aboutsummaryrefslogtreecommitdiff
path: root/psql/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'psql/Makefile')
-rw-r--r--psql/Makefile57
1 files changed, 57 insertions, 0 deletions
diff --git a/psql/Makefile b/psql/Makefile
new file mode 100644
index 0000000..f4084e3
--- /dev/null
+++ b/psql/Makefile
@@ -0,0 +1,57 @@
+NAME=psql
+CSYM=psql
+
+PDDIR=/usr/local/lib/pd
+INCLUDE = -I/usr/include/postgresql
+
+all: pd_linux
+current: pd_linux
+
+LDFLAGS = -lc -lm -lpq
+
+# Postgres ----------------------
+
+SRCDIR= /usr/include
+TARGDIR= ./
+
+#include Makefile.global #needed for postgresql stuff
+
+# Linux ----------------------------------------------
+
+pd_linux: $(NAME).pd_linux
+
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -g -DPD -O0 -fPIC -funroll-loops -fomit-frame-pointer \
+ -Wall -W -Wshadow -Wstrict-prototypes -Werror \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+.c.pd_linux:
+ $(CC) $(LINUXCFLAGS) $(INCLUDE) -o $*.o -c $*.c
+ $(CC) -export_dynamic -shared -o $*.pd_linux $*.o $(LDFLAGS)
+ strip --strip-unneeded $*.pd_linux
+ rm $*.o
+
+# Darwin ----------------------------------------------
+
+pd_darwin: $(NAME).pd_darwin
+
+.SUFFIXES: .pd_darwin
+
+DARWINCFLAGS = -DPD -O3 -Wall -W -Wshadow -Wstrict-prototypes \
+ -Wno-unused -Wno-parentheses -Wno-switch -L/usr/local/lib/
+
+.c.pd_darwin:
+ $(CC) $(DARWINCFLAGS) $(INCLUDE) -o $*.o -c $*.c
+ $(CC) -bundle -undefined dynamic_lookup -o $(NAME).pd_darwin $*.o $(LDFLAGS)
+ rm -f *.o
+
+# Install ----------------------------------------------
+
+install:
+ cp $(NAME).pd_* $(PDDIR)/extra/
+
+# Clean ----------------------------------------------
+
+clean:
+ rm -f *.pd_* *.o