1# 2# PortAudio V19 Makefile.in 3# 4# Dominic Mazzoni 5# Modifications by Mikael Magnusson 6# Modifications by Stelios Bounanos 7# 8 9top_srcdir = @top_srcdir@ 10srcdir = @srcdir@ 11VPATH = @srcdir@ 12top_builddir = . 13PREFIX = @prefix@ 14prefix = $(PREFIX) 15exec_prefix = @exec_prefix@ 16bindir = @bindir@ 17libdir = @libdir@ 18includedir = @includedir@ 19CC = @CC@ 20CXX = @CXX@ 21CFLAGS = @CFLAGS@ @DEFS@ 22LIBS = @LIBS@ 23AR = @AR@ 24RANLIB = @RANLIB@ 25SHELL = @SHELL@ 26LIBTOOL = @LIBTOOL@ 27INSTALL = @INSTALL@ 28INSTALL_DATA = @INSTALL_DATA@ 29SHARED_FLAGS = @SHARED_FLAGS@ 30LDFLAGS = @LDFLAGS@ 31DLL_LIBS = @DLL_LIBS@ 32CXXFLAGS = @CXXFLAGS@ 33NASM = @NASM@ 34NASMOPT = @NASMOPT@ 35LN_S = @LN_S@ 36LT_CURRENT=@LT_CURRENT@ 37LT_REVISION=@LT_REVISION@ 38LT_AGE=@LT_AGE@ 39 40OTHER_OBJS = @OTHER_OBJS@ 41INCLUDES = @INCLUDES@ 42 43PALIB = libportaudio.la 44PAINC = include/portaudio.h 45 46PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \ 47 -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \ 48 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) 49 50COMMON_OBJS = \ 51 src/common/pa_allocation.o \ 52 src/common/pa_converters.o \ 53 src/common/pa_cpuload.o \ 54 src/common/pa_dither.o \ 55 src/common/pa_debugprint.o \ 56 src/common/pa_front.o \ 57 src/common/pa_process.o \ 58 src/common/pa_stream.o \ 59 src/common/pa_trace.o \ 60 src/hostapi/skeleton/pa_hostapi_skeleton.o 61 62LOOPBACK_OBJS = \ 63 qa/loopback/src/audio_analyzer.o \ 64 qa/loopback/src/biquad_filter.o \ 65 qa/loopback/src/paqa_tools.o \ 66 qa/loopback/src/test_audio_analyzer.o \ 67 qa/loopback/src/write_wav.o \ 68 qa/loopback/src/paqa.o 69 70EXAMPLES = \ 71 bin/pa_devs \ 72 bin/pa_fuzz \ 73 bin/paex_pink \ 74 bin/paex_read_write_wire \ 75 bin/paex_record \ 76 bin/paex_saw \ 77 bin/paex_sine \ 78 bin/paex_write_sine \ 79 bin/paex_write_sine_nonint 80 81SELFTESTS = \ 82 bin/paqa_devs \ 83 bin/paqa_errs \ 84 bin/paqa_latency 85 86TESTS = \ 87 bin/patest1 \ 88 bin/patest_buffer \ 89 bin/patest_callbackstop \ 90 bin/patest_clip \ 91 bin/patest_dither \ 92 bin/patest_hang \ 93 bin/patest_in_overflow \ 94 bin/patest_latency \ 95 bin/patest_leftright \ 96 bin/patest_longsine \ 97 bin/patest_many \ 98 bin/patest_maxsines \ 99 bin/patest_mono \ 100 bin/patest_multi_sine \ 101 bin/patest_out_underflow \ 102 bin/patest_prime \ 103 bin/patest_ringmix \ 104 bin/patest_sine8 \ 105 bin/patest_sine_channelmaps \ 106 bin/patest_sine_formats \ 107 bin/patest_sine_time \ 108 bin/patest_sine_srate \ 109 bin/patest_start_stop \ 110 bin/patest_stop \ 111 bin/patest_stop_playout \ 112 bin/patest_toomanysines \ 113 bin/patest_two_rates \ 114 bin/patest_underflow \ 115 bin/patest_wire \ 116 bin/pa_minlat 117 118# Most of these don't compile yet. Put them in TESTS, above, if 119# you want to try to compile them... 120ALL_TESTS = \ 121 $(TESTS) \ 122 bin/patest_sync \ 123 bin/debug_convert \ 124 bin/debug_dither_calc \ 125 bin/debug_dual \ 126 bin/debug_multi_in \ 127 bin/debug_multi_out \ 128 bin/debug_record \ 129 bin/debug_record_reuse \ 130 bin/debug_sine_amp \ 131 bin/debug_sine \ 132 bin/debug_sine_formats \ 133 bin/debug_srate \ 134 bin/debug_test1 135 136OBJS := $(COMMON_OBJS) $(OTHER_OBJS) 137 138LTOBJS := $(OBJS:.o=.lo) 139 140SRC_DIRS = \ 141 src/common \ 142 src/hostapi/alsa \ 143 src/hostapi/asihpi \ 144 src/hostapi/asio \ 145 src/hostapi/coreaudio \ 146 src/hostapi/dsound \ 147 src/hostapi/jack \ 148 src/hostapi/oss \ 149 src/hostapi/wasapi \ 150 src/hostapi/wdmks \ 151 src/hostapi/wmme \ 152 src/os/unix \ 153 src/os/win 154 155SUBDIRS = 156@ENABLE_CXX_TRUE@SUBDIRS += bindings/cpp 157 158all: lib/$(PALIB) all-recursive tests examples selftests 159 160tests: bin-stamp $(TESTS) 161 162examples: bin-stamp $(EXAMPLES) 163 164selftests: bin-stamp $(SELFTESTS) 165 166loopback: bin-stamp bin/paloopback 167 168# With ASIO enabled we must link libportaudio and all test programs with CXX 169lib/$(PALIB): lib-stamp $(LTOBJS) $(MAKEFILE) $(PAINC) 170 @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) $(PA_LDFLAGS) -o lib/$(PALIB) $(LTOBJS) $(DLL_LIBS) 171 @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) $(PA_LDFLAGS) -o lib/$(PALIB) $(LTOBJS) $(DLL_LIBS) 172 173$(ALL_TESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) test/%.c 174 @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS) 175 @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS) 176 177$(EXAMPLES): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) examples/%.c 178 @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS) 179 @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS) 180 181$(SELFTESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) qa/%.c 182 @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS) 183 @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS) 184 185bin/paloopback: lib/$(PALIB) $(MAKEFILE) $(PAINC) $(LOOPBACK_OBJS) 186 @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS) 187 @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS) 188 189install: lib/$(PALIB) portaudio-2.0.pc 190 $(INSTALL) -d $(DESTDIR)$(libdir) 191 $(LIBTOOL) --mode=install $(INSTALL) lib/$(PALIB) $(DESTDIR)$(libdir) 192 $(INSTALL) -d $(DESTDIR)$(includedir) 193 for include in $(INCLUDES); do \ 194 $(INSTALL_DATA) -m 644 $(top_srcdir)/include/$$include $(DESTDIR)$(includedir)/$$include; \ 195 done 196 $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig 197 $(INSTALL) -m 644 portaudio-2.0.pc $(DESTDIR)$(libdir)/pkgconfig/portaudio-2.0.pc 198 @echo "" 199 @echo "------------------------------------------------------------" 200 @echo "PortAudio was successfully installed." 201 @echo "" 202 @echo "On some systems (e.g. Linux) you should run 'ldconfig' now" 203 @echo "to make the shared object available. You may also need to" 204 @echo "modify your LD_LIBRARY_PATH environment variable to include" 205 @echo "the directory $(libdir)" 206 @echo "------------------------------------------------------------" 207 @echo "" 208 $(MAKE) install-recursive 209 210uninstall: 211 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(PALIB) 212 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(includedir)/portaudio.h 213 $(MAKE) uninstall-recursive 214 215clean: 216 $(LIBTOOL) --mode=clean rm -f $(LTOBJS) $(LOOPBACK_OBJS) $(ALL_TESTS) lib/$(PALIB) 217 $(RM) bin-stamp lib-stamp 218 -$(RM) -r bin lib 219 220distclean: clean 221 $(RM) config.log config.status Makefile libtool portaudio-2.0.pc 222 223%.o: %.c $(MAKEFILE) $(PAINC) 224 $(CC) -c $(CFLAGS) $< -o $@ 225 226%.lo: %.c $(MAKEFILE) $(PAINC) 227 $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $< -o $@ 228 229%.lo: %.cpp $(MAKEFILE) $(PAINC) 230 $(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(CXXFLAGS) $< -o $@ 231 232%.o: %.cpp $(MAKEFILE) $(PAINC) 233 $(CXX) -c $(CXXFLAGS) $< -o $@ 234 235%.o: %.asm 236 $(NASM) $(NASMOPT) -o $@ $< 237 238bin-stamp: 239 -mkdir bin 240 touch $@ 241 242lib-stamp: 243 -mkdir lib 244 -mkdir -p $(SRC_DIRS) 245 touch $@ 246 247Makefile: Makefile.in config.status 248 $(SHELL) config.status 249 250all-recursive: 251 if test -n "$(SUBDIRS)" ; then for dir in "$(SUBDIRS)"; do $(MAKE) -C $$dir all; done ; fi 252 253install-recursive: 254 if test -n "$(SUBDIRS)" ; then for dir in "$(SUBDIRS)"; do $(MAKE) -C $$dir install; done ; fi 255 256uninstall-recursive: 257 if test -n "$(SUBDIRS)" ; then for dir in "$(SUBDIRS)"; do $(MAKE) -C $$dir uninstall; done ; fi 258