From 4aa74035b7f37d9cd1208efe06ce245f73b5dd18 Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Tue, 6 Nov 2007 09:59:03 +0000 Subject: psql external initial commit svn path=/trunk/externals/postlude/; revision=8946 --- psql/Makefile | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 psql/Makefile (limited to 'psql/Makefile') 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 -- cgit v1.2.1