blob: 58c95cd137881b1ca5e15c53b06a4ad73142f308 [file] [log] [blame]
Alexandre Lision8af73cb2013-12-10 14:11:20 -05001#
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 = -I$(top_srcdir)/include -I$(top_srcdir)/src/common -I$(top_srcdir)/src/os/unix @CFLAGS@ @DEFS@
22LIBS = @LIBS@
23AR = @AR@
24RANLIB = @RANLIB@
25LIBTOOL = @LIBTOOL@
26INSTALL = @INSTALL@
27INSTALL_DATA = @INSTALL_DATA@
28SHARED_FLAGS = @SHARED_FLAGS@
29LDFLAGS = @LDFLAGS@
30DLL_LIBS = @DLL_LIBS@
31CXXFLAGS = @CXXFLAGS@
32NASM = @NASM@
33NASMOPT = @NASMOPT@
34LN_S = @LN_S@
35LT_CURRENT=@LT_CURRENT@
36LT_REVISION=@LT_REVISION@
37LT_AGE=@LT_AGE@
38
39OTHER_OBJS = @OTHER_OBJS@
40
41PALIB = libportaudio.la
42PAINC = include/portaudio.h
43
44PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \
45 -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio)_.*" \
46 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
47
48COMMON_OBJS = \
49 src/common/pa_allocation.o \
50 src/common/pa_converters.o \
51 src/common/pa_cpuload.o \
52 src/common/pa_dither.o \
53 src/common/pa_debugprint.o \
54 src/common/pa_front.o \
55 src/common/pa_process.o \
56 src/common/pa_skeleton.o \
57 src/common/pa_stream.o \
58 src/common/pa_trace.o
59
60TESTS = \
61 bin/paqa_devs \
62 bin/paqa_errs \
63 bin/patest1 \
64 bin/patest_buffer \
65 bin/patest_callbackstop \
66 bin/patest_clip \
67 bin/patest_dither \
68 bin/patest_hang \
69 bin/patest_in_overflow \
70 bin/patest_latency \
71 bin/patest_leftright \
72 bin/patest_longsine \
73 bin/patest_many \
74 bin/patest_maxsines \
75 bin/patest_multi_sine \
76 bin/patest_out_underflow \
77 bin/patest_pink \
78 bin/patest_prime \
79 bin/patest_read_record \
80 bin/patest_read_write_wire \
81 bin/patest_record \
82 bin/patest_ringmix \
83 bin/patest_saw \
84 bin/patest_sine8 \
85 bin/patest_sine \
86 bin/patest_sine_channelmaps \
87 bin/patest_sine_formats \
88 bin/patest_sine_time \
89 bin/patest_sine_srate \
90 bin/patest_start_stop \
91 bin/patest_stop \
92 bin/patest_stop_playout \
93 bin/patest_toomanysines \
94 bin/patest_underflow \
95 bin/patest_wire \
96 bin/patest_write_sine \
97 bin/pa_devs \
98 bin/pa_fuzz \
99 bin/pa_minlat
100
101# Most of these don't compile yet. Put them in TESTS, above, if
102# you want to try to compile them...
103ALL_TESTS = \
104 $(TESTS) \
105 bin/patest_sync \
106 bin/debug_convert \
107 bin/debug_dither_calc \
108 bin/debug_dual \
109 bin/debug_multi_in \
110 bin/debug_multi_out \
111 bin/debug_record \
112 bin/debug_record_reuse \
113 bin/debug_sine_amp \
114 bin/debug_sine \
115 bin/debug_sine_formats \
116 bin/debug_srate \
117 bin/debug_test1
118
119OBJS := $(COMMON_OBJS) $(OTHER_OBJS)
120
121LTOBJS := $(OBJS:.o=.lo)
122
123SRC_DIRS = \
124 src/common \
125 src/hostapi/alsa \
126 src/hostapi/asihpi \
127 src/hostapi/asio \
128 src/hostapi/coreaudio \
129 src/hostapi/dsound \
130 src/hostapi/jack \
131 src/hostapi/oss \
132 src/hostapi/wasapi \
133 src/hostapi/wdmks \
134 src/hostapi/wmme \
135 src/os/mac_osx \
136 src/os/unix \
137 src/os/win
138
139SUBDIRS =
140@ENABLE_CXX_TRUE@SUBDIRS += bindings/cpp
141
142all: lib/$(PALIB) all-recursive tests
143
144tests: bin-stamp $(TESTS)
145
146
147# With ASIO enabled we must link libportaudio and all test programs with CXX
148lib/$(PALIB): lib-stamp $(LTOBJS) $(MAKEFILE) $(PAINC)
149 @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) $(PA_LDFLAGS) -o lib/$(PALIB) $(LTOBJS) $(DLL_LIBS)
150 @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) $(PA_LDFLAGS) -o lib/$(PALIB) $(LTOBJS) $(DLL_LIBS)
151
152$(ALL_TESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) test/%.c
153 @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
154 @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
155
156
157install: lib/$(PALIB) portaudio-2.0.pc
158 $(INSTALL) -d $(DESTDIR)$(libdir)
159 $(LIBTOOL) --mode=install $(INSTALL) lib/$(PALIB) $(DESTDIR)$(libdir)
160 $(INSTALL) -d $(DESTDIR)$(includedir)
161 $(INSTALL_DATA) -m 644 $(top_srcdir)/$(PAINC) $(DESTDIR)$(includedir)/portaudio.h
162 $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
163 $(INSTALL) -m 644 portaudio-2.0.pc $(DESTDIR)$(libdir)/pkgconfig/portaudio-2.0.pc
164 @echo ""
165 @echo "------------------------------------------------------------"
166 @echo "PortAudio was successfully installed."
167 @echo ""
168 @echo "On some systems (e.g. Linux) you should run 'ldconfig' now"
169 @echo "to make the shared object available. You may also need to"
170 @echo "modify your LD_LIBRARY_PATH environment variable to include"
171 @echo "the directory $(libdir)"
172 @echo "------------------------------------------------------------"
173 @echo ""
174 $(MAKE) install-recursive
175
176uninstall:
177 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(PALIB)
178 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(includedir)/portaudio.h
179 $(MAKE) uninstall-recursive
180
181clean:
182 $(LIBTOOL) --mode=clean rm -f $(LTOBJS) $(ALL_TESTS) lib/$(PALIB)
183 $(RM) bin-stamp lib-stamp
184 -$(RM) -r bin lib
185
186distclean: clean
187 $(RM) config.log config.status Makefile libtool portaudio-2.0.pc
188
189%.o: %.c $(MAKEFILE) $(PAINC)
190 $(CC) -c $(CFLAGS) $< -o $@
191
192%.lo: %.c $(MAKEFILE) $(PAINC)
193 $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $< -o $@
194
195%.lo: %.cpp $(MAKEFILE) $(PAINC)
196 $(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(CXXFLAGS) $< -o $@
197
198%.o: %.cpp $(MAKEFILE) $(PAINC)
199 $(CXX) -c $(CXXFLAGS) $< -o $@
200
201%.o: %.asm
202 $(NASM) $(NASMOPT) -o $@ $<
203
204bin-stamp:
205 -mkdir bin
206 touch $@
207
208lib-stamp:
209 -mkdir lib
210 -mkdir -p $(SRC_DIRS)
211 touch $@
212
213Makefile: Makefile.in config.status
214 $(SHELL) config.status
215
216all-recursive:
217 if test -n "$(SUBDIRS)" ; then for dir in "$(SUBDIRS)"; do $(MAKE) -C $$dir all; done ; fi
218
219install-recursive:
220 if test -n "$(SUBDIRS)" ; then for dir in "$(SUBDIRS)"; do $(MAKE) -C $$dir install; done ; fi
221
222uninstall-recursive:
223 if test -n "$(SUBDIRS)" ; then for dir in "$(SUBDIRS)"; do $(MAKE) -C $$dir uninstall; done ; fi