aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/fftease
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-09-25 02:41:31 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-09-25 02:41:31 +0000
commit1b8135bf011ac58e99254424c2dbf0128aaf2102 (patch)
tree53fbb0d1591b8c600ffc4bab809988a6ac7fe2a9 /externals/grill/fftease
parenta5f318cbee05c698256bba3430ce0e81f8b1bedb (diff)
""
svn path=/trunk/; revision=1025
Diffstat (limited to 'externals/grill/fftease')
-rw-r--r--externals/grill/fftease/config-pd-linux.txt5
-rw-r--r--externals/grill/fftease/makefile.pd-linux37
2 files changed, 30 insertions, 12 deletions
diff --git a/externals/grill/fftease/config-pd-linux.txt b/externals/grill/fftease/config-pd-linux.txt
index 4a7b085a..7599bb50 100644
--- a/externals/grill/fftease/config-pd-linux.txt
+++ b/externals/grill/fftease/config-pd-linux.txt
@@ -9,7 +9,6 @@
# your c/c++ compilers (define only if not gcc/g++)
# CC=gcc
-# CXX=g++
# where are the PD header files?
# leave it blank if it is a system directory (like /usr/local/include),
@@ -28,7 +27,9 @@ 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/fftease/makefile.pd-linux b/externals/grill/fftease/makefile.pd-linux
index 8f2361ab..5982626c 100644
--- a/externals/grill/fftease/makefile.pd-linux
+++ b/externals/grill/fftease/makefile.pd-linux
@@ -17,15 +17,31 @@ CONFIG=config-pd-linux.txt
include $(CONFIG)
-FLEXTLIB=$(FLEXTPATH)/flext.a
-
# compiler+linker stuff
INCLUDES=$(PDPATH)
LIBPATH=
-FLAGS=-DFLEXT_SYS=2 -fno-exceptions -fno-rtti ${UFLAGS}
-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
+
+
# ---------------------------------------------
@@ -44,20 +60,21 @@ DIR=src
# default target
all: $(TARGDIR) $(TARGET)
-$(patsubst %,$(DIR)/%,$(SRCS)): $(patsubst %,$(DIR)/%,$(HDRS)) $(FLEXTLIB) $(MAKEFILE) $(CONFIG)
+$(patsubst %,$(DIR)/%,$(SRCS)): $(patsubst %,$(DIR)/%,$(HDRS)) $(MAKEFILE) $(CONFIG)
touch $@
$(TARGDIR):
mkdir $(TARGDIR)
$(TARGDIR)/%.o : $(DIR)/%.cpp
- $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@
+ $(CC) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@
$(TARGDIR)/%.co : $(DIR)/%.c
$(CC) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@
-$(TARGET) : $(patsubst %.c,$(TARGDIR)/%.co,$(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))) $(FLEXTLIB)
- $(CXX) -shared $^ -Wl,-s $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(LIBS)) -o $@
+$(TARGET) : $(patsubst %.c,$(TARGDIR)/%.co,$(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)))
+ $(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBFLEXT) $(patsubst %,-l%,$(LIBS))
+ strip --strip-unneeded $@
chmod 755 $@
$(INSTPATH):