3 # This file is part of polypaudio.
5 # polypaudio is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # polypaudio is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with polypaudio; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 polypincludedir=$(includedir)/polyp
21 polypconfdir=$(sysconfdir)/polyp
23 AM_CFLAGS=-D_GNU_SOURCE -I$(top_srcdir) $(PTHREAD_CFLAGS)
24 #AM_CFLAGS+= -DPA_DLSEARCHDIR=\"$(pkglibdir)\"
25 AM_CFLAGS+= -DPA_DEFAULT_CONFIG_FILE=\"$(polypconfdir)/polypaudio.pa\"
26 AM_LDADD=$(PTHREAD_LIBS) -lm
27 AM_LIBADD=$(PTHREAD_LIBS) -lm
30 EXTRA_DIST = polypaudio.pa depmod.py
31 bin_PROGRAMS = polypaudio pacat pactl
32 noinst_PROGRAMS = mainloop-test mainloop-test-glib mainloop-test-glib12 pacat-simple parec-simple
34 polypconf_DATA=polypaudio.pa
36 BUILT_SOURCES=polyplib-version.h
38 polypinclude_HEADERS=polyplib.h \
44 polyplib-introspect.h \
45 polyplib-subscribe.h \
46 polyplib-operation.h \
56 pkglib_LTLIBRARIES=libiochannel.la \
71 libprotocol-simple.la \
72 libprotocol-esound.la \
73 libprotocol-native.la \
75 module-cli-protocol-tcp.la \
76 module-cli-protocol-unix.la \
79 module-alsa-source.la \
82 module-simple-protocol-tcp.la \
83 module-simple-protocol-unix.la \
84 module-esound-protocol-tcp.la \
85 module-esound-protocol-unix.la \
86 module-native-protocol-tcp.la \
87 module-native-protocol-unix.la \
91 pkglib_LTLIBRARIES+=module-x11-bell.la
94 lib_LTLIBRARIES=libpolyp.la \
96 libpolyp-mainloop.la \
97 libpolyp-mainloop-glib.la \
98 libpolyp-mainloop-glib12.la \
101 polypaudio_SOURCES = idxset.c idxset.h \
105 mainloop.c mainloop.h \
106 memblock.c memblock.h \
108 sample-util.c sample-util.h \
109 memblockq.c memblockq.h \
112 source-output.c source-output.h \
113 sink-input.c sink-input.h \
117 mainloop-signal.c mainloop-signal.h \
118 mainloop-api.c mainloop-api.h \
120 hashmap.c hashmap.h \
121 namereg.c namereg.h \
123 resampler.c resampler.h \
125 memchunk.c memchunk.h \
126 sconv-s16le.c sconv-s16le.h \
127 sconv-s16be.c sconv-s16be.h \
129 modargs.c modargs.h \
130 cmdline.c cmdline.h \
131 cli-command.c cli-command.h \
132 cli-text.c cli-text.h \
133 tokenizer.c tokenizer.h \
134 dynarray.c dynarray.h \
136 sound-file.c sound-file.h \
137 play-memchunk.c play-memchunk.h \
138 autoload.c autoload.h \
139 xmalloc.c xmalloc.h \
140 subscribe.h subscribe.c \
142 sound-file-stream.c sound-file-stream.h
144 polypaudio_CFLAGS = $(AM_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSNDFILE_CFLAGS)
145 polypaudio_INCLUDES = $(INCLTDL)
146 polypaudio_LDADD = $(AM_LDADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS)
147 polypaudio_LDFLAGS=-export-dynamic
149 libprotocol_simple_la_SOURCES = protocol-simple.c protocol-simple.h
150 libprotocol_simple_la_LDFLAGS = -avoid-version
151 libprotocol_simple_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la
153 libsocket_server_la_SOURCES = socket-server.c socket-server.h
154 libsocket_server_la_LDFLAGS = -avoid-version
155 libsocket_server_la_LIBADD = $(AM_LIBADD) libiochannel.la libsocket-util.la
157 libsocket_client_la_SOURCES = socket-client.c socket-client.h
158 libsocket_client_la_LDFLAGS = -avoid-version
159 libsocket_client_la_LIBADD = $(AM_LIBADD) libiochannel.la libsocket-util.la
161 libpstream_la_SOURCES = pstream.c pstream.h
162 libpstream_la_LDFLAGS = -avoid-version
163 libpstream_la_LIBADD = $(AM_LIBADD) libpacket.la libiochannel.la
165 libpstream_util_la_SOURCES = pstream-util.c pstream-util.h
166 libpstream_util_la_LDFLAGS = -avoid-version
167 libpstream_util_la_LIBADD = $(AM_LIBADD) libpacket.la libpstream.la libtagstruct.la
169 libpdispatch_la_SOURCES = pdispatch.c pdispatch.h
170 libpdispatch_la_LDFLAGS = -avoid-version
171 libpdispatch_la_LIBADD = $(AM_LIBADD) libtagstruct.la
173 libiochannel_la_SOURCES = iochannel.c iochannel.h
174 libiochannel_la_LDFLAGS = -avoid-version
175 libiochannel_la_LIBADD = $(AM_LIBADD) libsocket-util.la
177 libpacket_la_SOURCES = packet.c packet.h
178 libpacket_la_LDFLAGS = -avoid-version
180 liboss_util_la_SOURCES = oss-util.c oss-util.h
181 liboss_util_la_LDFLAGS = -avoid-version
183 libalsa_util_la_SOURCES = alsa-util.c alsa-util.h
184 libalsa_util_la_LDFLAGS = -avoid-version
185 libalsa_util_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS)
186 libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
188 libioline_la_SOURCES = ioline.c ioline.h
189 libioline_la_LDFLAGS = -avoid-version
190 libioline_la_LIBADD = $(AM_LIBADD) libiochannel.la
192 libcli_la_SOURCES = cli.c cli.h
193 libcli_la_LDFLAGS = -avoid-version
194 libcli_la_LIBADD = $(AM_LIBADD) libiochannel.la libioline.la
196 libprotocol_cli_la_SOURCES = protocol-cli.c protocol-cli.h
197 libprotocol_cli_la_LDFLAGS = -avoid-version
198 libprotocol_cli_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libcli.la
200 libprotocol_native_la_SOURCES = protocol-native.c protocol-native.h native-common.h
201 libprotocol_native_la_LDFLAGS = -avoid-version
202 libprotocol_native_la_LIBADD = $(AM_LIBADD) libsocket-server.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la
204 libtagstruct_la_SOURCES = tagstruct.c tagstruct.h
205 libtagstruct_la_LDFLAGS = -avoid-version
207 libprotocol_esound_la_SOURCES = protocol-esound.c protocol-esound.h esound.h
208 libprotocol_esound_la_LDFLAGS = -avoid-version
209 libprotocol_esound_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libauthkey.la
211 libauthkey_la_SOURCES = authkey.c authkey.h
212 libauthkey_la_LDFLAGS = -avoid-version
214 libsocket_util_la_SOURCES = socket-util.c socket-util.h
215 libsocket_util_la_LDFLAGS = -avoid-version
217 module_simple_protocol_tcp_la_SOURCES = module-protocol-stub.c
218 module_simple_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_SIMPLE $(AM_CFLAGS)
219 module_simple_protocol_tcp_la_LDFLAGS = -module -avoid-version
220 module_simple_protocol_tcp_la_LIBADD = $(AM_LIBADD) libprotocol-simple.la libsocket-server.la
222 module_simple_protocol_unix_la_SOURCES = module-protocol-stub.c
223 module_simple_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_SIMPLE $(AM_CFLAGS)
224 module_simple_protocol_unix_la_LDFLAGS = -module -avoid-version
225 module_simple_protocol_unix_la_LIBADD = $(AM_LIBADD) libprotocol-simple.la libsocket-server.la libsocket-util.la
227 module_cli_protocol_tcp_la_SOURCES = module-protocol-stub.c
228 module_cli_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS)
229 module_cli_protocol_tcp_la_LDFLAGS = -module -avoid-version
230 module_cli_protocol_tcp_la_LIBADD = $(AM_LIBADD) libprotocol-cli.la libsocket-server.la
232 module_cli_protocol_unix_la_SOURCES = module-protocol-stub.c
233 module_cli_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS)
234 module_cli_protocol_unix_la_LDFLAGS = -module -avoid-version
235 module_cli_protocol_unix_la_LIBADD = $(AM_LIBADD) libprotocol-cli.la libsocket-server.la libsocket-util.la
237 module_native_protocol_tcp_la_SOURCES = module-protocol-stub.c
238 module_native_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_NATIVE $(AM_CFLAGS)
239 module_native_protocol_tcp_la_LDFLAGS = -module -avoid-version
240 module_native_protocol_tcp_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libsocket-server.la
242 module_native_protocol_unix_la_SOURCES = module-protocol-stub.c
243 module_native_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_NATIVE $(AM_CFLAGS)
244 module_native_protocol_unix_la_LDFLAGS = -module -avoid-version
245 module_native_protocol_unix_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libsocket-server.la libsocket-util.la
247 module_esound_protocol_tcp_la_SOURCES = module-protocol-stub.c
248 module_esound_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS)
249 module_esound_protocol_tcp_la_LDFLAGS = -module -avoid-version
250 module_esound_protocol_tcp_la_LIBADD = $(AM_LIBADD) libprotocol-esound.la libsocket-server.la
252 module_esound_protocol_unix_la_SOURCES = module-protocol-stub.c
253 module_esound_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS)
254 module_esound_protocol_unix_la_LDFLAGS = -module -avoid-version
255 module_esound_protocol_unix_la_LIBADD = $(AM_LIBADD) libprotocol-esound.la libsocket-server.la libsocket-util.la
257 module_pipe_sink_la_SOURCES = module-pipe-sink.c
258 module_pipe_sink_la_LDFLAGS = -module -avoid-version
259 module_pipe_sink_la_LIBADD = $(AM_LIBADD) libiochannel.la
261 module_alsa_sink_la_SOURCES = module-alsa-sink.c
262 module_alsa_sink_la_LDFLAGS = -module -avoid-version
263 module_alsa_sink_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la
264 module_alsa_sink_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
266 module_alsa_source_la_SOURCES = module-alsa-source.c
267 module_alsa_source_la_LDFLAGS = -module -avoid-version
268 module_alsa_source_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la
269 module_alsa_source_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
271 module_oss_la_SOURCES = module-oss.c
272 module_oss_la_LDFLAGS = -module -avoid-version
273 module_oss_la_LIBADD = $(AM_LIBADD) libiochannel.la liboss-util.la
275 module_oss_mmap_la_SOURCES = module-oss-mmap.c
276 module_oss_mmap_la_LDFLAGS = -module -avoid-version
277 module_oss_mmap_la_LIBADD = $(AM_LIBADD) liboss-util.la
279 module_cli_la_SOURCES = module-cli.c
280 module_cli_la_LDFLAGS = -module -avoid-version
281 module_cli_la_LIBADD = $(AM_LIBADD) libcli.la libiochannel.la
283 module_sine_la_SOURCES = module-sine.c
284 module_sine_la_LDFLAGS = -module -avoid-version
285 module_sine_la_LIBADD = $(AM_LIBADD)
287 if !X_DISPLAY_MISSING
288 module_x11_bell_la_SOURCES = module-x11-bell.c
289 module_x11_bell_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
290 module_x11_bell_la_LDFLAGS = -module -avoid-version
291 module_x11_bell_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIB)
294 libpolyp_la_SOURCES = polyplib.h \
296 tagstruct.c tagstruct.h \
297 iochannel.c iochannel.h \
298 pstream.c pstream.h \
299 pstream-util.c pstream-util.h \
300 pdispatch.c pdispatch.h \
301 mainloop-api.c mainloop-api.h \
304 memblock.c memblock.h \
305 socket-client.c socket-client.h \
308 dynarray.c dynarray.h \
309 memchunk.c memchunk.h \
310 authkey.c authkey.h \
311 socket-util.c socket-util.h \
314 xmalloc.c xmalloc.h \
315 polyplib-operation.c polyplib-operation.h \
316 polyplib-context.c polyplib-context.h \
317 polyplib-stream.c polyplib-stream.h \
318 polyplib-introspect.c polyplib-introspect.h \
319 polyplib-scache.c polyplib-scache.h \
320 polyplib-subscribe.c polyplib-subscribe.h \
321 polyplib-internal.h \
324 libpolyp_la_CFLAGS = $(AM_CFLAGS)
325 libpolyp_la_LDFLAGS = -version-info 0:0:0
327 libpolyp_mainloop_la_SOURCES = mainloop-api.h mainloop-api.c \
328 mainloop.c mainloop.h \
329 mainloop-signal.c mainloop-signal.h
330 libpolyp_mainloop_la_CFLAGS = $(AM_CFLAGS)
331 libpolyp_mainloop_la_LIBADD = $(AM_LIBADD) libpolyp.la
332 libpolyp_mainloop_la_LDFLAGS = -version-info 0:0:0
334 libpolyp_error_la_SOURCES = polyplib-error.c polyplib-error.h
335 libpolyp_error_la_CFLAGS = $(AM_CFLAGS)
336 libpolyp_error_la_LIBADD = $(AM_LIBADD) libpolyp.la
337 libpolyp_error_la_LDFLAGS = -version-info 0:0:0
339 libpolyp_simple_la_SOURCES = polyplib-simple.c polyplib-simple.h
340 libpolyp_simple_la_CFLAGS = $(AM_CFLAGS)
341 libpolyp_simple_la_LIBADD = $(AM_LIBADD) libpolyp.la libpolyp-mainloop.la
342 libpolyp_simple_la_LDFLAGS = -version-info 0:0:0
344 libpolyp_mainloop_glib_la_SOURCES = glib-mainloop.h glib-mainloop.c
345 libpolyp_mainloop_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
346 libpolyp_mainloop_glib_la_LIBADD = $(AM_LIBADD) libpolyp-mainloop.la $(GLIB20_LIBS)
347 libpolyp_mainloop_glib_la_LDFLAGS = -version-info 0:0:0
349 libpolyp_mainloop_glib12_la_SOURCES = glib-mainloop.h glib12-mainloop.c
350 libpolyp_mainloop_glib12_la_CFLAGS = $(AM_CFLAGS) $(GLIB12_CFLAGS)
351 libpolyp_mainloop_glib12_la_LIBADD = $(AM_LIBADD) libpolyp-mainloop.la $(GLIB12_LIBS)
352 libpolyp_mainloop_glib12_la_LDFLAGS = -version-info 0:0:0
354 pacat_SOURCES = pacat.c
355 pacat_LDADD = $(AM_LDADD) libpolyp.la libpolyp-error.la libpolyp-mainloop.la
356 pacat_CFLAGS = $(AM_CFLAGS)
358 pactl_SOURCES = pactl.c
359 pactl_LDADD = $(AM_LDADD) libpolyp.la libpolyp-error.la libpolyp-mainloop.la $(LIBSNDFILE_LIBS)
360 pactl_CFLAGS = $(AM_CFLAGS) $(LIBSDNFILE_CFLAGS)
362 pacat_simple_SOURCES = pacat-simple.c
363 pacat_simple_LDADD = $(AM_LDADD) libpolyp.la libpolyp-simple.la libpolyp-error.la
364 pacat_simple_CFLAGS = $(AM_CFLAGS)
366 parec_simple_SOURCES = parec-simple.c
367 parec_simple_LDADD = $(AM_LDADD) libpolyp.la libpolyp-simple.la libpolyp-error.la
368 parec_simple_CFLAGS = $(AM_CFLAGS)
370 mainloop_test_SOURCES = mainloop-test.c
371 mainloop_test_CFLAGS = $(AM_CFLAGS)
372 mainloop_test_LDADD = $(AM_LDADD) libpolyp-mainloop.la libpolyp.la
374 mainloop_test_glib_SOURCES = $(mainloop_test_SOURCES)
375 mainloop_test_glib_CFLAGS = $(mainloop_test_CFLAGS) $(GLIB20_CFLAGS) -DGLIB_MAIN_LOOP
376 mainloop_test_glib_LDADD = $(mainloop_test_LDADD) $(GLIB20_LIBS) libpolyp-mainloop-glib.la
378 mainloop_test_glib12_SOURCES = $(mainloop_test_SOURCES)
379 mainloop_test_glib12_CFLAGS = $(mainloop_test_CFLAGS) $(GLIB12_CFLAGS) -DGLIB_MAIN_LOOP
380 mainloop_test_glib12_LDADD = $(mainloop_test_LDADD) $(GLIB12_LIBS) libpolyp-mainloop-glib12.la
382 if BUILD_LIBPOLYPCORE
384 polypinclude_HEADERS+=cli-command.h\
414 lib_LTLIBRARIES+= libpolypcore.la
416 libpolypcore_la_SOURCES = idxset.c idxset.h \
419 mainloop.c mainloop.h \
420 memblock.c memblock.h \
422 sample-util.c sample-util.h \
423 memblockq.c memblockq.h \
426 source-output.c source-output.h \
427 sink-input.c sink-input.h \
431 mainloop-signal.c mainloop-signal.h \
432 mainloop-api.c mainloop-api.h \
434 hashmap.c hashmap.h \
435 namereg.c namereg.h \
437 resampler.c resampler.h \
439 memchunk.c memchunk.h \
440 sconv-s16le.c sconv-s16le.h \
441 sconv-s16be.c sconv-s16be.h \
443 modargs.c modargs.h \
444 cli-command.c cli-command.h \
445 cli-text.c cli-text.h \
446 tokenizer.c tokenizer.h \
447 dynarray.c dynarray.h