view examples/MSP/Makefile @ 96:757e6f99dcd7

Dan Stowell: Removed strange "zeroing" part of xtract_mfcc() which was zeroing a load of elements despite the fact that they're ignored by the DCT process called next, and never used for anything. This was writing to an assumed large result array (same size as number of FFT bins) despite the fact that only a small number of MFCCs (typically less than 50) are required, therefore either wasting memory or writing to memory it shouldn't do!
author Dan Stowell <danstowell@gmail.com>
date Wed, 03 Oct 2007 13:43:16 +0000
parents 85329d9583b7
children 25fc4d0767f9
line wrap: on
line source
NAME=xtract~
CSYM=xtract~

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/

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

I386CFLAGS = -arch i386 
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

I386LDFLAGS = -arch i386
PPCLDFLAGS = -arch ppc

universal: 
	$(CC) $(CFLAGS) $(I386CFLAGS) -o $(NAME)-i386.o -c $(NAME).c
	$(CC) $(CFLAGS) $(PPCCFLAGS) -o $(NAME)-ppc.o -c $(NAME).c
	$(CC) $(LDFLAGS) $(I386LDFLAGS) -o $(NAME)-i386 $(NAME)-i386.o
	$(CC) $(LDFLAGS) $(PPCLDFLAGS) -o $(NAME)-ppc $(NAME)-ppc.o
	$(LIPO) -create $(NAME)-ppc $(NAME)-i386 -output $(NAME)
	mkdir -p $(NAME).mxo/Contents/MacOS
	cp Info.plist PkgInfo $(NAME).mxo/Contents/
	cp $(NAME) $(NAME).mxo/Contents/MacOS

ppc:
	$(CC) $(CFLAGS) $(PPCCFLAGS) -o $(NAME)-ppc.o -c $(NAME).c
	$(CC) $(LDFLAGS) $(PPCLDFLAGS) -o $(NAME)-ppc $(NAME)-ppc.o
	$(LIPO) -create $(NAME)-ppc -output $(NAME)
	mkdir -p $(NAME).mxo/Contents/MacOS
	cp Info.plist PkgInfo $(NAME).mxo/Contents/
	cp $(NAME) $(NAME).mxo/Contents/MacOS

intel:
	$(CC) $(CFLAGS) $(I386CFLAGS) -o $(NAME)-i386.o -c $(NAME).c
	$(CC) $(LDFLAGS) $(I386LDFLAGS) -o $(NAME)-i386 $(NAME)-i386.o
	$(LIPO) -create $(NAME)-i386 -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

install:
	$(INSTALL) cp -r $(NAME).mxo $(INSTALLDIR)