diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-01-04 04:58:53 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-01-04 04:58:53 +0000 |
commit | 7d237bf606940cede753ae1c07a59c1ec24027bf (patch) | |
tree | 4366a0c71e09acb4e89556964d4e23f6e3fe7631 /externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc | |
parent | 71b359c9eeb0071f6a1dfa2befb07a619b1e75c4 (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/gnumake-gcc-ext.inc')
-rw-r--r-- | externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc | 33 |
1 files changed, 26 insertions, 7 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)
|