Update of /cvsroot/pure-data/externals/grill/flext/buildsys/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2923/buildsys/mac
Modified Files: gnumake-gcc-ext.inc gnumake-gcc-flext.inc gnumake-gcc.inc Added Files: gnumake-gcc-targets.inc Log Message: PD: possibility to create DSP objects without main DSP inlet (use FLEXT_DSP0_NEW or similar) fixing typo support for multiple archs under OSX small fix for ppc arch architecture-specific compiler flags for UB under OSX fixed severe Altivec bug changed eol-style corrections to config build templates added xcode 2.4 project fixed atom sorting (now also respect symbol content) no stripping of local symbols some fixes, mostly OS X updated build system for Max with MinGW better default values fixed bug in AtomList copying
--- NEW FILE: gnumake-gcc-targets.inc --- ##############################################
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 _build_: $(TARGET)
$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) touch $@
# Attention: $@ doesn't work for paths with spaces.... $(OBJPATH): -mkdir -p $(OBJPATH)
# Attention: $@ doesn't work for paths with spaces.... $(TARGETPATH): -mkdir -p $(TARGETPATH)
##### precompiled header file ###################
ifdef PRECOMPILE PRECOMSRC := $(SRCDIR)/$(PRECOMPILE) else PRECOMSRC := $(FLEXTINC)/flext.h endif
ifdef PRECOMSRC PRECOMDST := $(OBJPATH)/$(notdir $(PRECOMSRC)).gch PRECOMINC := -I $(OBJPATH) endif
$(PRECOMDST) : $(PRECOMSRC) $(patsubst %,$(SRCDIR)/%,$(HDRS)) -mkdir -p $(dir $@) $(CXX) -c $(DEFS) $(INCPATH) $(PRECOMSRC) -o $@
##### architecture-specific compilation ###################
define ARCH_COMPILE $(OBJPATH)/%.opp_$(1) : $(SRCDIR)/%.cpp -mkdir -p $(dir $$@) $(CXX) -c $(CFLAGS) -arch $(1) $$(CFLAGS_$(1)) $(DEFS) $(PRECOMINC) $(INCPATH) $$^ -o $$@
$(OBJPATH)/%.o_$(1) : $(SRCDIR)/%.c -mkdir -p $(dir $$@) $(CC) -c $(CFLAGS) -arch $(1) $$(CFLAGS_$(1)) $(DEFS) $(INCPATH) $$^ -o $$@ endef
# implement for all archs in ARCH $(foreach arch,$(ARCH),$(eval $(call ARCH_COMPILE,$(arch))))
##### make fat object file ###################
$(OBJPATH)/%.opp : $(foreach arch,$(ARCH),$(OBJPATH)/%.opp_$(arch)) lipo $^ -create -output $@
$(OBJPATH)/%.o : $(foreach arch,$(ARCH),$(OBJPATH)/%.o_$(arch)) lipo $^ -create -output $@
##############################################
_clean_: -rm -r $(TARGETPATH) -rm -r $(OBJPATH)
##############################################
Index: gnumake-gcc.inc =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/buildsys/mac/gnumake-gcc.inc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gnumake-gcc.inc 21 Jul 2005 08:37:02 -0000 1.8 --- gnumake-gcc.inc 20 Jan 2007 14:26:02 -0000 1.9 *************** *** 2,31 ****
ifneq (,$(findstring Frameworks,$(FLEXTPREFIX))) ! FLEXTFRAMEWORK=$(FLEXTPREFIX)/flext.framework endif
ifdef FLEXTFRAMEWORK ifndef FLEXTLIB ! FLEXTLIB=$(FLEXTFRAMEWORK) endif ifndef FLEXTINC ! FLEXTINC=$(FLEXTFRAMEWORK)/Headers endif ifndef FLEXTSYS ! FLEXTSYS=$(FLEXTFRAMEWORK)/Resources endif else ifndef FLEXTLIB ! FLEXTLIB=$(FLEXTPREFIX)/lib endif ifndef FLEXTINC ! FLEXTINC=$(FLEXTPREFIX)/include/flext endif ifndef FLEXTSYS ! FLEXTSYS=$(FLEXTPREFIX)/lib/flext endif endif
! FLEXTBIN=$(FLEXTPREFIX)/bin
############################################## --- 2,31 ----
ifneq (,$(findstring Frameworks,$(FLEXTPREFIX))) ! FLEXTFRAMEWORK := $(FLEXTPREFIX)/flext.framework endif
ifdef FLEXTFRAMEWORK ifndef FLEXTLIB ! FLEXTLIB := $(FLEXTFRAMEWORK) endif ifndef FLEXTINC ! FLEXTINC := $(FLEXTFRAMEWORK)/Headers endif ifndef FLEXTSYS ! FLEXTSYS := $(FLEXTFRAMEWORK)/Resources endif else ifndef FLEXTLIB ! FLEXTLIB := $(FLEXTPREFIX)/lib endif ifndef FLEXTINC ! FLEXTINC := $(FLEXTPREFIX)/include/flext endif ifndef FLEXTSYS ! FLEXTSYS := $(FLEXTPREFIX)/lib/flext endif endif
! FLEXTBIN := $(FLEXTPREFIX)/bin
############################################## *************** *** 47,48 **** --- 47,56 ---- endif
+ ############################################## + + LDFLAGS += $(patsubst %,-arch %,$(ARCH)) + + ifdef OSXSDK + CFLAGS += -isysroot $(OSXSDK) + LDFLAGS += -isysroot $(OSXSDK) + endif
Index: gnumake-gcc-ext.inc =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gnumake-gcc-ext.inc 1 Sep 2005 23:29:52 -0000 1.6 --- gnumake-gcc-ext.inc 20 Jan 2007 14:26:01 -0000 1.7 *************** *** 5,51 **** 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))) ! 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 ! _build_: $(TARGET) ! ! $(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) ! touch $@ ! ! # Attention: $@ doesn't work for paths with spaces.... ! $(OBJPATH): ! -mkdir -p $(OBJPATH) ! ! # Attention: $@ doesn't work for paths with spaces.... ! $(TARGETPATH): ! -mkdir -p $(TARGETPATH) ! ! $(PRECOMDST) : $(PRECOMSRC) $(patsubst %,$(SRCDIR)/%,$(HDRS)) ! $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $(PRECOMSRC) -o $@ ! ! $(OBJPATH)/%.opp : $(SRCDIR)/%.cpp ! $(CXX) -c $(CFLAGS) $(DEFS) $(PRECOMINC) $(INCPATH) $< -o $@
! $(OBJPATH)/%.o : $(SRCDIR)/%.c ! $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) :: $(OBJPATH) $(TARGETPATH) --- 5,12 ---- LIBS += -l$(FLEXTNAME)
! # common compilation stuff ! include $(BUILDPATH)$(PLATFORM)/gnumake-gcc-targets.inc
! ##### linking ###################
$(TARGET) :: $(OBJPATH) $(TARGETPATH) *************** *** 66,76 **** endif
! ############################################## ! ! _clean_: ! -rm -r $(TARGETPATH) ! -rm -r $(OBJPATH) ! ! ##############################################
# Attention: $@ doesn't work for paths with spaces.... --- 27,31 ---- endif
! ###################################
# Attention: $@ doesn't work for paths with spaces....
Index: gnumake-gcc-flext.inc =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gnumake-gcc-flext.inc 9 Aug 2005 11:02:16 -0000 1.7 --- gnumake-gcc-flext.inc 20 Jan 2007 14:26:01 -0000 1.8 *************** *** 8,44 **** 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 ! _build_: $(TARGET) ! ! $(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) ! touch $@ ! ! $(OBJPATH): ! -mkdir -p $@ ! ! $(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) $(PRECOMINC) $(INCPATH) $< -o $@
! $(OBJPATH)/%.o : $(SRCDIR)/%.c ! $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) :: $(OBJPATH) $(TARGETPATH) --- 8,15 ---- endif
! # common compilation stuff ! include $(BUILDPATH)$(PLATFORM)/gnumake-gcc-targets.inc
! ##### linking ###################
$(TARGET) :: $(OBJPATH) $(TARGETPATH) *************** *** 59,69 **** endif
! ############################################## ! ! _clean_: ! -rm -r $(TARGETPATH) ! -rm -r $(OBJPATH)
! ##############################################
$(FLEXTINC): --- 30,38 ---- endif
! ifdef TARGETPOST ! $(TARGET) :: $(TARGETPOST) ! endif
! ###################################
$(FLEXTINC):