From fa5a047a01effcc99b3390804f6c408a73b9ecf8 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sat, 20 Jan 2007 14:26:02 +0000 Subject: 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 svn path=/trunk/; revision=7368 --- .../flext/buildsys/mac/gnumake-gcc-targets.inc | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 externals/grill/flext/buildsys/mac/gnumake-gcc-targets.inc (limited to 'externals/grill/flext/buildsys/mac/gnumake-gcc-targets.inc') diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc-targets.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc-targets.inc new file mode 100644 index 00000000..c8804667 --- /dev/null +++ b/externals/grill/flext/buildsys/mac/gnumake-gcc-targets.inc @@ -0,0 +1,70 @@ +############################################## + +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) + +############################################## -- cgit v1.2.1