aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/makefile.pd-linux
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-09-24 02:40:50 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-09-24 02:40:50 +0000
commitb1ab45bd09c01f9ec61e0017ebe42af1a8bf0f6d (patch)
tree352867c77c959f4d0e85b559dee84708e9ab29a6 /externals/grill/flext/makefile.pd-linux
parent8c5eb1bcbbf8156dc3211cb1c33974b6bb0df1ec (diff)
""
svn path=/trunk/; revision=1022
Diffstat (limited to 'externals/grill/flext/makefile.pd-linux')
-rw-r--r--externals/grill/flext/makefile.pd-linux31
1 files changed, 17 insertions, 14 deletions
diff --git a/externals/grill/flext/makefile.pd-linux b/externals/grill/flext/makefile.pd-linux
index 8131f25a..a5a3e241 100644
--- a/externals/grill/flext/makefile.pd-linux
+++ b/externals/grill/flext/makefile.pd-linux
@@ -19,7 +19,7 @@ INCLUDES=${PDPATH}
FLAGS=-DFLEXT_SYS=2 ${UFLAGS}
# compiler flags for optimized build
-CFLAGS=-O6
+CFLAGS=-O2
# compiler flags for debug build
CFLAGS_D=-g
@@ -31,7 +31,8 @@ CFLAGS_T=-DFLEXT_THREADS
CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS
# libraries
-LIBS=
+# it seems like libstdc++ must be defined for icc....
+LIBS=stdc++
# ----------------------------------------------
# the rest can stay untouched
@@ -59,20 +60,22 @@ endif
MAKEFILE=makefile.pd-linux
-ifdef V4_NAMING
-TARGET=${TARGDIR}/${NAME}.a
-TARGET_D=${TARGDIR}/${NAME}_d.a
-TARGET_T=${TARGDIR}/${NAME}_t.a
-TARGET_TD=${TARGDIR}/${NAME}_td.a
+# invoke dynamic linking
+ifeq ($(CXX),icc)
+DYNAMIC=-i_dynamic
else
+DYNAMIC=-Wl,-Bdynamic
+endif
+
+
TARGET=${TARGDIR}/lib${NAME}.a
TARGET_D=${TARGDIR}/lib${NAME}_d.a
TARGET_T=${TARGDIR}/lib${NAME}_t.a
TARGET_TD=${TARGDIR}/lib${NAME}_td.a
-endif
TARGET_S=${TARGDIR}/lib${NAME}.so
TARGET_SD=${TARGDIR}/lib${NAME}_d.so
+
all: $(TARGDIR) $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
$(TARGDIR):
@@ -94,16 +97,16 @@ $(TARGDIR)/%.tdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.sro : $(SRCDIR)/%.cpp
- $(CXX) -c $(CFLAGS) $(CFLAGS_T) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
+ $(CXX) -shared -c $(CFLAGS) $(CFLAGS_T) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp
- $(CXX) -c $(CFLAGS_D) $(CFLAGS_T) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
+ $(CXX) -shared -c $(CFLAGS_D) $(CFLAGS_T) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.ro,$(SRCS))
- ar rc $@ $^
+ ar rc $@ $^
chmod 644 $@
$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS))
@@ -119,11 +122,11 @@ $(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
chmod 644 $@
$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.sro,$(SRCS))
- ld -shared -Bdynamic --strip-debug $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(LIBS)) -o $@ $^
+ $(CXX) -shared $(DYNAMIC) -Wl,--strip-debug $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(patsubst %,-l%,$(LIBS))
chmod 755 $@
$(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS))
- ld -shared -Bdynamic $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(LIBS)) -o $@ $^
+ $(CXX) -shared $(DYNAMIC) $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(patsubst %,-l%,$(LIBS))
chmod 755 $@
@@ -141,6 +144,6 @@ endif
install:: $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD) $(patsubst %,$(SRCDIR)/%,$(HDRS))
cp $^ $(INSTDIR)
+ for i in $(foreach f,$(notdir $(filter %.a,$^)),$(patsubst lib%.a,%,$(f))); do rm -f $(INSTDIR)/$$i.a && ln -sf lib$$i.a $(INSTDIR)/$$i.a; done
chmod a+r $(patsubst %,$(INSTDIR)/%,$(notdir $^))
chown root.users $(patsubst %,$(INSTDIR)/%,$(notdir $^))
-