Update of /cvsroot/pure-data/externals/grill/flext/buildsys/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21881/buildsys/mac
Modified Files: make-gcc.inc Log Message: build system for OSX updated build system
Index: make-gcc.inc =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/buildsys/mac/make-gcc.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** make-gcc.inc 20 Dec 2004 05:06:17 -0000 1.1 --- make-gcc.inc 30 Dec 2004 04:58:24 -0000 1.2 *************** *** 1,5 **** ! LDFLAGS += -Wl,-x -framework ApplicationServices -framework vecLib
! ifdef DEBUG CFLAGS += -g -D_DEBUG else --- 1,13 ---- ! ifndef FLEXTBUILD ! INCPATH += -I$(FLEXTPATH) ! LIBPATH += -L$(FLEXTPATH) ! LIBS+=$(FLEXTPATH)/$(FLEXTNAME).a ! endif
! LDFLAGS += -Wl,-x -framework ApplicationServices -framework vecLib -dynamiclib -dynamic ! ! ############################################## ! ! ifndef DEBUG CFLAGS += -g -D_DEBUG else *************** *** 10,68 **** ##############################################
! 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) --- 18,102 ---- ##############################################
! ifdef FLEXTBUILD ! OUTNAME=$(FLEXTNAME)
ifdef SHARED ! EXT=dylib ! else ! EXT=a ! BUILDLIB=1 ! endif
else ! OUTNAME=$(NAME) ! endif
! ##############################################
! OBJPATH=$(OUTPATH)/$(OUTSUB) ! ! ifdef FLEXTBUILD ! TARGETPATH=$(OBJPATH) ! TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) ! else ! TARGETPATH=$(OBJPATH)/$(OUTNAME).$(EXT)/Contents/MacOS ! TARGET=$(TARGETPATH)/$(OUTNAME) endif
##############################################
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) ! COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS))) ! CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS)))
# default target ! _all_: $(TARGET)
$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) touch $@
! $(OBJPATH): ! -mkdir -p $@
! $(TARGETPATH): ! -mkdir -p $@ ! ! $(OBJPATH)/%.opp : $(SRCDIR)/%.cpp $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
! $(OBJPATH)/%.o : $(SRCDIR)/%.c $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
! $(TARGET) :: $(OBJPATH) $(TARGETPATH) ! ! $(TARGET) :: $(COBJS) $(CPPOBJS) ! ifdef BUILDLIB ! libtool -static -o $@ $(COBJS) $(CPPOBJS) ! else ! # $(CXX) $(LDFLAGS) $(LIBPATH) -dylib_install_name $(INSTPATH)/$(notdir $@) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) ! $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) chmod 755 $@ + endif + + ############################################## + + _clean_: + rm $(COBJS) $(CPPOBJS) $(TARGET) + + ##############################################
$(INSTPATH): ! -mkdir -p $@
! $(FLEXTPATH): ! -mkdir -p $@
! _install_:: $(INSTPATH) $(FLEXTPATH)
! _install_:: $(TARGET) ! ifdef FLEXTBUILD ! cp $(TARGET) $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTPATH) ! else ! install $(TARGET) $(INSTPATH) ! endif