Commit e91c0334 authored by thomas's avatar thomas
Browse files

adding autoconf stuff

git-svn-id: https://svn.grrrr.org/ext/trunk@1224 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent e5be51f4
#
# automake template
# added by tim blechmann
# modified by Thomas Grill
#
SUBDIRS = source tutorial
SUBDIRS = source # tutorial
EXTRA_DIST = flext.doxy
\ No newline at end of file
# EXTRA_DIST = flext.doxy
\ No newline at end of file
#! /bin/sh
aclocal \
&& automake --foreign \
&& autoconf
# MacOS has no libtoolize... use glibtoolize instead
glibtoolize --force && \
aclocal && \
automake --foreign --add-missing && \
autoconf
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2007 Thomas Grill (gr@grrrr.org)
Copyright (c) 2001-2008 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
......@@ -204,13 +204,15 @@ then you can run
./configure --help
to get a page of options.
You need to pass the path to the PD source files to the ./configure script, e.g. with
./configure --with-sysdir=/usr/local/src/pd/src
You need to pass the path to the PD source files or the Max SDK to the ./configure script,
e.g. on OS X with something like
./configure --enable-system=pd --with-sysdir=/Applications/Pd-0.40-2/Contents/Resources/src
Then build flext with
then build flext with
make
and install it with
su -c "make install"
sudo make install
----------------------------------------------------------------------------
......
......@@ -17,10 +17,10 @@ FLEXTPREFIX=/usr/local
OUTPATH=max-darwin
# where should the external be installed?
INSTPATH=/Library/Application\ Support/Cycling\ \'74/externals/flext
INSTPATH=/Applications/MaxMSP\ 4.6/Cycling\ \'74/externals/flext
# where should the initialization files be installed?
INITPATH=/Library/Application\ Support/Cycling\ \'74/init
INITPATH=/Applications/MaxMSP\ 4.6/Cycling\ \'74/init
# where should the help files be installed?
HELPPATH=/Applications/MaxMSP\ 4.6/max-help/flext
......@@ -31,7 +31,7 @@ HELPPATH=/Applications/MaxMSP\ 4.6/max-help/flext
# http://ccrma.stanford.edu/software/stk
# where to find the STK header files (e.g. stk.h)
STK_INC=/usr/local/include/stk
#STK_INC=/usr/local/include/stk
# where to find the STK library (normally libstk.a)
# (comment out STK_LIB if you don't use STK)
......@@ -43,7 +43,7 @@ STK_INC=/usr/local/include/stk
# http://music.nuim.ie//musictec/SndObj
# where to find the SndObj header files (e.g. sndobj.h)
SNDOBJ_INC=/usr/local/include/sndobj
#SNDOBJ_INC=/usr/local/include/sndobj
# where to find the SndObj library (normally libsndobj.a)
# (comment out STK_LIB if you don't use SndObj)
......@@ -52,27 +52,27 @@ SNDOBJ_INC=/usr/local/include/sndobj
###############################################################
# make flags (e.g. use multiprocessor)
#MFLAGS=-j 2
MFLAGS=-j 2
# user defined compiler flags
UFLAGS += -ffast-math
UFLAGS += -ffast-math -mmacosx-version-min=10.3
# user defined optimization flags
OFLAGS += -Os -ftree-vectorize
OFLAGS += -Os # -ftree-vectorize
# user defined debugging flags
DFLAGS +=
# architecture-specific flags (optional)
UFLAGS_ppc += -maltivec -faltivec
OFLAGS_ppc += -mtune=G4
UFLAGS_ppc += -mcpu=G4 -faltivec
OFLAGS_ppc +=
DFLAGS_ppc +=
UFLAGS_i386 += -mmmx -msse -msse2 -msse3
OFLAGS_i386 += -mtune=prescott
UFLAGS_i386 += -mmmx -msse -msse2 -msse3 -mtune=nocona
OFLAGS_i386 +=
DFLAGS_i386 +=
# cross-compilation (optional)
#ARCH=i386 ppc
ARCH=ppc i386 #x86_64 ppc64
# don't use OSXSDK for 10.5!
#OSXSDK=/Developer/SDKs/MacOSX10.4u.sdk
......@@ -28,7 +28,7 @@ INSTPATH=$(PDPATH)/extra
# http://ccrma.stanford.edu/software/stk
# where to find the STK header files (e.g. stk.h)
STK_INC=/usr/local/include/stk
#STK_INC=/usr/local/include/stk
# where to find the STK library (normally libstk.a)
# (comment out STK_LIB if you don't use STK)
......@@ -40,7 +40,7 @@ STK_INC=/usr/local/include/stk
# http://music.nuim.ie//musictec/SndObj
# where to find the SndObj header files (e.g. sndobj.h)
SNDOBJ_INC=/usr/local/include/sndobj
#SNDOBJ_INC=/usr/local/include/sndobj
# where to find the SndObj library (normally libsndobj.a)
# (comment out STK_LIB if you don't use SndObj)
......@@ -49,27 +49,29 @@ SNDOBJ_INC=/usr/local/include/sndobj
###############################################################
# make flags (e.g. use multiprocessor)
#MFLAGS=-j 2
MFLAGS=-j 2
# user defined compiler flags
UFLAGS += -ffast-math
UFLAGS += -ffast-math -mmacosx-version-min=10.3
# user defined optimization flags
OFLAGS += -Os -ftree-vectorize
OFLAGS += -Os # -ftree-vectorize
# user defined debugging flags
DFLAGS +=
# architecture-specific flags (optional)
UFLAGS_ppc += -maltivec -faltivec
OFLAGS_ppc += -mtune=G4
UFLAGS_ppc += -mcpu=G4 -faltivec
OFLAGS_ppc +=
DFLAGS_ppc +=
UFLAGS_i386 += -mmmx -msse -msse2 -msse3
OFLAGS_i386 += -mtune=prescott
UFLAGS_i386 += -mmmx -msse -msse2 -msse3 -mtune=nocona
OFLAGS_i386 +=
DFLAGS_i386 +=
# cross-compilation (optional)
#ARCH=i386 ppc
ARCH=ppc i386 #x86_64 ppc64
# don't use OSXSDK for 10.5!
#OSXSDK=/Developer/SDKs/MacOSX10.4u.sdk
dnl
dnl autoconf template
dnl added by tim blechmann
dnl
#
# autoconf template
# modified by Thomas Grill
#
dnl flext API version (current:release:age)
API_VERSION=0:0:0
# flext API version (current:release:age)
# API_VERSION=0:0:0
AC_INIT([flext],[0.5.0],[gr@grrrr.org],[flext])
AM_INIT_AUTOMAKE(1.6)
AC_INIT([flext],[0.5.1],[gr@grrrr.org])
AM_INIT_AUTOMAKE
dnl configure options
AC_ARG_ENABLE(system, [ --enable-system flext system (default: pd)],
[
case $enableval in
max) AC_DEFINE(FLEXT_SYS,1)
TARGETDIR=maxmsp;;
*) AC_DEFINE(FLEXT_SYS,2)
TARGETDIR=pd;;
esac
system = $enableval
],
AC_DEFINE(FLEXT_SYS,2)
TARGETDIR=pd
# configure options
AC_ARG_ENABLE(system,
AS_HELP_STRING(--enable-system,[realtime system [default=pd]]),
[SYSTEM=$enableval],
[SYSTEM=pd]
)
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])
AS_HELP_STRING(--with-sysdir,[path to pd or max headers]),
[sysdir=$withval],
AC_MSG_ERROR(path to system headers required $withval)
)
if test $SYSTEM == max; then
AC_DEFINE(FLEXT_SYS,1)
# check for MaxAPI.h in pd folder
AC_CHECK_FILE([$sysdir/max-includes/MaxAPI.h],,AC_MSG_ERROR([Cannot find $sysdir/max-includes/MaxAPI.h]))
AC_CHECK_FILE([$sysdir/max-includes/MaxAudioAPI.h],,AC_MSG_ERROR([Cannot find $sysdir/max-includes/MaxAudioAPI.h]))
INCLUDEDIR+=" -I$sysdir/max-includes -I$sysdir/msp-includes"
elif test $SYSTEM == pd; then
AC_DEFINE(FLEXT_SYS,2)
# check for g_canvas.h in pd folder
AC_CHECK_FILE([$sysdir/g_canvas.h],,AC_MSG_ERROR([Cannot find $sysdir/g_canvas.h]))
INCLUDEDIR+=" -I$sysdir"
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])
else
AC_MSG_ERROR([system must be pd or max])
fi
AC_ARG_WITH(stkdir,
[ --with-stkdir path to stk headers],
AS_HELP_STRING(--with-stkdir,[path to STK headers]),
[
AC_CHECK_FILE("$withval/Stk.h",,[echo "$withval/Stk.h not found" && exit 1])
AC_CHECK_FILE([$withval/Stk.h],,AC_MSG_ERROR([$withval/Stk.h not found]))
stkdir=$withval
INCLUDEDIR="-I$withval $INCLUDEDIR"
])
INCLUDEDIR+=" -I$withval"
]
)
AM_CONDITIONAL([STK],[test "$stkdir"])
AC_ARG_WITH(sndobjdir,
[ --with-sndobjdir path to SndObj headers],
AS_HELP_STRING(--with-sndobjdir,[path to SndObj headers]),
[
AC_CHECK_FILE("$withval/SndObj.h",,[echo "$withval/SndObj.h not found" && exit 1])
AC_CHECK_FILE([$withval/SndObj.h],,AC_MSG_ERROR([$withval/SndObj.h not found]))
sndobjdir=$withval
INCLUDEDIR="-I$withval $INCLUDEDIR"
])
INCLUDEDIR+=" -I$withval"
]
)
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 --maltivec -faltivec -malign-natural";
AC_DEFINE(FLEXT_USE_SIMD);;
G3)
OPT_FLAGS="-mtune=$enableval --malign-natural";;
*)
;;
esac
])
dnl Checks for programs.
# if CFLAGS aren't set by the user, set them to an empty string
# otherwise AC_PROG_CC sets them to "-O2 -g"
test ".$CFLAGS" = "." && CFLAGS=" "
test ".$CXXFLAGS" = "." && CXXFLAGS=" "
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
dnl Checks for libraries.
AM_ENABLE_STATIC
AM_ENABLE_STATIC
AC_LANG(C++)
dnl Checks for header files.
# Checks for libraries.
dnl Checks for typedefs, structures, and compiler characteristics.
# Checks for header files.
# 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 -shared"
EXTENSION=pd_linux
SOEXT=so
fi
# Checks for library functions.
if test `uname -s` == Darwin; then
# DYNAMIC_LDFLAGS="-version-info $API_VERSION -release $AC_PACKAGE_VERSION -dynamiclib -dynamic -flat_namespace -undefined suppress"
DYNAMIC_LDFLAGS="-dynamiclib -dynamic -flat_namespace -undefined suppress"
if test $system == max; then
EXTENSION=mxo
else
EXTENSION=pd_darwin
fi
SOEXT=dylib
# system specific
if test $(uname -s) == Linux; then
true
elif test $(uname -s) == Darwin; then
FRAMEWORKS="ApplicationServices vecLib"
elif test $(uname -s) == MINGW32_NT-5.0; then
EXT_CFLAGS+=" -mms-bitfields -mno-cygwin"
elif test $(uname -s) == CYGWIN_NT-5.0; then
EXT_CFLAGS+=" -mms-bitfields -mno-cygwin"
fi
dnl todo: mingw / cygwin
# set compilation flags
OPT_FLAGS=-O2
DBG_FLAGS="-DFLEXT_DEBUG -g"
AC_ARG_ENABLE(optimize,
AS_HELP_STRING(--enable-optimize,[enables optimized architecture specific builds for pentium4, pentium3, G4, G5, etc.]),
[
OPT_FLAGS+=" -mtune=$enableval"
case $enableval in
pentium | pentium2 | athlon | pentium-mmx)
OPT_FLAGS+=" -march=$enableval";;
pentium3 | pentium3m | pentium4 | pentium4m | pentium-m | prescott | nocona | athlon-xp | athlon-mp | athlon64 | opteron)
OPT_FLAGS+=" -march=$enableval -mfpmath=sse";
AC_DEFINE(FLEXT_USE_SIMD);;
G3)
OPT_FLAGS+=" -mcpu=$enableval";;
G5 | G4)
OPT_FLAGS+=" -mcpu=$enableval -faltivec";
AC_DEFINE(FLEXT_USE_SIMD);;
*)
;;
esac
]
)
AC_SUBST(INCLUDEDIR)
AC_SUBST(SYSTEM)
AC_SUBST(OPT_FLAGS)
AC_SUBST(DYNAMIC_LDFLAGS)
AC_SUBST(DBG_FLAGS)
# AC_SUBST(API_VERSION)
AC_SUBST(stkdir)
AC_SUBST(sndobjdir)
AC_SUBST(EXTENSION)
AC_SUBST(SOEXT)
AC_SUBST(TARGETDIR)
AC_SUBST(FRAMEWORKS) dnl for osx
AC_SUBST(FRAMEWORKS)
AC_OUTPUT([
Makefile
tutorial/Makefile
tutorial/adv1/Makefile
tutorial/adv2/Makefile
tutorial/adv3/Makefile
tutorial/attr1/Makefile
tutorial/attr2/Makefile
tutorial/attr3/Makefile
tutorial/bind1/Makefile
tutorial/buffer1/Makefile
tutorial/lib1/Makefile
tutorial/signal1/Makefile
tutorial/signal2/Makefile
tutorial/simple1/Makefile
tutorial/simple2/Makefile
tutorial/simple3/Makefile
tutorial/sndobj1/Makefile
tutorial/stk1/Makefile
tutorial/stk2/Makefile
tutorial/thread1/Makefile
tutorial/thread2/Makefile
tutorial/timer1/Makefile
tutorial/pd/Makefile
tutorial/maxmsp/Makefile
source/Makefile])
source/Makefile
])
# tutorial/Makefile
# tutorial/adv1/Makefile
# tutorial/adv2/Makefile
# tutorial/adv3/Makefile
# tutorial/attr1/Makefile
# tutorial/attr2/Makefile
# tutorial/attr3/Makefile
# tutorial/bind1/Makefile
# tutorial/buffer1/Makefile
# tutorial/lib1/Makefile
# tutorial/signal1/Makefile
# tutorial/signal2/Makefile
# tutorial/simple1/Makefile
# tutorial/simple2/Makefile
# tutorial/simple3/Makefile
# tutorial/sndobj1/Makefile
# tutorial/stk1/Makefile
# tutorial/stk2/Makefile
# tutorial/thread1/Makefile
# tutorial/thread2/Makefile
# tutorial/timer1/Makefile
# tutorial/pd/Makefile
# tutorial/maxmsp/Makefile
This diff is collapsed.
This diff is collapsed.
#
# automake template
# added by tim blechmann
#
# added by Thomas Grill
lib_LIBRARIES = libflext-pd_s.a libflext-pd_sd.a libflext-pd_t.a libflext-pd_td.a
# static libraries
lib_LIBRARIES = libflext-@SYSTEM@_s.a libflext-@SYSTEM@_sd.a libflext-@SYSTEM@_t.a libflext-@SYSTEM@_td.a
# shared libraries
lib_LTLIBRARIES = libflext-@SYSTEM@.la libflext-@SYSTEM@_d.la
SRCS_FLEXT = \
flbase.cpp \
......@@ -16,13 +19,12 @@ SRCS_FLEXT = \
flattr_ed.cpp \
flsupport.cpp \
flutil.cpp \
flatom.cpp \
flatom_pr.cpp \
flthr.cpp \
fltimer.cpp \
flsimd.cpp \
flout.cpp \
flatom_app.cpp \
flatom.cpp \
flatom_pr.cpp \
flatom_part.cpp \
flitem.cpp \
flmeth.cpp \
......@@ -32,7 +34,7 @@ SRCS_FLEXT = \
flbind.cpp \
flmap.cpp
pkginclude_HEADERS = \
nobase_pkginclude_HEADERS = \
flprefix.h \
flstdc.h \
flbase.h \
......@@ -42,6 +44,7 @@ pkginclude_HEADERS = \
flmap.h \
fldsp.h \
flinternal.h \
flcontainers.h \
fldefs.h \
fldefs_hdr.h \
fldefs_setup.h \
......@@ -52,7 +55,15 @@ pkginclude_HEADERS = \
fldefs_methcall.h \
fldefs_attrcb.h \
fldefs_attrvar.h \
fldefs_attradd.h
fldefs_attradd.h \
lockfree/prefix.hpp \
lockfree/branch_hints.hpp \
lockfree/cas.hpp \
lockfree/atomic_int.hpp \
lockfree/atomic_ptr.hpp \
lockfree/fifo.hpp \
lockfree/stack.hpp
# handling for stk / sndobj
......@@ -64,66 +75,29 @@ HDRS_SNDOBJ = flsndobj.cpp
if SNDOBJ
SRCS_FLEXT += $(SRCS_SNDOBJ)
pkginclude_HEADERS += $(HDRS_SNDOBJ)
nobase_pkginclude_HEADERS += $(HDRS_SNDOBJ)
LIB_SNDOBJ = -lsndobj
endif
if STK
SRCS_FLEXT += $(SRCS_STK)
pkginclude_HEADERS += $(HDRS_STK)
nobase_pkginclude_HEADERS += $(HDRS_STK)
LIB_STK = -lstk
endif
FRAMEWORKS = @FRAMEWORKS@
# for static libraries we can use automake
libflext_pd_s_a_SOURCES = $(SRCS_FLEXT)
libflext_pd_sd_a_SOURCES = $(SRCS_FLEXT)
libflext_pd_t_a_SOURCES = $(SRCS_FLEXT)
libflext_pd_td_a_SOURCES = $(SRCS_FLEXT)
libflext_pd_s_a_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@
libflext_pd_sd_a_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG
libflext_pd_t_a_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_THREADS
libflext_pd_td_a_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_THREADS
libflext_pd_s_a_LDFLAGS = @OPT_FLAGS@ @INCLUDEDIR@ \
$(patsubst %,-framework %,$(FRAMEWORKS))
libflext_pd_sd_a_LDFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG \
$(patsubst %,-framework %,$(FRAMEWORKS))
libflext_pd_t_a_LDFLAGS = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_THREADS \
$(patsubst %,-framework %,$(FRAMEWORKS))
libflext_pd_td_a_LDFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_THREADS \
$(patsubst %,-framework %,$(FRAMEWORKS))
# for shared libraries, we can't ...
libflext_pd_la_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_SHARED \
-DFLEXT_EXPORTS $(DEFS)
libflext_pd_d_la_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_SHARED \
-DFLEXT_EXPORTS $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
libflext_pd_la_LDFLAGS = @DYNAMIC_LDFLAGS@ $(LIB_STK) $(LIB_SNDOBJ) $(LDFLAGS) \
$(patsubst %,-framework %,$(FRAMEWORKS))
libflext_pd_d_la_LDFLAGS = @DYNAMIC_LDFLAGS@ $(LIB_STK) $(LIB_SNDOBJ) $(LDFLAGS)
$(patsubst %,-framework %,$(FRAMEWORKS))
libflext_pd_la_NAME = libflext-pd.@SOEXT@
libflext_pd_d_la_NAME = libflext-pd_d.@SOEXT@
all-local: $(libflext_pd_la_NAME) $(libflext_pd_d_la_NAME)
$(libflext_pd_la_NAME): $(patsubst %.cpp,libflext_pd_la-%.o,$(SRCS_FLEXT))
$(CXX) $(libflext_pd_la_LDFLAGS) $(LIBS) -o $(libflext_pd_la_NAME) $^
libflext_pd_la-%.o : %.cpp
$(CXX) -c $(libflext_pd_la_CXXFLAGS) $< -o $@
$(libflext_pd_d_la_NAME): $(patsubst %.cpp,libflext_pd_d_la-%.o,$(SRCS_FLEXT))
$(CXX) $(libflext_pd_d_la_LDFLAGS) $(LIBS) -o $(libflext_pd_d_la_NAME) $^
libflext_pd_d_la-%.o: %.cpp
$(CXX) -c $(libflext_pd_d_la_CXXFLAGS) $< -o $@
install-exec-local:
$(libLIBRARIES_INSTALL) $(libflext_pd_la_NAME) $(DESTDIR)$(libdir)
$(libLIBRARIES_INSTALL) $(libflext_pd_d_la_NAME) $(DESTDIR)$(libdir)
libflext_@SYSTEM@_s_a_SOURCES = $(SRCS_FLEXT)
libflext_@SYSTEM@_sd_a_SOURCES = $(SRCS_FLEXT)
libflext_@SYSTEM@_t_a_SOURCES = $(SRCS_FLEXT)
libflext_@SYSTEM@_td_a_SOURCES = $(SRCS_FLEXT)
libflext_@SYSTEM@_la_SOURCES = $(SRCS_FLEXT)
libflext_@SYSTEM@_d_la_SOURCES = $(SRCS_FLEXT)
libflext_@SYSTEM@_s_a_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@
libflext_@SYSTEM@_sd_a_CXXFLAGS = @DBG_FLAGS@ @INCLUDEDIR@
libflext_@SYSTEM@_t_a_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_THREADS
libflext_@SYSTEM@_td_a_CXXFLAGS = @DBG_FLAGS@ @INCLUDEDIR@ -DFLEXT_THREADS
libflext_@SYSTEM@_la_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_SHARED
libflext_@SYSTEM@_d_la_CXXFLAGS = @DBG_FLAGS@ @INCLUDEDIR@ -DFLEXT_SHARED
libflext_@SYSTEM@_la_LDFLAGS = $(patsubst %,-framework %,@FRAMEWORKS@)
libflext_@SYSTEM@_d_la_LDFLAGS = $(patsubst %,-framework %,@FRAMEWORKS@)
......@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org)
Copyright (c) 2001-2008 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
......@@ -179,7 +179,7 @@ void flext_base::Setup(t_classid id)
#if FLEXT_SYS == FLEXT_SYS_MAX
if(!IsLib(id))
#endif
AddMessageMethods(c,IsDSP(id),HasDSPIn(id));
AddMessageMethods(c,IsDSP(id),HasDSPIn(id));
if(HasAttributes(id)) {
AddMethod(id,0,"getattributes",cb_ListAttrib);
......
......@@ -181,22 +181,23 @@ bool flext_base::InitInlets()
for(cnt = 0,ix = incnt-1; ix >= insigs; --ix,++cnt) {
xlet &xi = inlist[ix];
if(ix == 0) {
if(!ix) {
if(xi.tp != xlet_any) {
error("%s: Leftmost inlet must be of type signal or anything",thisName());
ok = false;
}
}
else {
FLEXT_ASSERT(inlets);
switch(xi.tp) {
case xlet_sig:
inlets[ix] = NULL;
inlets[ix-1] = NULL;
error("%s: All signal inlets must be left-aligned",thisName());
ok = false;
break;
case xlet_float: {
if(ix < 10) {
inlets[ix] = NULL;
inlets[ix-1] = NULL;
floatin(x_obj,ix);
break;
}
......@@ -205,7 +206,7 @@ bool flext_base::InitInlets()
}