diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-09-25 02:41:31 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-09-25 02:41:31 +0000 |
commit | 1b8135bf011ac58e99254424c2dbf0128aaf2102 (patch) | |
tree | 53fbb0d1591b8c600ffc4bab809988a6ac7fe2a9 /externals/grill/dyn | |
parent | a5f318cbee05c698256bba3430ce0e81f8b1bedb (diff) |
""
svn path=/trunk/; revision=1025
Diffstat (limited to 'externals/grill/dyn')
-rw-r--r-- | externals/grill/dyn/build-pd-linux.sh | 2 | ||||
-rw-r--r-- | externals/grill/dyn/config-pd-linux.txt | 9 | ||||
-rw-r--r-- | externals/grill/dyn/makefile.pd-linux | 37 |
3 files changed, 34 insertions, 14 deletions
diff --git a/externals/grill/dyn/build-pd-linux.sh b/externals/grill/dyn/build-pd-linux.sh index 421cb6e1..413650f7 100644 --- a/externals/grill/dyn/build-pd-linux.sh +++ b/externals/grill/dyn/build-pd-linux.sh @@ -4,7 +4,7 @@ make -f makefile.pd-linux && { - if [ ${INSTPATH} != "" ]; then + if [ $INSTPATH != "" ]; then echo Now install as root su -c "make -f makefile.pd-linux install" fi diff --git a/externals/grill/dyn/config-pd-linux.txt b/externals/grill/dyn/config-pd-linux.txt index 9afaa255..8cb605be 100644 --- a/externals/grill/dyn/config-pd-linux.txt +++ b/externals/grill/dyn/config-pd-linux.txt @@ -12,7 +12,7 @@ # (the normal header file doesn't work as g_canvas.h is not there) # please note that currently the development branch (e.g devel_0_36) is needed # -PDPATH=/home/thomas/prog/pd-devel/src +PDPATH=/usr/src/pd-0.37-0/src # where do the flext libraries reside? FLEXTPATH=/usr/local/lib/pd/flext @@ -22,11 +22,14 @@ TARGDIR=./pd-linux # where should the external be installed? # (leave blank to omit installation) -#INSTPATH=/usr/local/lib/pd/extra +INSTPATH=/usr/local/lib/pd/extra # additional compiler flags # (check if they fit for your system!) -UFLAGS=-mcpu=pentiumpro # gcc 2.95 +# UFLAGS=-mcpu=pentiumpro # gcc 2.95 # UFLAGS=-mcpu=pentium3 -msse # gcc 3.2 +# define for shared build +#FLEXT_SHARED=1 + diff --git a/externals/grill/dyn/makefile.pd-linux b/externals/grill/dyn/makefile.pd-linux index 45c25f6c..3e858f1b 100644 --- a/externals/grill/dyn/makefile.pd-linux +++ b/externals/grill/dyn/makefile.pd-linux @@ -16,15 +16,31 @@ CONFIG=config-pd-linux.txt include $(CONFIG) -FLEXTLIB=$(FLEXTPATH)/flext.a # compiler+linker stuff INCLUDES=$(PDPATH) LIBPATH= -FLAGS=-DFLEXT_SYS=2 ${U_FLAGS} -CFLAGS=-O6 -#CFLAGS=-g -LIBS=m util +FLAGS=-DFLEXT_SYS=2 +CFLAGS=-O2 $(UFLAGS) +LIBS=stdc++ + + +ifdef FLEXT_SHARED +CFLAGS+=-shared -DFLEXT_SHARED +LDFLAGS+=-L $(FLEXTPATH) +LIBFLEXT=-lflext + +ifeq ($(CXX),icc) +LDFLAGS+=-i_dynamic +else +LDFLAGS+=-Wl,-Bdynamic +endif + +else + +LIBFLEXT=$(FLEXTPATH)/libflext.a + +endif # --------------------------------------------- @@ -43,21 +59,22 @@ TARGET=$(TARGDIR)/$(NAME).pd_linux # default target all: $(TARGDIR) $(TARGET) -$(patsubst %,$(DIR)/%,$(SRCS)): $(patsubst %,$(DIR)/%,$(HDRS)) $(FLEXTLIB) $(CONFIG) +$(patsubst %,$(DIR)/%,$(SRCS)): $(patsubst %,$(DIR)/%,$(HDRS)) $(MAKEFILE) $(CONFIG) touch $@ $(TARGDIR): - mkdir $(TARGDIR) + -mkdir $(TARGDIR) $(TARGDIR)/%.o : $(DIR)/%.cpp $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@ -$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) $(FLEXTLIB) - $(CXX) -shared $^ $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(LIBS)) -o $@ +$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) + $(CXX) -shared $(LDFLAGS) -o $@ $^ $(LIBFLEXT) $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(LIBS)) + strip --strip-unneeded $@ chmod 755 $@ $(INSTPATH): - mkdir $(INSTPATH) + -mkdir $(INSTPATH) install:: $(INSTPATH) |