LIBS = -lm CFLAGS = -O2 CDEFINES = -I../pa_common -I../pablio VERSION=18 CC=gcc LD=gcc AR=ar RANLIB=ranlib LN=ln CP=cp MKDIR=mkdir prefix=/usr libdir=/usr/lib includedir=/usr/include all: libportaudio.dylib libportaudio.a TESTS:= $(wildcard pa_tests/pa*.c pa_tests/debug*.c) TESTO:= $(wildcard pa_tests/pa*.o pa_tests/debug*.o) LIBFILES:= ./pa_common/pa_lib.c ./pa_common/pa_convert.c ./pa_mac_core/pa_mac_core.c ./pablio/ringbuffer.c all: libportaudio.dylib libportaudio.a .c.o: -gcc -c -I./pa_common -I./pablio $(CFLAGS) $< -o $*.o libportaudio.a: $(LIBFILES:.c=.o) $(AR) ruv $@ $? $(RANLIB) $@ libportaudio.$(VERSION).dylib: $(LIBFILES:.c=.o) gcc $(CFLAGS) $(CDEFINES) -framework CoreAudio -framework AudioToolbox -framework AudioUnit $(LIBS) -dynamiclib -o libportaudio.$(VERSION).dylib -install_name $(libdir)/libportaudio.$(VERSION).dylib -compatibility_version 1 -current_version $(VERSION) ./pa_common/pa_lib.o ./pa_common/pa_convert.o ./pa_mac_core/pa_mac_core.o ./pablio/ringbuffer.o libportaudio.dylib: libportaudio.$(VERSION).dylib $(LN) -s $? $@ install: libportaudio.dylib libportaudio.a $(MKDIR) -p $(DESTDIR)$(includedir)/portaudio $(MKDIR) -p $(DESTDIR)$(libdir) $(CP) -pPRf libportaudio.$(VERSION).dylib libportaudio.dylib libportaudio.a $(DESTDIR)$(libdir) $(CP) -pPRf pa_common/portaudio.h $(DESTDIR)$(includedir)/portaudio $(LN) -s portaudio/portaudio.h $(DESTDIR)$(includedir)//portaudio.h testo: $(TESTS:.c=.o) testq: $(TESTO:.o=) clean: -@rm -f $(TESTS:.c=.o) -@rm -f $(TESTS:.c=) -@rm -f $(LIBFILES:.c=.o) -@rm -f *.dylib