From 7d237bf606940cede753ae1c07a59c1ec24027bf Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 4 Jan 2005 04:58:53 +0000 Subject: updated build system - some cleanups updated for build system updated build system for OSX cleanups updated build system svn path=/trunk/; revision=2458 --- .../grill/flext/buildsys/mac/gnumake-gcc-ext.inc | 33 +++++++++++++++++----- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc') 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) -- cgit v1.2.1