| 1 |
# |
| 2 |
# PortAudio V19 Makefile.darwin |
| 3 |
# |
| 4 |
# Bjorn Roche of XO Audio (www.xoaudio.com) |
| 5 |
# Based on autoconf's makefile, created from Makefile generated by |
| 6 |
# autoconf. Autoconf files written by by Dominic Mazzoni with modifications |
| 7 |
# by Mikael Magnusson. |
| 8 |
# |
| 9 |
|
| 10 |
top_srcdir = . |
| 11 |
srcdir = . |
| 12 |
|
| 13 |
top_builddir = . |
| 14 |
OPT_LEVEL := -O2 |
| 15 |
PREFIX = /usr/local |
| 16 |
prefix = $(PREFIX) |
| 17 |
exec_prefix = ${prefix} |
| 18 |
bindir = ${exec_prefix}/bin |
| 19 |
libdir = ${exec_prefix}/lib |
| 20 |
includedir = ${prefix}/include |
| 21 |
CC = gcc |
| 22 |
CFLAGS = -g -std=gnu99 -Werror -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3 $(OPT_LEVEL) -Wall -pedantic -pipe -fPIC -DPA_BIG_ENDIAN -Ipa_common -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DPA_USE_COREAUDIO=1 -Iinclude -Isrc/common |
| 23 |
LIBS = -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon |
| 24 |
AR = /usr/bin/ar |
| 25 |
RANLIB = ranlib |
| 26 |
LIBTOOL = $(SHELL) $(top_builddir)/libtool |
| 27 |
INSTALL = /usr/bin/install -c |
| 28 |
INSTALL_DATA = ${INSTALL} -m 644 |
| 29 |
SHARED_FLAGS = -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon -dynamiclib -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3 |
| 30 |
DLL_LIBS = |
| 31 |
CXXFLAGS = -g $(OPT_LEVEL) |
| 32 |
NASM = |
| 33 |
NASMOPT = |
| 34 |
LN_S = ln -s |
| 35 |
LT_RELEASE=@LT_RELEASE@ |
| 36 |
LT_CURRENT=2 |
| 37 |
LT_REVISION=0 |
| 38 |
LT_AGE=0 |
| 39 |
|
| 40 |
|
| 41 |
OTHER_OBJS = src/os/mac_osx/pa_mac_hostapis.o src/os/unix/pa_unix_util.o src/hostapi/coreaudio/pa_mac_core.o src/hostapi/coreaudio/ringbuffer.o src/hostapi/coreaudio/pa_mac_core_utilities.o src/hostapi/coreaudio/pa_mac_core_blocking.o |
| 42 |
|
| 43 |
PALIB = libportaudio.a |
| 44 |
PADLL = libportaudio |
| 45 |
PADLLV_MIN = 19 |
| 46 |
PADLLV = 0.0.19 |
| 47 |
PADLLEXT = .dylib |
| 48 |
PASHLIBNAME = $(PADLL).$(PADLLV)$(PADLLEXT) |
| 49 |
PAINC = include/portaudio.h |
| 50 |
PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined -export -symbols-regex "Pa_.*" -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) |
| 51 |
|
| 52 |
COMMON_OBJS = \ |
| 53 |
src/common/pa_allocation.o \ |
| 54 |
src/common/pa_converters.o \ |
| 55 |
src/common/pa_cpuload.o \ |
| 56 |
src/common/pa_dither.o \ |
| 57 |
src/common/pa_front.o \ |
| 58 |
src/common/pa_process.o \ |
| 59 |
src/common/pa_skeleton.o \ |
| 60 |
src/common/pa_stream.o \ |
| 61 |
src/common/pa_trace.o |
| 62 |
|
| 63 |
TESTS = \ |
| 64 |
bin/paqa_devs \ |
| 65 |
bin/paqa_errs \ |
| 66 |
bin/patest1 \ |
| 67 |
bin/patest_buffer \ |
| 68 |
bin/patest_callbackstop \ |
| 69 |
bin/patest_clip \ |
| 70 |
bin/patest_dither \ |
| 71 |
bin/patest_hang \ |
| 72 |
bin/patest_in_overflow \ |
| 73 |
bin/patest_latency \ |
| 74 |
bin/patest_leftright \ |
| 75 |
bin/patest_longsine \ |
| 76 |
bin/patest_many \ |
| 77 |
bin/patest_maxsines \ |
| 78 |
bin/patest_multi_sine \ |
| 79 |
bin/patest_out_underflow \ |
| 80 |
bin/patest_pink \ |
| 81 |
bin/patest_prime \ |
| 82 |
bin/patest_read_record \ |
| 83 |
bin/patest_read_write_wire \ |
| 84 |
bin/patest_record \ |
| 85 |
bin/patest_ringmix \ |
| 86 |
bin/patest_saw \ |
| 87 |
bin/patest_sine8 \ |
| 88 |
bin/patest_sine \ |
| 89 |
bin/patest_sine_formats \ |
| 90 |
bin/patest_sine_time \ |
| 91 |
bin/patest_start_stop \ |
| 92 |
bin/patest_stop \ |
| 93 |
bin/patest_sync \ |
| 94 |
bin/patest_toomanysines \ |
| 95 |
bin/patest_underflow \ |
| 96 |
bin/patest_wire \ |
| 97 |
bin/patest_write_sine \ |
| 98 |
bin/patest_write_stop \ |
| 99 |
bin/pa_devs \ |
| 100 |
bin/pa_fuzz \ |
| 101 |
bin/pa_minlat |
| 102 |
|
| 103 |
# Most of these don't compile yet. Put them in TESTS, above, if |
| 104 |
# you want to try to compile them... |
| 105 |
ALL_TESTS = \ |
| 106 |
$(TESTS) \ |
| 107 |
bin/debug_convert \ |
| 108 |
bin/debug_dither_calc \ |
| 109 |
bin/debug_dual \ |
| 110 |
bin/debug_multi_in \ |
| 111 |
bin/debug_multi_out \ |
| 112 |
bin/debug_record \ |
| 113 |
bin/debug_record_reuse \ |
| 114 |
bin/debug_sine_amp \ |
| 115 |
bin/debug_sine \ |
| 116 |
bin/debug_sine_formats \ |
| 117 |
bin/debug_srate \ |
| 118 |
bin/debug_test1 \ |
| 119 |
bin/pa_devs \ |
| 120 |
bin/pa_fuzz \ |
| 121 |
bin/pa_minlat \ |
| 122 |
bin/paqa_devs \ |
| 123 |
bin/paqa_errs \ |
| 124 |
bin/patest1 \ |
| 125 |
bin/patest_buffer \ |
| 126 |
bin/patest_clip \ |
| 127 |
bin/patest_dither \ |
| 128 |
bin/patest_hang \ |
| 129 |
bin/patest_in_overflow \ |
| 130 |
bin/patest_latency \ |
| 131 |
bin/patest_leftright \ |
| 132 |
bin/patest_longsine \ |
| 133 |
bin/patest_many \ |
| 134 |
bin/patest_maxsines \ |
| 135 |
bin/patest_multi_sine \ |
| 136 |
bin/patest_out_underflow \ |
| 137 |
bin/patest_pink \ |
| 138 |
bin/patest_read_record \ |
| 139 |
bin/patest_record \ |
| 140 |
bin/patest_ringmix \ |
| 141 |
bin/patest_saw \ |
| 142 |
bin/patest_sine8 \ |
| 143 |
bin/patest_sine \ |
| 144 |
bin/patest_sine_formats \ |
| 145 |
bin/patest_sine_time \ |
| 146 |
bin/patest_start_stop \ |
| 147 |
bin/patest_stop \ |
| 148 |
bin/patest_sync \ |
| 149 |
bin/patest_toomanysines \ |
| 150 |
bin/patest_underflow \ |
| 151 |
bin/patest_wire \ |
| 152 |
bin/patest_write_sine |
| 153 |
|
| 154 |
OBJS = $(COMMON_OBJS) $(OTHER_OBJS) |
| 155 |
|
| 156 |
#LTOBJS:= $(OBJS:.o=.lo) |
| 157 |
|
| 158 |
all: lib/$(PALIB) lib/$(PASHLIBNAME) tests |
| 159 |
|
| 160 |
tests: bin/ $(TESTS) |
| 161 |
|
| 162 |
lib/$(PALIB): lib/ $(OBJS) Makefile.darwin $(PAINC) |
| 163 |
-rm lib/$(PALIB) |
| 164 |
$(AR) ruv lib/$(PALIB) $(OBJS) |
| 165 |
$(RANLIB) lib/$(PALIB) |
| 166 |
|
| 167 |
lib/$(PASHLIBNAME): lib/ $(OBJS) Makefile.darwin $(PAINC) |
| 168 |
$(CC) $(SHARED_FLAGS) -o lib/$(PASHLIBNAME) $(OBJS) $(DLL_LIBS) -install_name $(PREFIX)/lib/$(PASHLIBNAME) -compatibility_version $(PADLLV) -current_version $(PADLLV) |
| 169 |
|
| 170 |
$(TESTS): bin/%: lib/$(PALIB) Makefile.darwin $(PAINC) test/%.c |
| 171 |
$(CC) -o $@ $(CFLAGS) test/$*.c lib/$(PALIB) $(LIBS) |
| 172 |
|
| 173 |
install: lib/$(PALIB) lib/$(PASHLIBNAME) portaudio-2.0.pc |
| 174 |
$(INSTALL) -d $(PREFIX)/lib |
| 175 |
$(INSTALL) -m 644 lib/$(PASHLIBNAME) $(PREFIX)/lib/$(PASHLIBNAME) |
| 176 |
$(INSTALL) -m 644 lib/$(PALIB) $(PREFIX)/lib/$(PALIB) |
| 177 |
cd $(PREFIX)/lib && rm -f $(PADLL)$(PADLLEXT) && ln -s $(PASHLIBNAME) $(PADLL)$(PADLLEXT) |
| 178 |
$(INSTALL) -d $(PREFIX)/include |
| 179 |
$(INSTALL) -m 644 include/portaudio.h $(PREFIX)/include/portaudio.h |
| 180 |
$(INSTALL) -d $(PREFIX)/lib/pkgconfig |
| 181 |
$(INSTALL) -m 644 portaudio-2.0.pc $(PREFIX)/lib/pkgconfig/portaudio-2.0.pc |
| 182 |
@echo "" |
| 183 |
@echo "------------------------------------------------------------" |
| 184 |
@echo "PortAudio was successfully installed." |
| 185 |
@echo "" |
| 186 |
@echo "On some systems (e.g. Linux) you should run 'ldconfig' now" |
| 187 |
@echo "to make the shared object available. You may also need to" |
| 188 |
@echo "modify your LD_LIBRARY_PATH environment variable to include" |
| 189 |
@echo "the directory $(PREFIX)/lib" |
| 190 |
@echo "------------------------------------------------------------" |
| 191 |
@echo "" |
| 192 |
|
| 193 |
uninstall: |
| 194 |
rm -f $(PREFIX)/lib/$(PASHLIBNAME) |
| 195 |
rm -f $(PREFIX)/lib/$(PALIB) |
| 196 |
rm -f $(PREFIX)/lib/$(PADLL)$(PADLLEXT) |
| 197 |
rm -f $(PREFIX)/include/portaudio.h |
| 198 |
|
| 199 |
clean: |
| 200 |
rm -f $(OBJS) $(TESTS) lib/$(PALIB) lib/$(PASHLIBNAME) |
| 201 |
|
| 202 |
%.o: %.c Makefile.darwin $(PAINC) |
| 203 |
$(CC) -c $(CFLAGS) $< -o $@ |
| 204 |
|
| 205 |
%.o: %.cpp Makefile.darwin $(PAINC) |
| 206 |
$(CXX) -c $(CXXFLAGS) $< -o $@ |
| 207 |
|
| 208 |
%.o: %.asm |
| 209 |
$(NASM) $(NASMOPT) -o $@ $< |
| 210 |
|
| 211 |
bin: |
| 212 |
mkdir bin |
| 213 |
|
| 214 |
lib: |
| 215 |
mkdir lib |
| 216 |
|
| 217 |
|
| 218 |
|