From c2f0c369d14687d1af4d2a9142650558bfab60fb Mon Sep 17 00:00:00 2001
From: Miller Puckette <msp@ucsd.edu>
Date: Wed, 1 Aug 2007 17:20:56 -0700
Subject: [PATCH] add some makefiles

---
 doc/6.externs/makefile  |  82 +++++++++++++++++
 extra/bonk~/makefile    |   4 +
 extra/choice/makefile   |   4 +
 extra/expr~/makefile    | 190 ++++++++++++++++++++++++++++++++++++++++
 extra/fiddle~/makefile  |   4 +
 extra/loop~/makefile    |   4 +
 extra/lrshift~/makefile |   4 +
 extra/makefile          |  96 ++++++++++++++++++++
 extra/pique/makefile    |   4 +
 extra/sigmund~/makefile |   4 +
 10 files changed, 396 insertions(+)
 create mode 100644 doc/6.externs/makefile
 create mode 100644 extra/bonk~/makefile
 create mode 100644 extra/choice/makefile
 create mode 100644 extra/expr~/makefile
 create mode 100644 extra/fiddle~/makefile
 create mode 100644 extra/loop~/makefile
 create mode 100644 extra/lrshift~/makefile
 create mode 100644 extra/makefile
 create mode 100644 extra/pique/makefile
 create mode 100644 extra/sigmund~/makefile

