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-flext.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-flext.inc')
-rw-r--r-- | externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc | 33 |
1 files changed, 23 insertions, 10 deletions
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)
|