aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2004-10-26 20:03:50 +0000
committerThomas Grill <xovo@users.sourceforge.net>2004-10-26 20:03:50 +0000
commitc752987457f50c1adf5051e1fd8167a5637f1e34 (patch)
treee78349513f1c0c7f37bd6d96935f90d9c5257e15 /externals/grill/flext
parente44cd51e389696bc871ece7d9ea08d10a683382e (diff)
""
svn path=/trunk/; revision=2169
Diffstat (limited to 'externals/grill/flext')
-rwxr-xr-xexternals/grill/flext/.cvsignore9
-rwxr-xr-xexternals/grill/flext/Makefile.am10
-rwxr-xr-xexternals/grill/flext/bootstrap.sh5
-rw-r--r--externals/grill/flext/changes.txt4
-rw-r--r--externals/grill/flext/config-pd-darwin.txt7
-rwxr-xr-xexternals/grill/flext/configure.ac136
-rwxr-xr-xexternals/grill/flext/flext.pbproj/project.pbxproj37
-rw-r--r--externals/grill/flext/flext.vcproj8
-rw-r--r--externals/grill/flext/flext.vcproj.vspscc10
-rw-r--r--externals/grill/flext/makefile.pd-darwin11
-rw-r--r--externals/grill/flext/makefile.pd-linux6
-rwxr-xr-xexternals/grill/flext/source/Makefile.am116
-rw-r--r--externals/grill/flext/source/flatom_pr.cpp8
-rw-r--r--externals/grill/flext/source/flext.h4
-rw-r--r--externals/grill/flext/source/flmap.h19
-rwxr-xr-xexternals/grill/flext/source/flsimd.cpp57
-rw-r--r--externals/grill/flext/source/flsupport.cpp10
-rw-r--r--externals/grill/flext/source/flsupport.h8
-rwxr-xr-xexternals/grill/flext/source/flxlet.cpp4
19 files changed, 358 insertions, 111 deletions
diff --git a/externals/grill/flext/.cvsignore b/externals/grill/flext/.cvsignore
deleted file mode 100755
index 51cbd3a7..00000000
--- a/externals/grill/flext/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-max-os9
-max-osx
-pd-darwin
-pd-msvc
-doc
-build
-flext Data
-.DS_Store
-
diff --git a/externals/grill/flext/Makefile.am b/externals/grill/flext/Makefile.am
new file mode 100755
index 00000000..9bcf5bb0
--- /dev/null
+++ b/externals/grill/flext/Makefile.am
@@ -0,0 +1,10 @@
+#
+# automake template
+# added by tim blechmann
+#
+
+SUBDIRS = source
+
+EXTRA_DIST = flext.doxy # examples tutorial
+
+AUTOMAKE_OPTIONS = foreign \ No newline at end of file
diff --git a/externals/grill/flext/bootstrap.sh b/externals/grill/flext/bootstrap.sh
new file mode 100755
index 00000000..52a86eda
--- /dev/null
+++ b/externals/grill/flext/bootstrap.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+aclocal \
+&& automake --add-missing \
+&& autoconf
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt
index cdabf647..d9b96343 100644
--- a/externals/grill/flext/changes.txt
+++ b/externals/grill/flext/changes.txt
@@ -13,6 +13,10 @@ Donations for further development of the package are highly appreciated.
Version history:
+0.4.8:
+- fixes for 64 bit builds (size_t is integer type of pointer size)
+- finally added a autoconf system (many many thanks to Tim Blechmann)
+
0.4.7:
- added flext::GetBool (just because flext::GetInt has been there for a while)
- added bool to usable types for creation arguments
diff --git a/externals/grill/flext/config-pd-darwin.txt b/externals/grill/flext/config-pd-darwin.txt
index 0420315e..5f60ce4a 100644
--- a/externals/grill/flext/config-pd-darwin.txt
+++ b/externals/grill/flext/config-pd-darwin.txt
@@ -25,4 +25,9 @@ INSTDIR=/usr/local/lib/pd/flext
# additional compiler flags
# (check if they fit for your system!)
-UFLAGS=-DFLEXT_USE_SIMD -malign-power -maltivec -faltivec
+UFLAGS=-DFLEXT_USE_SIMD -maltivec -faltivec
+
+
+
+
+
diff --git a/externals/grill/flext/configure.ac b/externals/grill/flext/configure.ac
new file mode 100755
index 00000000..4c0a0057
--- /dev/null
+++ b/externals/grill/flext/configure.ac
@@ -0,0 +1,136 @@
+dnl
+dnl autoconf template
+dnl added by tim blechmann
+dnl
+
+dnl flext API version (current:release:age)
+API_VERSION=0:0:0
+
+AC_INIT([flext],[0.4.7],[gr@grrrr.org],[flext])
+AM_INIT_AUTOMAKE(1.6)
+
+
+dnl configure options
+AC_ARG_ENABLE(system, [ --enable-system flext system (default: pd)],
+ [
+ case $enableval in
+ max) AC_DEFINE(FLEXT_SYS,1);;
+ *) AC_DEFINE(FLEXT_SYS,2);;
+ esac
+ system = $enableval
+ ],
+ AC_DEFINE(FLEXT_SYS,2))
+
+AC_ARG_WITH(sysdir,
+ [ --with-sysdir path to pd or max headers],
+ [
+ sysdir=$withval
+ INCLUDEDIR="-I$withval $INCLUDEDIR"
+ ],
+ [echo "path to system headers required "$enableval && exit 1])
+
+dnl check for g_canvas.h in pd folder
+AC_CHECK_FILE("$sysdir/g_canvas.h",,[echo "$sysdir/g_canvas.h not found" && exit 1])
+
+AC_ARG_WITH(stkdir,
+ [ --with-stkdir path to stk headers],
+ [
+ AC_CHECK_FILE("$withval/Stk.h",,[echo "$withval/Stk.h not found" && exit 1])
+ stkdir=$withval
+ INCLUDEDIR="-I$withval $INCLUDEDIR"
+ ])
+
+AM_CONDITIONAL([STK],[test "$stkdir"])
+
+AC_ARG_WITH(sndobjdir,
+ [ --with-sndobjdir path to SndObj headers],
+ [
+ AC_CHECK_FILE("$withval/SndObj.h",,[echo "$withval/SndObj.h not found" && exit 1])
+ sndobjdir=$withval
+ INCLUDEDIR="-I$withval $INCLUDEDIR"
+ ])
+
+AM_CONDITIONAL([SNDOBJ],[test "$sndobjdir"])
+
+AC_ARG_ENABLE(optimize, [ --enable-optimize enables optimized builds for: pentium4, pentium3, G4, G5],
+ [
+ case $enableval in
+ pentium3 | pentium3m)
+ OPT_FLAGS = "-mtune=$enableval -march=$enableval -mmmx -msse -mfpmath=sse";
+ AC_DEFINE(FLEXT_USE_SIMD);;
+ pentium2 | athlon | pentium-mmx)
+ OPT_FLAGS="-mtune=$enableval -march=$enableval -mmmx";;
+ pentium)
+ OPT_FLAGS="-mtune=$enableval -march=$enableval";;
+ pentium4 | pentium4m | pentium-m | prescott | nocona | athlon-xp | athlon-mp | athlon64 | opteron)
+ OPT_FLAGS="-mtune=$enableval -march=$enableval -mmmx -msse -msse2 -mfpmath=sse";
+ AC_DEFINE(FLEXT_USE_SIMD);;
+ G5 | G4)
+ OPT_FLAGS="-mtune=$enableval -march=$enableval -maltivec -faltivec -malign-natural";
+ AC_DEFINE(FLEXT_USE_SIMD);;
+ G3)
+ OPT_FLAGS="-mtune=$enableval -march=$enableval -malign-natural";;
+ *)
+ ;;
+ esac
+ ])
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+dnl Checks for libraries.
+
+dnl Checks for header files.
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+AC_STRUCT_TM
+
+dnl Checks for library functions.
+
+dnl system specific
+
+if test $(uname -s) == Linux ; then
+ DYNAMIC_LDFLAGS="-Wl,-Bdynamic"
+ PDEXT=pd_linux
+ SOEXT=so
+fi
+if test $(uname -s) == Darwin ; then
+ DYNAMIC_LDFLAGS="-version-info $API_VERSION -release $AC_PACKAGE_VERSION -dylib -dynamic -flat_namespace -undefined suppress"
+
+ if test $system == max ; then
+ PDEXT=mxo
+ SOEXT=dylib
+ FRAMEWORKS=vecLib maxlib maxaudio
+ else
+ PDEXT=pd_darwin
+ SOEXT=dylib
+ FRAMEWORKS=vecLib
+ fi
+fi
+
+dnl else
+dnl echo "Platform NOT supported"
+dnl exit 1
+dnl fi
+
+dnl todo: mingw / cygwin
+
+AC_SUBST(INCLUDEDIR)
+AC_SUBST(OPT_FLAGS)
+AC_SUBST(DYNAMIC_LDFLAGS)
+AC_SUBST(stkdir)
+AC_SUBST(sndobjdir)
+AC_SUBST(PDEXT)
+AC_SUBST(SOEXT)
+AC_SUBST(FRAMEWORKS) dnl for osx
+AC_OUTPUT([
+ Makefile
+ tutorial/Makefile
+ source/Makefile])
diff --git a/externals/grill/flext/flext.pbproj/project.pbxproj b/externals/grill/flext/flext.pbproj/project.pbxproj
index 3cf5e9b6..7164a900 100755
--- a/externals/grill/flext/flext.pbproj/project.pbxproj
+++ b/externals/grill/flext/flext.pbproj/project.pbxproj
@@ -109,8 +109,7 @@
sourceTree = "<group>";
};
08FB77AAFE841565C02AAC07 = {
- fallbackIsa = PBXFileReference;
- isa = PBXFrameworkReference;
+ isa = PBXFileReference;
lastKnownFileType = wrapper.framework;
name = Carbon.framework;
path = /System/Library/Frameworks/Carbon.framework;
@@ -648,8 +647,6 @@
};
};
F5128F2503864E5501A80AC9 = {
- buildRules = (
- );
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
@@ -662,8 +659,6 @@
name = Development;
};
F5128F2603864E5501A80AC9 = {
- buildRules = (
- );
buildSettings = {
COPY_PHASE_STRIP = YES;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
@@ -1025,8 +1020,7 @@
};
F55CEDC20383E6E401A80AC9 = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = flext.a;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
@@ -1415,8 +1409,7 @@
};
F55CEE120383F55201A80AC9 = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = flext_t.a;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
@@ -1666,8 +1659,7 @@
};
F55CEE2F0383F57A01A80AC9 = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = flext_d.a;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
@@ -1917,8 +1909,7 @@
};
F55CEE4C0383F59B01A80AC9 = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = flext_td.a;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
@@ -2235,8 +2226,7 @@
};
F59A5FAD0386DF3201A80AC9 = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = flext_t.max.a;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
@@ -2482,8 +2472,7 @@
};
F5AAF632038683E801A80AC9 = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = flext.max.a;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
@@ -2810,8 +2799,7 @@
};
F5C2051103D403B401A80AC9 = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = flext.a;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
@@ -3105,8 +3093,7 @@
};
F5C2062403D470B401A80AC9 = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = flext_t.a;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
@@ -3415,8 +3402,7 @@
};
F5CBC5B704757A5901A0C81C = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = libflext.dylib;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
@@ -4502,8 +4488,7 @@
};
F5CBC69B047584CD01A0C81C = {
explicitFileType = "compiled.mach-o.dylib";
- fallbackIsa = PBXFileReference;
- isa = PBXLibraryReference;
+ isa = PBXFileReference;
path = libflext_d.dylib;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
diff --git a/externals/grill/flext/flext.vcproj b/externals/grill/flext/flext.vcproj
index 6dba0f79..6061ce62 100644
--- a/externals/grill/flext/flext.vcproj
+++ b/externals/grill/flext/flext.vcproj
@@ -3,11 +3,8 @@
ProjectType="Visual C++"
Version="7.10"
Name="flext"
- ProjectGUID="{817F8B42-38B6-401B-9D36-E3C77429A9F2}"
- SccProjectName="max/flext"
- SccAuxPath=""
- SccLocalPath="."
- SccProvider="MSSCCI:Jalindi Igloo">
+ ProjectGUID="{B94DB81C-B5FB-4984-99DC-5063C3793BFE}"
+ Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
@@ -336,6 +333,7 @@
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="TRUE"
+ Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"
CompileAs="0"/>
<Tool
diff --git a/externals/grill/flext/flext.vcproj.vspscc b/externals/grill/flext/flext.vcproj.vspscc
deleted file mode 100644
index 6cb031bc..00000000
--- a/externals/grill/flext/flext.vcproj.vspscc
+++ /dev/null
@@ -1,10 +0,0 @@
-""
-{
-"FILE_VERSION" = "9237"
-"ENLISTMENT_CHOICE" = "NEVER"
-"PROJECT_FILE_RELATIVE_PATH" = ""
-"NUMBER_OF_EXCLUDED_FILES" = "0"
-"ORIGINAL_PROJECT_FILE_PATH" = ""
-"NUMBER_OF_NESTED_PROJECTS" = "0"
-"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
-}
diff --git a/externals/grill/flext/makefile.pd-darwin b/externals/grill/flext/makefile.pd-darwin
index dd4e8a84..7accda82 100644
--- a/externals/grill/flext/makefile.pd-darwin
+++ b/externals/grill/flext/makefile.pd-darwin
@@ -31,6 +31,11 @@ CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS
# flags for shared linking
LSHFLAGS= -dylib -dynamic -flat_namespace -undefined suppress
+ifdef $(INSTDIR)
+LSHFLAGS_R=-dylib_install_name $(INSTDIR)/libflext.dylib
+LSHFLAGS_D=-dylib_install_name $(INSTDIR)/libflext_d.dylib
+endif
+
# frameworks
#FRAMEWORKS=Carbon veclib
@@ -59,7 +64,7 @@ HDRS+=$(HDRS_STK)
endif
-MAKEFILE=makefile.pd-darwin
+MAKEFILE=#makefile.pd-darwin
TARGET=$(TARGDIR)/lib$(NAME).a
TARGET_D=$(TARGDIR)/lib$(NAME)_d.a
@@ -108,10 +113,10 @@ $(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
libtool -static -o $@ $^
$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.so,$(SRCS))
- ld $(LSHFLAGS) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS))
+ ld $(LSHFLAGS) $(LSHFLAGS_R) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS))
$(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS))
- ld $(LSHFLAGS) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS))
+ ld $(LSHFLAGS) $(LSHFLAGS_D) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS))
.PHONY: clean install
diff --git a/externals/grill/flext/makefile.pd-linux b/externals/grill/flext/makefile.pd-linux
index 718d72c7..70567c97 100644
--- a/externals/grill/flext/makefile.pd-linux
+++ b/externals/grill/flext/makefile.pd-linux
@@ -16,13 +16,13 @@ include ${CONFIG}
INCLUDES=${PDPATH}
# general compiler flags
-FLAGS=-DFLEXT_SYS=2 ${UFLAGS}
+FLAGS=-DFLEXT_SYS=2 -fPIC ${UFLAGS}
# compiler flags for optimized build
-CFLAGS=-O2
+CFLAGS=-O2
# compiler flags for debug build
-CFLAGS_D=-g -DFLEXT_DEBUG
+CFLAGS_D=-g -DFLEXT_DEBUG
# additional flags for threading
CFLAGS_T=-DFLEXT_THREADS
diff --git a/externals/grill/flext/source/Makefile.am b/externals/grill/flext/source/Makefile.am
new file mode 100755
index 00000000..49f0b5f7
--- /dev/null
+++ b/externals/grill/flext/source/Makefile.am
@@ -0,0 +1,116 @@
+#
+# automake template
+# added by tim blechmann
+#
+
+lib_LIBRARIES = libflext.a libflext_d.a libflext_t.a libflext_td.a
+
+SRCS_FLEXT = \
+ flbase.cpp \
+ flext.cpp \
+ flbuf.cpp \
+ fldsp.cpp \
+ fllib.cpp \
+ flxlet.cpp \
+ flattr.cpp \
+ flattr_ed.cpp \
+ flsupport.cpp \
+ flutil.cpp \
+ flatom.cpp \
+ flatom_pr.cpp \
+ flthr.cpp \
+ fltimer.cpp \
+ flsimd.cpp \
+ flout.cpp \
+ flatom_app.cpp \
+ flatom_part.cpp \
+ flitem.cpp \
+ flmeth.cpp \
+ flmsg.cpp \
+ flproxy.cpp \
+ flqueue.cpp \
+ flbind.cpp
+
+pkginclude_HEADERS = \
+ flprefix.h \
+ flstdc.h \
+ flbase.h \
+ flclass.h \
+ flext.h \
+ flsupport.h \
+ flmap.h \
+ fldsp.h \
+ flinternal.h \
+ fldefs.h \
+ fldefs_hdr.h \
+ fldefs_setup.h \
+ fldefs_methcb.h \
+ fldefs_meththr.h \
+ fldefs_methadd.h \
+ fldefs_methbind.h \
+ fldefs_methcall.h \
+ fldefs_attrcb.h \
+ fldefs_attrvar.h \
+ fldefs_attradd.h
+
+
+if SNDOBJ
+SRCS_SNDOBJ = flsndobj.cpp
+HDRS_SNDOBJ = flsndobj.cpp
+LIB_SNDOBJ = -lsndobj
+endif
+
+if STK
+SRCS_STK = flstk.cpp
+HDRS_STK = flstk.cpp
+LIB_STK = -lstk
+endif
+
+pkginclude_HEADERS += $(HDRS_SNDOBJ) $(HDRS_STK)
+FRAMEWORKS = @FRAMEWORKS@
+
+
+# for static libraries we can use automake
+libflext_a_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
+libflext_d_a_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
+libflext_t_a_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
+libflext_td_a_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
+
+libflext_a_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@
+libflext_d_a_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG
+libflext_t_a_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_THREADS
+libflext_td_a_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_THREADS
+
+libflext_a_LDFLAGS_ = @OPT_FLAGS@ @INCLUDEDIR@ $(patsubst %,-framework %,$(FRAMEWORKS))
+libflext_d_a_LDFLAGS_ = @INCLUDEDIR@ -g -DFLEXT_DEBUG $(patsubst %,-framework %,$(FRAMEWORKS))
+libflext_t_a_LDFLAGS_ = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_THREADS $(patsubst %,-framework %,$(FRAMEWORKS))
+libflext_td_a_LDFLAGS_ = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_THREADS $(patsubst %,-framework %,$(FRAMEWORKS))
+
+# for shared libraries, we can't ...
+libflext_la_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_SHARED -DFLEXT_EXPORTS $(DEFS)
+libflext_d_la_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_SHARED -DFLEXT_EXPORTS $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
+
+libflext_la_LDFLAGS_ = @DYNAMIC_LDFLAGS@ $(LIB_STK) $(LIB_SNDOBJ) $(LDFLAGS) $(patsubst %,-framework %,$(FRAMEWORKS))
+libflext_d_la_LDFLAGS_ = @DYNAMIC_LDFLAGS@ $(LIB_STK) $(LIB_SNDOBJ) $(LDFLAGS) $(patsubst %,-framework %,$(FRAMEWORKS))
+
+libflext_la_NAME = libflext.@SOEXT@
+libflext_d_la_NAME = libflext_d.@SOEXT@
+
+
+all-local: $(libflext_la_NAME) $(libflext_d_la_NAME)
+
+$(libflext_la_NAME): $(patsubst %.cpp,libflext_la-%.o,$(SRCS_FLEXT))
+ $(CXX) -shared $(libflext_la_LDFLAGS_) $(LIBS) -o $(libflext_la_NAME) $^
+
+libflext_la-%.o: %.cpp
+ $(CXX) -shared -c $(libflext_la_CXXFLAGS) $< -o $@
+
+$(libflext_d_la_NAME): $(patsubst %.cpp,libflext_d_la-%.o,$(SRCS_FLEXT))
+ $(CXX) -shared $(libflext_d_la_LDFLAGS_) $(LIBS) -o $(libflext_d_la_NAME) $^
+
+libflext_d_la-%.o: %.cpp
+ $(CXX) -shared -c $(libflext_d_la_CXXFLAGS) $< -o $@
+
+install-exec-local:
+ $(libLIBRARIES_INSTALL) $(libflext_la_NAME) $(DESTDIR)$(libdir)
+ $(libLIBRARIES_INSTALL) $(libflext_d_la_NAME) $(DESTDIR)$(libdir) \ No newline at end of file
diff --git a/externals/grill/flext/source/flatom_pr.cpp b/externals/grill/flext/source/flatom_pr.cpp
index 5b15648a..cfc69266 100644
--- a/externals/grill/flext/source/flatom_pr.cpp
+++ b/externals/grill/flext/source/flatom_pr.cpp
@@ -23,7 +23,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#endif
// \TODO take bufsz into account!
-bool flext::PrintAtom(const t_atom &a,char *buf,int bufsz)
+bool flext::PrintAtom(const t_atom &a,char *buf,size_t bufsz)
{
bool ok = true;
if(IsFloat(a)) {
@@ -37,7 +37,7 @@ bool flext::PrintAtom(const t_atom &a,char *buf,int bufsz)
*buf = 0;
else {
const char *c = GetString(a);
- int len = strlen(c);
+ size_t len = strlen(c);
if(len < bufsz) {
memcpy(buf,c,len); buf[len] = 0;
ok = true;
@@ -70,14 +70,14 @@ bool flext::PrintAtom(const t_atom &a,char *buf,int bufsz)
return ok;
}
-bool flext::PrintList(int argc,const t_atom *argv,char *buf,int bufsz)
+bool flext::PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz)
{
bool ok = true;
for(int i = 0; ok && i < argc && bufsz > 0; ++i) {
if(i) { *(buf++) = ' '; --bufsz; } // prepend space
if(PrintAtom(argv[i],buf,bufsz)) {
- int len = strlen(buf);
+ size_t len = strlen(buf);
buf += len,bufsz -= len;
}
else
diff --git a/externals/grill/flext/source/flext.h b/externals/grill/flext/source/flext.h
index 8d8f6e74..4dc3f421 100644
--- a/externals/grill/flext/source/flext.h
+++ b/externals/grill/flext/source/flext.h
@@ -23,10 +23,10 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
//! \brief flext version number
-#define FLEXT_VERSION 407
+#define FLEXT_VERSION 408
//! \brief flext version string
-#define FLEXT_VERSTR "0.4.7"
+#define FLEXT_VERSTR "0.4.8pre"
//! @}
diff --git a/externals/grill/flext/source/flmap.h b/externals/grill/flext/source/flmap.h
index c20b5ade..64d4f565 100644
--- a/externals/grill/flext/source/flmap.h
+++ b/externals/grill/flext/source/flmap.h
@@ -21,18 +21,21 @@ WARRANTIES, see the file, "license.txt," in this distribution.
@{
*/
+//! Key/Value type for AnyMap... must have size of pointer!
+typedef size_t AnyMapType;
+
//! Base class for maps
class AnyMap:
- public std::map<unsigned int,unsigned int>
+ public std::map<AnyMapType,AnyMapType>
{
- typedef std::map<unsigned int,unsigned int> Parent;
+ typedef std::map<AnyMapType,AnyMapType> Parent;
public:
AnyMap();
~AnyMap();
- iterator find(unsigned int k);
- unsigned int &operator [](unsigned int k);
+ iterator find(AnyMapType k);
+ AnyMapType &operator [](AnyMapType k);
- typedef std::pair<unsigned int,unsigned int> pair;
+ typedef std::pair<AnyMapType,AnyMapType> pair;
};
//! Specialized map class for any 32-bit key/value types
@@ -66,9 +69,9 @@ public:
inline T &data() const { return *(T *)&second; }
};
- inline iterator find(K k) { return AnyMap::find(*(unsigned int *)&k); }
- inline T &operator [](K k) { return *(T *)&(AnyMap::operator [](*(unsigned int *)&k)); }
- inline void erase(K k) { AnyMap::erase(*(unsigned int *)&k); }
+ inline iterator find(K k) { return AnyMap::find(*(AnyMapType *)&k); }
+ inline T &operator [](K k) { return *(T *)&(AnyMap::operator [](*(AnyMapType *)&k)); }
+ inline void erase(K k) { AnyMap::erase(*(AnyMapType *)&k); }
};
//! @} // FLEXT_SUPPORT
diff --git a/externals/grill/flext/source/flsimd.cpp b/externals/grill/flext/source/flsimd.cpp
index d3487790..12cdba7c 100755
--- a/externals/grill/flext/source/flsimd.cpp
+++ b/externals/grill/flext/source/flsimd.cpp
@@ -35,7 +35,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <xmmintrin.h> // SSE
#include <emmintrin.h> // SSE2
#include <mm3dnow.h> // 3DNow!
- #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__MWERKS__) && defined(__ALTIVEC__)
+ #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__MWERKS__) && defined(__VEC__)
#if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH
#include <sys/sysctl.h>
#include <vDSP.h>
@@ -47,7 +47,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <altivec.h>
#include <vectorOps.h>
- #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__GNUG__) && defined(__ALTIVEC__)
+ #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__GNUG__) && defined(__VEC__)
#include <sys/sysctl.h>
#include <vecLib/vecLib.h>
#endif
@@ -272,7 +272,6 @@ static unsigned long setsimdcaps()
if(cpuinfo.os_support&_CPU_FEATURE_SSE) simdflags += flext::simd_sse;
if(cpuinfo.os_support&_CPU_FEATURE_SSE2) simdflags += flext::simd_sse2;
#elif FLEXT_CPU == FLEXT_CPU_PPC
-
#if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH
int selectors[2] = { CTL_HW, HW_VECTORUNIT };
@@ -297,7 +296,7 @@ static unsigned long setsimdcaps()
}
-#if FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
+#if FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
/* functions for misaligned vector data - taken from the Altivec tutorial of Ian Ollmann, Ph.D. */
@@ -386,8 +385,8 @@ void flext::CopySamples(t_sample *dst,const t_sample *src,int cnt)
prefetcht0 [eax+32]
}
- if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0) {
- if((reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0) {
+ if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0) {
+ if((reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0) {
// aligned src, aligned dst
__asm {
mov eax,dword ptr [src]
@@ -435,7 +434,7 @@ loopau:
}
}
else {
- if((reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0) {
+ if((reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0) {
// unaligned src, aligned dst
__asm {
mov eax,dword ptr [src]
@@ -509,7 +508,7 @@ zero:
#endif
}
-#if defined(FLEXT_USE_SIMD) && FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
+#if defined(FLEXT_USE_SIMD) && FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
// because of some frame code Altivec stuff should be in seperate functions....
static const vector float zero = (vector float)(0);
@@ -683,7 +682,7 @@ void flext::SetSamples(t_sample *dst,int cnt,t_sample s)
shufps xmm0,xmm0,0
}
- if((reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0) {
+ if((reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0) {
// aligned version
__asm {
mov ecx,[n]
@@ -717,7 +716,7 @@ zero:
while(cnt--) *(dst++) = s;
}
else
-#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
+#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(dst))
SetAltivec(dst,cnt,s);
else
@@ -769,8 +768,8 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt)
shufps xmm0,xmm0,0
}
- if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0
- && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
+ if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
+ && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
) {
// aligned version
__asm {
@@ -842,7 +841,7 @@ zero:
vsmul(src,1,&op,dst,1,cnt);
}
else
-#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
+#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst))
MulAltivec(dst,src,op,cnt);
else
@@ -905,10 +904,10 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,const t_sample *op,int
prefetcht0 [ebx+32]
}
- if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0
- && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
+ if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
+ && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
) {
- if((reinterpret_cast<unsigned long>(op)&(__alignof(__m128)-1)) == 0) {
+ if((reinterpret_cast<size_t>(op)&(__alignof(__m128)-1)) == 0) {
__asm {
mov ecx,[n]
mov eax,dword ptr [src]
@@ -986,7 +985,7 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,const t_sample *op,int
}
}
else {
- if((reinterpret_cast<unsigned long>(op)&(__alignof(__m128)-1)) == 0) {
+ if((reinterpret_cast<size_t>(op)&(__alignof(__m128)-1)) == 0) {
__asm {
mov ecx,[n]
mov eax,dword ptr [src]
@@ -1072,7 +1071,7 @@ zero:
vmul(src,1,op,1,dst,1,cnt);
}
else
-#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
+#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst))
MulAltivec(dst,src,op,cnt);
else
@@ -1135,8 +1134,8 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt)
shufps xmm0,xmm0,0
}
- if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0
- && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
+ if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
+ && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
) {
// aligned version
__asm {
@@ -1202,7 +1201,7 @@ loopu:
while(cnt--) *(dst++) = *(src++)+op;
}
else
-#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
+#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst))
AddAltivec(dst,src,op,cnt);
else
@@ -1264,10 +1263,10 @@ 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<unsigned long>(src)&(__alignof(__m128)-1)) == 0
- && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
+ if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
+ && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
) {
- if((reinterpret_cast<unsigned long>(op)&(__alignof(__m128)-1)) == 0) {
+ if((reinterpret_cast<size_t>(op)&(__alignof(__m128)-1)) == 0) {
__asm {
mov ecx,dword ptr [n]
mov eax,dword ptr [src]
@@ -1345,7 +1344,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int
}
}
else {
- if((reinterpret_cast<unsigned long>(op)&(__alignof(__m128)-1)) == 0) {
+ if((reinterpret_cast<size_t>(op)&(__alignof(__m128)-1)) == 0) {
__asm {
mov ecx,dword ptr [n]
mov eax,dword ptr [src]
@@ -1430,7 +1429,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int
vadd(src,1,op,1,dst,1,cnt);
}
else
-#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
+#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst))
AddAltivec(dst,src,op,cnt);
else
@@ -1497,8 +1496,8 @@ void flext::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,t_samp
shufps xmm1,xmm1,0
}
- if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0
- && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
+ if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
+ && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
) {
// aligned version
__asm {
@@ -1572,7 +1571,7 @@ loopu:
while(cnt--) *(dst++) = *(src++)*opmul+opadd;
}
else
-#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
+#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst))
ScaleAltivec(dst,src,opmul,opadd,cnt);
else
diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp
index 85d9720d..b4c3d09f 100644
--- a/externals/grill/flext/source/flsupport.cpp
+++ b/externals/grill/flext/source/flsupport.cpp
@@ -168,7 +168,7 @@ void flext_root::operator delete(void *blk)
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;
+ const size_t alignovh = bitalign/8-1;
bytes += ovh+alignovh;
char *blk;
@@ -195,7 +195,7 @@ void *flext_root::NewAligned(size_t bytes,int bitalign)
}
FLEXT_ASSERT(blk);
- char *ablk = reinterpret_cast<char *>((reinterpret_cast<unsigned long>(blk)+ovh+alignovh) & ~alignovh);
+ char *ablk = reinterpret_cast<char *>((reinterpret_cast<size_t>(blk)+ovh+alignovh) & ~alignovh);
*(char **)(ablk-sizeof(size_t)-sizeof(char *)) = blk;
*(size_t *)(ablk-sizeof(size_t)) = bytes;
return ablk;
@@ -236,7 +236,7 @@ void flext_root::FreeAligned(void *blk)
/*! \todo there is probably also a shortcut for Max and jMax
\todo size checking
*/
-void flext::GetAString(const t_atom &a,char *buf,int szbuf)
+void flext::GetAString(const t_atom &a,char *buf,size_t szbuf)
{
#if FLEXT_SYS == FLEXT_SYS_PD
atom_string(const_cast<t_atom *>(&a),buf,szbuf);
@@ -287,5 +287,5 @@ void flext_root::error(const char *fmt,...)
AnyMap::AnyMap() {}
AnyMap::~AnyMap() {}
-AnyMap::iterator AnyMap::find(unsigned int k) { return Parent::find(k); }
-unsigned int &AnyMap::operator [](unsigned int k) { return Parent::operator [](k); }
+AnyMap::iterator AnyMap::find(AnyMapType k) { return Parent::find(k); }
+AnyMapType &AnyMap::operator [](AnyMapType k) { return Parent::operator [](k); }
diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h
index d9f5b540..69848762 100644
--- a/externals/grill/flext/source/flsupport.h
+++ b/externals/grill/flext/source/flsupport.h
@@ -64,7 +64,7 @@ public:
static void FreeAligned(void *blk);
//! Test for alignment
static bool IsAligned(void *ptr,int bitalign = 128) {
- return (reinterpret_cast<unsigned long>(ptr)&(bitalign-1)) == 0;
+ return (reinterpret_cast<size_t>(ptr)&(bitalign-1)) == 0;
}
//! @} FLEXT_S_MEMORY
};
@@ -256,14 +256,14 @@ public:
static void CopyAtom(t_atom *dst,const t_atom *src) { *dst = *src; }
//! Print an atom
- static bool PrintAtom(const t_atom &a,char *buf,int bufsz);
+ static bool PrintAtom(const t_atom &a,char *buf,size_t bufsz);
//! Scan an atom
static bool ScanAtom(t_atom &a,const char *buf);
//! Copy a list of atoms
static t_atom *CopyList(int argc,const t_atom *argv);
//! Print an atom list
- static bool PrintList(int argc,const t_atom *argv,char *buf,int bufsz);
+ static bool PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz);
//! Copy a memory region
static void CopyMem(void *dst,const void *src,int bytes);
@@ -412,7 +412,7 @@ public:
//! Access the string value (without type check)
static const char *GetString(const t_atom &a) { t_symbol *s = GetSymbol(a); return s?GetString(s):NULL; }
//! Check for a string and get its value
- static void GetAString(const t_atom &a,char *buf,int szbuf);
+ static void GetAString(const t_atom &a,char *buf,size_t szbuf);
//! Set the atom to represent a string
static void SetString(t_atom &a,const char *c) { SetSymbol(a,MakeSymbol(c)); }
diff --git a/externals/grill/flext/source/flxlet.cpp b/externals/grill/flext/source/flxlet.cpp
index 1d57177c..f3afb207 100755
--- a/externals/grill/flext/source/flxlet.cpp
+++ b/externals/grill/flext/source/flxlet.cpp
@@ -22,7 +22,7 @@ flext_base::xlet::xlet(type t,const char *d):
tp(t),nxt(NULL)
{
if(d) {
- int ln = strlen(d);
+ size_t ln = strlen(d);
desc = new char[ln+1];
memcpy(desc,d,ln);
desc[ln] = 0;
@@ -53,7 +53,7 @@ void flext_base::DescXlet(int ix,const char *d,xlet *&root)
if(xi) {
if(xi->desc) delete[] xi->desc;
- int ln = strlen(d);
+ size_t ln = strlen(d);
xi->desc = new char[ln+1];
memcpy(xi->desc,d,ln);
xi->desc[ln] = 0;