diff --git a/doc/6.externs/makefile b/doc/6.externs/makefile
new file mode 100644
index 000000000..8a5657fea
--- /dev/null
+++ b/doc/6.externs/makefile
@@ -0,0 +1,82 @@
+current:
+	echo make pd_linux, pd_nt, pd_irix5, or pd_irix6
+
+clean: ; rm -f *.pd_linux *.o
+
+# ----------------------- NT -----------------------
+
+pd_nt: obj1.dll obj2.dll obj3.dll obj4.dll obj5.dll dspobj~.dll
+
+.SUFFIXES: .obj .dll
+
+PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
+VC="D:\Program Files\Microsoft Visual Studio\Vc98"
+
+PDNTINCLUDE = /I. /I\tcl\include /I..\..\src /I$(VC)\include
+
+PDNTLDIR = $(VC)\lib
+PDNTLIB = $(PDNTLDIR)\libc.lib \
+	$(PDNTLDIR)\oldnames.lib \
+	$(PDNTLDIR)\kernel32.lib \
+	..\..\bin\pd.lib 
+
+.c.dll:
+	cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
+	link /dll /export:$*_setup $*.obj $(PDNTLIB)
+
+# override explicitly for tilde objects like this:
+dspobj~.dll: dspobj~.c; 
+	cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
+	link /dll /export:dspobj_tilde_setup $*.obj $(PDNTLIB)
+
+# ----------------------- IRIX 5.x -----------------------
+
+pd_irix5: obj1.pd_irix5 obj2.pd_irix5 \
+    obj3.pd_irix5 obj4.pd_irix5 obj5.pd_irix5 dspobj~.pd_irix5
+
+.SUFFIXES: .pd_irix5
+
+SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
+
+
+SGIINCLUDE =  -I../../src/
+
+.c.pd_irix5:
+	cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+	ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
+	rm $*.o
+
+# ----------------------- LINUX i386 -----------------------
+
+pd_linux: obj1.pd_linux obj2.pd_linux obj3.pd_linux obj4.pd_linux \
+    obj5.pd_linux dspobj~.pd_linux
+
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
+    -Wall -W -Wshadow -Wstrict-prototypes -Werror \
+    -Wno-unused -Wno-parentheses -Wno-switch
+
+LINUXINCLUDE =  -I../../src
+
+.c.pd_linux:
+	cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+	ld -export_dynamic  -shared -o $*.pd_linux $*.o -lc -lm
+	strip --strip-unneeded $*.pd_linux
+	rm $*.o
+
+# ----------------------- Mac OSX -----------------------
+
+pd_darwin: obj1.pd_darwin obj2.pd_darwin \
+     obj3.pd_darwin obj4.pd_darwin obj5.pd_darwin dspobj~.pd_darwin
+
+.SUFFIXES: .pd_darwin
+
+DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
+    -Wno-unused -Wno-parentheses -Wno-switch
+
+.c.pd_darwin:
+	cc $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+	cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o 
+	rm -f $*.o
+
diff --git a/extra/bonk~/makefile b/extra/bonk~/makefile
new file mode 100644
index 000000000..af6399cca
--- /dev/null
+++ b/extra/bonk~/makefile
@@ -0,0 +1,4 @@
+NAME=bonk~
+CSYM=bonk_tilde
+
+include ../makefile
diff --git a/extra/choice/makefile b/extra/choice/makefile
new file mode 100644
index 000000000..7fc711593
--- /dev/null
+++ b/extra/choice/makefile
@@ -0,0 +1,4 @@
+NAME=choice
+CSYM=choice
+
+include ../makefile
diff --git a/extra/expr~/makefile b/extra/expr~/makefile
new file mode 100644
index 000000000..4889afe56
--- /dev/null
+++ b/extra/expr~/makefile
@@ -0,0 +1,190 @@
+
+current: expr.pd_linux expr~.pd_linux fexpr~.pd_linux \
+     ../expr.pd_linux ../expr~.pd_linux ../fexpr~.pd_linux
+
+install: install_linux
+
+clean: clean_linux
+
+PDEXTERN=/usr/local/lib/pd/externs
+
+# ----------------------- NT -----------------------
+
+pd_nt: expr.dll
+
+NTOBJ =  vexp.obj vexp_fun.obj vexp_if.obj
+
+PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
+VC="C:\Program Files\Microsoft Visual Studio\Vc98"
+
+PDNTINCLUDE = /I. /I..\..\src /I$(VC)\include
+
+PDNTLDIR = $(VC)\lib
+PDNTLIB = $(PDNTLDIR)\libc.lib \
+	$(PDNTLDIR)\oldnames.lib \
+	$(PDNTLDIR)\kernel32.lib \
+	..\..\bin\pd.lib 
+
+.c.obj:
+	cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
+
+expr.dll: $(NTOBJ)
+	link /dll /export:expr_setup /export:expr_tilde_setup \
+	    /export:fexpr_tilde_setup $(NTOBJ) $(PDNTLIB)
+	ren vexp.dll expr.dll
+	copy expr.dll ..\expr.dll
+	copy expr.dll ..\expr~.dll
+	copy expr.dll ..\fexpr~.dll
+	copy help-expr.pd ..\help-expr.pd
+
+# ----------------------- IRIX 5.x -----------------------
+
+pd_irix5: 
+
+.SUFFIXES: .pd_irix5
+
+SGICFLAGS5 = -o32 -DPD -DSGI -O2
+
+
+SGIINCLUDE =  -I/usr/people/msp/pd/pd/src
+
+.c.pd_irix5:
+	$(CC) $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+	ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
+	rm $*.o
+
+# ----------------------- IRIX 6.x -----------------------
+
+pd_irix6: 
+
+.SUFFIXES: .pd_irix6
+
+SGICFLAGS6 = -DPD -DSGI -n32 \
+	-OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \
+	-Ofast=ip32
+
+SGICFLAGS5 = -DPD -O2 -DSGI
+
+SGIINCLUDE =  -I/usr/people/msp/pd/pd/src
+
+.c.pd_irix6:
+	$(CC) $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c
+	ld -elf -shared -rdata_shared -o $*.pd_irix6 $*.o
+	rm $*.o
+
+# ----------------------- LINUX i386 -----------------------
+
+LINUXOBJ =  vexp.pd_linux_o vexp_fun.pd_linux_o vexp_if.pd_linux_o
+.SUFFIXES: .pd_linux_o
+
+LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -fPIC \
+    -fno-strict-aliasing -Wall -W -Wshadow -Wstrict-prototypes \
+    -Wno-unused -Wno-parentheses -Wno-switch 
+
+LINUXINCLUDE =  -I../../src
+
+.c.pd_linux_o:
+	$(CC) -g $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.pd_linux_o -c $*.c
+
+expr.pd_linux: $(LINUXOBJ)
+	$(CC) -export_dynamic  -shared -o expr.pd_linux $(LINUXOBJ) -lc -lm
+	strip --strip-unneeded expr.pd_linux
+
+expr~.pd_linux: expr.pd_linux
+	-ln -s expr.pd_linux expr~.pd_linux
+
+fexpr~.pd_linux: expr.pd_linux
+	-ln -s expr.pd_linux fexpr~.pd_linux
+
+../expr.pd_linux: expr.pd_linux
+	-ln -s expr~/expr.pd_linux ../expr.pd_linux
+
+../expr~.pd_linux: expr.pd_linux
+	-ln -s expr~/expr.pd_linux ../expr~.pd_linux
+
+../fexpr~.pd_linux: expr.pd_linux
+	-ln -s expr~/expr.pd_linux ../fexpr~.pd_linux
+
+install_linux:
+	install expr.pd_linux $(PDEXTERN)
+	rm -f $(PDEXTERN)/expr~.pd_linux
+	rm -f $(PDEXTERN)/fexpr~.pd_linux
+	cd $(PDEXTERN); \
+	-ln -s expr.pd_linux expr~.pd_linux
+	-ln -s expr.pd_linux fexpr~.pd_linux
+
+
+linux_clean:
+	rm -f *.pd_linux_o *.o
+
+# ----------------------- MAC OSX -----------------------
+
+MACOSXOBJ3 =  vexp.d_ppc_o vexp_fun.d_ppc_o vexp_if.d_ppc_o
+MACOSXOBJ =  vexp.d_fat_o vexp_fun.d_fat_o vexp_if.d_fat_o
+.SUFFIXES: .d_ppc_o .d_fat_o
+
+MACOSXCFLAGS = -DMACOSX -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
+    -Wno-unused -Wno-parentheses -Wno-switch 
+
+MACOSXINCLUDE =  -I../../src
+
+d_ppc: expr.d_ppc expr~.d_ppc fexpr~.d_ppc
+.c.d_ppc_o:
+	$(CC) -g $(MACOSXCFLAGS) $(MACOSXINCLUDE) -o $*.d_ppc_o -c $*.c
+
+expr.d_ppc: $(MACOSXOBJ3)
+	$(CC) -bundle -undefined suppress  -flat_namespace \
+		-o expr.d_ppc $(MACOSXOBJ3)  -lm
+	rm -f ../expr.d_ppc
+	-ln -s expr~/expr.d_ppc ..
+
+expr~.d_ppc: expr.d_ppc
+	-ln -s expr.d_ppc expr~.d_ppc
+	rm -f ../expr~.d_ppc
+	-ln -s expr~/expr~.d_ppc ..
+
+fexpr~.d_ppc: expr.d_ppc
+	-ln -s expr.d_ppc fexpr~.d_ppc
+	rm -f ../fexpr~.d_ppc
+	-ln -s expr~/fexpr~.d_ppc ..
+
+install_d_fat:
+	install expr.d_fat $(PDEXTERN)
+	rm -f $(PDEXTERN)/expr~.d_fat
+	rm -f $(PDEXTERN)/fexpr~.d_fat
+	cd $(PDEXTERN); \
+	-ln -s expr.d_fat expr~.d_fat; \
+	-ln -s expr.d_fat fexpr~.d_fat
+
+d_fat: expr.d_fat expr~.d_fat fexpr~.d_fat
+.c.d_fat_o:
+	$(CC) -g $(MACOSXCFLAGS) $(MACOSXINCLUDE)  -arch i386 -arch ppc \
+	-o $*.d_fat_o -c $*.c
+
+expr.d_fat: $(MACOSXOBJ)
+	$(CC) -arch i386 -arch ppc -bundle -undefined suppress  -flat_namespace \
+		-o expr.d_fat $(MACOSXOBJ)  -lm
+	rm -f ../expr.d_fat
+	-ln -s expr~/expr.d_fat ..
+
+expr~.d_fat: expr.d_fat
+	-ln -s expr.d_fat expr~.d_fat
+	rm -f ../expr~.d_fat
+	-ln -s expr~/expr~.d_fat ..
+
+fexpr~.d_fat: expr.d_fat
+	-ln -s expr.d_fat fexpr~.d_fat
+	rm -f ../fexpr~.d_fat
+	-ln -s expr~/fexpr~.d_fat ..
+
+install_d_ppc:
+	install expr.d_ppc $(PDEXTERN)
+	rm -f $(PDEXTERN)/expr~.d_ppc
+	rm -f $(PDEXTERN)/fexpr~.d_ppc
+	cd $(PDEXTERN); \
+	-ln -s expr.d_ppc expr~.d_ppc; \
+	-ln -s expr.d_ppc fexpr~.d_ppc
+
+clean_d_ppc:
+	rm -f *.d_ppc_o *.o
+
diff --git a/extra/fiddle~/makefile b/extra/fiddle~/makefile
new file mode 100644
index 000000000..247c905e6
--- /dev/null
+++ b/extra/fiddle~/makefile
@@ -0,0 +1,4 @@
+NAME=fiddle~
+CSYM=fiddle_tilde
+
+include ../makefile
diff --git a/extra/loop~/makefile b/extra/loop~/makefile
new file mode 100644
index 000000000..fd21f2b4c
--- /dev/null
+++ b/extra/loop~/makefile
@@ -0,0 +1,4 @@
+NAME=loop~
+CSYM=loop_tilde
+
+include ../makefile
diff --git a/extra/lrshift~/makefile b/extra/lrshift~/makefile
new file mode 100644
index 000000000..d6a24cfe3
--- /dev/null
+++ b/extra/lrshift~/makefile
@@ -0,0 +1,4 @@
+NAME=lrshift~
+CSYM=lrshift_tilde
+
+include ../makefile
diff --git a/extra/makefile b/extra/makefile
new file mode 100644
index 000000000..56e59bed8
--- /dev/null
+++ b/extra/makefile
@@ -0,0 +1,96 @@
+current: pd_linux
+
+# ----------------------- NT -----------------------
+
+pd_nt: $(NAME).dll
+
+.SUFFIXES: .dll
+
+PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
+VC="C:\Program Files\Microsoft Visual Studio\Vc98"
+
+PDNTINCLUDE = /I. /I..\..\src /I$(VC)\include
+
+PDNTLDIR = $(VC)\lib
+PDNTLIB = $(PDNTLDIR)\libc.lib \
+	$(PDNTLDIR)\oldnames.lib \
+	$(PDNTLDIR)\kernel32.lib \
+	..\..\bin\pd.lib 
+
+.c.dll:
+	cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
+	link /dll /export:$(CSYM)_setup $*.obj $(PDNTLIB)
+
+# ----------------------- IRIX 5.x -----------------------
+
+pd_irix5: $(NAME).pd_irix5
+
+.SUFFIXES: .pd_irix5
+
+SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
+
+SGIINCLUDE =  -I../../src
+
+.c.pd_irix5:
+	$(CC) $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+	ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
+	rm $*.o
+
+# ----------------------- IRIX 6.x -----------------------
+
+pd_irix6: $(NAME).pd_irix6
+
+.SUFFIXES: .pd_irix6
+
+SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \
+	-OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \
+	-Ofast=ip32
+
+.c.pd_irix6:
+	$(CC) $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c
+	ld -n32 -IPA -shared -rdata_shared -o $*.pd_irix6 $*.o
+	rm $*.o
+
+# ----------------------- LINUX i386 -----------------------
+
+pd_linux: $(NAME).pd_linux
+
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -fPIC \
+    -Wall -W -Wshadow -Wstrict-prototypes \
+    -Wno-unused -Wno-parentheses -Wno-switch $(CFLAGS)
+
+LINUXINCLUDE =  -I../../src
+
+.c.pd_linux:
+	$(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+	$(CC) -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
+	strip --strip-unneeded $*.pd_linux
+	rm -f $*.o
+
+# ----------------------- Mac OSX -----------------------
+
+d_ppc: $(NAME).d_ppc
+d_fat: $(NAME).d_fat
+
+.SUFFIXES: .d_ppc .d_fat
+
+DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
+    -Wno-unused -Wno-parentheses -Wno-switch
+
+.c.d_ppc:
+	$(CC) $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+	$(CC) -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o 
+	rm -f $*.o
+
+.c.d_fat:
+	$(CC) -arch i386 -arch ppc $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+	$(CC) -arch i386 -arch ppc -bundle -undefined suppress -flat_namespace \
+	    -o $*.d_fat $*.o 
+	rm -f $*.o
+
+# ----------------------------------------------------------
+
+clean:
+	rm -f *.o *.pd_* so_locations
diff --git a/extra/pique/makefile b/extra/pique/makefile
new file mode 100644
index 000000000..562ce23b9
--- /dev/null
+++ b/extra/pique/makefile
@@ -0,0 +1,4 @@
+NAME=pique
+CSYM=pique
+
+include ../makefile
diff --git a/extra/sigmund~/makefile b/extra/sigmund~/makefile
new file mode 100644
index 000000000..3dc176b3b
--- /dev/null
+++ b/extra/sigmund~/makefile
@@ -0,0 +1,4 @@
+NAME=sigmund~
+CSYM=sigmund_tilde
+
+include ../makefile
-- 
GitLab