From f9428704ca2515a8beff60d31497f4fb3adda6ff Mon Sep 17 00:00:00 2001 From: "N.N." Date: Sat, 22 Sep 2007 23:54:13 +0000 Subject: added send/receive support, makefile for pd_darwin svn path=/trunk/externals/ffext/; revision=8748 --- tracker/makefile | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'tracker/makefile') diff --git a/tracker/makefile b/tracker/makefile index 1014845..64512a8 100644 --- a/tracker/makefile +++ b/tracker/makefile @@ -1,19 +1,37 @@ -all: tracker.pd_linux -tracker.pd_linux: tracker.c tracker.h tracker.tk2c +all: pd_linux + +SUFFIX=pd_linux +#SUFFIX=pd_darwin + +$(SUFFIX): tracker.$(SUFFIX) +tracker.$(SUFFIX): tracker.c tracker.h tracker.tk2c + +pd_darwin: tracker.pd_darwin +tracker.pd_: tracker.c tracker.h tracker.tk2c STRIP = strip -CFLAGS = -DPD -DUNIX -O2 -funroll-loops -fomit-frame-pointer \ +CFLAGS = -DPD -O2 \ -Wall -W -Wno-shadow -Wstrict-prototypes \ - -Wno-unused -Wno-parentheses -Wno-switch \ - -I/usr/include -I../pd/src + -Wno-unused -Wno-parentheses -Wno-switch +INCLUDE = -I/usr/include -I../pd/src +LDFLAGS = + +ifeq ($(SUFFIX),pd_linux) + CFLAGS += -DUNIX -funroll-loops -fomit-frame-pointer + LDFLAGS += -export_dynamic -shared -lc -lm +endif +ifeq ($(SUFFIX),pd_darwin) + LDFLAGS += -bundle -undefined suppress -flat_namespace + STRIP = false +endif -.SUFFIXES: .pd_linux .tk .tk2c +.SUFFIXES: .$(SUFFIX) .tk .tk2c .tk.tk2c: ./tk2c.bash < $*.tk > $*.tk2c -.c.pd_linux: - $(CC) $(CFLAGS) -o $*.o -c $*.c - $(LD) -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm +.c.$(SUFFIX): + $(CC) $(CFLAGS) $(INCLUDE) -o $*.o -c $*.c + $(LD) $(LDFLAGS) -o $*.pd_linux $*.o $(STRIP) --strip-unneeded $*.pd_linux clean: $(RM) -f *.o *.pd_* so_locations *.tk2c -- cgit v1.2.1