From 9554c20806f8da1482790543f2ec5a3c91b363d0 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 22 Oct 2004 18:49:16 +0000 Subject: more progress generalizing for cross-platformness; Darwin stuff compiles and the object loads, but it doesn't do anything yet svn path=/trunk/externals/hcs/hid/; revision=2141 --- Makefile | 106 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 55 insertions(+), 51 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 75b23b8..9c5bfe5 100644 --- a/Makefile +++ b/Makefile @@ -1,51 +1,55 @@ -CC=gcc - -OS_NAME = $(shell uname -s) - - -# ----------------------- GNU/LINUX i386 ----------------------- -ifeq ($(OS_NAME),Linux) -LDFLAGS = -export_dynamic -shared -.SUFFIXES: .pd_linux - -all: input_arrays pd_linux -pd_linux: hid.pd_linux - -endif - -# ----------------------- DARWIN ----------------------- -ifeq ($(OS_NAME),Darwin) -LDFLAGS = -bundle -bundle_loader $(PDEXECUTABLE) -L/sw/lib -.SUFFIXES: .pd_darwin - -all: input_arrays pd_darwin -pd_darwin: hid.pd_darwin - -endif - -# ----------------------- GENERAL ----------------------- - -PDEXECUTABLE = ../../../pd/bin/pd - -CFLAGS = -DUNIX -DPD -O2 -funroll-loops -fomit-frame-pointer \ - -Wall -W -Wshadow -Wstrict-prototypes -Werror \ - -Wno-unused -Wno-parentheses -Wno-switch - -INCLUDE = -I../ -I../../../pd/src -I/usr/local/include -I./HID\ Utilities\ Source - -.c.pd_darwin: - $(CC) $(CFLAGS) $(INCLUDE) -o $*.o -c $*.c - $(CC) $(LDFLAGS) -o "$*.pd_darwin" "$*.o" -lc -lm - -.c.pd_linux: - $(CC) $(CFLAGS) $(INCLUDE) -o $*.o -c $*.c - ld $(LDFLAGS) -o $*.pd_linux $*.o -lc -lm - strip --strip-unneeded $*.pd_linux - rm $*.o - -input_arrays: - ./make-arrays-from-input.h.pl - - -clean: ; rm -f *.pd_* *.o *~ input_arrays.h ev*-list.pd - + +OS_NAME = $(shell uname -s) + + +# ----------------------- GNU/LINUX i386 ----------------------- +ifeq ($(OS_NAME),Linux) +LDFLAGS = -export_dynamic -shared +.SUFFIXES: .pd_linux + +all: input_arrays pd_linux +pd_linux: hid.pd_linux + +endif + +# ----------------------- DARWIN ----------------------- +ifeq ($(OS_NAME),Darwin) +FRAMEWORKS = Carbon IOKit +LDFLAGS = -bundle -bundle_loader $(PDEXECUTABLE) \ + -L/sw/lib -L./HID\ Utilities\ Source/build \ + -lHIDUtilities \ + $(patsubst %,-framework %,$(FRAMEWORKS)) +.SUFFIXES: .pd_darwin + +all: input_arrays pd_darwin +pd_darwin: hid.pd_darwin + +endif + +# ----------------------- GENERAL ----------------------- + +PDEXECUTABLE = ../../../pd/bin/pd + +CFLAGS = -DUNIX -DPD -O2 -funroll-loops -fomit-frame-pointer \ + -Wall -W -Wshadow -Wstrict-prototypes \ + -Wno-unused -Wno-parentheses -Wno-switch + +INCLUDE = -I./ -I../../../pd/src -I./HID\ Utilities\ Source + +.c.o: + $(CC) $(CFLAGS) $(INCLUDE) -c *.c + +.o.pd_darwin: + $(CC) $(LDFLAGS) -o $*.pd_darwin *.o + +.o.pd_linux: + ld $(LDFLAGS) -o $*.pd_linux $*.o -lc -lm + strip --strip-unneeded $*.pd_linux +# rm $*.o + +input_arrays: + ./make-arrays-from-input.h.pl + + +clean: ; rm -f *.pd_* *.o *~ input_arrays.? ev*-list.pd + -- cgit v1.2.1