diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-09-24 02:40:50 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-09-24 02:40:50 +0000 |
commit | b1ab45bd09c01f9ec61e0017ebe42af1a8bf0f6d (patch) | |
tree | 352867c77c959f4d0e85b559dee84708e9ab29a6 /externals | |
parent | 8c5eb1bcbbf8156dc3211cb1c33974b6bb0df1ec (diff) |
""
svn path=/trunk/; revision=1022
Diffstat (limited to 'externals')
-rw-r--r-- | externals/grill/flext/changes.txt | 1 | ||||
-rw-r--r-- | externals/grill/flext/config-pd-linux.txt | 5 | ||||
-rw-r--r-- | externals/grill/flext/makefile.pd-linux | 31 | ||||
-rw-r--r-- | externals/grill/flext/source/flclass.h | 15 | ||||
-rwxr-xr-x | externals/grill/flext/source/fllib.cpp | 8 | ||||
-rw-r--r-- | externals/grill/flext/source/flsupport.cpp | 16 | ||||
-rw-r--r-- | externals/grill/flext/source/flsupport.h | 98 | ||||
-rw-r--r-- | externals/grill/pool/config-pd-linux.txt | 6 | ||||
-rw-r--r-- | externals/grill/pool/makefile.pd-linux | 27 | ||||
-rw-r--r-- | externals/grill/vasp/config-pd-linux.txt | 4 | ||||
-rw-r--r-- | externals/grill/vasp/makefile.pd-linux | 22 | ||||
-rwxr-xr-x | externals/grill/xsample/config-pd-linux.txt | 8 | ||||
-rw-r--r-- | externals/grill/xsample/makefile.pd-linux | 25 |
13 files changed, 161 insertions, 105 deletions
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt index 207bb364..6493764b 100644 --- a/externals/grill/flext/changes.txt +++ b/externals/grill/flext/changes.txt @@ -33,6 +33,7 @@ Version history: - added flext::NewLarge and flext::FreeLarge memory allocation functions which use the C-Library heap and should mainly be used in secondary threads - flext_dsp reported wrong inlet/outlet count (CntInSig, CntOutSig functions) - added support for patcher arguments for attributes (use # instead of $ to save them with a patch) +- moved memory functions and console output from flext to super-base-class flext_root and derived all helper classes from that 0.4.4: - fixed deadly bug for Max/MSP method-to-symbol-binding proxies diff --git a/externals/grill/flext/config-pd-linux.txt b/externals/grill/flext/config-pd-linux.txt index 254e9171..6962affc 100644 --- a/externals/grill/flext/config-pd-linux.txt +++ b/externals/grill/flext/config-pd-linux.txt @@ -12,7 +12,7 @@ PDPATH=/usr/src/pd-0.37-0/src # where is the SndObj include directory? # (leave blank or comment out to disable SndObj support) -SNDOBJ=/usr/local/include/SndObj +SNDOBJ=/usr/local/include #/SndObj # where is the STK include directory? # (leave blank or comment out to disable STK support) @@ -30,6 +30,3 @@ INSTDIR=/usr/local/lib/pd/flext # UFLAGS=-mcpu=pentiumpro # gcc 2.95 # UFLAGS=-mcpu=pentium3 -msse # gcc 3.2 -# define to use old library naming for backwards compatibility (to externals depending on flext versions < 0.5) -# ("flext.a" instead of new "libflext.a" etc.) -V4_NAMING=1 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 $^)) - diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h index 6bdd55d5..fa5337b7 100644 --- a/externals/grill/flext/source/flclass.h +++ b/externals/grill/flext/source/flclass.h @@ -591,7 +591,9 @@ protected: class AttrItem; - class Item { + class Item: + public flext_root + { public: Item(const t_symbol *t,int inl,AttrItem *a); virtual ~Item(); @@ -605,7 +607,9 @@ protected: }; //! This class holds hashed item entries - class ItemCont { + class ItemCont: + public flext_root + { public: ItemCont(); ~ItemCont(); @@ -685,7 +689,8 @@ protected: }; //! Represent a data value of an attribute - class AttrData + class AttrData: + public flext_root { public: AttrData(): flags(0) {} @@ -900,7 +905,9 @@ private: static t_class *pxbnd_class; - class pxbnd_object // no virtual table! + class pxbnd_object: + public flext_root + // no virtual table! { public: t_object obj; // MUST reside at memory offset 0 diff --git a/externals/grill/flext/source/fllib.cpp b/externals/grill/flext/source/fllib.cpp index 65d71cc5..6d9c32cd 100755 --- a/externals/grill/flext/source/fllib.cpp +++ b/externals/grill/flext/source/fllib.cpp @@ -104,7 +104,9 @@ bool flext::chktilde(const char *objname) // this class stands for one registered object // it holds the class, type flags, constructor and destructor of the object and the creation arg types // it will never be destroyed -class libclass { +class libclass: + public flext_root +{ public: libclass(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *)); @@ -126,7 +128,9 @@ libclass::libclass(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(f // this class stands for one registered object name // it holds a pointer to the respective object // it will never be destroyed -class libname { +class libname: + public flext_root +{ public: const t_symbol *name; libclass *obj; diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp index ab0d871e..7b30a2b8 100644 --- a/externals/grill/flext/source/flsupport.cpp +++ b/externals/grill/flext/source/flsupport.cpp @@ -79,7 +79,7 @@ void flext::Setup() // ///////////////////////////////////////////////////////// -void *flext::operator new(size_t bytes) +void *flext_root::operator new(size_t bytes) { bytes += sizeof(size_t); @@ -98,7 +98,7 @@ void *flext::operator new(size_t bytes) return blk+sizeof(size_t); } -void flext::operator delete(void *blk) +void flext_root::operator delete(void *blk) { char *ori = (char *)blk-sizeof(size_t); #if FLEXT_SYS == FLEXT_SYS_JMAX @@ -109,7 +109,7 @@ void flext::operator delete(void *blk) #endif } -void *flext::NewAligned(size_t bytes,int bitalign) +void *flext_root::NewAligned(size_t bytes,int bitalign) { const size_t ovh = sizeof(size_t)+sizeof(char *); const unsigned long alignovh = bitalign/8-1; @@ -125,7 +125,7 @@ void *flext::NewAligned(size_t bytes,int bitalign) return ablk; } -void flext::FreeAligned(void *blk) +void flext_root::FreeAligned(void *blk) { char *ori = *(char **)((char *)blk-sizeof(size_t)-sizeof(char *)); @@ -182,10 +182,10 @@ int flext::Int2Bits(unsigned long n) } -void flext::post(const char *fmt, ...) +void flext_root::post(const char *fmt, ...) { #ifdef FLEXT_THREADS - static ThrMutex mutex; + static flext::ThrMutex mutex; mutex.Lock(); #endif va_list ap; @@ -204,10 +204,10 @@ void flext::post(const char *fmt, ...) #endif } -void flext::error(const char *fmt,...) +void flext_root::error(const char *fmt,...) { #ifdef FLEXT_THREADS - static ThrMutex mutex; + static flext::ThrMutex mutex; mutex.Lock(); #endif va_list ap; diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h index c4331df4..f336d0de 100644 --- a/externals/grill/flext/source/flsupport.h +++ b/externals/grill/flext/source/flsupport.h @@ -17,43 +17,17 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "flstdc.h" -class FLEXT_SHARE FLEXT_CLASSDEF(flext); -typedef class FLEXT_CLASSDEF(flext) flext; -class FLEXT_SHARE FLEXT_CLASSDEF(flext_base); - -/*! \brief Flext support class +class FLEXT_SHARE FLEXT_CLASSDEF(flext_root); +typedef class FLEXT_CLASSDEF(flext_root) flext_root; - A number of methods (most are static functions) are defined here for convenience. - This class doesn't define any data members, hence it can be inherited to all - classes (not only PD objects) to profit from the cross-platform functionality. - Examples are the overloaded memory allocation, atom and atom list functions, - thread functions and classes, the sample buffer class and others. +/*! \brief Flext root support class - This class can also be used for a non-object class (not representing an external object) - and won't give any extra burden to it. + Moved memory functions and console output here so that all the classes + contained in flext can use them */ - -class FLEXT_SHARE FLEXT_CLASSDEF(flext) { - - /*! \defgroup FLEXT_SUPPORT Flext support class - @{ - */ +class FLEXT_SHARE FLEXT_CLASSDEF(flext_root) { public: - -// --- version ----------------------------------------------- - - /*! \brief Flext version number - - Return the version number of the flext library. - For statically linked flext this is identical to the header definition FLEXT_VERSION, - otherwise it reflects the version number of the shared flext library. - */ - static int Version(); - - //! Flext version string - static const char *VersionStr(); - // --- console output ----------------------------------------------- //! post message to console @@ -96,6 +70,48 @@ public: //! @} FLEXT_S_MEMORY +}; + + +class FLEXT_SHARE FLEXT_CLASSDEF(flext); +typedef class FLEXT_CLASSDEF(flext) flext; + +class FLEXT_SHARE FLEXT_CLASSDEF(flext_base); + +/*! \brief Flext support class + + A number of methods (most are static functions) are defined here for convenience. + This class doesn't define any data members, hence it can be inherited to all + classes (not only PD objects) to profit from the cross-platform functionality. + Examples are the overloaded memory allocation, atom and atom list functions, + thread functions and classes, the sample buffer class and others. + + This class can also be used for a non-object class (not representing an external object) + and won't give any extra burden to it. +*/ + +class FLEXT_SHARE FLEXT_CLASSDEF(flext): + public flext_root +{ + + /*! \defgroup FLEXT_SUPPORT Flext support class + @{ + */ +public: + +// --- version ----------------------------------------------- + + /*! \brief Flext version number + + Return the version number of the flext library. + For statically linked flext this is identical to the header definition FLEXT_VERSION, + otherwise it reflects the version number of the shared flext library. + */ + static int Version(); + + //! Flext version string + static const char *VersionStr(); + // --- buffer/array stuff ----------------------------------------- /*! \defgroup FLEXT_S_BUFFER Buffer handling @@ -106,7 +122,8 @@ public: #if FLEXT_SYS != FLEXT_SYS_JMAX //! Class for platform independent buffer handling - class FLEXT_SHARE buffer + class FLEXT_SHARE buffer: + public flext_root { public: /*! \brief Construct buffer. @@ -470,7 +487,8 @@ public: // --- atom list stuff ------------------------------------------- //! Class representing a list of atoms - class FLEXT_SHARE AtomList + class FLEXT_SHARE AtomList: + public flext_root { public: //! Construct list @@ -652,7 +670,8 @@ public: /*! \brief Thread parameters \internal */ - class FLEXT_SHARE thr_params + class FLEXT_SHARE thr_params: + public flext_root { public: thr_params(int n = 1); @@ -676,7 +695,8 @@ public: /*! \brief This represents an entry to the list of active method threads \internal */ - class FLEXT_SHARE thr_entry + class FLEXT_SHARE thr_entry: + public flext_root { public: thr_entry(void (*m)(thr_params *),thr_params *p,thrid_t id = GetThreadId()); @@ -752,7 +772,8 @@ public: /*! \brief Thread mutex \sa pthreads documentation */ - class FLEXT_SHARE ThrMutex + class FLEXT_SHARE ThrMutex: + public flext_root #if FLEXT_THREADS == FLEXT_THR_POSIX { public: @@ -921,7 +942,8 @@ public: /*! \brief Class encapsulating a timer with callback functionality. This class can either be used with FLEXT_ADDTIMER or used as a base class with an overloaded virtual Work function. */ - class FLEXT_SHARE Timer + class FLEXT_SHARE Timer: + public flext_root { public: Timer(bool queued = false); diff --git a/externals/grill/pool/config-pd-linux.txt b/externals/grill/pool/config-pd-linux.txt index 13942e05..48bc3703 100644 --- a/externals/grill/pool/config-pd-linux.txt +++ b/externals/grill/pool/config-pd-linux.txt @@ -7,7 +7,7 @@ # where are the PD header files? # leave it blank if it is a system directory (like /usr/local/include), -# since gcc 3.2 complains about it +# since gcc >= 3.2 complains about it PDPATH= # where do the flext libraries reside? @@ -20,5 +20,9 @@ TARGDIR=./pd-linux # (leave blank to omit installation) INSTPATH=/usr/local/lib/pd/extra +# user defined compiler flags +UFLAGS= +# define for shared build +# FLEXT_SHARED=1 diff --git a/externals/grill/pool/makefile.pd-linux b/externals/grill/pool/makefile.pd-linux index 7098e4e3..ac028d7a 100644 --- a/externals/grill/pool/makefile.pd-linux +++ b/externals/grill/pool/makefile.pd-linux @@ -12,15 +12,23 @@ CONFIG=config-pd-linux.txt include $(CONFIG) -FLEXTLIB=$(FLEXTPATH)/flext.a - # compiler+linker stuff INCLUDES=$(PDPATH) -LIBPATH= -FLAGS=-DPD -CFLAGS=-O6 -mcpu=pentiumpro -#CFLAGS=-g -LIBS=m util +FLAGS=-DFLEXT_SYS=2 +CFLAGS=-O2 $(UFLAGS) +LIBPATH=$(FLEXTPATH) +LIBS=flext + +ifdef FLEXT_SHARED +CFLAGS+=-shared -DFLEXT_SHARED + +ifeq ($(CXX),icc) +LDFLAGS+=-i_dynamic +else +LDFLAGS+=-Wl,-Bdynamic +endif + +endif # --------------------------------------------- @@ -49,8 +57,9 @@ $(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 $@ $^ $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(LIBS)) + strip --strip-unneeded $@ chmod 755 $@ $(INSTPATH): diff --git a/externals/grill/vasp/config-pd-linux.txt b/externals/grill/vasp/config-pd-linux.txt index 32fdb9fc..eec673ee 100644 --- a/externals/grill/vasp/config-pd-linux.txt +++ b/externals/grill/vasp/config-pd-linux.txt @@ -10,7 +10,7 @@ PD=/usr/local/lib/pd # where are the PD header files? # leave it blank if it is a system directory (like /usr/local/include), -# since gcc 3.2 complains about it +# since gcc >= 3.2 complains about it PDINC= # where do the flext libraries reside? @@ -32,7 +32,7 @@ HELPDIR=${PD}/doc/5.reference # additional compiler flags # (check if they fit to your system!) # UFLAGS=-mcpu=pentium3 -msse -mfpmath=sse -fprefetch-loop-arrays -UFLAGS=-mcpu=pentiumpro +# UFLAGS=-mcpu=pentiumpro # define to link against shared flext library (flext version >= 0.5.0) #FLEXT_SHARED=1 diff --git a/externals/grill/vasp/makefile.pd-linux b/externals/grill/vasp/makefile.pd-linux index 04d971ef..eb5c4d30 100644 --- a/externals/grill/vasp/makefile.pd-linux +++ b/externals/grill/vasp/makefile.pd-linux @@ -13,24 +13,24 @@ CONFIG=config-pd-linux.txt include ${CONFIG} -FLEXTLIB=$(FLEXTPATH)/flext_t.a # compiler stuff INCLUDES=$(PDINC) -FLAGS=-DFLEXT_SYS=2 -DFLEXT_THREADS -fno-exceptions -CFLAGS=-O6 ${UFLAGS} -fmove-all-movables -frerun-loop-opt -#CFLAGS+=-funroll-loops -fmove-all-movables -freduce-all-givs -fschedule-insns2 -foptimize-register-move +FLAGS=-DFLEXT_SYS=2 -DFLEXT_THREADS +CFLAGS=-O2 ${UFLAGS} LDFLAGS=-Wl,-s - -LIBS=m +LIBS=flext ifdef FLEXT_SHARED -CFLAGS+=-DFLEXT_SHARED -LDFLAGS+=-Bdynamic -LINKFLEXT=-lflext +CFLAGS+=-shared -DFLEXT_SHARED + +ifeq ($(CXX),icc) +LDFLAGS+=-i_dynamic else -LINKFLEXT=$(FLEXTLIB) +LDFLAGS+=-Wl,-Bdynamic +endif + endif @@ -59,7 +59,7 @@ $(TARGDIR)/%.o : $(SRCDIR)/%.cpp $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@ $(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) - $(CXX) $(LDFLAGS) -shared $^ $(patsubst %,-l%,$(LIBS)) -L$(FLEXTPATH) $(LINKFLEXT) -o $@ + $(CXX) $(LDFLAGS) -shared -o$@ $^ -L$(FLEXTPATH) $(patsubst %,-l%,$(LIBS)) strip --strip-unneeded $@ chmod 755 $@ diff --git a/externals/grill/xsample/config-pd-linux.txt b/externals/grill/xsample/config-pd-linux.txt index da33caf7..e89b6e98 100755 --- a/externals/grill/xsample/config-pd-linux.txt +++ b/externals/grill/xsample/config-pd-linux.txt @@ -3,7 +3,7 @@ # # your c++ compiler (if not g++) -# CXX=g++ +#CXX=g++ # where does the PD installation reside? PD=/usr/local/lib/pd @@ -29,9 +29,9 @@ HELPDIR=${PD}/doc/5.reference # additional compiler flags # (check whether they fit to your system!) -UFLAGS=-mcpu=pentiumpro # gcc 2.95 -# UFLAGS=-mcpu=pentium3 -msse -mfpmath=sse # gcc 3.2 +#UFLAGS=-mcpu=pentiumpro -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions # gcc 2.95 +#UFLAGS=-mcpu=pentium3 -msse -mfpmath=sse -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions # gcc 3.2 # define to link against shared flext library (flext version >= 0.5.0) -# FLEXT_SHARED=1 +#FLEXT_SHARED=1 diff --git a/externals/grill/xsample/makefile.pd-linux b/externals/grill/xsample/makefile.pd-linux index 6bc5935a..306c3512 100644 --- a/externals/grill/xsample/makefile.pd-linux +++ b/externals/grill/xsample/makefile.pd-linux @@ -12,22 +12,31 @@ CONFIG=config-pd-linux.txt include ${CONFIG} -FLEXTLIB=$(FLEXTPATH)/flext.a # compiler stuff INCLUDES=$(PDINC) FLAGS=-DFLEXT_SYS=2 -CFLAGS=${UFLAGS} -O6 -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions -LIBS=m +CFLAGS=-O2 ${UFLAGS} +LIBS= ifdef FLEXT_SHARED -CFLAGS+=-DFLEXT_SHARED -LDFLAGS+=-Bdynamic -LINKFLEXT=-lflext +CFLAGS+=-shared -DFLEXT_SHARED +LDFLAGS+=-L $(FLEXTPATH) +LIBFLEXT=-lflext + +ifeq ($(CXX),icc) +LDFLAGS+=-i_dynamic else -LINKFLEXT=$(FLEXTLIB) +LDFLAGS+=-Wl,-Bdynamic endif +else + +LIBFLEXT=$(FLEXTPATH)/libflext.a + +endif + + # ---------------------------------------------- # the rest can stay untouched # ---------------------------------------------- @@ -52,7 +61,7 @@ $(TARGDIR)/%.o : $(SRCDIR)/%.cpp $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@ $(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) - $(CXX) $(LDFLAGS) -shared $^ $(patsubst %,-l%,$(LIBS)) -L$(FLEXTPATH) $(LINKFLEXT) -o $@ + $(CXX) $(LDFLAGS) -shared -o $@ $^ $(LIBFLEXT) $(patsubst %,-l%,$(LIBS)) strip --strip-unneeded $@ chmod 755 $@ |