diff examples/MSP/Makefile @ 121:25fc4d0767f9

- Max example tweaks - corrected output display in simpletest example
author Jamie Bullock <jamie@postlude.co.uk>
date Mon, 23 Aug 2010 11:28:39 +0000
parents 85329d9583b7
children 1b970b36d946
line wrap: on
line diff
--- a/examples/MSP/Makefile	Wed Feb 03 22:35:13 2010 +0000
+++ b/examples/MSP/Makefile	Mon Aug 23 11:28:39 2010 +0000
@@ -4,22 +4,28 @@
 all: universal
 current: universal
 
-MAXINCLUDE = /usr/local/include/max-includes 
-MSPINCLUDE = /usr/local/include/msp-includes 
 FRAMEWORKS = /Library/Frameworks
-INSTALLDIR = /Applications/Audio/MaxMSP\ 4.6.3/Cycling\ \'74/externals/
+MAXINCLUDE = $(FRAMEWORKS)/MaxAPI.framework/Headers
+MSPINCLUDE = $(FRAMEWORKS)/MaxAudioAPI.framework/Headers
+INSTALLDIR = /Applications/Max5/Cycling\ \'74/externals/
+XTRACT_HEADERS = /usr/local/include
+FFTW_LIBS = -lfftw3f #include this if you compiled libxtract with --enable-fft
 
 LIPO = /usr/bin/lipo
 CC = gcc
 
-CFLAGS = -F$(FRAMEWORKS) -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -x c -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -fmessage-length=0 -I$(MAXINCLUDE) -I$(MSPINCLUDE) -include macho-prefix.h  -Werror
+#DEBUG_FLAGS = -Werror -Wall
+
+CFLAGS = -F$(FRAMEWORKS) -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -x c -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -fmessage-length=0 -I$(MAXINCLUDE) -I$(MSPINCLUDE) -include macho-prefix.pch $(DEBUG_FLAGS) -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -I$(XTRACT_HEADERS)
 
 I386CFLAGS = -arch i386 
+IX86_64CFLAGS = -arch x86_64
 PPCCFLAGS = -arch ppc -faltivec -fasm-blocks -Wno-unused
 
-LDFLAGS = -F$(FRAMEWORKS) -L$(MAXINCLUDE) -L$(MSPINCLUDE) -framework Carbon -framework MaxAPI -framework MaxAudioAPI -Wl,-Y,1455 -bundle -L/usr/local/lib -lxtract
+LDFLAGS = -F$(FRAMEWORKS) -L$(MAXINCLUDE) -L$(MSPINCLUDE) -framework Carbon -framework MaxAPI -framework MaxAudioAPI -Wl,-Y,1455 -bundle -L/usr/local/lib -lxtract $(FFTW_LIBS)
 
 I386LDFLAGS = -arch i386
+IX86_64CFLAGS = -arch x86_64
 PPCLDFLAGS = -arch ppc
 
 universal: 
@@ -48,11 +54,18 @@
 	cp Info.plist PkgInfo $(NAME).mxo/Contents/
 	cp $(NAME) $(NAME).mxo/Contents/MacOS
 
+intel64:
+	$(CC) $(CFLAGS) $(IX86_64CFLAGS) -o $(NAME)-64.o -c $(NAME).c
+	$(CC) $(LDFLAGS) $(IX86_64LDFLAGS) -o $(NAME)-64 $(NAME)-64.o
+	$(LIPO) -create $(NAME)-64 -output $(NAME)
+	mkdir -p $(NAME).mxo/Contents/MacOS
+	cp Info.plist PkgInfo $(NAME).mxo/Contents/
+	cp $(NAME) $(NAME).mxo/Contents/MacOS
+
+
+
 clean:
-	rm -rf *i386* *ppc* xtract~ *.mxo
-
-maintainer-clean:
-	rm -rf *i386* *ppc* xtract~ *.mxo
+	rm -rf *64* *i386* *ppc* xtract~ *.mxo
 
 install:
 	$(INSTALL) cp -r $(NAME).mxo $(INSTALLDIR)