aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/buildsys/mac
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-01-04 04:58:53 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-01-04 04:58:53 +0000
commit7d237bf606940cede753ae1c07a59c1ec24027bf (patch)
tree4366a0c71e09acb4e89556964d4e23f6e3fe7631 /externals/grill/flext/buildsys/mac
parent71b359c9eeb0071f6a1dfa2befb07a619b1e75c4 (diff)
updated build system - some cleanups
updated for build system updated build system for OSX cleanups updated build system svn path=/trunk/; revision=2458
Diffstat (limited to 'externals/grill/flext/buildsys/mac')
-rw-r--r--externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc33
-rw-r--r--externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc33
-rw-r--r--externals/grill/flext/buildsys/mac/gnumake-gcc.inc2
-rw-r--r--externals/grill/flext/buildsys/mac/max/config-gcc.def2
-rw-r--r--externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc3
-rw-r--r--externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc2
-rw-r--r--externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc2
-rw-r--r--externals/grill/flext/buildsys/mac/pd/gnumake-gcc-flext.inc2
-rw-r--r--externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc3
9 files changed, 59 insertions, 23 deletions
diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc
index ad4e2856..66a86234 100644
--- a/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc
+++ b/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc
@@ -4,6 +4,18 @@ INCPATH += -I$(FLEXTINC)
LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)
LIBS += -l$(FLEXTNAME)
+# obviously header precompilation os still buggy with gcc 3.3
+
+ifdef PRECOMPILE
+#PRECOMSRC=$(SRCDIR)/$(PRECOMPILE)
+else
+#PRECOMSRC=$(FLEXTINC)/flext.h
+endif
+ifdef PRECOMSRC
+PRECOMDST=$(OBJPATH)/$(notdir $(PRECOMSRC)).gch
+PRECOMINC = -include $(OBJPATH)/$(notdir $(PRECOMSRC))
+endif
+
##############################################
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
@@ -19,33 +31,40 @@ _build_: $(TARGET)
$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
touch $@
+# Attention: $@ doesn't work for paths with spaces....
$(OBJPATH):
- -mkdir -p $@
+ -mkdir -p $(OBJPATH)
+# Attention: $@ doesn't work for paths with spaces....
$(TARGETPATH):
- -mkdir -p $@
+ -mkdir -p $(TARGETPATH)
+
+$(PRECOMDST) : $(PRECOMSRC) $(patsubst %,$(SRCDIR)/%,$(HDRS))
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $(PRECOMSRC) -o $@
$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
- $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+ $(CXX) -c $(CFLAGS) $(DEFS) $(PRECOMINC) $(INCPATH) $< -o $@
$(OBJPATH)/%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) :: $(OBJPATH) $(TARGETPATH)
-$(TARGET) :: $(COBJS) $(CPPOBJS)
+$(TARGET) :: $(PRECOMDST) $(COBJS) $(CPPOBJS)
$(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
chmod 755 $@
##############################################
_clean_:
- rm $(COBJS) $(CPPOBJS) $(TARGET)
+ -rm -r $(TARGETPATH)
+ -rm -r $(OBJPATH)
##############################################
+# Attention: $@ doesn't work for paths with spaces....
$(INSTPATH):
- -mkdir -p $@
+ -mkdir -p $(INSTPATH)
_install_:: $(INSTPATH)
- install $(TARGET) $(INSTPATH)
+ cp -R $(INSTTARGET) $(INSTPATH)
diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc
index 1baafe86..b7c0ef8e 100644
--- a/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc
+++ b/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc
@@ -1,6 +1,8 @@
# build class specific settings
-
-#LDFLAGS += -dylib_install_name $(FLEXTSHLIB)
+
+ifdef SHARED
+#LDFLAGS += -dylib_install_name $(FLEXTSHLIB)/$(OUTNAME).$(EXT)
+endif
##############################################
@@ -21,26 +23,36 @@ $(OBJPATH):
$(TARGETPATH):
-mkdir -p $@
+ifdef PRECOMPILE
+PRECOMSRC=$(SRCDIR)/$(PRECOMPILE)
+PRECOMDST=$(OBJPATH)/$(notdir $(PRECOMSRC)).gch
+PRECOMINC = -include $(OBJPATH)/$(notdir $(PRECOMSRC))
+endif
+
+$(PRECOMDST): $(PRECOMSRC) $(patsubst %,$(SRCDIR)/%,$(HDRS))
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $(PRECOMSRC) -o $@
+
$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
- $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+ $(CXX) -c $(CFLAGS) $(DEFS) $(PRECOMINC) $(INCPATH) $< -o $@
$(OBJPATH)/%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) :: $(OBJPATH) $(TARGETPATH)
-$(TARGET) :: $(COBJS) $(CPPOBJS)
+$(TARGET) :: $(PRECOMDST) $(COBJS) $(CPPOBJS)
ifdef SHARED
$(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
chmod 755 $@
-else
+else
libtool -static -o $@ $(COBJS) $(CPPOBJS)
endif
-
+
##############################################
_clean_:
- rm $(COBJS) $(CPPOBJS) $(TARGET)
+ -rm -r $(TARGETPATH)
+ -rm -r $(OBJPATH)
##############################################
@@ -57,8 +69,9 @@ $(FLEXTLIBINST):
-mkdir -p $@
_install_: $(FLEXTINC) $(FLEXTLIBINST)
- install $(TARGET) $(FLEXTLIBINST)
-ifndef SHARED
- ranlib $(FLEXTLIBINST)/$(OUTNAME).$(EXT) # have to rerun ranlib at install dir ?!
+ install $(TARGET) $(FLEXTLIBINST)
+ifndef SHARED
+# have to rerun ranlib at install dir ?!
+ ranlib $(FLEXTLIBINST)/$(notdir $(TARGET))
endif
install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTINC)
diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc.inc
index 4567ec41..661c422d 100644
--- a/externals/grill/flext/buildsys/mac/gnumake-gcc.inc
+++ b/externals/grill/flext/buildsys/mac/gnumake-gcc.inc
@@ -4,7 +4,7 @@ LDFLAGS += -dynamic -Wl,-x -framework ApplicationServices -framework vecLib
##############################################
-ifndef DEBUG
+ifdef DEBUG
CFLAGS += -g -D_DEBUG
else
CFLAGS += $(OFLAGS) -DNDEBUG
diff --git a/externals/grill/flext/buildsys/mac/max/config-gcc.def b/externals/grill/flext/buildsys/mac/max/config-gcc.def
index 41c0b490..de6c6632 100644
--- a/externals/grill/flext/buildsys/mac/max/config-gcc.def
+++ b/externals/grill/flext/buildsys/mac/max/config-gcc.def
@@ -19,7 +19,7 @@ FLEXTSHLIB=$(FLEXTLIB)
OUTPATH=max-darwin
# where should the external be installed?
-INSTPATH=/Library/Application\ Support/Cycling\ \'74/externals
+INSTPATH=/Library/Application\ Support/Cycling\ \'74/externals/flext
###############################################################
diff --git a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc
index 24d90d60..85e01a75 100644
--- a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc
+++ b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc
@@ -4,5 +4,6 @@ EXT=mxo
OBJPATH=$(OUTPATH)/$(OUTSUB)
-TARGETPATH=$(OBJPATH)/$(OUTNAME).$(EXT)/Contents/MacOS
+INSTTARGET=$(OBJPATH)/$(OUTNAME).$(EXT)
+TARGETPATH=$(INSTTARGET)/Contents/MacOS
TARGET=$(TARGETPATH)/$(OUTNAME)
diff --git a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc
index 4cb53259..b99cfec7 100644
--- a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc
+++ b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc
@@ -7,6 +7,8 @@ endif
##############################################
OBJPATH=$(OUTPATH)/$(OUTSUB)
+
TARGETPATH=$(OBJPATH)
TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT)
+INSTTARGET=$(TARGET)
diff --git a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc
index f52bc6db..90b71f03 100644
--- a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc
+++ b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc
@@ -1 +1,3 @@
EXT=pd_darwin
+
+LDFLAGS += -bundle -bundle_loader $(PDBIN)
diff --git a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-flext.inc
index 2ebf308d..7aa9b3b5 100644
--- a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-flext.inc
+++ b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-flext.inc
@@ -3,3 +3,5 @@ EXT=dylib
else
EXT=a
endif
+
+LDFLAGS += -dynamiclib -flat_namespace -undefined suppress
diff --git a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc
index ac805f09..f00d0569 100644
--- a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc
+++ b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc
@@ -3,11 +3,8 @@ DEFS += -DFLEXT_SYS=2
INCPATH += -I$(PDPATH)/src
LIBPATH += -L$(PDPATH)/bin
-LDFLAGS += -bundle -bundle_loader $(PDBIN)
-
##############################################
OBJPATH=$(OUTPATH)/$(OUTSUB)
TARGETPATH=$(OBJPATH)
TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT)
-