aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/buildsys
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2004-12-30 04:58:25 +0000
committerThomas Grill <xovo@users.sourceforge.net>2004-12-30 04:58:25 +0000
commitdf2969c21530e66b61b85a75644ab3aef2ecb7ee (patch)
tree33732754c80415705dea5d735aa831ada6daf6f9 /externals/grill/flext/buildsys
parenta6191b14a38c4ffb858d89da2c82cc00600f9733 (diff)
build system for OSX
updated build system svn path=/trunk/; revision=2436
Diffstat (limited to 'externals/grill/flext/buildsys')
-rw-r--r--externals/grill/flext/buildsys/config-mac-max-gcc.txt16
-rw-r--r--externals/grill/flext/buildsys/config-mac-pd-gcc.txt18
-rw-r--r--externals/grill/flext/buildsys/mac/make-gcc.inc94
-rw-r--r--externals/grill/flext/buildsys/mac/max/config-gcc.def16
-rw-r--r--externals/grill/flext/buildsys/mac/max/make-gcc.inc7
-rw-r--r--externals/grill/flext/buildsys/mac/pd/config-gcc.def4
-rw-r--r--externals/grill/flext/buildsys/win/make-cygwin.inc7
7 files changed, 126 insertions, 36 deletions
diff --git a/externals/grill/flext/buildsys/config-mac-max-gcc.txt b/externals/grill/flext/buildsys/config-mac-max-gcc.txt
new file mode 100644
index 00000000..b10869b2
--- /dev/null
+++ b/externals/grill/flext/buildsys/config-mac-max-gcc.txt
@@ -0,0 +1,16 @@
+# where are the Max/MSP SDK header files?
+# you should have the latest version!
+MAXSDKPATH=/Volumes/Daten/Prog/MaxMSP-SDK/4.5\ headers/c74support
+
+# where should the external be installed?
+INSTPATH=/Library/Application\ Support/Cycling\ \'74/externals
+
+# where do the flext headers and libraries reside?
+FLEXTPATH=/Library/Application\ Support/Cycling\ \'74/flext
+
+# where should the external be built?
+OUTPATH=max-darwin
+
+# user defined compiler flags
+# (check if they match your system!)
+OFLAGS=-O2 -mcpu=G4 -malign-natural -maltivec -faltivec
diff --git a/externals/grill/flext/buildsys/config-mac-pd-gcc.txt b/externals/grill/flext/buildsys/config-mac-pd-gcc.txt
new file mode 100644
index 00000000..e15b67a6
--- /dev/null
+++ b/externals/grill/flext/buildsys/config-mac-pd-gcc.txt
@@ -0,0 +1,18 @@
+# where is the PD installation including source code?
+PDPATH=/Applications/Pd-0.38-0test10.app/Contents/Resources
+
+# where is the PD executable?
+PDBIN=$(PDPATH)/bin/pd
+
+# where should the external be installed?
+INSTPATH=$(PDPATH)/extra
+
+# where do the flext headers and libraries reside?
+FLEXTPATH=$(PDPATH)/flext
+
+# where should the external be built?
+OUTPATH=pd-darwin
+
+# user defined compiler flags
+# (check if they match your system!)
+OFLAGS=-O2 -mcpu=G4 -malign-natural -maltivec -faltivec
diff --git a/externals/grill/flext/buildsys/mac/make-gcc.inc b/externals/grill/flext/buildsys/mac/make-gcc.inc
index 39f4849a..a7f6c511 100644
--- a/externals/grill/flext/buildsys/mac/make-gcc.inc
+++ b/externals/grill/flext/buildsys/mac/make-gcc.inc
@@ -1,6 +1,14 @@
-LDFLAGS += -Wl,-x -framework ApplicationServices -framework vecLib
+ifndef FLEXTBUILD
+INCPATH += -I$(FLEXTPATH)
+LIBPATH += -L$(FLEXTPATH)
+LIBS+=$(FLEXTPATH)/$(FLEXTNAME).a
+endif
+
+LDFLAGS += -Wl,-x -framework ApplicationServices -framework vecLib -dynamiclib -dynamic
-ifdef DEBUG
+##############################################
+
+ifndef DEBUG
CFLAGS += -g -D_DEBUG
else
CFLAGS += $(OFLAGS) -DNDEBUG
@@ -9,60 +17,86 @@ endif
##############################################
-INCPATH += -I$(FLEXTPATH)
-LIBPATH += -L$(FLEXTPATH)
+ifdef FLEXTBUILD
+OUTNAME=$(FLEXTNAME)
ifdef SHARED
-# --- shared ---
-DEFS += -DFLEXT_SHARED
+EXT=dylib
+else
+EXT=a
+BUILDLIB=1
+endif
else
-ifdef THREADED
-# --- static multi-threaded ---
-DEFS += -DFLEXT_THREADS
+OUTNAME=$(NAME)
+endif
-else
-# --- static single-threaded ---
+##############################################
-endif
+OBJPATH=$(OUTPATH)/$(OUTSUB)
+
+ifdef FLEXTBUILD
+TARGETPATH=$(OBJPATH)
+TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT)
+else
+TARGETPATH=$(OBJPATH)/$(OUTNAME).$(EXT)/Contents/MacOS
+TARGET=$(TARGETPATH)/$(OUTNAME)
endif
##############################################
-TARGET=$(OUTPATH)/$(NAME).$(EXT)
-
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS)))
-COBJS=$(patsubst %.c,$(OUTPATH)/%.o,$(filter %.c,$(SRCS)))
-CPPOBJS=$(patsubst %.cpp,$(OUTPATH)/%.opp,$(filter %.cpp,$(SRCS)))
+COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS)))
+CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS)))
# default target
-all: $(OUTPATH) $(TARGET)
+_all_: $(TARGET)
$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
touch $@
-$(OUTPATH):
- mkdir $(OUTPATH)
+$(OBJPATH):
+ -mkdir -p $@
-$(OUTPATH)/%.opp : $(SRCDIR)/%.cpp
+$(TARGETPATH):
+ -mkdir -p $@
+
+$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
-$(OUTPATH)/%.o : $(SRCDIR)/%.c
+$(OBJPATH)/%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
-$(TARGET) : $(COBJS) $(CPPOBJS)
- $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+$(TARGET) :: $(OBJPATH) $(TARGETPATH)
+
+$(TARGET) :: $(COBJS) $(CPPOBJS)
+ifdef BUILDLIB
+ libtool -static -o $@ $(COBJS) $(CPPOBJS)
+else
+# $(CXX) $(LDFLAGS) $(LIBPATH) -dylib_install_name $(INSTPATH)/$(notdir $@) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
+ $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
chmod 755 $@
+endif
+
+##############################################
+
+_clean_:
+ rm $(COBJS) $(CPPOBJS) $(TARGET)
+
+##############################################
$(INSTPATH):
- mkdir $(INSTPATH)
+ -mkdir -p $@
-install:: $(INSTPATH)
+$(FLEXTPATH):
+ -mkdir -p $@
-install:: $(TARGET)
- install $^ $(INSTPATH)
+_install_:: $(INSTPATH) $(FLEXTPATH)
-.PHONY: clean
-clean:
- $(RM) $(COBJS) $(CPPOBJS) $(TARGET)
+_install_:: $(TARGET)
+ifdef FLEXTBUILD
+ cp $(TARGET) $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTPATH)
+else
+ install $(TARGET) $(INSTPATH)
+endif
diff --git a/externals/grill/flext/buildsys/mac/max/config-gcc.def b/externals/grill/flext/buildsys/mac/max/config-gcc.def
new file mode 100644
index 00000000..b10869b2
--- /dev/null
+++ b/externals/grill/flext/buildsys/mac/max/config-gcc.def
@@ -0,0 +1,16 @@
+# where are the Max/MSP SDK header files?
+# you should have the latest version!
+MAXSDKPATH=/Volumes/Daten/Prog/MaxMSP-SDK/4.5\ headers/c74support
+
+# where should the external be installed?
+INSTPATH=/Library/Application\ Support/Cycling\ \'74/externals
+
+# where do the flext headers and libraries reside?
+FLEXTPATH=/Library/Application\ Support/Cycling\ \'74/flext
+
+# where should the external be built?
+OUTPATH=max-darwin
+
+# user defined compiler flags
+# (check if they match your system!)
+OFLAGS=-O2 -mcpu=G4 -malign-natural -maltivec -faltivec
diff --git a/externals/grill/flext/buildsys/mac/max/make-gcc.inc b/externals/grill/flext/buildsys/mac/max/make-gcc.inc
new file mode 100644
index 00000000..fb5a40ca
--- /dev/null
+++ b/externals/grill/flext/buildsys/mac/max/make-gcc.inc
@@ -0,0 +1,7 @@
+DEFS += -DFLEXT_SYS=1
+
+INCPATH += -I$(MAXSDKPATH)/max-includes -I$(MAXSDKPATH)/msp-includes
+
+LDFLAGS += -framework MaxAPI -framework MaxAudioAPI
+
+EXT=mxo
diff --git a/externals/grill/flext/buildsys/mac/pd/config-gcc.def b/externals/grill/flext/buildsys/mac/pd/config-gcc.def
index 1f8ab2cd..9793e4a3 100644
--- a/externals/grill/flext/buildsys/mac/pd/config-gcc.def
+++ b/externals/grill/flext/buildsys/mac/pd/config-gcc.def
@@ -1,5 +1,5 @@
-# where is the PD installation?
-PDPATH=/usr/local/lib/pd
+# where is the PD installation including source code?
+PDPATH=/Applications/Pd-0.38-0test10.app/Contents/Resources
# where is the PD executable?
PDBIN=/usr/local/bin/pd
diff --git a/externals/grill/flext/buildsys/win/make-cygwin.inc b/externals/grill/flext/buildsys/win/make-cygwin.inc
index beaeef83..6841cf7e 100644
--- a/externals/grill/flext/buildsys/win/make-cygwin.inc
+++ b/externals/grill/flext/buildsys/win/make-cygwin.inc
@@ -50,8 +50,7 @@ $(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
touch $@
$(TARGETPATH):
- -mkdir $(OUTPATH)
- -mkdir $@
+ -mkdir -p $@
$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
@@ -77,10 +76,10 @@ _clean_:
##############################################
$(INSTPATH):
- -mkdir $@
+ -mkdir -p $@
$(FLEXTPATH):
- -mkdir $@
+ -mkdir -p $@
_install_:: $(INSTPATH) $(FLEXTPATH)