From a71ce6ca986dacad105df7823476e6f1a0756819 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 18 Oct 2004 21:10:49 +0000 Subject: [hid] now outputs downcased event names from input.h and Makefile should work on MacOSX and GNU/Linux svn path=/trunk/externals/hcs/hid/; revision=2121 --- Makefile | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dc8be9d..a205252 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,30 @@ CC=gcc -all: input_arrays pd_darwin +OS_NAME = $(shell uname -s) + -pd_darwin: hid.pd_darwin macosxhid.pd_darwin +# ----------------------- GNU/LINUX i386 ----------------------- +ifeq ($(OS_NAME),Linux) +LDFLAGS = -export_dynamic -shared +.SUFFIXES: .pd_linux -clean: ; rm -f *.pd_darwin *.o *~ input_arrays.h +all: input_arrays pd_linux +pd_linux: hid.pd_linux -# ----------------------- DARWIN i386 ----------------------- +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 \ @@ -18,11 +33,19 @@ CFLAGS = -DUNIX -DPD -O2 -funroll-loops -fomit-frame-pointer \ INCLUDE = -I../ -I../../../pd/src -I/usr/local/include -I./HID\ Utilities\ Source -LDFLAGS = -bundle -bundle_loader $(PDEXECUTABLE) -L/sw/lib - .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 > input_arrays.h + + +clean: ; rm -f *.pd_* *.o *~ input_arrays.h + -- cgit v1.2.1