From 3e86a4527748e5de5c091ffcb4ae5ac2dd8abd8a Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 27 Jan 2005 04:57:32 +0000 Subject: Fixes for Mac fixed autoconf files updates for batch mode some more SIMD optimized functions svn path=/trunk/; revision=2543 --- externals/grill/flext/AUTHORS | 1 - externals/grill/flext/ChangeLog | 1 - externals/grill/flext/INSTALL | 187 --------- externals/grill/flext/NEWS | 1 - externals/grill/flext/README | 1 - externals/grill/flext/bootstrap.sh | 2 +- externals/grill/flext/buildsys/bmake-sub.mak | 2 + externals/grill/flext/buildsys/bmake.mak | 10 +- externals/grill/flext/buildsys/gnumake-sub.mak | 4 +- externals/grill/flext/buildsys/gnumake.mak | 8 + .../flext/buildsys/mac/pd/gnumake-gcc-ext.inc | 2 +- externals/grill/flext/buildsys/nmake-sub.mak | 2 + externals/grill/flext/buildsys/nmake.mak | 8 + externals/grill/flext/changes.txt | 1 + externals/grill/flext/source/flsimd.cpp | 454 ++++++++++++++++++--- externals/grill/flext/tutorial/adv1/Makefile.am | 4 +- externals/grill/flext/tutorial/adv2/Makefile.am | 4 +- externals/grill/flext/tutorial/adv3/Makefile.am | 4 +- externals/grill/flext/tutorial/attr1/Makefile.am | 4 +- externals/grill/flext/tutorial/attr2/Makefile.am | 4 +- externals/grill/flext/tutorial/attr3/Makefile.am | 4 +- externals/grill/flext/tutorial/bind1/Makefile.am | 4 +- externals/grill/flext/tutorial/buffer1/Makefile.am | 4 +- externals/grill/flext/tutorial/lib1/Makefile.am | 4 +- externals/grill/flext/tutorial/signal1/Makefile.am | 4 +- externals/grill/flext/tutorial/signal2/Makefile.am | 4 +- externals/grill/flext/tutorial/simple1/Makefile.am | 4 +- externals/grill/flext/tutorial/simple2/Makefile.am | 4 +- externals/grill/flext/tutorial/simple3/Makefile.am | 4 +- externals/grill/flext/tutorial/sndobj1/Makefile.am | 4 +- externals/grill/flext/tutorial/stk1/Makefile.am | 4 +- externals/grill/flext/tutorial/stk2/Makefile.am | 4 +- externals/grill/flext/tutorial/thread1/Makefile.am | 4 +- externals/grill/flext/tutorial/thread2/Makefile.am | 4 +- externals/grill/flext/tutorial/timer1/Makefile.am | 4 +- 35 files changed, 465 insertions(+), 299 deletions(-) delete mode 100644 externals/grill/flext/AUTHORS delete mode 100644 externals/grill/flext/ChangeLog delete mode 100644 externals/grill/flext/INSTALL delete mode 100644 externals/grill/flext/NEWS delete mode 100644 externals/grill/flext/README (limited to 'externals') diff --git a/externals/grill/flext/AUTHORS b/externals/grill/flext/AUTHORS deleted file mode 100644 index 9a5b6f9e..00000000 --- a/externals/grill/flext/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Thomas Grill (gr@grrrr.org) diff --git a/externals/grill/flext/ChangeLog b/externals/grill/flext/ChangeLog deleted file mode 100644 index 74b4ae7f..00000000 --- a/externals/grill/flext/ChangeLog +++ /dev/null @@ -1 +0,0 @@ -see changes.txt diff --git a/externals/grill/flext/INSTALL b/externals/grill/flext/INSTALL deleted file mode 100644 index ee61342f..00000000 --- a/externals/grill/flext/INSTALL +++ /dev/null @@ -1,187 +0,0 @@ -These are instructions for the autoconf building system. -For the native flext build system, please see the build.txt document. - ------------------------------------------------------------------------ - -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. diff --git a/externals/grill/flext/NEWS b/externals/grill/flext/NEWS deleted file mode 100644 index 88a522b9..00000000 --- a/externals/grill/flext/NEWS +++ /dev/null @@ -1 +0,0 @@ -see notes.txt and changes.txt diff --git a/externals/grill/flext/README b/externals/grill/flext/README deleted file mode 100644 index a115b5a9..00000000 --- a/externals/grill/flext/README +++ /dev/null @@ -1 +0,0 @@ -see readme.txt diff --git a/externals/grill/flext/bootstrap.sh b/externals/grill/flext/bootstrap.sh index 52a86eda..8e1a99b2 100755 --- a/externals/grill/flext/bootstrap.sh +++ b/externals/grill/flext/bootstrap.sh @@ -1,5 +1,5 @@ #! /bin/sh aclocal \ -&& automake --add-missing \ +&& automake --foreign \ && autoconf diff --git a/externals/grill/flext/buildsys/bmake-sub.mak b/externals/grill/flext/buildsys/bmake-sub.mak index 7b0c7b7a..a4e38abe 100644 --- a/externals/grill/flext/buildsys/bmake-sub.mak +++ b/externals/grill/flext/buildsys/bmake-sub.mak @@ -5,7 +5,9 @@ # project-specific definitions # package info +!if "$(PKGINFO)" != "" && "$(PKGINFO)" != "1" !include $(PKGINFO) +!endif # special package settings !ifdef USRCONFIG diff --git a/externals/grill/flext/buildsys/bmake.mak b/externals/grill/flext/buildsys/bmake.mak index b3a29d03..5b5ea10a 100644 --- a/externals/grill/flext/buildsys/bmake.mak +++ b/externals/grill/flext/buildsys/bmake.mak @@ -12,10 +12,18 @@ PKGINFO=package.txt !endif -!if "$(PKGINFO)" != "" +!if "$(PKGINFO)" != "" && "$(PKGINFO)" != "1" !include $(PKGINFO) !endif +!ifndef NAME +!error NAME variable must be defined (name of target) +!endif + +!ifndef SRCS +!error SRCS variable must be defined (list of source files) +!endif + ############################################### # check variables diff --git a/externals/grill/flext/buildsys/gnumake-sub.mak b/externals/grill/flext/buildsys/gnumake-sub.mak index a7de50ce..f0b35db1 100644 --- a/externals/grill/flext/buildsys/gnumake-sub.mak +++ b/externals/grill/flext/buildsys/gnumake-sub.mak @@ -5,7 +5,9 @@ include $(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt # project specific definitions # package info -include $(PKGINFO) +ifneq ($(PKGINFO),) + include $(PKGINFO) +endif # special settings ifdef USRCONFIG diff --git a/externals/grill/flext/buildsys/gnumake.mak b/externals/grill/flext/buildsys/gnumake.mak index 85559e13..efa0c273 100644 --- a/externals/grill/flext/buildsys/gnumake.mak +++ b/externals/grill/flext/buildsys/gnumake.mak @@ -16,6 +16,14 @@ ifneq ($(PKGINFO),) include $(PKGINFO) endif +ifndef NAME +$(error "NAME variable must be defined (name of target)") +endif + +ifndef SRCS +$(error "SRCS variable must be defined (list of source files)") +endif + ############################################### # check variables diff --git a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc index 39ab2964..62486351 100644 --- a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc +++ b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc @@ -1,3 +1,3 @@ EXT=pd_darwin -LDFLAGS += -bundle -bundle_loader $(PDBIN) +LDFLAGS += -bundle -bundle_loader $(PDBIN) -flat_namespace diff --git a/externals/grill/flext/buildsys/nmake-sub.mak b/externals/grill/flext/buildsys/nmake-sub.mak index 854e72de..faa3c738 100644 --- a/externals/grill/flext/buildsys/nmake-sub.mak +++ b/externals/grill/flext/buildsys/nmake-sub.mak @@ -5,7 +5,9 @@ # project-specific definitions # package info +!if "$(PKGINFO)" != "" !include $(PKGINFO) +!endif # special package settings !ifdef USRCONFIG diff --git a/externals/grill/flext/buildsys/nmake.mak b/externals/grill/flext/buildsys/nmake.mak index e097e048..3e946de0 100644 --- a/externals/grill/flext/buildsys/nmake.mak +++ b/externals/grill/flext/buildsys/nmake.mak @@ -16,6 +16,14 @@ PKGINFO=package.txt !include $(PKGINFO) !endif +!ifndef NAME +!error NAME variable must be defined (name of target) +!endif + +!ifndef SRCS +!error SRCS variable must be defined (list of source files) +!endif + ############################################### # check variables diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt index 2bc79870..d6ffec1e 100644 --- a/externals/grill/flext/changes.txt +++ b/externals/grill/flext/changes.txt @@ -30,6 +30,7 @@ Version history: - added m_click method which gets called on alt-click (PD) resp. double clicks (Max) onto the object box - in ToOut check if we are inside dsp (and use ToQueue then...) - some restructuring and use symbols (rather the char *) natively for AddMethod* and AddAttrib* functions +- added some more SIMD functionality 0.4.7: - added flext::GetBool (just because flext::GetInt has been there for a while) diff --git a/externals/grill/flext/source/flsimd.cpp b/externals/grill/flext/source/flsimd.cpp index 7b35903b..fdb9c2d2 100755 --- a/externals/grill/flext/source/flsimd.cpp +++ b/externals/grill/flext/source/flsimd.cpp @@ -246,6 +246,36 @@ notamd: return feature; } + +inline bool IsVectorAligned(const void *where) +{ + return (reinterpret_cast(where)&(__alignof(__m128)-1)) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2) +{ + return ( + (reinterpret_cast(v1)|reinterpret_cast(v2)) + &(__alignof(__m128)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3) +{ + return ( + (reinterpret_cast(v1)|reinterpret_cast(v2)|reinterpret_cast(v3)) + &(__alignof(__m128)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3,const void *v4) +{ + return ( + (reinterpret_cast(v1)|reinterpret_cast(v2)|reinterpret_cast(v3)|reinterpret_cast(v4)) + &(__alignof(__m128)-1) + ) == 0; +} + #else // not MSVC static int _cpuid (_p_info *pinfo) @@ -347,6 +377,30 @@ inline bool IsVectorAligned(const void *where) return (reinterpret_cast(where)&(sizeof(vector float)-1)) == 0; } +inline bool VectorsAligned(const void *v1,const void *v2) +{ + return ( + (reinterpret_cast(v1)|reinterpret_cast(v2)) + &(sizeof(vector float)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3) +{ + return ( + (reinterpret_cast(v1)|reinterpret_cast(v2)|reinterpret_cast(v3)) + &(sizeof(vector float)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3,const void *v4) +{ + return ( + (reinterpret_cast(v1)|reinterpret_cast(v2)|reinterpret_cast(v3)|reinterpret_cast(v4)) + &(sizeof(vector float)-1) + ) == 0; +} + inline vector float LoadValue(const float &f) { return IsVectorAligned(&f)?vec_splat(vec_ld(0,(vector float *)&f),0):LoadUnaligned(&f); @@ -385,8 +439,8 @@ void flext::CopySamples(t_sample *dst,const t_sample *src,int cnt) prefetcht0 [eax+32] } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0) { - if((reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0) { + if(IsVectorAligned(src)) { + if(IsVectorAligned(dst)) { // aligned src, aligned dst __asm { mov eax,dword ptr [src] @@ -434,7 +488,7 @@ loopau: } } else { - if((reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0) { + if(IsVectorAligned(dst)) { // unaligned src, aligned dst __asm { mov eax,dword ptr [src] @@ -638,24 +692,45 @@ static void ScaleAltivec(t_sample *dst,const t_sample *src,t_sample opmul,t_samp cnt -= n<<4; for(; n--; src += 16,dst += 16) { - vector float a1 = vec_ld( 0,src); - vector float a2 = vec_ld(16,src); - vector float a3 = vec_ld(32,src); - vector float a4 = vec_ld(48,src); - - a1 = vec_madd(a1,argmul,argadd); - a2 = vec_madd(a2,argmul,argadd); - a3 = vec_madd(a3,argmul,argadd); - a4 = vec_madd(a4,argmul,argadd); - - vec_st(a1, 0,dst); - vec_st(a2,16,dst); - vec_st(a3,32,dst); - vec_st(a4,48,dst); + vec_st(vec_madd(vec_ld( 0,src),argmul,argadd), 0,dst); + vec_st(vec_madd(vec_ld(16,src),argmul,argadd),16,dst); + vec_st(vec_madd(vec_ld(32,src),argmul,argadd),32,dst); + vec_st(vec_madd(vec_ld(48,src),argmul,argadd),48,dst); } while(cnt--) *(dst++) = *(src++)*opmul+opadd; } + +static void ScaleAltivec(t_sample *dst,const t_sample *src,t_sample opmul,const t_sample *add,int cnt) +{ + const vector float argmul = LoadValue(opmul); + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16,add += 16) { + vec_st(vec_madd(vec_ld( 0,src),argmul,vec_ld( 0,add)), 0,dst); + vec_st(vec_madd(vec_ld(16,src),argmul,vec_ld(16,add)),16,dst); + vec_st(vec_madd(vec_ld(32,src),argmul,vec_ld(32,add)),32,dst); + vec_st(vec_madd(vec_ld(48,src),argmul,vec_ld(48,add)),48,dst); + } + + while(cnt--) *(dst++) = *(src++) * opmul + *(add++); +} + +static void ScaleAltivec(t_sample *dst,const t_sample *src,const t_sample *mul,const t_sample *add,int cnt) +{ + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16,mul += 16,add += 16) { + vec_st(vec_madd(vec_ld( 0,src),vec_ld( 0,mul),vec_ld( 0,add)), 0,dst); + vec_st(vec_madd(vec_ld(16,src),vec_ld(16,mul),vec_ld(16,add)),16,dst); + vec_st(vec_madd(vec_ld(32,src),vec_ld(32,mul),vec_ld(32,add)),32,dst); + vec_st(vec_madd(vec_ld(48,src),vec_ld(48,mul),vec_ld(48,add)),48,dst); + } + + while(cnt--) *(dst++) = *(src++) * *(mul++) + *(add++); +} #endif void flext::SetSamples(t_sample *dst,int cnt,t_sample s) @@ -682,7 +757,7 @@ void flext::SetSamples(t_sample *dst,int cnt,t_sample s) shufps xmm0,xmm0,0 } - if((reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0) { + if(IsVectorAligned(dst)) { // aligned version __asm { mov ecx,[n] @@ -768,9 +843,7 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) shufps xmm0,xmm0,0 } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 - ) { + if(VectorsAligned(src,dst)) { // aligned version __asm { mov ecx,[n] @@ -842,7 +915,7 @@ zero: } else #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) - if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst)) MulAltivec(dst,src,op,cnt); else #endif // _MSC_VER @@ -904,10 +977,8 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,const t_sample *op,int prefetcht0 [ebx+32] } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 - ) { - if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { + if(VectorsAligned(src,dst)) { + if(IsVectorAligned(op)) { __asm { mov ecx,[n] mov eax,dword ptr [src] @@ -985,7 +1056,7 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,const t_sample *op,int } } else { - if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { + if(IsVectorAligned(op)) { __asm { mov ecx,[n] mov eax,dword ptr [src] @@ -1072,7 +1143,7 @@ zero: } else #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) - if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst)) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,op,dst)) MulAltivec(dst,src,op,cnt); else #endif // _MSC_VER @@ -1134,9 +1205,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) shufps xmm0,xmm0,0 } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 - ) { + if(VectorsAligned(src,dst)) { // aligned version __asm { mov ecx,[n] @@ -1202,7 +1271,7 @@ loopu: } else #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) - if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst)) AddAltivec(dst,src,op,cnt); else #endif // _MSC_VER @@ -1263,10 +1332,8 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int int n = cnt>>4; cnt -= n<<4; - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 - ) { - if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { + if(VectorsAligned(src,dst)) { + if(IsVectorAligned(op)) { __asm { mov ecx,dword ptr [n] mov eax,dword ptr [src] @@ -1344,7 +1411,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int } } else { - if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { + if(IsVectorAligned(op)) { __asm { mov ecx,dword ptr [n] mov eax,dword ptr [src] @@ -1430,7 +1497,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int } else #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) - if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst)) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,op,dst)) AddAltivec(dst,src,op,cnt); else #endif // _MSC_VER @@ -1496,9 +1563,7 @@ void flext::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,t_samp shufps xmm1,xmm1,0 } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 - ) { + if(VectorsAligned(src,dst)) { // aligned version __asm { mov ecx,dword ptr [n] @@ -1572,7 +1637,7 @@ loopu: } else #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) - if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst)) ScaleAltivec(dst,src,opmul,opadd,cnt); else #endif // _MSC_VER @@ -1592,12 +1657,135 @@ loopu: #endif } -void flext::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,const t_sample *add,int cnt) +void flext::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,const t_sample *opadd,int cnt) { +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMulC_32f((const float *)src,(float)opmul,(float *)dst,cnt); + ippsAdd_32f_I((float *)opadd,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMulC_64f((const double *)src,(double)opmul,(double *)dst,cnt); + ippsAdd_64f_I((double *)opadd,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + + movss xmm0,xmmword ptr [opmul] + shufps xmm0,xmm0,0 + } + + if(VectorsAligned(src,dst,opadd)) { + // aligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [opadd] +loopa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm2,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movaps xmmword ptr[edx],xmm2 + + movaps xmm3,xmmword ptr[eax+4*4] + movaps xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movaps xmmword ptr[edx+4*4],xmm3 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm5,xmmword ptr[eax+12*4] + movaps xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movaps xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [opadd] +loopu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm2,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movups xmmword ptr[edx],xmm2 + + movups xmm3,xmmword ptr[eax+4*4] + movups xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movups xmmword ptr[edx+4*4],xmm3 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm5,xmmword ptr[eax+12*4] + movups xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movups xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + loop loopu + } + } + while(cnt--) *(dst++) = *(src++) * opmul + *(opadd++); + } + else +#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst,opadd)) + ScaleAltivec(dst,src,opmul,opadd,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD { int n = cnt>>3; cnt -= n<<3; - if(dst == add) { + if(dst == opadd) { while(n--) { dst[0] += src[0]*opmul; dst[1] += src[1]*opmul; dst[2] += src[2]*opmul; dst[3] += src[3]*opmul; @@ -1609,41 +1797,179 @@ void flext::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,const } else { while(n--) { - dst[0] = src[0]*opmul+add[0]; dst[1] = src[1]*opmul+add[1]; - dst[2] = src[2]*opmul+add[2]; dst[3] = src[3]*opmul+add[3]; - dst[4] = src[4]*opmul+add[4]; dst[5] = src[5]*opmul+add[5]; - dst[6] = src[6]*opmul+add[6]; dst[7] = src[7]*opmul+add[7]; - src += 8,dst += 8,add += 8; + dst[0] = src[0]*opmul+opadd[0]; dst[1] = src[1]*opmul+opadd[1]; + dst[2] = src[2]*opmul+opadd[2]; dst[3] = src[3]*opmul+opadd[3]; + dst[4] = src[4]*opmul+opadd[4]; dst[5] = src[5]*opmul+opadd[5]; + dst[6] = src[6]*opmul+opadd[6]; dst[7] = src[7]*opmul+opadd[7]; + src += 8,dst += 8,opadd += 8; } - while(cnt--) *(dst++) = *(src++)*opmul+*(add++); + while(cnt--) *(dst++) = *(src++)*opmul+*(opadd++); } } +#endif } -void flext::ScaleSamples(t_sample *dst,const t_sample *src,const t_sample *mul,const t_sample *add,int cnt) +void flext::ScaleSamples(t_sample *dst,const t_sample *src,const t_sample *opmul,const t_sample *opadd,int cnt) { +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMul_32f((const float *)src,(const float *)opmul,(float *)dst,cnt); + ippsAdd_32f_I((const float *)opadd,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMul_64f((const double *)src,(const double *)opmul,(double *)dst,cnt); + ippsAdd_64f_I((const double *)opadd,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + } + + if(VectorsAligned(src,dst,opmul,opadd)) { + // aligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov esi,dword ptr [opmul] + mov ebx,dword ptr [opadd] +loopa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [esi+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + prefetcht0 [esi+96] + + movaps xmm2,xmmword ptr[eax] + movaps xmm0,xmmword ptr[esi] + movaps xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movaps xmmword ptr[edx],xmm2 + + movaps xmm3,xmmword ptr[eax+4*4] + movaps xmm0,xmmword ptr[esi+4*4] + movaps xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movaps xmmword ptr[edx+4*4],xmm3 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm0,xmmword ptr[esi+8*4] + movaps xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm5,xmmword ptr[eax+12*4] + movaps xmm0,xmmword ptr[esi+12*4] + movaps xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movaps xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + add esi,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov esi,dword ptr [opmul] + mov ebx,dword ptr [opadd] +loopu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [esi+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + prefetcht0 [esi+96] + + movups xmm2,xmmword ptr[eax] + movups xmm0,xmmword ptr[esi] + movups xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movups xmmword ptr[edx],xmm2 + + movups xmm3,xmmword ptr[eax+4*4] + movups xmm0,xmmword ptr[esi+4*4] + movups xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movups xmmword ptr[edx+4*4],xmm3 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm0,xmmword ptr[esi+8*4] + movups xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm5,xmmword ptr[eax+12*4] + movups xmm0,xmmword ptr[esi+12*4] + movups xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movups xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + add esi,16*4 + loop loopu + } + } + while(cnt--) *(dst++) = *(src++) * *(opmul++) + *(opadd++); + } + else +#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst,opmul,opadd)) + ScaleAltivec(dst,src,opmul,opadd,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD { int n = cnt>>3; cnt -= n<<3; - if(dst == add) { + if(dst == opadd) { while(n--) { - dst[0] += src[0]*mul[0]; dst[1] += src[1]*mul[1]; - dst[2] += src[2]*mul[2]; dst[3] += src[3]*mul[3]; - dst[4] += src[4]*mul[4]; dst[5] += src[5]*mul[5]; - dst[6] += src[6]*mul[6]; dst[7] += src[7]*mul[7]; - src += 8,dst += 8,mul += 8; + dst[0] += src[0]*opmul[0]; dst[1] += src[1]*opmul[1]; + dst[2] += src[2]*opmul[2]; dst[3] += src[3]*opmul[3]; + dst[4] += src[4]*opmul[4]; dst[5] += src[5]*opmul[5]; + dst[6] += src[6]*opmul[6]; dst[7] += src[7]*opmul[7]; + src += 8,dst += 8,opmul += 8; } - while(cnt--) *(dst++) += *(src++) * *(mul++); + while(cnt--) *(dst++) += *(src++) * *(opmul++); } else { while(n--) { - dst[0] = src[0]*mul[0]+add[0]; dst[1] = src[1]*mul[1]+add[1]; - dst[2] = src[2]*mul[2]+add[2]; dst[3] = src[3]*mul[3]+add[3]; - dst[4] = src[4]*mul[4]+add[4]; dst[5] = src[5]*mul[5]+add[5]; - dst[6] = src[6]*mul[6]+add[6]; dst[7] = src[7]*mul[7]+add[7]; - src += 8,dst += 8,mul += 8,add += 8; + dst[0] = src[0]*opmul[0]+opadd[0]; dst[1] = src[1]*opmul[1]+opadd[1]; + dst[2] = src[2]*opmul[2]+opadd[2]; dst[3] = src[3]*opmul[3]+opadd[3]; + dst[4] = src[4]*opmul[4]+opadd[4]; dst[5] = src[5]*opmul[5]+opadd[5]; + dst[6] = src[6]*opmul[6]+opadd[6]; dst[7] = src[7]*opmul[7]+opadd[7]; + src += 8,dst += 8,opmul += 8,opadd += 8; } - while(cnt--) *(dst++) = *(src++)* *(mul++) + *(add++); + while(cnt--) *(dst++) = *(src++)* *(opmul++) + *(opadd++); } } +#endif } diff --git a/externals/grill/flext/tutorial/adv1/Makefile.am b/externals/grill/flext/tutorial/adv1/Makefile.am index ba556deb..d849ba2f 100644 --- a/externals/grill/flext/tutorial/adv1/Makefile.am +++ b/externals/grill/flext/tutorial/adv1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/adv2/Makefile.am b/externals/grill/flext/tutorial/adv2/Makefile.am index efd61012..6daf4f32 100644 --- a/externals/grill/flext/tutorial/adv2/Makefile.am +++ b/externals/grill/flext/tutorial/adv2/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/adv3/Makefile.am b/externals/grill/flext/tutorial/adv3/Makefile.am index 5eadc6aa..6c083c80 100644 --- a/externals/grill/flext/tutorial/adv3/Makefile.am +++ b/externals/grill/flext/tutorial/adv3/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/attr1/Makefile.am b/externals/grill/flext/tutorial/attr1/Makefile.am index 531eace6..000b2a85 100644 --- a/externals/grill/flext/tutorial/attr1/Makefile.am +++ b/externals/grill/flext/tutorial/attr1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/attr2/Makefile.am b/externals/grill/flext/tutorial/attr2/Makefile.am index f1a6a347..ed29b067 100644 --- a/externals/grill/flext/tutorial/attr2/Makefile.am +++ b/externals/grill/flext/tutorial/attr2/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/attr3/Makefile.am b/externals/grill/flext/tutorial/attr3/Makefile.am index a94ce0f8..eb4befbb 100644 --- a/externals/grill/flext/tutorial/attr3/Makefile.am +++ b/externals/grill/flext/tutorial/attr3/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/bind1/Makefile.am b/externals/grill/flext/tutorial/bind1/Makefile.am index 8e360f2f..085de2d2 100644 --- a/externals/grill/flext/tutorial/bind1/Makefile.am +++ b/externals/grill/flext/tutorial/bind1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/buffer1/Makefile.am b/externals/grill/flext/tutorial/buffer1/Makefile.am index a11d11be..05a9b98a 100644 --- a/externals/grill/flext/tutorial/buffer1/Makefile.am +++ b/externals/grill/flext/tutorial/buffer1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/lib1/Makefile.am b/externals/grill/flext/tutorial/lib1/Makefile.am index e9865545..6083365d 100644 --- a/externals/grill/flext/tutorial/lib1/Makefile.am +++ b/externals/grill/flext/tutorial/lib1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/signal1/Makefile.am b/externals/grill/flext/tutorial/signal1/Makefile.am index 98c237c0..857be41e 100644 --- a/externals/grill/flext/tutorial/signal1/Makefile.am +++ b/externals/grill/flext/tutorial/signal1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/signal2/Makefile.am b/externals/grill/flext/tutorial/signal2/Makefile.am index 30ccfda0..6aaf483d 100644 --- a/externals/grill/flext/tutorial/signal2/Makefile.am +++ b/externals/grill/flext/tutorial/signal2/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/simple1/Makefile.am b/externals/grill/flext/tutorial/simple1/Makefile.am index f7cb220e..d918a68d 100644 --- a/externals/grill/flext/tutorial/simple1/Makefile.am +++ b/externals/grill/flext/tutorial/simple1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/simple2/Makefile.am b/externals/grill/flext/tutorial/simple2/Makefile.am index 60a3fde4..696c144b 100644 --- a/externals/grill/flext/tutorial/simple2/Makefile.am +++ b/externals/grill/flext/tutorial/simple2/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/simple3/Makefile.am b/externals/grill/flext/tutorial/simple3/Makefile.am index 9c610387..f4436562 100644 --- a/externals/grill/flext/tutorial/simple3/Makefile.am +++ b/externals/grill/flext/tutorial/simple3/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/sndobj1/Makefile.am b/externals/grill/flext/tutorial/sndobj1/Makefile.am index 2c9b1436..40dcd384 100644 --- a/externals/grill/flext/tutorial/sndobj1/Makefile.am +++ b/externals/grill/flext/tutorial/sndobj1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/stk1/Makefile.am b/externals/grill/flext/tutorial/stk1/Makefile.am index dd6c86d1..3449f410 100644 --- a/externals/grill/flext/tutorial/stk1/Makefile.am +++ b/externals/grill/flext/tutorial/stk1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/stk2/Makefile.am b/externals/grill/flext/tutorial/stk2/Makefile.am index 93c7b6b9..fe13e6a3 100644 --- a/externals/grill/flext/tutorial/stk2/Makefile.am +++ b/externals/grill/flext/tutorial/stk2/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/thread1/Makefile.am b/externals/grill/flext/tutorial/thread1/Makefile.am index 268b3625..e8965b14 100644 --- a/externals/grill/flext/tutorial/thread1/Makefile.am +++ b/externals/grill/flext/tutorial/thread1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/thread2/Makefile.am b/externals/grill/flext/tutorial/thread2/Makefile.am index 2e5c4e09..8b0e89da 100644 --- a/externals/grill/flext/tutorial/thread2/Makefile.am +++ b/externals/grill/flext/tutorial/thread2/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ diff --git a/externals/grill/flext/tutorial/timer1/Makefile.am b/externals/grill/flext/tutorial/timer1/Makefile.am index 25db9868..c5ab15f3 100644 --- a/externals/grill/flext/tutorial/timer1/Makefile.am +++ b/externals/grill/flext/tutorial/timer1/Makefile.am @@ -18,10 +18,10 @@ CXXFLAGS = @CXXFLAGS@ \ $(DEFS) \ -DFLEXT_SHARED -LDFLAGS = @LDFLAGS@ \ +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ $(patsubst %,-framework %,$(FRAMEWORKS)) -LIBS = @LIBS@ -lflext +LIBS = @LIBS@ -lflext-pd FRAMEWORKS = @FRAMEWORKS@ -- cgit v1.2.1