view examples/MSP/Makefile @ 214:f28f66faa016

Add "stateful" feature type with initial feature "last n" Stateful feature extraction functions are functions that require state to be maintained between successive calls. This is necessary, for example when an accumulation of values is required, or changes need to be measured over time. The initial xtract_last_n() function accumulates the last N (single) values from *data and writes them to *result
author Jamie Bullock <jamie@jamiebullock.com>
date Tue, 03 Jun 2014 21:17:07 +0100
parents 09599ca5a02a
children
line wrap: on
line source
NAME=xtract~
CSYM=xtract~

all: universal
current: universal

FRAMEWORKS = /Library/Frameworks
MAXINCLUDE = $(FRAMEWORKS)/MaxAPI.framework/Headers
MSPINCLUDE = $(FRAMEWORKS)/MaxAudioAPI.framework/Headers
INSTALLDIR = /Applications/Max5/Cycling\ \'74/externals/
XTRACT_HEADERS = /usr/local/include

LIPO = /usr/bin/lipo
CC = gcc

#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) $(DEBUG_FLAGS) -I$(XTRACT_HEADERS)

I386CFLAGS = -arch i386 
IX86_64CFLAGS = -arch x86_64

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
IX86_64CFLAGS = -arch x86_64

universal: 
	$(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


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

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 *64* *i386* xtract~ *.mxo

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