aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile48
1 files changed, 48 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..3a8e66a
--- /dev/null
+++ b/makefile
@@ -0,0 +1,48 @@
+#
+# For Debian :
+# apt-get install xlib-dev xmms-dev
+#
+
+
+
+current: pd_linux
+ @echo make pd_linux, pd_darwin, clean ... you must be specific
+ @echo default to pd_linux
+
+
+clean: ; rm -f *.pd_linux *.o
+
+# ----------------------- LINUX i386 -----------------------
+
+pd_linux: pcre.pd_linux xmms.pd_linux x11mouse.pd_linux x11key.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 -fPIC
+
+LINUXINCLUDE = -I../src -L/usr/lib/X11 -I/usr/include/X11 -L/usr/X11R6/lib
+LINUXLINKS = -lX11 -lXtst -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -lxmms
+
+.c.pd_linux:
+ cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c \
+ `xmms-config --cflags`
+ ld -export_dynamic -shared -o $*.pd_linux $*.o -lpcre -lc -lm\
+ -L/usr/lib -L/usr/X11R6/lib $(LINUXLINKS)
+ strip --strip-unneeded $*.pd_linux
+ rm $*.o
+# ----------------------- Mac OSX -----------------------
+
+pd_darwin: matches.pd_darwin concat.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 -lpcre
+ cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o
+ rm -f $*.o
+