From 6dacabe813f4ccab33669b5dd3e3b5f61be500af Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 20 Dec 2004 05:06:19 +0000 Subject: simplified make system updated make system for BCC updated make system updated build system svn path=/trunk/; revision=2416 --- externals/grill/flext/buildsys/mac/make-gcc.inc | 68 +++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 externals/grill/flext/buildsys/mac/make-gcc.inc (limited to 'externals/grill/flext/buildsys/mac/make-gcc.inc') diff --git a/externals/grill/flext/buildsys/mac/make-gcc.inc b/externals/grill/flext/buildsys/mac/make-gcc.inc new file mode 100644 index 00000000..39f4849a --- /dev/null +++ b/externals/grill/flext/buildsys/mac/make-gcc.inc @@ -0,0 +1,68 @@ +LDFLAGS += -Wl,-x -framework ApplicationServices -framework vecLib + +ifdef DEBUG +CFLAGS += -g -D_DEBUG +else +CFLAGS += $(OFLAGS) -DNDEBUG +LDFLAGS += -Wl,-S +endif + +############################################## + +INCPATH += -I$(FLEXTPATH) +LIBPATH += -L$(FLEXTPATH) + +ifdef SHARED +# --- shared --- +DEFS += -DFLEXT_SHARED + +else +ifdef THREADED +# --- static multi-threaded --- +DEFS += -DFLEXT_THREADS + +else +# --- static single-threaded --- + +endif +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))) + +# default target +all: $(OUTPATH) $(TARGET) + +$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) + touch $@ + +$(OUTPATH): + mkdir $(OUTPATH) + +$(OUTPATH)/%.opp : $(SRCDIR)/%.cpp + $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(OUTPATH)/%.o : $(SRCDIR)/%.c + $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGET) : $(COBJS) $(CPPOBJS) + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS) + chmod 755 $@ + +$(INSTPATH): + mkdir $(INSTPATH) + +install:: $(INSTPATH) + +install:: $(TARGET) + install $^ $(INSTPATH) + +.PHONY: clean +clean: + $(RM) $(COBJS) $(CPPOBJS) $(TARGET) -- cgit v1.2.1