From 76be9508936fa53fe661d378ee2fc41cc9baebf3 Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Fri, 1 Jul 2005 08:13:35 +0000 Subject: added svn path=/trunk/externals/ggee/; revision=3276 --- makefile.sub | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 makefile.sub (limited to 'makefile.sub') diff --git a/makefile.sub b/makefile.sub new file mode 100644 index 0000000..684d3ed --- /dev/null +++ b/makefile.sub @@ -0,0 +1,42 @@ +prefix=$(DESTDIR)/usr + +EXTERNALS = $(shell ls *.c) +STRIP = strip --strip-unneeded -R .note -R .comment + + + +linux: $(EXTERNALS:.c=.pd_linux) +win: $(EXTERNALS:.c=.dll) +osx: $(EXTERNALS:.c=.pd_darwin) + + + +.SUFFIXES: .pd_linux .pd_darwin .dll + +WARNFLAGS = -Wall -W -Wshadow -Wstrict-prototypes \ + -Wno-unused -Wno-parentheses -Wno-switch + +CFLAGS + = -fPIC -DPD $(WARNFLAGS) + +INCLUDES = -I.. -I../include + +# the linux compilation target + +%.pd_linux: %.c + $(CC) $(CFLAGS) $(INCLUDES) -o "$*.o" -c $*.c + gcc -Wl,-export_dynamic -shared -o "$*.pd_linux" "$*.o" -lc -lm + chmod a-x "$*.pd_linux" + rm -f "$*.o" + +# the windows mingw target + +%.dll: ../src/%.c + $(CC) -mms-bitfields $(CFLAGS) $(DEFINES) $(INCLUDE) -o "$*.o" -c "../src/$*.c" + gcc -shared -o "$*.dll" "$*.o" $(PDPATH)/bin/pd.dll + +strip: + $(STRIP) *.pd_linux + +clean: + -rm *.pd_linux *~ *.dll *.pd_darwin *.o + -- cgit v1.2.1