From 1b8135bf011ac58e99254424c2dbf0128aaf2102 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 25 Sep 2003 02:41:31 +0000 Subject: "" svn path=/trunk/; revision=1025 --- externals/grill/flext/config-pd-darwin.txt | 5 --- externals/grill/flext/flext.cw | Bin 789029 -> 880367 bytes externals/grill/flext/makefile.pd-darwin | 56 +++++++++++++++++------------ externals/grill/flext/makefile.pd-linux | 3 ++ 4 files changed, 36 insertions(+), 28 deletions(-) (limited to 'externals/grill/flext') diff --git a/externals/grill/flext/config-pd-darwin.txt b/externals/grill/flext/config-pd-darwin.txt index 1fa58fb9..91e59edd 100644 --- a/externals/grill/flext/config-pd-darwin.txt +++ b/externals/grill/flext/config-pd-darwin.txt @@ -26,8 +26,3 @@ INSTDIR=/usr/local/lib/pd/flext # additional compiler flags # (check if they fit for your system!) UFLAGS=-DFLEXT_USE_SIMD -malign-power -maltivec -faltivec - -# define to use old library naming for backwards compatibility -# ("flext.a" instead of new "libflext.a" etc.) -V4_NAMING=1 - diff --git a/externals/grill/flext/flext.cw b/externals/grill/flext/flext.cw index 60cdd1eb..5810f001 100644 Binary files a/externals/grill/flext/flext.cw and b/externals/grill/flext/flext.cw differ diff --git a/externals/grill/flext/makefile.pd-darwin b/externals/grill/flext/makefile.pd-darwin index d431a010..a8bb24be 100644 --- a/externals/grill/flext/makefile.pd-darwin +++ b/externals/grill/flext/makefile.pd-darwin @@ -14,12 +14,25 @@ include ${CONFIG} # compiler+linker stuff INCLUDES=${PDPATH} -FLAGS=-DFLEXT_SYS=2 -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes -FLAGS+=${UFLAGS} -CFLAGS=-O6 +FLAGS=-DFLEXT_SYS=2 ${UFLAGS} + +# compiler flags for optimized build +CFLAGS=-O2 + +# compiler flags for debug build CFLAGS_D=-g + +# additional flags for threading CFLAGS_T=-DFLEXT_THREADS -LIBS=gcc + +# additional flags for shared library +CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS + +# flags for shared linking +LSHFLAGS= -dylib -dynamic -flat_namespace -undefined suppress + +# frameworks +FRAMEWORKS=Carbon veclib # ---------------------------------------------- @@ -28,7 +41,7 @@ LIBS=gcc NAME=flext -SRCDIR=source +SRCDIR=./source # all the source files from the package include make-files.txt @@ -45,24 +58,17 @@ SRCS+=$(SRCS_STK) HDRS+=$(HDRS_STK) endif -# for FLEXT_USE_SIMD -CFLAGS+=-framework Carbon -framework veclib -Fveclib -FCarbon MAKEFILE=makefile.pd-darwin -ifndef V4_NAMING + TARGET=$(TARGDIR)/lib$(NAME).a TARGET_D=$(TARGDIR)/lib$(NAME)_d.a TARGET_T=$(TARGDIR)/lib$(NAME)_t.a TARGET_TD=$(TARGDIR)/lib$(NAME)_td.a -else -TARGET=$(TARGDIR)/$(NAME).a -TARGET_D=$(TARGDIR)/$(NAME)_d.a -TARGET_T=$(TARGDIR)/$(NAME)_t.a -TARGET_TD=$(TARGDIR)/$(NAME)_td.a -endif TARGET_S=$(TARGDIR)/lib$(NAME).dylib TARGET_SD=$(TARGDIR)/lib$(NAME)_d.dylib + all: $(TARGDIR) $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD) $(TARGDIR): @@ -72,22 +78,22 @@ $(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(patsubst touch $@ $(TARGDIR)/%.o : $(SRCDIR)/%.cpp - $(CXX) -c -dynamic $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@ + $(CXX) -c -dynamic $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@ $(TARGDIR)/%.do : $(SRCDIR)/%.cpp - $(CXX) -c -dynamic $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@ + $(CXX) -c -dynamic $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@ $(TARGDIR)/%.to : $(SRCDIR)/%.cpp - $(CXX) -c -dynamic $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@ + $(CXX) -c -dynamic $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@ $(TARGDIR)/%.tdo : $(SRCDIR)/%.cpp - $(CXX) -c -dynamic $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@ + $(CXX) -c -dynamic $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@ $(TARGDIR)/%.so : $(SRCDIR)/%.cpp - $(CXX) -c -dynamic $(CFLAGS) $(CFLAGS_T) $(FLAGS) -DFLEXT_SHARED $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@ + $(CXX) -c -dynamic $(CFLAGS) $(CFLAGS_T) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@ -$(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp - $(CXX) -c -dynamic $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) -DFLEXT_SHARED $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@ +$(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp + $(CXX) -c -dynamic $(CFLAGS_D) $(CFLAGS_T) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@ $(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) libtool -static -o $@ $^ @@ -102,10 +108,10 @@ $(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS)) libtool -static -o $@ $^ $(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.so,$(SRCS)) - ld -dylib -dynamic -flat_namespace -undefined suppress -lgcc -lstdc++ -ldylib1.o -o $@ $^ + ld $(LSHFLAGS) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS)) $(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS)) - ld -dylib -dynamic -flat_namespace -undefined suppress -lgcc -lstdc++ -ldylib1.o -o $@ $^ + ld $(LSHFLAGS) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS)) .PHONY: clean install @@ -123,6 +129,10 @@ install:: $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD cp $^ $(INSTDIR) mv $(INSTDIR)/lib*.dylib /usr/local/lib ranlib $(INSTDIR)/*.a # have to rerun ranlib at install dir ?! + + #make compatibility links for old-style naming + for i in $(foreach f,$(notdir $(filter %.a,$^)),$(patsubst lib%.a,%,$(f))); do rm -f $(INSTDIR)/$$i.a && ln -sf lib$$i.a $(INSTDIR)/$$i.a; done + # chmod 755 $(patsubst %,$(INSTDIR)/%,$(notdir $^)) # chgrp admin $(patsubst %,$(INSTDIR)/%,$(notdir $^)) diff --git a/externals/grill/flext/makefile.pd-linux b/externals/grill/flext/makefile.pd-linux index a5a3e241..7e77f7f4 100644 --- a/externals/grill/flext/makefile.pd-linux +++ b/externals/grill/flext/makefile.pd-linux @@ -144,6 +144,9 @@ endif install:: $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD) $(patsubst %,$(SRCDIR)/%,$(HDRS)) cp $^ $(INSTDIR) + + #make compatibility links for old-style naming for i in $(foreach f,$(notdir $(filter %.a,$^)),$(patsubst lib%.a,%,$(f))); do rm -f $(INSTDIR)/$$i.a && ln -sf lib$$i.a $(INSTDIR)/$$i.a; done + chmod a+r $(patsubst %,$(INSTDIR)/%,$(notdir $^)) chown root.users $(patsubst %,$(INSTDIR)/%,$(notdir $^)) -- cgit v1.2.1