diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-01-07 04:38:10 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-01-07 04:38:10 +0000 |
commit | b8510c87be3a74307f4ad6122d75a353d350b84c (patch) | |
tree | 3c95c81f6d239b3a892b362f624ac5290b91ef82 /externals/grill/flext | |
parent | 0182bbff2871114a4e93cc97942da621491f0e02 (diff) |
""
svn path=/trunk/; revision=326
Diffstat (limited to 'externals/grill/flext')
-rw-r--r-- | externals/grill/flext/config-pd-linux.txt | 5 | ||||
-rw-r--r-- | externals/grill/flext/makefile.pd-linux | 16 | ||||
-rw-r--r-- | externals/grill/flext/readme.txt | 76 | ||||
-rw-r--r-- | externals/grill/flext/source/flsupport.h | 16 |
4 files changed, 56 insertions, 57 deletions
diff --git a/externals/grill/flext/config-pd-linux.txt b/externals/grill/flext/config-pd-linux.txt index 018471f1..d5060e1b 100644 --- a/externals/grill/flext/config-pd-linux.txt +++ b/externals/grill/flext/config-pd-linux.txt @@ -25,5 +25,6 @@ TARGDIR=./pd-linux # (leave blank to omit installation) INSTDIR=/usr/local/lib/pd/flext - - +# additional compiler flags +UFLAGS= -mcpu=pentiumpro # gcc 2.95 +# UFLAGS= -mcpu=pentium3 -msse # gcc 3.2 diff --git a/externals/grill/flext/makefile.pd-linux b/externals/grill/flext/makefile.pd-linux index c48d8466..6e1901bf 100644 --- a/externals/grill/flext/makefile.pd-linux +++ b/externals/grill/flext/makefile.pd-linux @@ -15,11 +15,17 @@ include $(CONFIG) # compiler+linker stuff INCLUDES=$(PDPATH) $(SNDOBJ) $(STK) FLAGS=-DFLEXT_SYS=2 -CFLAGS=-O6 -fno-exceptions -CFLAGS+=-mcpu=pentiumpro # gcc 2.95 -# CFLAGS+=-mcpu=pentium3 -msse # gcc 3.2 -CFLAGS_D=-mcpu=pentiumpro -g -CFLAGS_T=-DFLEXT_THREADS + +# compiler flags for optimized build +CFLAGS=$(UFLAGS) -O6 -fno-exceptions + +# compiler flags for debug build +CFLAGS_D=$(UFLAGS) -g -fno-exceptions + +# additional flags for threading +CFLAGS_T=-DFLEXT_THREADS + +# libraries LIBS= # ---------------------------------------------- diff --git a/externals/grill/flext/readme.txt b/externals/grill/flext/readme.txt index 9eac2a1b..e95e51f7 100644 --- a/externals/grill/flext/readme.txt +++ b/externals/grill/flext/readme.txt @@ -11,38 +11,17 @@ Donations for further development of the package are highly appreciated. ---------------------------------------------------------------------------- -Package files: -- readme.txt: this one -- gpl.txt,license.txt: GPL license stuff -- flext.h: main include file -- flstdc.h: Basic definitions in classic C - some common vocabulary for the different platforms -- flbase.h,flbase.cpp: C++ interface -- flclass.h,flext.cpp: actual base classes for message (flext_base) and dsp (flext_dsp) processing -- fldsp.h,fldsp.cpp: code for signal externals -- flthr.h,flthr.cpp: code for threaded methods -- flsupport.h,flsupport.cpp: various flext support functions and classes -- flatom.cpp flatom_pr.cpp: code for functions dealing with lists of atoms -- flutil.cpp: additional utility functions -- flxlet.cpp: code for variable inlet/outlet stuff -- flattr.cpp: code for attribute stuff -- flinternals.h: internal definitions for flext library -- flbuf.cpp: buffer object handling for base classes -- fllib.cpp: code for handling external libraries in MaxMSP -- fldefs.h: definitions for internal flext use -- flcwmax*.h: trivial prefix headers for Max/MSP CodeWarrior projects -- flmspbuffer.h: MaxMSP's inofficial buffer.h included here for conveniance - -> for PD you need the pd source code (which is most likely part of the distribution) -> for Max/MSP you will also need the Max/MSP SDK (and for threading the Multiprocessing library) - -> if you choose to compile with SndObj support you will need the respective library -> download from: http://www.may.ie/academic/music/musictec/SndObj/main.html - -> if you choose to compile with STK support you will need the respective package and build a library -> download from: http://ccrma-www.stanford.edu/software/stk/ -> For linking it may preferable to use a library of all the STK objects. -> Under linux you can create one from the STK directory with: -> "g++ -c -pipe -I include -D __LINUX_OSS__ src/*.cpp && ar r libstk.a *.o && rm -f *.o" +o for PD you need the pd source code (which is most likely part of the distribution) +o for Max/MSP you will also need the Max/MSP SDK (and for threading the Multiprocessing library) + +o if you choose to compile with SndObj support you will need the respective library + download from: http://www.may.ie/academic/music/musictec/SndObj/main.html + +o if you choose to compile with STK support you will need the respective package and build a library + download from: http://ccrma-www.stanford.edu/software/stk/ + For linking it may preferable to use a library of all the STK objects. + Under linux you can create one from the STK directory with: + "g++ -c -pipe -I include -D __LINUX_OSS__ src/*.cpp && ar r libstk.a *.o && rm -f *.o" ---------------------------------------------------------------------------- @@ -50,40 +29,47 @@ The package should at least compile (and is tested) with the following compilers pd - Windows: ------------- -For any of these compilers define "FLEXT_SYS=2". - o Microsoft Visual C++ 6: edit "config-pd-msvc.txt" & run "build-pd-msvc.bat" o Borland C++ 5.5 (free): edit "config-pd-bcc.txt" & run "build-pd-bcc.bat" o Cygwin: edit "config-pd-cygwin.txt" & run "sh build-pd-cygwin.sh" + additional settings (e.g. target processor, compiler flags) can be made in makefile.pd-cygwin + +With your project using flext, be sure to define "FLEXT_SYS=2". + pd - linux: ----------- -Be sure to define "FLEXT_SYS=2". - o GCC: edit "config-pd-linux.txt" & run "sh build-pd-linux.sh" + additional settings (e.g. target processor, compiler flags) can be made in makefile.pd-linux + +With your project using flext, be sure to define "FLEXT_SYS=2". + pd - MacOSX: ----------- -Be sure to define "FLEXT_SYS=2". - o GCC: edit "config-pd-darwin.txt" & run "sh build-pd-darwin.sh" + additional settings (e.g. target processor, compiler flags) can be made in makefile.pd-darwin + +With your project using flext, be sure to define "FLEXT_SYS=2". + Max/MSP - MacOS 9: ------------------ -Be sure to define "FLEXT_SYS=1" - alternatively use the prefix file "flcwmax.h" - o Metrowerks CodeWarrior V6: edit & use the "flext.cw" project file You must have the following "Source Trees" defined: "flext" - Pointing to the flext main directory "Cycling74" - Pointing to the Cycling 74 SDK + +With your project using flext, be sure to define "FLEXT_SYS=1" +- alternatively use the prefix file "flcwmax.h" + + Max/MSP - MacOSX: ------------------ -Be sure to define "FLEXT_SYS=1" - alternatively use the prefix file "flcwmax-x.h" or "flcwmax-x-thr.h" for threading support. - o Metrowerks CodeWarrior V6: edit & use the "flext.cw" project file You must have the following "Source Trees" defined: @@ -92,6 +78,11 @@ You must have the following "Source Trees" defined: "Cycling74 OSX" - Pointing to the Cycling 74 SDK for xmax "MP SDK" - Pointing to the Multiprocessing SDK (for threading support) + +With your project using flext, be sure to define "FLEXT_SYS=1" +- alternatively use the prefix file "flcwmax-x.h" or "flcwmax-x-thr.h" for threading support. + + ---------------------------------------------------------------------------- Goals/features of the package: @@ -118,6 +109,7 @@ Version history: 0.4.2: - moved CLASS_MAINSIGNALIN to class scope (fixed "float method overwritten" warning) - unix makefiles: CXX should be commented out if standard (to enable environmental settings) +- introduced default returns for the different flext::GetA* functions 0.4.1: - full port for Max@OSX diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h index 060da5d9..0c0c62c9 100644 --- a/externals/grill/flext/source/flsupport.h +++ b/externals/grill/flext/source/flsupport.h @@ -208,7 +208,7 @@ public: //! Get symbol string static const char *GetString(const t_symbol *s) { return s->s_name; } //! Check for symbol and get string - static const char *GetAString(const t_symbol *s) { return s?s->s_name:""; } + static const char *GetAString(const t_symbol *s,const char *def = "") { return s?GetString(s):def; } // --- atom stuff ---------------------------------------- @@ -246,7 +246,7 @@ public: static void SetSymbol(t_atom &a,const t_symbol *s) { a.a_type = A_SYMBOL; a.a_w.w_sym = const_cast<t_symbol *>(s); } #endif //! Check for a symbol and get its value - static t_symbol *GetASymbol(const t_atom &a) { return IsSymbol(a)?GetSymbol(a):NULL; } // NULL or empty symbol? + static t_symbol *GetASymbol(const t_atom &a,t_symbol *def = NULL) { return IsSymbol(a)?GetSymbol(a):def; } // NULL or empty symbol? //! Check whether the atom is a string static bool IsString(const t_atom &a) { return IsSymbol(a); } @@ -269,14 +269,14 @@ public: #if FLEXT_SYS == FLEXT_SYS_PD //! Check for a float and get its value - static float GetAFloat(const t_atom &a) { return IsFloat(a)?GetFloat(a):0; } + static float GetAFloat(const t_atom &a,float def = 0) { return IsFloat(a)?GetFloat(a):def; } //! Check whether the atom is an integer static bool IsInt(const t_atom &) { return false; } //! Access the integer value (without type check) static int GetInt(const t_atom &a) { return (int)GetFloat(a); } //! Check for an integer and get its value - static int GetAInt(const t_atom &a) { return (int)GetAFloat(a); } + static int GetAInt(const t_atom &a,int def = 0) { return (int)GetAFloat(a,(float)def); } //! Set the atom to represent a integer (depending on the system) static void SetInt(t_atom &a,int v) { a.a_type = A_FLOAT; a.a_w.w_float = (float)v; } @@ -287,20 +287,20 @@ public: //! Access the pointer value (without type check) static t_gpointer *GetPointer(const t_atom &a) { return a.a_w.w_gpointer; } //! Check for a pointer and get its value - static void *GetAPointer(const t_atom &a) { return IsPointer(a)?GetPointer(a):NULL; } + static void *GetAPointer(const t_atom &a,void *def = NULL) { return IsPointer(a)?GetPointer(a):def; } //! Set the atom to represent a pointer static void SetPointer(t_atom &a,void *p) { a.a_type = A_POINTER; a.a_w.w_gpointer = (t_gpointer *)p; } #elif FLEXT_SYS == FLEXT_SYS_MAX //! Check for a float and get its value - static float GetAFloat(const t_atom &a) { return IsFloat(a)?GetFloat(a):(IsInt(a)?GetInt(a):0); } + static float GetAFloat(const t_atom &a,float def = 0) { return IsFloat(a)?GetFloat(a):(IsInt(a)?GetInt(a):def); } //! Check whether the atom is an int static bool IsInt(const t_atom &a) { return a.a_type == A_INT; } //! Access the integer value (without type check) static int GetInt(const t_atom &a) { return a.a_w.w_long; } //! Check for an integer and get its value - static int GetAInt(const t_atom &a) { return IsInt(a)?GetInt(a):(IsFloat(a)?(int)GetFloat(a):0); } + static int GetAInt(const t_atom &a,int def = 0) { return IsInt(a)?GetInt(a):(IsFloat(a)?(int)GetFloat(a):def); } //! Set the atom to represent an integer static void SetInt(t_atom &a,int v) { a.a_type = A_INT; a.a_w.w_long = v; } @@ -309,7 +309,7 @@ public: //! Check whether the atom can be a pointer static bool CanbePointer(const t_atom &a) { return IsInt(a); } //! Check for a pointer and get its value - static void *GetAPointer(const t_atom &a) { return IsInt(a)?(void *)GetInt(a):NULL; } + static void *GetAPointer(const t_atom &a,void *def = NULL) { return IsInt(a)?(void *)GetInt(a):def; } //! Set the atom to represent a pointer static void SetPointer(t_atom &a,void *p) { SetInt(a,(int)p); } #else |