aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/dyn/makefile.pd-linux
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/dyn/makefile.pd-linux
parenta5f318cbee05c698256bba3430ce0e81f8b1bedb (diff)
""
svn path=/trunk/; revision=1025
Diffstat (limited to 'externals/grill/dyn/makefile.pd-linux')
-rw-r--r--externals/grill/dyn/makefile.pd-linux37
1 files changed, 27 insertions, 10 deletions
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)