From 7a3b2297e6f784e608d2013c910657334ee3019e Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Sun, 20 Nov 2005 21:54:41 +0000 Subject: also works with pd_main now - additional threaded resize method svn path=/trunk/externals/tb/; revision=3991 --- sndfiler/src/Makefile.pd_main | 116 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100755 sndfiler/src/Makefile.pd_main (limited to 'sndfiler/src/Makefile.pd_main') diff --git a/sndfiler/src/Makefile.pd_main b/sndfiler/src/Makefile.pd_main new file mode 100755 index 0000000..1b4c5ca --- /dev/null +++ b/sndfiler/src/Makefile.pd_main @@ -0,0 +1,116 @@ +# ---------------------------------------------------------- + +# adjust the next pathes to your system: + +# this should point to the directory which contains +# m_pd.h and g_canvas.h +PD_SCR = /home/holzi/pd-0.39-1/src +#PD_SCR = c:/pd/src + +# this is the pd directory, usually /usr/lib/pd +# or c:/pd etc. +PD_PATH = /usr/lib/pd +#PD_PATH = c:/pd + +# path of sndfile.h from libsndfile, usually it's in +# /usr/include and so detected automatically +SNDFILE_SRC = /usr/include + +# the directory, where libsndfile is located +# (in linux it' normally not necessary, in windows it's +# normally in c:/windwos/system or so) +SNDFILE_PATH = c:/windows/system + +# path to threadlib.h +THREADLIB_SRC = /home/Georg/pd-cvs/externals/grh/threadlib/src +#THREADLIB_SRC = c:/Georg/pd-cvs/externals/grh/threadlib/src + +# path to threadlib.pd_linux/dll/pd_darwin +# (usually path/to/pd/extra) +THREADLIB_PATH = $(PD_PATH)/extra + +# ---------------------------------------------------------- + +NAME=sndfiler + +CC = gcc +LD = gcc +INCLUDE= -I. -I$(PD_SCR) -I$(SNDFILE_SRC) -I$(THREADLIB_SRC) +CC_FLAGS = -DPD -DUSE_PD_MAIN -O3 -funroll-loops \ + -Wall -W -Wshadow -Wno-parentheses -Wno-switch \ + -Wno-unused -fomit-frame-pointer +LD_FLAGS = --export-dynamic -shared -o + +current: + @echo ---------------------------- + @echo USAGE: + @echo linux: make pd_linux + @echo windows: make pd_win + @echo darwin: make pd_darwin + @echo ---------------------------- + +# ----------------------- LINUX i386 ----------------------- + +pd_linux: $(NAME).pd_linux + +.SUFFIXES: .pd_linux + +CC_UNIX = -DUNIX -fPIC -pthread +LIB_UNIX = -lc -lm -lsndfile $(THREADLIB_PATH)/threadlib.pd_linux + +.c.pd_linux: + $(CC) $(CC_UNIX) $(CC_FLAGS) $(INCLUDE) -o $*.o -c $*.c + $(LD) $(LD_FLAGS) $*.pd_linux $*.o $(LIB_UNIX) + strip --strip-unneeded $*.pd_linux + chmod 755 $*.pd_linux + @test -d ../bin || mkdir -p ../bin + cp $*.pd_linux ../bin + rm -f $*.o + +# ------------------------ WIN MinGW ----------------------- + +pd_win: $(NAME).dll + +.SUFFIXES: .dll + +CC_WIN = -DMSW -mms-bitfields +LIB_WIN = $(PD_PATH)/bin/pd.dll \ + $(SNDFILE_PATH)/pthreadGC.dll \ + $(SNDFILE_PATH)/libsndfile.dll \ + $(THREADLIB_PATH)/threadlib.dll + +.c.dll: + $(CC) $(CC_WIN) $(CC_FLAGS) $(INCLUDE) -o $*.o -c $*.c + $(LD) $(LD_FLAGS) $*.dll $*.o $(LIB_WIN) + strip --strip-unneeded $*.dll + chmod 755 $*.dll + @test -d ../bin || mkdir -p ../bin + cp $*.dll ../bin + rm -f $*.o + +# ----------------------- Mac OSX ----------------------- + +pd_darwin: $(NAME).pd_darwin + +.SUFFIXES: .pd_darwin + +CC_DARWIN = -pthread +LD_DARWIN = -bundle -undefined suppress -flat_namespace \ + -bundle_loader $(PD_PATH)/bin/pd --export-dynamic + +.c.pd_darwin: + $(CC) $(CC_FLAGS) $(CC_DARWIN) $(INCLUDE) -o $*.o -c $*.c + $(LD) $(LD_DARWIN) $*.pd_linux $*.o $(LIB) + chmod 755 $*.pd_darwin + @test -d ../bin || mkdir -p ../bin + cp $*.pd_darwin ../bin + rm -f $*.o + +# ---------------------------------------------------------- + +clean: + rm -f *.o *.pd_darwin *.pd_linux *.dll + +install: + install ../bin/$(NAME).* $(PD_PATH)/extra + install ../doc/*.pd $(PD_PATH)/doc/5.reference -- cgit v1.2.1 From dfebc6aa91cc76e8e4ee7b28f159c61dc03d9c60 Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Mon, 21 Nov 2005 09:29:14 +0000 Subject: osx makefile fix svn path=/trunk/externals/tb/; revision=3996 --- sndfiler/src/Makefile.pd_main | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sndfiler/src/Makefile.pd_main') diff --git a/sndfiler/src/Makefile.pd_main b/sndfiler/src/Makefile.pd_main index 1b4c5ca..195d396 100755 --- a/sndfiler/src/Makefile.pd_main +++ b/sndfiler/src/Makefile.pd_main @@ -96,11 +96,13 @@ pd_darwin: $(NAME).pd_darwin CC_DARWIN = -pthread LD_DARWIN = -bundle -undefined suppress -flat_namespace \ - -bundle_loader $(PD_PATH)/bin/pd --export-dynamic + -bundle_loader $(PD_PATH)/bin/pd --export-dynamic \ + -L/sw/lib -L/opt/local/lib -lsndfile \ + $(THREADLIB_PATH)/threadlib.pd_darwin .c.pd_darwin: $(CC) $(CC_FLAGS) $(CC_DARWIN) $(INCLUDE) -o $*.o -c $*.c - $(LD) $(LD_DARWIN) $*.pd_linux $*.o $(LIB) + $(LD) $(LD_DARWIN) -o $*.pd_linux $*.o $(LIB) chmod 755 $*.pd_darwin @test -d ../bin || mkdir -p ../bin cp $*.pd_darwin ../bin -- cgit v1.2.1 From 04f24a3a63d8e1f49f966b586b42134269553c66 Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Mon, 21 Nov 2005 17:04:05 +0000 Subject: now the osx version should work :) svn path=/trunk/externals/tb/; revision=4008 --- sndfiler/src/Makefile.pd_main | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sndfiler/src/Makefile.pd_main') diff --git a/sndfiler/src/Makefile.pd_main b/sndfiler/src/Makefile.pd_main index 195d396..b56b4b3 100755 --- a/sndfiler/src/Makefile.pd_main +++ b/sndfiler/src/Makefile.pd_main @@ -102,7 +102,7 @@ LD_DARWIN = -bundle -undefined suppress -flat_namespace \ .c.pd_darwin: $(CC) $(CC_FLAGS) $(CC_DARWIN) $(INCLUDE) -o $*.o -c $*.c - $(LD) $(LD_DARWIN) -o $*.pd_linux $*.o $(LIB) + $(LD) $(LD_DARWIN) -o $*.pd_darwin $*.o $(LIB) chmod 755 $*.pd_darwin @test -d ../bin || mkdir -p ../bin cp $*.pd_darwin ../bin -- cgit v1.2.1 From 60fee223a0a27439814547aee438bb5c53e44437 Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Sun, 29 Jan 2006 19:29:29 +0000 Subject: fixed compilation for main pd svn path=/trunk/externals/tb/; revision=4517 --- sndfiler/src/Makefile.pd_main | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sndfiler/src/Makefile.pd_main') diff --git a/sndfiler/src/Makefile.pd_main b/sndfiler/src/Makefile.pd_main index b56b4b3..f5a70e5 100755 --- a/sndfiler/src/Makefile.pd_main +++ b/sndfiler/src/Makefile.pd_main @@ -4,7 +4,7 @@ # this should point to the directory which contains # m_pd.h and g_canvas.h -PD_SCR = /home/holzi/pd-0.39-1/src +PD_SCR = /usr/local/src/pd/src #PD_SCR = c:/pd/src # this is the pd directory, usually /usr/lib/pd @@ -19,10 +19,10 @@ SNDFILE_SRC = /usr/include # the directory, where libsndfile is located # (in linux it' normally not necessary, in windows it's # normally in c:/windwos/system or so) -SNDFILE_PATH = c:/windows/system +#SNDFILE_PATH = c:/windows/system # path to threadlib.h -THREADLIB_SRC = /home/Georg/pd-cvs/externals/grh/threadlib/src +THREADLIB_SRC = /home/holzi/pd-cvs/externals/grh/threadlib/src #THREADLIB_SRC = c:/Georg/pd-cvs/externals/grh/threadlib/src # path to threadlib.pd_linux/dll/pd_darwin -- cgit v1.2.1 From 10dee9a91925645cd9e3bb14e5ef31e8a338949e Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Wed, 1 Feb 2006 09:01:28 +0000 Subject: now possible to read ogg file (using libvorbisfile) svn path=/trunk/externals/tb/; revision=4531 --- sndfiler/src/Makefile.pd_main | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'sndfiler/src/Makefile.pd_main') diff --git a/sndfiler/src/Makefile.pd_main b/sndfiler/src/Makefile.pd_main index f5a70e5..29bde80 100755 --- a/sndfiler/src/Makefile.pd_main +++ b/sndfiler/src/Makefile.pd_main @@ -41,6 +41,8 @@ CC_FLAGS = -DPD -DUSE_PD_MAIN -O3 -funroll-loops \ -Wno-unused -fomit-frame-pointer LD_FLAGS = --export-dynamic -shared -o +OBJ=sndfiler.o file_input.o + current: @echo ---------------------------- @echo USAGE: @@ -56,11 +58,12 @@ pd_linux: $(NAME).pd_linux .SUFFIXES: .pd_linux CC_UNIX = -DUNIX -fPIC -pthread -LIB_UNIX = -lc -lm -lsndfile $(THREADLIB_PATH)/threadlib.pd_linux +LIB_UNIX = -lc -lm -lsndfile -lvorbisfile $(THREADLIB_PATH)/threadlib.pd_linux .c.pd_linux: - $(CC) $(CC_UNIX) $(CC_FLAGS) $(INCLUDE) -o $*.o -c $*.c - $(LD) $(LD_FLAGS) $*.pd_linux $*.o $(LIB_UNIX) + $(CC) $(CC_UNIX) $(CC_FLAGS) $(INCLUDE) -o sndfiler.o -c sndfiler.c + $(CC) $(CC_UNIX) $(CC_FLAGS) $(INCLUDE) -o file_input.o -c file_input.c + $(LD) $(LD_FLAGS) $*.pd_linux $(OBJ) $(LIB_UNIX) strip --strip-unneeded $*.pd_linux chmod 755 $*.pd_linux @test -d ../bin || mkdir -p ../bin @@ -97,11 +100,12 @@ pd_darwin: $(NAME).pd_darwin CC_DARWIN = -pthread LD_DARWIN = -bundle -undefined suppress -flat_namespace \ -bundle_loader $(PD_PATH)/bin/pd --export-dynamic \ - -L/sw/lib -L/opt/local/lib -lsndfile \ + -L/sw/lib -L/opt/local/lib -lsndfile -lvorbisfile \ $(THREADLIB_PATH)/threadlib.pd_darwin .c.pd_darwin: - $(CC) $(CC_FLAGS) $(CC_DARWIN) $(INCLUDE) -o $*.o -c $*.c + $(CC) $(CC_UNIX) $(CC_FLAGS) $(INCLUDE) -o sndfiler.o -c sndfiler.c + $(CC) $(CC_UNIX) $(CC_FLAGS) $(INCLUDE) -o file_input.o -c file_input.c $(LD) $(LD_DARWIN) -o $*.pd_darwin $*.o $(LIB) chmod 755 $*.pd_darwin @test -d ../bin || mkdir -p ../bin -- cgit v1.2.1