aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Blechmann <timblech@users.sourceforge.net>2003-09-07 00:42:00 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:11:53 +0200
commit6399d444c572093ab8bc356be0cb915b33265415 (patch)
tree5050547fdab70b73f5b00cb998794897ff89b2fc
parent432472fe416edfb1f5548e7a4998e62869ff41e5 (diff)
*** empty log message ***
svn path=/trunk/externals/tb/; revision=934
-rwxr-xr-xtbext/config-pd-linux.txt36
-rwxr-xr-xtbext/make-files.txt4
-rw-r--r--tbext/makefile114
-rw-r--r--tbext/makefile.pd-linux92
-rw-r--r--tbext/source/main.cpp5
-rw-r--r--tbext/source/tbroute.cpp16
-rw-r--r--tbext/source/tbsroute~.cpp12
-rw-r--r--tbext/source/tbstrg.cpp2
8 files changed, 150 insertions, 131 deletions
diff --git a/tbext/config-pd-linux.txt b/tbext/config-pd-linux.txt
new file mode 100755
index 0000000..e1fa248
--- /dev/null
+++ b/tbext/config-pd-linux.txt
@@ -0,0 +1,36 @@
+# config file for tbext, adapted from Thomas Grill's xsample makefile
+
+# your c++ compiler (if not g++)
+ CXX=icc
+
+
+# where does the PD installation reside?
+PD=/usr/lib/pd
+
+# where are the PD header files?
+# leave it blank if it is a system directory (like /usr/local/include),
+# since gcc 3.2 complains about it
+PDINC=/home/tim/pd/devel_0_36/pd/src
+
+# where do the flext libraries reside?
+FLEXTPATH=/usr/lib/flext
+
+# where should xsample objects be built?
+TARGDIR=./pd-linux
+
+# where should xsample be installed?
+# (leave blank to omit installation)
+INSTDIR=${PD}/externs
+
+# where should the xsample help be installed?
+# (leave blank to omit installation)
+HELPDIR=${PD}/doc/5.reference
+
+# additional compiler flags
+# (check whether they fit to your system!)
+UFLAGS=-xW -tpp7 -ip -ipo_obj -g # icc
+# UFLAGS=-mcpu=pentium4 -mmmx -msse2 -msse -mfpmath=sse # gcc 3.2
+
+# define to link against shared flext library (flext version >= 0.5.0)
+FLEXT_SHARED=1
+
diff --git a/tbext/make-files.txt b/tbext/make-files.txt
index 609e57b..ba3fe55 100755
--- a/tbext/make-files.txt
+++ b/tbext/make-files.txt
@@ -1,6 +1,8 @@
# all the source files from the package
+SRCDIR = source
SRCS= \
- main.cpp tbroute.cpp tbstrg.cpp tbsig~.cpp tbsroute~.cpp tbpow~.cpp
+ main.cpp tbroute.cpp tbsig~.cpp tbsroute~.cpp tbpow~.cpp tbfft1.cpp # tbg7xx.cpp tbstrg.cpp
+
#HDRS= \
main.h
diff --git a/tbext/makefile b/tbext/makefile
deleted file mode 100644
index a9577e7..0000000
--- a/tbext/makefile
+++ /dev/null
@@ -1,114 +0,0 @@
-# Makefile for icc @ linux adapted from Thomas Grill's xsample makefile
-#
-# usage:
-# to build run "make"
-# to install (as root), do "make install"
-#
-
-
-
-
-# your c++ compiler (if not g++)
- CXX=icc
-
-# where does the PD installation reside?
-PD=/usr/lib/pdsrc/pd
-
-# where are the PD header files?
-# leave it blank if it is a system directory (like /usr/local/include),
-# since gcc 3.2 complains about it
-PDINC=
-
-# where do the flext libraries reside?
-FLEXTPATH=/usr/lib/flext
-
-# where should the objects be built?
-TARGDIR=./
-
-# where should tbext be installed?
-# (leave blank to omit installation)
-INSTDIR=${PD}/externs
-
-# where should the tbext help be installed?
-# (leave blank to omit installation)
-HELPDIR=${PD}/doc/5.reference
-
-# additional compiler flags
-# (check whether they fit to your system!)
-# UFLAGS=-mcpu=pentiumpro # gcc 2.95
-# UFLAGS=-mcpu=pentium4 -mmmx -msse2 -msse -mfpmath=sse # gcc 3.2
-UFLAGS= -O3 -xW -tpp7 -ip -ipo #icc
-
-
-FLEXTLIB=$(FLEXTPATH)/flext.a
-
-# compiler stuff
-INCLUDES=$(PDINC)
-FLAGS=-DFLEXT_SYS=2 -D__GNUG__
-CFLAGS=${UFLAGS} -O6 -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions
-LDFLAGS=$(CFLAGS)
-LIBS=m
-
-# ----------------------------------------------
-# the rest can stay untouched
-# ----------------------------------------------
-
-NAME=tbext
-SRCDIR=source
-
-include make-files.txt
-
-MAKEFILE=makefile
-TARGET=$(TARGDIR)/$(NAME).pd_linux
-
-# default target
-all: $(TARGDIR) $(TARGET)
-
-$(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(MAKEFILE) $(CONFIG)
- touch $(patsubst %,$(SRCDIR)/%,$(SRCS))
-
-$(TARGDIR):
- -mkdir $(TARGDIR)
-
-$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
- $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@
-
-$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) $(FLEXTLIB)
- $(CXX) $(LDFLAGS) -shared $^ $(patsubst %,-l%,$(LIBS)) -o $@
- strip --strip-unneeded $@
- chmod 755 $@
-
-$(INSTDIR):
- -mkdir $(INSTDIR)
-
-install:: $(INSTDIR)
-
-install:: $(TARGET)
- cp $^ $(INSTDIR)
- chown root.root $(patsubst %,$(INSTDIR)/%,$(notdir $^))
-
-$(HELPDIR):
- -mkdir $(HELPDIR)
-
-install-help:: $(HELPDIR)
-
-install-help:: ./pd
- chmod 644 $^/*.*
- cp $^/*.* $(HELPDIR)
-
-
-.PHONY: clean
-clean:
- rm -f $(TARGDIR)/*.o $(TARGDIR)/*.il $(TARGET)
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tbext/makefile.pd-linux b/tbext/makefile.pd-linux
new file mode 100644
index 0000000..25b7f3b
--- /dev/null
+++ b/tbext/makefile.pd-linux
@@ -0,0 +1,92 @@
+# xsample - extended sample objects for Max/MSP and pd (pure data)
+# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+#
+# Makefile for gcc @ linux
+#
+# usage:
+# to build run "make -f makefile.pd-linux"
+# to install (as root), do "make -f makefile.pd-linux install"
+#
+
+CONFIG=config-pd-linux.txt
+
+include ${CONFIG}
+
+FLEXTLIB=$(FLEXTPATH)/flext.a
+
+# compiler stuff
+INCLUDES=$(PDINC)
+FLAGS=-DFLEXT_SYS=2
+CFLAGS=${UFLAGS} -O3 -I/usr/lib/flext -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions
+LIBS=m
+
+ifdef FLEXT_SHARED
+CFLAGS+=-DFLEXT_SHARED -DFLEXT_THREADS
+LDFLAGS+=-Bdynamic
+LINKFLEXT=-lflext #-L/usr/lib/flext/libflext.so
+else
+LINKFLEXT=$(FLEXTLIB)
+endif
+
+# ----------------------------------------------
+# the rest can stay untouched
+# ----------------------------------------------
+
+NAME=tbext
+
+include make-files.txt
+
+MAKEFILE=makefile.pd-linux
+TARGET=$(TARGDIR)/$(NAME).pd_linux
+
+# default target
+all: $(TARGDIR) $(TARGET)
+
+$(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(MAKEFILE) $(CONFIG)
+ touch $(patsubst %,$(SRCDIR)/%,$(SRCS))
+
+$(TARGDIR):
+ -mkdir $(TARGDIR)
+
+$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@
+
+$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))
+ $(CXX) $(LDFLAGS) -shared $^ $(patsubst %,-l%,$(LIBS)) -L$(FLEXTPATH) $(LINKFLEXT) -o $@
+ strip --strip-unneeded $@
+ chmod 755 $@
+
+$(INSTDIR):
+ -mkdir $(INSTDIR)
+
+install:: $(INSTDIR)
+
+install:: $(TARGET)
+ cp $^ $(INSTDIR)
+ chown root.root $(patsubst %,$(INSTDIR)/%,$(notdir $^))
+
+$(HELPDIR):
+ -mkdir $(HELPDIR)
+
+install-help:: $(HELPDIR)
+
+install-help:: ./pd
+ chmod 644 $^/*.*
+ cp $^/*.* $(HELPDIR)
+
+
+.PHONY: clean
+clean:
+ rm -f $(TARGDIR)/*.o $(TARGET)
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tbext/source/main.cpp b/tbext/source/main.cpp
index c4317fd..9cfbd24 100644
--- a/tbext/source/main.cpp
+++ b/tbext/source/main.cpp
@@ -54,10 +54,13 @@ void ttbext_setup()
post("");
FLEXT_SETUP(tbroute);
- FLEXT_SETUP(tbstrg);
+ //FLEXT_SETUP(tbstrg);
FLEXT_DSP_SETUP(tbsroute);
FLEXT_DSP_SETUP(tbsig);
FLEXT_DSP_SETUP(tbpow);
+ // FLEXT_DSP_SETUP(tbg7xx);
+ FLEXT_DSP_SETUP(tbfft1);
+
}
diff --git a/tbext/source/tbroute.cpp b/tbext/source/tbroute.cpp
index 83d85a0..3218886 100644
--- a/tbext/source/tbroute.cpp
+++ b/tbext/source/tbroute.cpp
@@ -40,7 +40,6 @@
/* */
/* */
-
#include <flext.h>
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
@@ -52,31 +51,32 @@ class tbroute: public flext_base
FLEXT_HEADER(tbroute,flext_base);
public: // constructor
- tbroute(t_int chan);
+ tbroute(int chan);
protected:
void route(t_float f);
void routebang();
- void set_route(t_int i);
+ void set_route(int i);
private:
FLEXT_CALLBACK_1(route,t_float);
FLEXT_CALLBACK(routebang);
- FLEXT_CALLBACK_1(set_route,t_int);
- t_int dest;
+ FLEXT_CALLBACK_1(set_route,int);
+
+ int dest;
};
FLEXT_LIB_1("tbroute",tbroute,int);
-tbroute::tbroute(t_int chan)
+tbroute::tbroute(int chan)
{
AddInAnything();
AddInInt();
- for (t_int i=0; i!=chan;++i)
+ for (int i=0; i!=chan;++i)
{
AddOutAnything();
}
@@ -98,7 +98,7 @@ void tbroute::routebang()
ToOutBang(dest);
}
-void tbroute::set_route(t_int i)
+void tbroute::set_route(int i)
{
--i;
if ((i>-1) && (i<CntOut()))
diff --git a/tbext/source/tbsroute~.cpp b/tbext/source/tbsroute~.cpp
index 3d2264d..d18d264 100644
--- a/tbext/source/tbsroute~.cpp
+++ b/tbext/source/tbsroute~.cpp
@@ -51,21 +51,22 @@ class tbsroute: public flext_dsp
FLEXT_HEADER(tbsroute,flext_dsp)
public: // constructor
- tbsroute(int chan);
+ tbsroute(t_int chan);
protected:
virtual void m_signal (int n, float *const *in, float *const *out);
void set_route(int i);
private:
- FLEXT_CALLBACK_1(set_route,t_int)
+ FLEXT_CALLBACK_1(set_route,int)
t_int dest;
};
-FLEXT_LIB_DSP_1("tbroute~",tbsroute,int)
+FLEXT_LIB_DSP_1("tbroute~",tbsroute,int);
- tbsroute::tbsroute(t_int chan):dest(0)
+tbsroute::tbsroute (t_int chan):
+ dest(0)
{
AddInSignal();
AddInInt();
@@ -92,8 +93,7 @@ void tbsroute::m_signal(int n, float *const *in, float *const *out)
}
-
-void tbsroute::set_route(t_int i)
+void tbsroute::set_route(int i)
{
--i;
if ((i>-1) && (i<CntOutSig()))
diff --git a/tbext/source/tbstrg.cpp b/tbext/source/tbstrg.cpp
index c71c7da..a999e2f 100644
--- a/tbext/source/tbstrg.cpp
+++ b/tbext/source/tbstrg.cpp
@@ -59,7 +59,7 @@ protected:
private:
- FLEXT_CALLBACK_1(set_route,t_int);
+ FLEXT_CALLBACK(set_route,t_int);
t_int dest;
};