aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/fftease/makefile.pd-linux
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/fftease/makefile.pd-linux')
-rw-r--r--externals/grill/fftease/makefile.pd-linux37
1 files changed, 27 insertions, 10 deletions
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):