diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2004-10-22 18:49:16 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2004-10-22 18:49:16 +0000 |
commit | 9554c20806f8da1482790543f2ec5a3c91b363d0 (patch) | |
tree | 87c1653591f47f75da9e467f0d2a4fae1bb65c94 /Makefile | |
parent | f59333ff17f17d8fa9e983ccee47f43cd77a3040 (diff) |
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
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 106 |
1 files changed, 55 insertions, 51 deletions
@@ -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 + |