aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/xsample')
-rwxr-xr-xexternals/grill/xsample/config-pd-linux.txt3
-rw-r--r--externals/grill/xsample/makefile.pd-linux12
2 files changed, 13 insertions, 2 deletions
diff --git a/externals/grill/xsample/config-pd-linux.txt b/externals/grill/xsample/config-pd-linux.txt
index a58077ec..efc0e43d 100755
--- a/externals/grill/xsample/config-pd-linux.txt
+++ b/externals/grill/xsample/config-pd-linux.txt
@@ -32,3 +32,6 @@ HELPDIR=${PD}/doc/5.reference
UFLAGS=-mcpu=pentiumpro # gcc 2.95
# UFLAGS=-mcpu=pentium3 -msse -mfpmath=sse # gcc 3.2
+# define to link against shared flext library (flext version >= 0.5.0)
+#FLEXT_SHARED=1
+
diff --git a/externals/grill/xsample/makefile.pd-linux b/externals/grill/xsample/makefile.pd-linux
index d5ba9016..6bc5935a 100644
--- a/externals/grill/xsample/makefile.pd-linux
+++ b/externals/grill/xsample/makefile.pd-linux
@@ -20,6 +20,14 @@ FLAGS=-DFLEXT_SYS=2
CFLAGS=${UFLAGS} -O6 -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions
LIBS=m
+ifdef FLEXT_SHARED
+CFLAGS+=-DFLEXT_SHARED
+LDFLAGS+=-Bdynamic
+LINKFLEXT=-lflext
+else
+LINKFLEXT=$(FLEXTLIB)
+endif
+
# ----------------------------------------------
# the rest can stay untouched
# ----------------------------------------------
@@ -43,8 +51,8 @@ $(TARGDIR):
$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@
-$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) $(FLEXTLIB)
- $(CXX) $(LDFLAGS) -shared $^ $(patsubst %,-l%,$(LIBS)) -o $@
+$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))
+ $(CXX) $(LDFLAGS) -shared $^ $(patsubst %,-l%,$(LIBS)) -L$(FLEXTPATH) $(LINKFLEXT) -o $@
strip --strip-unneeded $@
chmod 755 $@