Turn device ports into reference counted objects
[platform/upstream/pulseaudio.git] / src / Makefile.am
1 # This file is part of PulseAudio.
2 #
3 # Copyright 2004-2006 Lennart Poettering
4 # Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
5 # Copyright 2006 Diego Pettenò
6 #
7 # PulseAudio is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # PulseAudio is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with PulseAudio; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 # USA.
21
22 ###################################
23 #       Extra directories         #
24 ###################################
25
26 pulseincludedir=$(includedir)/pulse
27 pulsecoreincludedir=$(includedir)/pulsecore
28 pulselibexecdir=$(libexecdir)/pulse
29 if HAVE_X11
30 xdgautostartdir=$(sysconfdir)/xdg/autostart
31 endif
32 if HAVE_ALSA
33 alsaprofilesetsdir=$(datadir)/pulseaudio/alsa-mixer/profile-sets
34 alsapathsdir=$(datadir)/pulseaudio/alsa-mixer/paths
35 endif
36 if HAVE_DBUS
37 dbuspolicydir=$(sysconfdir)/dbus-1/system.d
38 endif
39
40 ###################################
41 #     Compiler/linker flags       #
42 ###################################
43
44 AM_CFLAGS = \
45         -I$(top_srcdir)/src \
46         -I$(top_srcdir)/src/modules \
47         -I$(top_builddir)/src/modules \
48         $(PTHREAD_CFLAGS) \
49         -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
50         -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
51 AM_CXXFLAGS = $(AM_CFLAGS)
52 SERVER_CFLAGS = -D__INCLUDED_FROM_PULSE_AUDIO
53
54 AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)
55 AM_LDADD = $(PTHREAD_LIBS) $(INTLLIBS)
56 AM_LDFLAGS = $(NODELETE_LDFLAGS)
57
58 if STATIC_BINS
59 BINLDFLAGS = -static
60 endif
61
62 if OS_IS_WIN32
63 AM_LDFLAGS+=-Wl,--export-all-symbols,--enable-auto-import -no-undefined
64 WINSOCK_LIBS=-lwsock32 -lws2_32 -lwininet
65 endif
66
67 if OS_IS_DARWIN
68 AM_LDFLAGS+=-Wl,-headerpad_max_install_names -headerpad_max_install_names
69 endif
70
71 FOREIGN_CFLAGS = -w
72
73 MODULE_LDFLAGS = $(AM_LDFLAGS) -module -disable-static -avoid-version $(NOUNDEFINED_LDFLAGS)
74 MODULE_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
75
76 ###################################
77 #          Extra files            #
78 ###################################
79
80 EXTRA_DIST = \
81                 pulse/client.conf.in \
82                 pulse/version.h.in \
83                 daemon/daemon.conf.in \
84                 daemon/default.pa.in \
85                 daemon/system.pa.in \
86                 depmod.py \
87                 daemon/esdcompat.in \
88                 daemon/start-pulseaudio-x11.in \
89                 daemon/start-pulseaudio-kde.in \
90                 utils/padsp \
91                 utils/qpaeq \
92                 modules/module-defs.h.m4 \
93                 daemon/pulseaudio.desktop.in \
94                 daemon/pulseaudio-kde.desktop.in \
95                 map-file \
96                 daemon/pulseaudio-system.conf \
97                 modules/echo-cancel/adrian-license.txt
98
99 pulseconf_DATA = \
100                 default.pa \
101                 system.pa \
102                 daemon.conf \
103                 client.conf
104
105 if HAVE_DBUS
106 dbuspolicy_DATA = \
107                 daemon/pulseaudio-system.conf
108 endif
109
110 if HAVE_X11
111 xdgautostart_in_files = \
112                 daemon/pulseaudio.desktop.in \
113                 daemon/pulseaudio-kde.desktop.in
114 xdgautostart_DATA = $(xdgautostart_in_files:.desktop.in=.desktop)
115 @INTLTOOL_DESKTOP_RULE@
116 endif
117
118
119 ###################################
120 #          Includes               #
121 ###################################
122
123 BUILT_SOURCES =
124 CLEANFILES =
125 include $(top_srcdir)/orc.mak
126 ORC_SOURCE =
127
128 ###################################
129 #          Main daemon            #
130 ###################################
131
132 bin_PROGRAMS = pulseaudio
133
134 pulseaudio_SOURCES = \
135                 daemon/caps.c daemon/caps.h \
136                 daemon/cmdline.c daemon/cmdline.h \
137                 daemon/cpulimit.c daemon/cpulimit.h \
138                 daemon/daemon-conf.c daemon/daemon-conf.h \
139                 daemon/dumpmodules.c daemon/dumpmodules.h \
140                 daemon/ltdl-bind-now.c daemon/ltdl-bind-now.h \
141                 daemon/main.c
142
143 pulseaudio_CFLAGS = $(AM_CFLAGS) $(CAP_CFLAGS)
144 pulseaudio_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la $(LIBLTDL) $(CAP_LIBS)
145 # This is needed because automake doesn't properly expand the foreach below
146 pulseaudio_DEPENDENCIES = libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la $(PREOPEN_LIBS)
147
148 if HAVE_DBUS
149 pulseaudio_CFLAGS += $(DBUS_CFLAGS)
150 pulseaudio_SOURCES += daemon/server-lookup.c daemon/server-lookup.h
151 pulseaudio_LDADD += $(DBUS_LIBS)
152 endif
153
154 if PREOPEN_MODS
155 PREOPEN_LIBS = $(PREOPEN_MODS)
156 else
157 PREOPEN_LIBS = $(modlibexec_LTLIBRARIES)
158 endif
159
160 if FORCE_PREOPEN
161 pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f))
162 else
163 pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
164 endif
165
166 ###################################
167 #       Utility programs          #
168 ###################################
169
170 bin_SCRIPTS = esdcompat
171
172 bin_PROGRAMS += \
173                 pacat \
174                 pactl
175
176 if !OS_IS_WIN32
177 bin_PROGRAMS += pasuspender
178 endif
179
180 if HAVE_AF_UNIX
181 bin_PROGRAMS += pacmd
182 endif
183
184 if HAVE_X11
185 bin_PROGRAMS += pax11publish
186 bin_SCRIPTS += start-pulseaudio-x11 start-pulseaudio-kde
187 endif
188
189 pacat_SOURCES = utils/pacat.c
190 pacat_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la $(LIBSNDFILE_LIBS)
191 pacat_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
192 pacat_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
193
194 pactl_SOURCES = utils/pactl.c
195 pactl_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la $(LIBSNDFILE_LIBS)
196 pactl_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
197 pactl_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
198
199 pasuspender_SOURCES = utils/pasuspender.c
200 pasuspender_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
201 pasuspender_CFLAGS = $(AM_CFLAGS)
202 pasuspender_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
203
204 pacmd_SOURCES = utils/pacmd.c
205 pacmd_CFLAGS = $(AM_CFLAGS)
206 pacmd_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
207 pacmd_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
208
209 pax11publish_SOURCES = utils/pax11publish.c
210 pax11publish_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
211 pax11publish_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la $(X11_LIBS)
212 pax11publish_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
213
214 ###################################
215 #         Test programs           #
216 ###################################
217
218 TESTS_default = \
219                 mainloop-test \
220                 strlist-test \
221                 close-test \
222                 memblockq-test \
223                 channelmap-test \
224                 thread-mainloop-test \
225                 utf8-test \
226                 format-test \
227                 get-binary-name-test \
228                 ipacl-test \
229                 hook-list-test \
230                 memblock-test \
231                 asyncq-test \
232                 asyncmsgq-test \
233                 queue-test \
234                 rtpoll-test \
235                 resampler-test \
236                 smoother-test \
237                 thread-test \
238                 volume-test \
239                 mix-test \
240                 proplist-test \
241                 lock-autospawn-test \
242                 prioq-test
243
244 TESTS_norun = \
245                 mcalign-test \
246                 pacat-simple \
247                 parec-simple \
248                 flist-test \
249                 remix-test \
250                 rtstutter \
251                 sig2str-test \
252                 stripnul \
253                 echo-cancel-test
254
255 # These tests need a running pulseaudio daemon
256 TESTS_daemon = \
257                 connect-stress \
258                 extended-test \
259                 interpol-test \
260                 sync-playback
261
262 if !OS_IS_WIN32
263 TESTS_default += \
264                 sigbus-test \
265                 usergroup-test
266 endif
267
268 if !OS_IS_DARWIN
269 TESTS_default += \
270                 once-test
271 endif
272
273 if HAVE_SIGXCPU
274 TESTS_norun += \
275                 cpulimit-test \
276                 cpulimit-test2
277 endif
278
279 if HAVE_GLIB20
280 TESTS_default += \
281                 mainloop-test-glib
282 endif
283
284 if HAVE_GTK20
285 TESTS_norun += \
286                 gtk-test
287 endif
288
289 if HAVE_ALSA
290 TESTS_norun += \
291                 alsa-time-test
292 endif
293
294 TESTS_ENVIRONMENT=MAKE_CHECK=1
295 TESTS = $(TESTS_default)
296
297 if BUILD_TESTS_DEFAULT
298 noinst_PROGRAMS = $(TESTS_default) $(TESTS_norun) $(TESTS_daemon)
299 else
300 check_PROGRAMS = $(TESTS_default) $(TESTS_norun) $(TESTS_daemon)
301 endif
302
303 check-daemon:
304         $(MAKE) check TESTS="$(TESTS_daemon)"
305
306 mainloop_test_SOURCES = tests/mainloop-test.c
307 mainloop_test_CFLAGS = $(AM_CFLAGS)
308 mainloop_test_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
309 mainloop_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
310
311 thread_mainloop_test_SOURCES = tests/thread-mainloop-test.c
312 thread_mainloop_test_CFLAGS = $(AM_CFLAGS)
313 thread_mainloop_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
314 thread_mainloop_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
315
316 utf8_test_SOURCES = tests/utf8-test.c
317 utf8_test_CFLAGS = $(AM_CFLAGS)
318 utf8_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
319 utf8_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
320
321 format_test_SOURCES = tests/format-test.c
322 format_test_CFLAGS = $(AM_CFLAGS)
323 format_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
324 format_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
325
326 get_binary_name_test_SOURCES = tests/get-binary-name-test.c
327 get_binary_name_test_CFLAGS = $(AM_CFLAGS)
328 get_binary_name_test_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
329 get_binary_name_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
330
331 ipacl_test_SOURCES = tests/ipacl-test.c
332 ipacl_test_CFLAGS = $(AM_CFLAGS)
333 ipacl_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
334 ipacl_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
335
336 hook_list_test_SOURCES = tests/hook-list-test.c
337 hook_list_test_CFLAGS = $(AM_CFLAGS)
338 hook_list_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
339 hook_list_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
340
341 memblock_test_SOURCES = tests/memblock-test.c
342 memblock_test_CFLAGS = $(AM_CFLAGS)
343 memblock_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
344 memblock_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
345
346 thread_test_SOURCES = tests/thread-test.c
347 thread_test_CFLAGS = $(AM_CFLAGS)
348 thread_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
349 thread_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
350
351 once_test_SOURCES = tests/once-test.c
352 once_test_CFLAGS = $(AM_CFLAGS)
353 once_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
354 once_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
355
356 flist_test_SOURCES = tests/flist-test.c
357 flist_test_CFLAGS = $(AM_CFLAGS)
358 flist_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
359 flist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
360
361 asyncq_test_SOURCES = tests/asyncq-test.c
362 asyncq_test_CFLAGS = $(AM_CFLAGS)
363 asyncq_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
364 asyncq_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
365
366 asyncmsgq_test_SOURCES = tests/asyncmsgq-test.c
367 asyncmsgq_test_CFLAGS = $(AM_CFLAGS)
368 asyncmsgq_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
369 asyncmsgq_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
370
371 queue_test_SOURCES = tests/queue-test.c
372 queue_test_CFLAGS = $(AM_CFLAGS)
373 queue_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
374 queue_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
375
376 rtpoll_test_SOURCES = tests/rtpoll-test.c
377 rtpoll_test_CFLAGS = $(AM_CFLAGS)
378 rtpoll_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
379 rtpoll_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
380
381 mcalign_test_SOURCES = tests/mcalign-test.c
382 mcalign_test_CFLAGS = $(AM_CFLAGS)
383 mcalign_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
384 mcalign_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
385
386 pacat_simple_SOURCES = tests/pacat-simple.c
387 pacat_simple_LDADD = $(AM_LDADD) libpulse.la libpulse-simple.la libpulsecommon-@PA_MAJORMINOR@.la
388 pacat_simple_CFLAGS = $(AM_CFLAGS)
389 pacat_simple_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
390
391 parec_simple_SOURCES = tests/parec-simple.c
392 parec_simple_LDADD = $(AM_LDADD) libpulse.la libpulse-simple.la libpulsecommon-@PA_MAJORMINOR@.la
393 parec_simple_CFLAGS = $(AM_CFLAGS)
394 parec_simple_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
395
396 extended_test_SOURCES = tests/extended-test.c
397 extended_test_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
398 extended_test_CFLAGS = $(AM_CFLAGS)
399 extended_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
400
401 strlist_test_SOURCES = tests/strlist-test.c
402 strlist_test_CFLAGS = $(AM_CFLAGS)
403 strlist_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
404 strlist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
405
406 close_test_SOURCES = tests/close-test.c
407 close_test_CFLAGS = $(AM_CFLAGS)
408 close_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
409 close_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
410
411 volume_test_SOURCES = tests/volume-test.c
412 volume_test_CFLAGS = $(AM_CFLAGS)
413 volume_test_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
414 volume_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
415
416 channelmap_test_SOURCES = tests/channelmap-test.c
417 channelmap_test_CFLAGS = $(AM_CFLAGS)
418 channelmap_test_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
419 channelmap_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
420
421 cpulimit_test_SOURCES = tests/cpulimit-test.c daemon/cpulimit.c daemon/cpulimit.h
422 cpulimit_test_CFLAGS = $(AM_CFLAGS)
423 cpulimit_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
424 cpulimit_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
425
426 cpulimit_test2_SOURCES = tests/cpulimit-test.c daemon/cpulimit.c daemon/cpulimit.h
427 cpulimit_test2_CFLAGS = $(AM_CFLAGS) -DTEST2
428 cpulimit_test2_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
429 cpulimit_test2_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
430
431 mainloop_test_glib_SOURCES = $(mainloop_test_SOURCES)
432 mainloop_test_glib_CFLAGS = $(mainloop_test_CFLAGS) $(GLIB20_CFLAGS) -DGLIB_MAIN_LOOP
433 mainloop_test_glib_LDADD = $(mainloop_test_LDADD) $(GLIB20_LIBS) libpulse-mainloop-glib.la
434 mainloop_test_glib_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
435
436 memblockq_test_SOURCES = tests/memblockq-test.c
437 memblockq_test_CFLAGS = $(AM_CFLAGS)
438 memblockq_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
439 memblockq_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
440
441 sync_playback_SOURCES = tests/sync-playback.c
442 sync_playback_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
443 sync_playback_CFLAGS = $(AM_CFLAGS)
444 sync_playback_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
445
446 interpol_test_SOURCES = tests/interpol-test.c
447 interpol_test_LDADD = $(AM_LDADD) libpulse.la libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
448 interpol_test_CFLAGS = $(AM_CFLAGS)
449 interpol_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
450
451 sig2str_test_SOURCES = tests/sig2str-test.c
452 sig2str_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
453 sig2str_test_CFLAGS = $(AM_CFLAGS)
454 sig2str_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
455
456 resampler_test_SOURCES = tests/resampler-test.c
457 resampler_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
458 resampler_test_CFLAGS = $(AM_CFLAGS)
459 resampler_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
460
461 mix_test_SOURCES = tests/mix-test.c
462 mix_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
463 mix_test_CFLAGS = $(AM_CFLAGS)
464 mix_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
465
466 remix_test_SOURCES = tests/remix-test.c
467 remix_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
468 remix_test_CFLAGS = $(AM_CFLAGS)
469 remix_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
470
471 smoother_test_SOURCES = tests/smoother-test.c
472 smoother_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
473 smoother_test_CFLAGS = $(AM_CFLAGS)
474 smoother_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
475
476 proplist_test_SOURCES = tests/proplist-test.c
477 proplist_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
478 proplist_test_CFLAGS = $(AM_CFLAGS)
479 proplist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
480
481 rtstutter_SOURCES = tests/rtstutter.c
482 rtstutter_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
483 rtstutter_CFLAGS = $(AM_CFLAGS)
484 rtstutter_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
485
486 stripnul_SOURCES = tests/stripnul.c
487 stripnul_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
488 stripnul_CFLAGS = $(AM_CFLAGS)
489 stripnul_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
490
491 lock_autospawn_test_SOURCES = tests/lock-autospawn-test.c
492 lock_autospawn_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
493 lock_autospawn_test_CFLAGS = $(AM_CFLAGS)
494 lock_autospawn_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
495
496 prioq_test_SOURCES = tests/prioq-test.c
497 prioq_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
498 prioq_test_CFLAGS = $(AM_CFLAGS)
499 prioq_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
500
501 sigbus_test_SOURCES = tests/sigbus-test.c
502 sigbus_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
503 sigbus_test_CFLAGS = $(AM_CFLAGS)
504 sigbus_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
505
506 gtk_test_SOURCES = tests/gtk-test.c
507 gtk_test_LDADD = $(AM_LDADD) $(GTK20_LIBS) libpulse.la libpulse-mainloop-glib.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
508 gtk_test_CFLAGS = $(AM_CFLAGS) $(GTK20_CFLAGS)
509 gtk_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
510
511 alsa_time_test_SOURCES = tests/alsa-time-test.c
512 alsa_time_test_LDADD = $(AM_LDADD) $(ASOUNDLIB_LIBS)
513 alsa_time_test_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
514 alsa_time_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
515
516 usergroup_test_SOURCES = tests/usergroup-test.c
517 usergroup_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
518 usergroup_test_CFLAGS = $(AM_CFLAGS)
519 usergroup_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
520
521 connect_stress_SOURCES = tests/connect-stress.c
522 connect_stress_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
523 connect_stress_CFLAGS = $(AM_CFLAGS)
524 connect_stress_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
525
526 echo_cancel_test_SOURCES = $(module_echo_cancel_la_SOURCES)
527 nodist_echo_cancel_test_SOURCES = $(nodist_module_echo_cancel_la_SOURCES)
528 echo_cancel_test_LDADD = $(module_echo_cancel_la_LIBADD)
529 echo_cancel_test_CFLAGS = $(module_echo_cancel_la_CFLAGS) -DECHO_CANCEL_TEST=1
530 if HAVE_WEBRTC
531 echo_cancel_test_CXXFLAGS = $(module_echo_cancel_la_CXXFLAGS) -DECHO_CANCEL_TEST=1
532 endif
533 echo_cancel_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
534
535 ###################################
536 #         Common library          #
537 ###################################
538
539 lib_LTLIBRARIES = \
540                 libpulsecommon-@PA_MAJORMINOR@.la
541
542 libpulsecommon_@PA_MAJORMINOR@_la_SOURCES = \
543                 pulse/client-conf.c pulse/client-conf.h \
544                 pulse/fork-detect.c pulse/fork-detect.h \
545                 pulse/xmalloc.c pulse/xmalloc.h \
546                 pulse/proplist.c pulse/proplist.h \
547                 pulse/utf8.c pulse/utf8.h \
548                 pulse/channelmap.c pulse/channelmap.h \
549                 pulse/sample.c pulse/sample.h \
550                 pulse/util.c pulse/util.h \
551                 pulse/timeval.c pulse/timeval.h \
552                 pulse/rtclock.c pulse/rtclock.h \
553                 pulsecore/atomic.h \
554                 pulsecore/authkey.c pulsecore/authkey.h \
555                 pulsecore/conf-parser.c pulsecore/conf-parser.h \
556                 pulsecore/core-error.c pulsecore/core-error.h \
557                 pulsecore/core-rtclock.c pulsecore/core-rtclock.h \
558                 pulsecore/core-util.c pulsecore/core-util.h \
559                 pulsecore/creds.h \
560                 pulsecore/dynarray.c pulsecore/dynarray.h \
561                 pulsecore/endianmacros.h \
562                 pulsecore/flist.c pulsecore/flist.h \
563                 pulsecore/hashmap.c pulsecore/hashmap.h \
564                 pulsecore/i18n.c pulsecore/i18n.h \
565                 pulsecore/idxset.c pulsecore/idxset.h \
566                 pulsecore/arpa-inet.c pulsecore/arpa-inet.h \
567                 pulsecore/iochannel.c pulsecore/iochannel.h \
568                 pulsecore/ioline.c pulsecore/ioline.h \
569                 pulsecore/ipacl.c pulsecore/ipacl.h \
570                 pulsecore/llist.h \
571                 pulsecore/lock-autospawn.c pulsecore/lock-autospawn.h \
572                 pulsecore/log.c pulsecore/log.h \
573                 pulsecore/ratelimit.c pulsecore/ratelimit.h \
574                 pulsecore/macro.h \
575                 pulsecore/mcalign.c pulsecore/mcalign.h \
576                 pulsecore/memblock.c pulsecore/memblock.h \
577                 pulsecore/memblockq.c pulsecore/memblockq.h \
578                 pulsecore/memchunk.c pulsecore/memchunk.h \
579                 pulsecore/native-common.h \
580                 pulsecore/once.c pulsecore/once.h \
581                 pulsecore/packet.c pulsecore/packet.h \
582                 pulsecore/parseaddr.c pulsecore/parseaddr.h \
583                 pulsecore/pdispatch.c pulsecore/pdispatch.h \
584                 pulsecore/pid.c pulsecore/pid.h \
585                 pulsecore/pipe.c pulsecore/pipe.h \
586                 pulsecore/poll.c pulsecore/poll.h \
587                 pulsecore/prioq.c pulsecore/prioq.h \
588                 pulsecore/memtrap.c pulsecore/memtrap.h \
589                 pulsecore/aupdate.c pulsecore/aupdate.h \
590                 pulsecore/proplist-util.c pulsecore/proplist-util.h \
591                 pulsecore/pstream-util.c pulsecore/pstream-util.h \
592                 pulsecore/pstream.c pulsecore/pstream.h \
593                 pulsecore/queue.c pulsecore/queue.h \
594                 pulsecore/random.c pulsecore/random.h \
595                 pulsecore/refcnt.h \
596                 pulsecore/shm.c pulsecore/shm.h \
597                 pulsecore/bitset.c pulsecore/bitset.h \
598                 pulsecore/socket-client.c pulsecore/socket-client.h \
599                 pulsecore/socket-server.c pulsecore/socket-server.h \
600                 pulsecore/socket-util.c pulsecore/socket-util.h \
601                 pulsecore/strbuf.c pulsecore/strbuf.h \
602                 pulsecore/strlist.c pulsecore/strlist.h \
603                 pulsecore/tagstruct.c pulsecore/tagstruct.h \
604                 pulsecore/time-smoother.c pulsecore/time-smoother.h \
605                 pulsecore/tokenizer.c pulsecore/tokenizer.h \
606                 pulsecore/usergroup.c pulsecore/usergroup.h \
607                 pulsecore/sndfile-util.c pulsecore/sndfile-util.h \
608                 pulsecore/socket.h
609
610 libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
611 libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
612 libpulsecommon_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) $(LIBWRAP_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV) $(LIBSNDFILE_LIBS)
613
614 if HAVE_X11
615 libpulsecommon_@PA_MAJORMINOR@_la_SOURCES += \
616                 pulse/client-conf-x11.c pulse/client-conf-x11.h \
617                 pulsecore/x11prop.c pulsecore/x11prop.h
618 libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(X11_CFLAGS)
619 libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(X11_LIBS)
620 endif
621
622 # proplist-util.h uses these header files, but not the library itself!
623 libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(GLIB20_CFLAGS) $(GTK20_CFLAGS)
624
625 ## Please note that libpulsecommon implicitly also depends on<
626 ## libpulse! i.e. we have a cyclic dependancy here. Which is intended
627 ## since libpulse only includes stable, official APIs, while
628 ## libpulsecommon only includes unofficial APIs.
629
630 if OS_IS_WIN32
631 libpulsecommon_@PA_MAJORMINOR@_la_SOURCES += \
632                 pulsecore/mutex-win32.c pulsecore/mutex.h \
633                 pulsecore/thread-win32.c pulsecore/thread.h \
634                 pulsecore/semaphore-win32.c pulsecore/semaphore.h
635 else !OS_IS_WIN32
636 if OS_IS_DARWIN
637 libpulsecommon_@PA_MAJORMINOR@_la_SOURCES += \
638                 pulsecore/mutex-posix.c pulsecore/mutex.h \
639                 pulsecore/thread-posix.c pulsecore/thread.h \
640                 pulsecore/semaphore-osx.c pulsecore/semaphore.h
641 libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += "-I/Developer/Headers/FlatCarbon/"
642 #libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += "-framework CoreServices"
643 else !OS_IS_DARWIN
644 libpulsecommon_@PA_MAJORMINOR@_la_SOURCES += \
645                 pulsecore/mutex-posix.c pulsecore/mutex.h \
646                 pulsecore/thread-posix.c pulsecore/thread.h \
647                 pulsecore/semaphore-posix.c pulsecore/semaphore.h
648 endif !OS_IS_DARWIN
649 endif !OS_IS_WIN32
650
651 if HAVE_LIBASYNCNS
652 libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(LIBASYNCNS_CFLAGS)
653 libpulsecommon_@PA_MAJORMINOR@_la_LIBADD += $(LIBASYNCNS_LIBS)
654 endif
655
656 if OS_IS_WIN32
657 libpulsecommon_@PA_MAJORMINOR@_la_SOURCES += pulsecore/dllmain.c
658 endif
659
660 if HAVE_DBUS
661 libpulsecommon_@PA_MAJORMINOR@_la_SOURCES += \
662                 pulsecore/dbus-util.c pulsecore/dbus-util.h \
663                 pulsecore/rtkit.c pulsecore/rtkit.h
664 libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(DBUS_CFLAGS)
665 libpulsecommon_@PA_MAJORMINOR@_la_LIBADD += $(DBUS_LIBS)
666 endif
667
668 ###################################
669 #         Client library          #
670 ###################################
671
672 pulseinclude_HEADERS = \
673                 pulse/cdecl.h \
674                 pulse/channelmap.h \
675                 pulse/context.h \
676                 pulse/def.h \
677                 pulse/error.h \
678                 pulse/ext-device-manager.h \
679                 pulse/ext-device-restore.h \
680                 pulse/ext-stream-restore.h \
681                 pulse/format.h \
682                 pulse/gccmacro.h \
683                 pulse/introspect.h \
684                 pulse/mainloop-api.h \
685                 pulse/mainloop-signal.h \
686                 pulse/mainloop.h \
687                 pulse/operation.h \
688                 pulse/proplist.h \
689                 pulse/pulseaudio.h \
690                 pulse/rtclock.h \
691                 pulse/sample.h \
692                 pulse/scache.h \
693                 pulse/simple.h \
694                 pulse/stream.h \
695                 pulse/subscribe.h \
696                 pulse/thread-mainloop.h \
697                 pulse/timeval.h \
698                 pulse/utf8.h \
699                 pulse/util.h \
700                 pulse/version.h \
701                 pulse/volume.h \
702                 pulse/xmalloc.h
703
704 lib_LTLIBRARIES += \
705                 libpulse.la \
706                 libpulse-simple.la
707
708 if HAVE_GLIB20
709 pulseinclude_HEADERS += \
710                 pulse/glib-mainloop.h
711
712 lib_LTLIBRARIES += \
713                 libpulse-mainloop-glib.la
714 endif
715
716 # Public interface
717 libpulse_la_SOURCES = \
718                 pulse/cdecl.h \
719                 pulse/channelmap.c pulse/channelmap.h \
720                 pulse/context.c pulse/context.h \
721                 pulse/def.h \
722                 pulse/error.c pulse/error.h \
723                 pulse/ext-device-manager.c pulse/ext-device-manager.h \
724                 pulse/ext-device-restore.c pulse/ext-device-restore.h \
725                 pulse/ext-stream-restore.c pulse/ext-stream-restore.h \
726                 pulse/format.c pulse/format.h \
727                 pulse/gccmacro.h \
728                 pulse/internal.h \
729                 pulse/introspect.c pulse/introspect.h \
730                 pulse/mainloop-api.c pulse/mainloop-api.h \
731                 pulse/mainloop-signal.c pulse/mainloop-signal.h \
732                 pulse/mainloop.c pulse/mainloop.h \
733                 pulse/operation.c pulse/operation.h \
734                 pulse/proplist.c pulse/proplist.h \
735                 pulse/pulseaudio.h \
736                 pulse/rtclock.c pulse/rtclock.h \
737                 pulse/sample.c pulse/sample.h \
738                 pulse/scache.c pulse/scache.h \
739                 pulse/stream.c pulse/stream.h \
740                 pulse/subscribe.c pulse/subscribe.h \
741                 pulse/thread-mainloop.c pulse/thread-mainloop.h \
742                 pulse/timeval.c pulse/timeval.h \
743                 pulse/utf8.c pulse/utf8.h \
744                 pulse/util.c pulse/util.h \
745                 pulse/volume.c pulse/volume.h \
746                 pulse/xmalloc.c pulse/xmalloc.h
747
748 libpulse_la_CFLAGS = $(AM_CFLAGS) $(LIBJSON_CFLAGS)
749 libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LTLIBICONV) $(LIBJSON_LIBS) libpulsecommon-@PA_MAJORMINOR@.la
750 libpulse_la_LDFLAGS = $(AM_LDFLAGS) $(VERSIONING_LDFLAGS) -version-info $(LIBPULSE_VERSION_INFO)
751
752 if HAVE_DBUS
753 libpulse_la_CFLAGS += $(DBUS_CFLAGS)
754 libpulse_la_LIBADD += $(DBUS_LIBS)
755 endif
756
757 libpulse_simple_la_SOURCES = pulse/simple.c pulse/simple.h
758 libpulse_simple_la_CFLAGS = $(AM_CFLAGS)
759 libpulse_simple_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
760 libpulse_simple_la_LDFLAGS = $(AM_LDFLAGS) $(VERSIONING_LDFLAGS) -version-info $(LIBPULSE_SIMPLE_VERSION_INFO)
761
762 libpulse_mainloop_glib_la_SOURCES = pulse/glib-mainloop.h pulse/glib-mainloop.c
763 libpulse_mainloop_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
764 libpulse_mainloop_glib_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la $(GLIB20_LIBS)
765 libpulse_mainloop_glib_la_LDFLAGS = $(AM_LDFLAGS) $(VERSIONING_LDFLAGS) -version-info $(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO)
766
767 ###################################
768 #         OSS emulation           #
769 ###################################
770
771 if HAVE_OSS_WRAPPER
772 lib_LTLIBRARIES += libpulsedsp.la
773 bin_SCRIPTS += utils/padsp
774 endif
775
776 libpulsedsp_la_SOURCES = utils/padsp.c
777 libpulsedsp_la_CFLAGS = $(AM_CFLAGS)
778 libpulsedsp_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
779 libpulsedsp_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version -disable-static
780
781 ###################################
782 #      Daemon core library        #
783 ###################################
784
785 lib_LTLIBRARIES += libpulsecore-@PA_MAJORMINOR@.la
786
787 # Pure core stuff
788 libpulsecore_@PA_MAJORMINOR@_la_SOURCES = \
789                 pulsecore/asyncmsgq.c pulsecore/asyncmsgq.h \
790                 pulsecore/asyncq.c pulsecore/asyncq.h \
791                 pulsecore/auth-cookie.c pulsecore/auth-cookie.h \
792                 pulsecore/cli-command.c pulsecore/cli-command.h \
793                 pulsecore/cli-text.c pulsecore/cli-text.h \
794                 pulsecore/client.c pulsecore/client.h \
795                 pulsecore/card.c pulsecore/card.h \
796                 pulsecore/core-scache.c pulsecore/core-scache.h \
797                 pulsecore/core-subscribe.c pulsecore/core-subscribe.h \
798                 pulsecore/core.c pulsecore/core.h \
799                 pulsecore/fdsem.c pulsecore/fdsem.h \
800                 pulsecore/g711.c pulsecore/g711.h \
801                 pulsecore/hook-list.c pulsecore/hook-list.h \
802                 pulsecore/ltdl-helper.c pulsecore/ltdl-helper.h \
803                 pulsecore/modargs.c pulsecore/modargs.h \
804                 pulsecore/modinfo.c pulsecore/modinfo.h \
805                 pulsecore/module.c pulsecore/module.h \
806                 pulsecore/msgobject.c pulsecore/msgobject.h \
807                 pulsecore/namereg.c pulsecore/namereg.h \
808                 pulsecore/object.c pulsecore/object.h \
809                 pulsecore/play-memblockq.c pulsecore/play-memblockq.h \
810                 pulsecore/play-memchunk.c pulsecore/play-memchunk.h \
811                 pulsecore/remap.c pulsecore/remap.h \
812                 pulsecore/remap_mmx.c pulsecore/remap_sse.c \
813                 pulsecore/resampler.c pulsecore/resampler.h \
814                 pulsecore/rtpoll.c pulsecore/rtpoll.h \
815                 pulsecore/sample-util.c pulsecore/sample-util.h \
816                 pulsecore/cpu.h \
817                 pulsecore/cpu-arm.c pulsecore/cpu-arm.h \
818                 pulsecore/cpu-x86.c pulsecore/cpu-x86.h \
819                 pulsecore/cpu-orc.c pulsecore/cpu-orc.h \
820                 pulsecore/svolume_c.c pulsecore/svolume_arm.c \
821                 pulsecore/svolume_mmx.c pulsecore/svolume_sse.c \
822                 pulsecore/sconv-s16be.c pulsecore/sconv-s16be.h \
823                 pulsecore/sconv-s16le.c pulsecore/sconv-s16le.h \
824                 pulsecore/sconv_sse.c \
825                 pulsecore/sconv.c pulsecore/sconv.h \
826                 pulsecore/shared.c pulsecore/shared.h \
827                 pulsecore/sink-input.c pulsecore/sink-input.h \
828                 pulsecore/sink.c pulsecore/sink.h \
829                 pulsecore/device-port.c pulsecore/device-port.h \
830                 pulsecore/sioman.c pulsecore/sioman.h \
831                 pulsecore/sound-file-stream.c pulsecore/sound-file-stream.h \
832                 pulsecore/sound-file.c pulsecore/sound-file.h \
833                 pulsecore/source-output.c pulsecore/source-output.h \
834                 pulsecore/source.c pulsecore/source.h \
835                 pulsecore/start-child.c pulsecore/start-child.h \
836                 pulsecore/thread-mq.c pulsecore/thread-mq.h \
837                 pulsecore/database.h
838
839 libpulsecore_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSPEEX_CFLAGS) $(LIBSNDFILE_CFLAGS) $(WINSOCK_CFLAGS)
840 libpulsecore_@PA_MAJORMINOR@_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
841 libpulsecore_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSPEEX_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV) libpulsecommon-@PA_MAJORMINOR@.la libpulse.la libpulsecore-foreign.la
842
843 if HAVE_ORC
844 ORC_SOURCE += pulsecore/svolume
845 libpulsecore_@PA_MAJORMINOR@_la_SOURCES += pulsecore/svolume_orc.c
846 nodist_libpulsecore_@PA_MAJORMINOR@_la_SOURCES = pulsecore/svolume-orc-gen.c pulsecore/svolume-orc-gen.h
847 libpulsecore_@PA_MAJORMINOR@_la_CFLAGS += $(ORC_CFLAGS)
848 libpulsecore_@PA_MAJORMINOR@_la_LIBADD += $(ORC_LIBS)
849 endif
850
851 if HAVE_X11
852 libpulsecore_@PA_MAJORMINOR@_la_SOURCES += pulsecore/x11wrap.c pulsecore/x11wrap.h
853 libpulsecore_@PA_MAJORMINOR@_la_CFLAGS += $(X11_CFLAGS)
854 libpulsecore_@PA_MAJORMINOR@_la_LDFLAGS += $(X11_LIBS)
855 endif
856
857 if HAVE_DBUS
858 libpulsecore_@PA_MAJORMINOR@_la_SOURCES += \
859                 pulsecore/dbus-shared.c pulsecore/dbus-shared.h \
860                 pulsecore/protocol-dbus.c pulsecore/protocol-dbus.h
861 libpulsecore_@PA_MAJORMINOR@_la_CFLAGS += $(DBUS_CFLAGS)
862 libpulsecore_@PA_MAJORMINOR@_la_LIBADD += $(DBUS_LIBS)
863 endif
864
865 if HAVE_GDBM
866 libpulsecore_@PA_MAJORMINOR@_la_SOURCES += pulsecore/database-gdbm.c
867 libpulsecore_@PA_MAJORMINOR@_la_CFLAGS += $(GDBM_CFLAGS)
868 libpulsecore_@PA_MAJORMINOR@_la_LIBADD += $(GDBM_LIBS)
869 endif
870
871 if HAVE_TDB
872 libpulsecore_@PA_MAJORMINOR@_la_SOURCES += pulsecore/database-tdb.c
873 libpulsecore_@PA_MAJORMINOR@_la_CFLAGS += $(TDB_CFLAGS)
874 libpulsecore_@PA_MAJORMINOR@_la_LIBADD += $(TDB_LIBS)
875 endif
876
877 if HAVE_SIMPLEDB
878 libpulsecore_@PA_MAJORMINOR@_la_SOURCES += pulsecore/database-simple.c
879 endif
880
881 # We split the foreign code off to not be annoyed by warnings we don't care about
882 noinst_LTLIBRARIES = libpulsecore-foreign.la
883
884 libpulsecore_foreign_la_SOURCES = \
885                 pulsecore/ffmpeg/resample2.c pulsecore/ffmpeg/avcodec.h pulsecore/ffmpeg/dsputil.h
886
887 libpulsecore_foreign_la_CFLAGS = $(AM_CFLAGS) $(FOREIGN_CFLAGS)
888
889 ###################################
890 #   Plug-in support libraries     #
891 ###################################
892
893 ### Warning! Due to an obscure bug in libtool/automake it is required
894 ### that the libraries in modlibexec_LTLIBRARIES are specified in-order,
895 ### i.e. libraries near the end of the list depend on libraries near
896 ### the head, and not the other way!
897
898 modlibexec_LTLIBRARIES = \
899                 libcli.la \
900                 libprotocol-cli.la \
901                 libprotocol-simple.la \
902                 libprotocol-http.la \
903                 libprotocol-native.la \
904                 libprotocol-esound.la
905
906 # We need to emulate sendmsg/recvmsg to support this on Win32
907 if !OS_IS_WIN32
908 modlibexec_LTLIBRARIES += \
909                 librtp.la
910 endif
911
912 if HAVE_AVAHI
913 modlibexec_LTLIBRARIES += \
914                 libavahi-wrap.la
915 endif
916
917 libprotocol_simple_la_SOURCES = pulsecore/protocol-simple.c pulsecore/protocol-simple.h
918 libprotocol_simple_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
919 libprotocol_simple_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
920
921 libcli_la_SOURCES = pulsecore/cli.c pulsecore/cli.h
922 libcli_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
923 libcli_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
924
925 libprotocol_cli_la_SOURCES = pulsecore/protocol-cli.c pulsecore/protocol-cli.h
926 libprotocol_cli_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
927 libprotocol_cli_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la libcli.la
928
929 libprotocol_http_la_SOURCES = pulsecore/protocol-http.c pulsecore/protocol-http.h pulsecore/mime-type.c pulsecore/mime-type.h
930 libprotocol_http_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
931 libprotocol_http_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
932
933 libprotocol_native_la_SOURCES = pulsecore/protocol-native.c pulsecore/protocol-native.h pulsecore/native-common.h
934 libprotocol_native_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS)
935 libprotocol_native_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
936 libprotocol_native_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
937 if HAVE_DBUS
938 libprotocol_native_la_CFLAGS += $(DBUS_CFLAGS)
939 libprotocol_native_la_LIBADD += $(DBUS_LIBS)
940 endif
941
942 libprotocol_esound_la_SOURCES = pulsecore/protocol-esound.c pulsecore/protocol-esound.h pulsecore/esound.h
943 libprotocol_esound_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
944 libprotocol_esound_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
945
946 librtp_la_SOURCES = \
947                 modules/rtp/rtp.c modules/rtp/rtp.h \
948                 modules/rtp/sdp.c modules/rtp/sdp.h \
949                 modules/rtp/sap.c modules/rtp/sap.h \
950                 modules/rtp/rtsp_client.c modules/rtp/rtsp_client.h \
951                 modules/rtp/headerlist.c modules/rtp/headerlist.h
952 librtp_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
953 librtp_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
954
955 libraop_la_SOURCES = \
956         modules/raop/raop_client.c modules/raop/raop_client.h \
957         modules/raop/base64.c modules/raop/base64.h
958 libraop_la_CFLAGS = $(AM_CFLAGS) $(OPENSSL_CFLAGS) -I$(top_srcdir)/src/modules/rtp
959 libraop_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
960 libraop_la_LIBADD = $(AM_LIBADD) $(OPENSSL_LIBS) libpulsecore-@PA_MAJORMINOR@.la librtp.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
961
962 # Avahi
963 libavahi_wrap_la_SOURCES = pulsecore/avahi-wrap.c pulsecore/avahi-wrap.h
964 libavahi_wrap_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
965 libavahi_wrap_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
966 libavahi_wrap_la_LIBADD = $(AM_LIBADD) $(AVAHI_CFLAGS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
967
968 ###################################
969 #        Plug-in libraries        #
970 ###################################
971
972 if HAVE_DBUS
973 # Serveral module (e.g. libalsa-util.la)
974 modlibexec_LTLIBRARIES += \
975                 module-console-kit.la
976 endif
977
978 modlibexec_LTLIBRARIES += \
979                 module-cli.la \
980                 module-cli-protocol-tcp.la \
981                 module-simple-protocol-tcp.la \
982                 module-null-sink.la \
983                 module-null-source.la \
984                 module-sine-source.la \
985                 module-detect.la \
986                 module-volume-restore.la \
987                 module-device-manager.la \
988                 module-device-restore.la \
989                 module-stream-restore.la \
990                 module-card-restore.la \
991                 module-default-device-restore.la \
992                 module-always-sink.la \
993                 module-rescue-streams.la \
994                 module-intended-roles.la \
995                 module-suspend-on-idle.la \
996                 module-echo-cancel.la \
997                 module-http-protocol-tcp.la \
998                 module-sine.la \
999                 module-native-protocol-tcp.la \
1000                 module-native-protocol-fd.la \
1001                 module-esound-protocol-tcp.la \
1002                 module-combine.la \
1003                 module-combine-sink.la \
1004                 module-remap-sink.la \
1005                 module-ladspa-sink.la \
1006                 module-esound-sink.la \
1007                 module-tunnel-sink.la \
1008                 module-tunnel-source.la \
1009                 module-position-event-sounds.la \
1010                 module-augment-properties.la \
1011                 module-role-cork.la \
1012                 module-loopback.la \
1013                 module-virtual-sink.la \
1014                 module-virtual-source.la \
1015                 module-switch-on-connect.la \
1016                 module-filter-apply.la \
1017                 module-filter-heuristics.la
1018
1019 # See comment at librtp.la above
1020 if !OS_IS_WIN32
1021 modlibexec_LTLIBRARIES += \
1022                 module-rtp-send.la \
1023                 module-rtp-recv.la
1024 endif
1025
1026 if HAVE_AF_UNIX
1027 modlibexec_LTLIBRARIES += \
1028                 module-cli-protocol-unix.la \
1029                 module-simple-protocol-unix.la \
1030                 module-http-protocol-unix.la \
1031                 module-native-protocol-unix.la \
1032                 module-esound-protocol-unix.la
1033 endif
1034
1035 if HAVE_MKFIFO
1036 modlibexec_LTLIBRARIES += \
1037                 module-pipe-sink.la \
1038                 module-pipe-source.la
1039 endif
1040
1041 if !OS_IS_WIN32
1042 modlibexec_LTLIBRARIES += \
1043                 module-esound-compat-spawnfd.la \
1044                 module-esound-compat-spawnpid.la
1045 endif
1046
1047 if HAVE_REGEX
1048 modlibexec_LTLIBRARIES += \
1049                 module-match.la
1050 endif
1051
1052 if HAVE_X11
1053 modlibexec_LTLIBRARIES += \
1054                 module-x11-bell.la \
1055                 module-x11-publish.la \
1056                 module-x11-xsmp.la \
1057                 module-x11-cork-request.la
1058 endif
1059
1060 if HAVE_OSS_OUTPUT
1061 modlibexec_LTLIBRARIES += \
1062                 liboss-util.la \
1063                 module-oss.la
1064 endif
1065
1066 if HAVE_COREAUDIO
1067 modlibexec_LTLIBRARIES += \
1068                 module-coreaudio-detect.la \
1069                 module-coreaudio-device.la
1070 endif
1071
1072 pulselibexec_PROGRAMS =
1073
1074 if HAVE_ALSA
1075 modlibexec_LTLIBRARIES += \
1076                 libalsa-util.la \
1077                 module-alsa-sink.la \
1078                 module-alsa-source.la \
1079                 module-alsa-card.la
1080
1081 dist_alsaprofilesets_DATA = \
1082                 modules/alsa/mixer/profile-sets/default.conf \
1083                 modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf \
1084                 modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \
1085                 modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf \
1086                 modules/alsa/mixer/profile-sets/native-instruments-traktor-audio6.conf \
1087                 modules/alsa/mixer/profile-sets/native-instruments-traktor-audio10.conf \
1088                 modules/alsa/mixer/profile-sets/native-instruments-traktorkontrol-s4.conf \
1089                 modules/alsa/mixer/profile-sets/native-instruments-korecontroller.conf \
1090                 modules/alsa/mixer/profile-sets/kinect-audio.conf
1091
1092 if HAVE_UDEV
1093 dist_udevrules_DATA = \
1094                 modules/alsa/mixer/profile-sets/90-pulseaudio.rules
1095 endif
1096
1097 dist_alsapaths_DATA = \
1098                 modules/alsa/mixer/paths/analog-input-aux.conf \
1099                 modules/alsa/mixer/paths/analog-input.conf \
1100                 modules/alsa/mixer/paths/analog-input.conf.common \
1101                 modules/alsa/mixer/paths/analog-input-fm.conf \
1102                 modules/alsa/mixer/paths/analog-input-linein.conf \
1103                 modules/alsa/mixer/paths/analog-input-mic.conf \
1104                 modules/alsa/mixer/paths/analog-input-dock-mic.conf \
1105                 modules/alsa/mixer/paths/analog-input-front-mic.conf \
1106                 modules/alsa/mixer/paths/analog-input-internal-mic.conf \
1107                 modules/alsa/mixer/paths/analog-input-rear-mic.conf \
1108                 modules/alsa/mixer/paths/analog-input-mic.conf.common \
1109                 modules/alsa/mixer/paths/analog-input-mic-line.conf \
1110                 modules/alsa/mixer/paths/analog-input-tvtuner.conf \
1111                 modules/alsa/mixer/paths/analog-input-video.conf \
1112                 modules/alsa/mixer/paths/analog-output.conf \
1113                 modules/alsa/mixer/paths/analog-output-speaker.conf \
1114                 modules/alsa/mixer/paths/analog-output.conf.common \
1115                 modules/alsa/mixer/paths/analog-output-desktop-speaker.conf \
1116                 modules/alsa/mixer/paths/analog-output-headphones.conf \
1117                 modules/alsa/mixer/paths/analog-output-headphones-2.conf \
1118                 modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf \
1119                 modules/alsa/mixer/paths/analog-output-mono.conf \
1120                 modules/alsa/mixer/paths/iec958-stereo-output.conf
1121
1122 endif
1123
1124 if HAVE_SOLARIS
1125 modlibexec_LTLIBRARIES += \
1126                 module-solaris.la
1127 endif
1128
1129 if HAVE_AVAHI
1130 modlibexec_LTLIBRARIES += \
1131                 module-zeroconf-publish.la \
1132                 module-zeroconf-discover.la
1133 endif
1134
1135 if HAVE_BONJOUR
1136 modlibexec_LTLIBRARIES += \
1137                 module-bonjour-publish.la
1138 endif
1139
1140 if HAVE_LIRC
1141 modlibexec_LTLIBRARIES += \
1142                 module-lirc.la
1143 endif
1144
1145 if HAVE_EVDEV
1146 modlibexec_LTLIBRARIES += \
1147                 module-mmkbd-evdev.la
1148 endif
1149
1150 if HAVE_JACK
1151 modlibexec_LTLIBRARIES += \
1152                 module-jack-sink.la \
1153                 module-jack-source.la
1154
1155 if HAVE_DBUS
1156 modlibexec_LTLIBRARIES += \
1157                 module-jackdbus-detect.la
1158 endif
1159
1160 endif
1161
1162 if HAVE_GCONF
1163 modlibexec_LTLIBRARIES += \
1164                 module-gconf.la
1165
1166 pulselibexec_PROGRAMS += \
1167                 gconf-helper
1168 endif
1169
1170 if HAVE_WAVEOUT
1171 modlibexec_LTLIBRARIES += \
1172                 module-waveout.la
1173 endif
1174
1175 if HAVE_HAL
1176 modlibexec_LTLIBRARIES += \
1177                 module-hal-detect.la
1178 endif
1179
1180 if HAVE_HAL_COMPAT
1181 modlibexec_LTLIBRARIES += \
1182                 module-hal-detect.la
1183 endif
1184
1185 if HAVE_UDEV
1186 modlibexec_LTLIBRARIES += \
1187                 module-udev-detect.la
1188 endif
1189
1190 if HAVE_DBUS
1191 modlibexec_LTLIBRARIES += \
1192                 module-rygel-media-server.la \
1193                 module-dbus-protocol.la
1194 endif
1195
1196 if HAVE_BLUEZ
1197 modlibexec_LTLIBRARIES += \
1198                 libbluetooth-util.la \
1199                 module-bluetooth-proximity.la \
1200                 module-bluetooth-discover.la \
1201                 libbluetooth-ipc.la \
1202                 libbluetooth-sbc.la \
1203                 module-bluetooth-device.la
1204
1205 pulselibexec_PROGRAMS += \
1206                 proximity-helper
1207 endif
1208
1209 if HAVE_OPENSSL
1210 modlibexec_LTLIBRARIES += \
1211                 libraop.la \
1212                 module-raop-sink.la
1213 if HAVE_AVAHI
1214 modlibexec_LTLIBRARIES += \
1215                 module-raop-discover.la
1216 endif
1217 endif
1218
1219 if HAVE_DBUS
1220 if HAVE_FFTW
1221 modlibexec_LTLIBRARIES += \
1222                 module-equalizer-sink.la
1223 bin_SCRIPTS += utils/qpaeq
1224 endif
1225 endif
1226
1227 # These are generated by an M4 script
1228 SYMDEF_FILES = \
1229                 module-cli-symdef.h \
1230                 module-cli-protocol-tcp-symdef.h \
1231                 module-cli-protocol-unix-symdef.h \
1232                 module-pipe-sink-symdef.h \
1233                 module-pipe-source-symdef.h \
1234                 module-simple-protocol-tcp-symdef.h \
1235                 module-simple-protocol-unix-symdef.h \
1236                 module-esound-protocol-tcp-symdef.h \
1237                 module-esound-protocol-unix-symdef.h \
1238                 module-native-protocol-tcp-symdef.h \
1239                 module-native-protocol-unix-symdef.h \
1240                 module-native-protocol-fd-symdef.h \
1241                 module-sine-symdef.h \
1242                 module-combine-symdef.h \
1243                 module-combine-sink-symdef.h \
1244                 module-remap-sink-symdef.h \
1245                 module-ladspa-sink-symdef.h \
1246                 module-equalizer-sink-symdef.h \
1247                 module-esound-compat-spawnfd-symdef.h \
1248                 module-esound-compat-spawnpid-symdef.h \
1249                 module-match-symdef.h \
1250                 module-tunnel-sink-symdef.h \
1251                 module-tunnel-source-symdef.h \
1252                 module-null-sink-symdef.h \
1253                 module-null-source-symdef.h \
1254                 module-sine-source-symdef.h \
1255                 module-esound-sink-symdef.h \
1256                 module-zeroconf-publish-symdef.h \
1257                 module-zeroconf-discover-symdef.h \
1258                 module-bonjour-publish-symdef.h \
1259                 module-lirc-symdef.h \
1260                 module-mmkbd-evdev-symdef.h \
1261                 module-http-protocol-tcp-symdef.h \
1262                 module-http-protocol-unix-symdef.h \
1263                 module-rygel-media-server-symdef.h \
1264                 module-x11-bell-symdef.h \
1265                 module-x11-publish-symdef.h \
1266                 module-x11-xsmp-symdef.h \
1267                 module-x11-cork-request-symdef.h \
1268                 module-oss-symdef.h \
1269                 module-alsa-sink-symdef.h \
1270                 module-alsa-source-symdef.h \
1271                 module-alsa-card-symdef.h \
1272                 module-coreaudio-detect-symdef.h \
1273                 module-coreaudio-device-symdef.h \
1274                 module-solaris-symdef.h \
1275                 module-waveout-symdef.h \
1276                 module-detect-symdef.h \
1277                 module-rtp-send-symdef.h \
1278                 module-rtp-recv-symdef.h \
1279                 module-jackdbus-detect-symdef.h \
1280                 module-jack-sink-symdef.h \
1281                 module-jack-source-symdef.h \
1282                 module-volume-restore-symdef.h \
1283                 module-device-manager-symdef.h \
1284                 module-device-restore-symdef.h \
1285                 module-stream-restore-symdef.h \
1286                 module-card-restore-symdef.h \
1287                 module-default-device-restore-symdef.h \
1288                 module-always-sink-symdef.h \
1289                 module-rescue-streams-symdef.h \
1290                 module-intended-roles-symdef.h \
1291                 module-suspend-on-idle-symdef.h \
1292                 module-echo-cancel-symdef.h \
1293                 module-hal-detect-symdef.h \
1294                 module-udev-detect-symdef.h \
1295                 module-bluetooth-proximity-symdef.h \
1296                 module-bluetooth-discover-symdef.h \
1297                 module-bluetooth-device-symdef.h \
1298                 module-raop-sink-symdef.h \
1299                 module-raop-discover-symdef.h \
1300                 module-gconf-symdef.h \
1301                 module-position-event-sounds-symdef.h \
1302                 module-augment-properties-symdef.h \
1303                 module-role-cork-symdef.h \
1304                 module-console-kit-symdef.h \
1305                 module-dbus-protocol-symdef.h \
1306                 module-loopback-symdef.h \
1307                 module-virtual-sink-symdef.h \
1308                 module-virtual-source-symdef.h \
1309                 module-switch-on-connect-symdef.h \
1310                 module-filter-apply-symdef.h \
1311                 module-filter-heuristics-symdef.h
1312
1313 EXTRA_DIST += $(SYMDEF_FILES)
1314 BUILT_SOURCES += $(SYMDEF_FILES) builddirs
1315
1316 $(SYMDEF_FILES): modules/module-defs.h.m4
1317         $(AM_V_at)$(MKDIR_P) modules
1318         $(AM_V_GEN)$(M4) -Dfname="$@" $< > $@
1319
1320 .PHONY: builddirs
1321 builddirs:
1322         $(AM_V_at)$(MKDIR_P) daemon modules
1323
1324 # Simple protocol
1325
1326 module_simple_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c
1327 module_simple_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_SIMPLE $(AM_CFLAGS)
1328 module_simple_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS)
1329 module_simple_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-simple.la
1330
1331 module_simple_protocol_unix_la_SOURCES = modules/module-protocol-stub.c
1332 module_simple_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_SIMPLE $(AM_CFLAGS)
1333 module_simple_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS)
1334 module_simple_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-simple.la
1335
1336 # CLI protocol
1337
1338 module_cli_la_SOURCES = modules/module-cli.c
1339 module_cli_la_LDFLAGS = $(MODULE_LDFLAGS)
1340 module_cli_la_LIBADD = $(MODULE_LIBADD) libcli.la
1341
1342 module_cli_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c
1343 module_cli_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS)
1344 module_cli_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS)
1345 module_cli_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-cli.la
1346
1347 module_cli_protocol_unix_la_SOURCES = modules/module-protocol-stub.c
1348 module_cli_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS)
1349 module_cli_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS)
1350 module_cli_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-cli.la
1351
1352 # HTTP protocol
1353
1354 module_http_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c
1355 module_http_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_HTTP $(AM_CFLAGS)
1356 module_http_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS)
1357 module_http_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-http.la
1358
1359 module_http_protocol_unix_la_SOURCES = modules/module-protocol-stub.c
1360 module_http_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_HTTP $(AM_CFLAGS)
1361 module_http_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS)
1362 module_http_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-http.la
1363
1364 # D-Bus protocol
1365
1366 module_dbus_protocol_la_SOURCES = \
1367                 modules/dbus/iface-card.c modules/dbus/iface-card.h \
1368                 modules/dbus/iface-card-profile.c modules/dbus/iface-card-profile.h \
1369                 modules/dbus/iface-client.c modules/dbus/iface-client.h \
1370                 modules/dbus/iface-core.c modules/dbus/iface-core.h \
1371                 modules/dbus/iface-device.c modules/dbus/iface-device.h \
1372                 modules/dbus/iface-device-port.c modules/dbus/iface-device-port.h \
1373                 modules/dbus/iface-memstats.c modules/dbus/iface-memstats.h \
1374                 modules/dbus/iface-module.c modules/dbus/iface-module.h \
1375                 modules/dbus/iface-sample.c modules/dbus/iface-sample.h \
1376                 modules/dbus/iface-stream.c modules/dbus/iface-stream.h \
1377                 modules/dbus/module-dbus-protocol.c
1378 module_dbus_protocol_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1379 module_dbus_protocol_la_LDFLAGS = $(MODULE_LDFLAGS)
1380 module_dbus_protocol_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS)
1381
1382 # Native protocol
1383
1384 module_native_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c
1385 module_native_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_NATIVE $(AM_CFLAGS)
1386 module_native_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS)
1387 module_native_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la
1388
1389 module_native_protocol_unix_la_SOURCES = modules/module-protocol-stub.c
1390 module_native_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_NATIVE $(AM_CFLAGS)
1391 module_native_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS)
1392 module_native_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la
1393
1394 module_native_protocol_fd_la_SOURCES = modules/module-native-protocol-fd.c
1395 module_native_protocol_fd_la_CFLAGS = $(AM_CFLAGS)
1396 module_native_protocol_fd_la_LDFLAGS = $(MODULE_LDFLAGS)
1397 module_native_protocol_fd_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la
1398
1399 # EsounD protocol
1400
1401 module_esound_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c
1402 module_esound_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS)
1403 module_esound_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS)
1404 module_esound_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-esound.la
1405
1406 module_esound_protocol_unix_la_SOURCES = modules/module-protocol-stub.c
1407 module_esound_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS)
1408 module_esound_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS)
1409 module_esound_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-esound.la
1410
1411 module_esound_compat_spawnfd_la_SOURCES = modules/module-esound-compat-spawnfd.c
1412 module_esound_compat_spawnfd_la_LDFLAGS = $(MODULE_LDFLAGS)
1413 module_esound_compat_spawnfd_la_LIBADD = $(MODULE_LIBADD)
1414
1415 module_esound_compat_spawnpid_la_SOURCES = modules/module-esound-compat-spawnpid.c
1416 module_esound_compat_spawnpid_la_LDFLAGS = $(MODULE_LDFLAGS)
1417 module_esound_compat_spawnpid_la_LIBADD = $(MODULE_LIBADD)
1418
1419 module_esound_sink_la_SOURCES = modules/module-esound-sink.c
1420 module_esound_sink_la_LDFLAGS = $(MODULE_LDFLAGS) $(WINSOCK_LIBS)
1421 module_esound_sink_la_LIBADD = $(MODULE_LIBADD)
1422
1423 # Pipes
1424
1425 module_pipe_sink_la_SOURCES = modules/module-pipe-sink.c
1426 module_pipe_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1427 module_pipe_sink_la_LIBADD = $(MODULE_LIBADD)
1428
1429 module_pipe_source_la_SOURCES = modules/module-pipe-source.c
1430 module_pipe_source_la_LDFLAGS = $(MODULE_LDFLAGS)
1431 module_pipe_source_la_LIBADD = $(MODULE_LIBADD)
1432
1433 # Fake sources/sinks
1434
1435 module_sine_la_SOURCES = modules/module-sine.c
1436 module_sine_la_LDFLAGS = $(MODULE_LDFLAGS)
1437 module_sine_la_LIBADD = $(MODULE_LIBADD)
1438
1439 module_null_sink_la_SOURCES = modules/module-null-sink.c
1440 module_null_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1441 module_null_sink_la_LIBADD = $(MODULE_LIBADD)
1442
1443 module_null_source_la_SOURCES = modules/module-null-source.c
1444 module_null_source_la_LDFLAGS = $(MODULE_LDFLAGS)
1445 module_null_source_la_LIBADD = $(MODULE_LIBADD)
1446
1447 module_sine_source_la_SOURCES = modules/module-sine-source.c
1448 module_sine_source_la_LDFLAGS = $(MODULE_LDFLAGS)
1449 module_sine_source_la_LIBADD = $(MODULE_LIBADD)
1450
1451 # Couplings
1452
1453 module_combine_la_SOURCES = modules/module-combine.c
1454 module_combine_la_LDFLAGS = $(MODULE_LDFLAGS)
1455 module_combine_la_LIBADD = $(MODULE_LIBADD)
1456
1457 module_combine_sink_la_SOURCES = modules/module-combine-sink.c
1458 module_combine_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1459 module_combine_sink_la_LIBADD = $(MODULE_LIBADD)
1460
1461 module_switch_on_connect_la_SOURCES = modules/module-switch-on-connect.c
1462 module_switch_on_connect_la_LDFLAGS = $(MODULE_LDFLAGS)
1463 module_switch_on_connect_la_LIBADD = $(MODULE_LIBADD)
1464
1465 module_filter_apply_la_SOURCES = modules/module-filter-apply.c
1466 module_filter_apply_la_LDFLAGS = $(MODULE_LDFLAGS)
1467 module_filter_apply_la_LIBADD = $(MODULE_LIBADD)
1468
1469 module_filter_heuristics_la_SOURCES = modules/module-filter-heuristics.c
1470 module_filter_heuristics_la_LDFLAGS = $(MODULE_LDFLAGS)
1471 module_filter_heuristics_la_LIBADD = $(MODULE_LIBADD)
1472
1473 module_remap_sink_la_SOURCES = modules/module-remap-sink.c
1474 module_remap_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1475 module_remap_sink_la_LIBADD = $(MODULE_LIBADD)
1476
1477 module_ladspa_sink_la_SOURCES = modules/module-ladspa-sink.c modules/ladspa.h
1478 module_ladspa_sink_la_CFLAGS = -DLADSPA_PATH=\"$(libdir)/ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/local/lib64/ladspa:/usr/lib64/ladspa\" $(AM_CFLAGS)
1479 module_ladspa_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1480 module_ladspa_sink_la_LIBADD = $(MODULE_LIBADD) $(LIBLTDL)
1481
1482 module_equalizer_sink_la_SOURCES = modules/module-equalizer-sink.c
1483 module_equalizer_sink_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(DBUS_CFLAGS) $(FFTW_CFLAGS)
1484 module_equalizer_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1485 module_equalizer_sink_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) $(FFTW_LIBS)
1486
1487 module_match_la_SOURCES = modules/module-match.c
1488 module_match_la_LDFLAGS = $(MODULE_LDFLAGS)
1489 module_match_la_LIBADD = $(MODULE_LIBADD)
1490
1491 module_tunnel_sink_la_SOURCES = modules/module-tunnel.c
1492 module_tunnel_sink_la_CFLAGS = -DTUNNEL_SINK=1 $(AM_CFLAGS)
1493 module_tunnel_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1494 module_tunnel_sink_la_LIBADD = $(MODULE_LIBADD)
1495
1496 module_tunnel_source_la_SOURCES = modules/module-tunnel.c
1497 module_tunnel_source_la_LDFLAGS = $(MODULE_LDFLAGS)
1498 module_tunnel_source_la_LIBADD = $(MODULE_LIBADD)
1499
1500 module_loopback_la_SOURCES = modules/module-loopback.c
1501 module_loopback_la_LDFLAGS = $(MODULE_LDFLAGS)
1502 module_loopback_la_LIBADD = $(MODULE_LIBADD)
1503
1504 module_virtual_sink_la_SOURCES = modules/module-virtual-sink.c
1505 module_virtual_sink_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS)
1506 module_virtual_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1507 module_virtual_sink_la_LIBADD = $(MODULE_LIBADD)
1508
1509 module_virtual_source_la_SOURCES = modules/module-virtual-source.c
1510 module_virtual_source_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS)
1511 module_virtual_source_la_LDFLAGS = $(MODULE_LDFLAGS)
1512 module_virtual_source_la_LIBADD = $(MODULE_LIBADD)
1513
1514 # X11
1515
1516 module_x11_bell_la_SOURCES = modules/x11/module-x11-bell.c
1517 module_x11_bell_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
1518 module_x11_bell_la_LDFLAGS = $(MODULE_LDFLAGS)
1519 module_x11_bell_la_LIBADD = $(MODULE_LIBADD) $(X11_LIBS)
1520
1521 module_x11_publish_la_SOURCES = modules/x11/module-x11-publish.c
1522 module_x11_publish_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
1523 module_x11_publish_la_LDFLAGS = $(MODULE_LDFLAGS)
1524 module_x11_publish_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la $(X11_LIBS)
1525
1526 module_x11_xsmp_la_SOURCES = modules/x11/module-x11-xsmp.c
1527 module_x11_xsmp_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
1528 module_x11_xsmp_la_LDFLAGS = $(MODULE_LDFLAGS)
1529 module_x11_xsmp_la_LIBADD = $(MODULE_LIBADD) $(X11_LIBS)
1530
1531 module_x11_cork_request_la_SOURCES = modules/x11/module-x11-cork-request.c
1532 module_x11_cork_request_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
1533 module_x11_cork_request_la_LDFLAGS = $(MODULE_LDFLAGS)
1534 module_x11_cork_request_la_LIBADD = $(MODULE_LIBADD) $(X11_LIBS)
1535
1536 # OSS
1537
1538 liboss_util_la_SOURCES = modules/oss/oss-util.c modules/oss/oss-util.h
1539 liboss_util_la_LDFLAGS = -avoid-version
1540 liboss_util_la_LIBADD = $(MODULE_LIBADD)
1541
1542 module_oss_la_SOURCES = modules/oss/module-oss.c
1543 module_oss_la_LDFLAGS = $(MODULE_LDFLAGS)
1544 module_oss_la_LIBADD = $(MODULE_LIBADD) liboss-util.la
1545
1546 # COREAUDIO
1547
1548 module_coreaudio_detect_la_SOURCES = modules/macosx/module-coreaudio-detect.c
1549 module_coreaudio_detect_la_LDFLAGS = $(MODULE_LDFLAGS) \
1550                 -Wl,-framework -Wl,Cocoa -framework CoreAudio \
1551                 -Wl,-framework -Wl,AudioUnit -framework AudioUnit
1552 module_coreaudio_detect_la_LIBADD = $(MODULE_LIBADD)
1553
1554 module_coreaudio_device_la_SOURCES = modules/macosx/module-coreaudio-device.c
1555 module_coreaudio_device_la_LDFLAGS = $(MODULE_LDFLAGS) \
1556                 -Wl,-framework -Wl,Cocoa -framework CoreAudio \
1557                 -Wl,-framework -Wl,AudioUnit -framework AudioUnit
1558 module_coreaudio_device_la_LIBADD = $(MODULE_LIBADD)
1559
1560 # ALSA
1561
1562 libalsa_util_la_SOURCES = \
1563                 modules/alsa/alsa-util.c modules/alsa/alsa-util.h \
1564                 modules/alsa/alsa-mixer.c modules/alsa/alsa-mixer.h \
1565                 modules/alsa/alsa-sink.c modules/alsa/alsa-sink.h \
1566                 modules/alsa/alsa-source.c modules/alsa/alsa-source.h \
1567                 modules/reserve-wrap.c modules/reserve-wrap.h
1568 libalsa_util_la_LDFLAGS = -avoid-version
1569 libalsa_util_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS)
1570 libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(ASOUNDLIB_CFLAGS)
1571
1572 if HAVE_HAL
1573 libalsa_util_la_SOURCES += modules/hal-util.h modules/hal-util.c
1574 libalsa_util_la_LIBADD += $(HAL_LIBS)
1575 libalsa_util_la_CFLAGS += $(HAL_CFLAGS)
1576 endif
1577
1578 if HAVE_UDEV
1579 libalsa_util_la_SOURCES += modules/udev-util.h modules/udev-util.c
1580 libalsa_util_la_LIBADD += $(UDEV_LIBS)
1581 libalsa_util_la_CFLAGS += $(UDEV_CFLAGS)
1582 endif
1583
1584 if HAVE_DBUS
1585 libalsa_util_la_SOURCES += modules/reserve.h modules/reserve.c modules/reserve-monitor.h modules/reserve-monitor.c
1586 libalsa_util_la_LIBADD += $(DBUS_LIBS)
1587 libalsa_util_la_CFLAGS += $(DBUS_CFLAGS)
1588 endif
1589
1590 module_alsa_sink_la_SOURCES = modules/alsa/module-alsa-sink.c
1591 module_alsa_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1592 module_alsa_sink_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la
1593 module_alsa_sink_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
1594
1595 module_alsa_source_la_SOURCES = modules/alsa/module-alsa-source.c
1596 module_alsa_source_la_LDFLAGS = $(MODULE_LDFLAGS)
1597 module_alsa_source_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la
1598 module_alsa_source_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
1599
1600 module_alsa_card_la_SOURCES = modules/alsa/module-alsa-card.c
1601 module_alsa_card_la_LDFLAGS = $(MODULE_LDFLAGS)
1602 module_alsa_card_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la
1603 module_alsa_card_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
1604
1605 # Solaris
1606
1607 module_solaris_la_SOURCES = modules/module-solaris.c
1608 module_solaris_la_LDFLAGS = $(MODULE_LDFLAGS)
1609 module_solaris_la_LIBADD = $(MODULE_LIBADD)
1610
1611 # Avahi
1612
1613 module_zeroconf_publish_la_SOURCES = modules/module-zeroconf-publish.c
1614 module_zeroconf_publish_la_LDFLAGS = $(MODULE_LDFLAGS)
1615 module_zeroconf_publish_la_LIBADD = $(MODULE_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la libprotocol-native.la
1616 module_zeroconf_publish_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
1617
1618 module_zeroconf_discover_la_SOURCES = modules/module-zeroconf-discover.c
1619 module_zeroconf_discover_la_LDFLAGS = $(MODULE_LDFLAGS)
1620 module_zeroconf_discover_la_LIBADD = $(MODULE_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la
1621 module_zeroconf_discover_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
1622
1623 # Bonjour
1624
1625 module_bonjour_publish_la_SOURCES = modules/macosx/module-bonjour-publish.c
1626 module_bonjour_publish_la_LDFLAGS = $(MODULE_LDFLAGS) \
1627                         -Wl,-framework -Wl,CoreFoundation -framework CoreFoundation
1628 module_bonjour_publish_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la
1629
1630 # LIRC
1631
1632 module_lirc_la_SOURCES = modules/module-lirc.c
1633 module_lirc_la_LDFLAGS = $(MODULE_LDFLAGS)
1634 module_lirc_la_LIBADD = $(MODULE_LIBADD) $(LIRC_LIBS)
1635 module_lirc_la_CFLAGS = $(AM_CFLAGS) $(LIRC_CFLAGS)
1636
1637 # Linux evdev
1638
1639 module_mmkbd_evdev_la_SOURCES = modules/module-mmkbd-evdev.c
1640 module_mmkbd_evdev_la_LDFLAGS = $(MODULE_LDFLAGS)
1641 module_mmkbd_evdev_la_LIBADD = $(MODULE_LIBADD)
1642 module_mmkbd_evdev_la_CFLAGS = $(AM_CFLAGS)
1643
1644 # Windows waveout
1645 module_waveout_la_SOURCES = modules/module-waveout.c
1646 module_waveout_la_LDFLAGS = $(MODULE_LDFLAGS)
1647 module_waveout_la_LIBADD = $(MODULE_LIBADD) -lwinmm
1648 module_waveout_la_CFLAGS = $(AM_CFLAGS)
1649
1650 # Hardware autodetection module
1651 module_detect_la_SOURCES = modules/module-detect.c
1652 module_detect_la_LDFLAGS = $(MODULE_LDFLAGS)
1653 module_detect_la_LIBADD = $(MODULE_LIBADD)
1654 module_detect_la_CFLAGS = $(AM_CFLAGS)
1655
1656 # Volume restore module
1657 module_volume_restore_la_SOURCES = modules/module-volume-restore.c
1658 module_volume_restore_la_LDFLAGS = $(MODULE_LDFLAGS)
1659 module_volume_restore_la_LIBADD = $(MODULE_LIBADD)
1660 module_volume_restore_la_CFLAGS = $(AM_CFLAGS)
1661
1662 # Position event sounds in space
1663 module_position_event_sounds_la_SOURCES = modules/module-position-event-sounds.c
1664 module_position_event_sounds_la_LDFLAGS = $(MODULE_LDFLAGS)
1665 module_position_event_sounds_la_LIBADD = $(MODULE_LIBADD)
1666 module_position_event_sounds_la_CFLAGS = $(AM_CFLAGS)
1667
1668 # Augment properties from XDG .desktop files
1669 module_augment_properties_la_SOURCES = modules/module-augment-properties.c
1670 module_augment_properties_la_LDFLAGS = $(MODULE_LDFLAGS)
1671 module_augment_properties_la_LIBADD = $(MODULE_LIBADD)
1672 #module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"$(datadir)/applications\"
1673 module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"/usr/share/applications\"
1674
1675 # Cork certain streams while others are active (e.g. cork music when phone streams appear)
1676 module_role_cork_la_SOURCES = modules/module-role-cork.c
1677 module_role_cork_la_LDFLAGS = $(MODULE_LDFLAGS)
1678 module_role_cork_la_LIBADD = $(MODULE_LIBADD)
1679 module_role_cork_la_CFLAGS = $(AM_CFLAGS)
1680
1681 # Device description restore module
1682 module_device_manager_la_SOURCES = modules/module-device-manager.c
1683 module_device_manager_la_LDFLAGS = $(MODULE_LDFLAGS)
1684 module_device_manager_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la
1685 module_device_manager_la_CFLAGS = $(AM_CFLAGS)
1686
1687 # Device volume/muted restore module
1688 module_device_restore_la_SOURCES = modules/module-device-restore.c
1689 module_device_restore_la_LDFLAGS = $(MODULE_LDFLAGS)
1690 module_device_restore_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la
1691 module_device_restore_la_CFLAGS = $(AM_CFLAGS)
1692
1693 if HAVE_DBUS
1694 module_device_restore_la_LIBADD += $(DBUS_LIBS)
1695 module_device_restore_la_CFLAGS += $(DBUS_CFLAGS)
1696 endif
1697
1698 # Stream volume/muted/device restore module
1699 module_stream_restore_la_SOURCES = modules/module-stream-restore.c
1700 module_stream_restore_la_LDFLAGS = $(MODULE_LDFLAGS)
1701 module_stream_restore_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la
1702 module_stream_restore_la_CFLAGS = $(AM_CFLAGS)
1703
1704 if HAVE_DBUS
1705 module_stream_restore_la_LIBADD += $(DBUS_LIBS)
1706 module_stream_restore_la_CFLAGS += $(DBUS_CFLAGS)
1707 endif
1708
1709 # Card profile restore module
1710 module_card_restore_la_SOURCES = modules/module-card-restore.c
1711 module_card_restore_la_LDFLAGS = $(MODULE_LDFLAGS)
1712 module_card_restore_la_LIBADD = $(MODULE_LIBADD)
1713 module_card_restore_la_CFLAGS = $(AM_CFLAGS)
1714
1715 # Default sink/source restore module
1716 module_default_device_restore_la_SOURCES = modules/module-default-device-restore.c
1717 module_default_device_restore_la_LDFLAGS = $(MODULE_LDFLAGS)
1718 module_default_device_restore_la_LIBADD = $(MODULE_LIBADD)
1719 module_default_device_restore_la_CFLAGS = $(AM_CFLAGS)
1720
1721 # Always Sink module
1722 module_always_sink_la_SOURCES = modules/module-always-sink.c
1723 module_always_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1724 module_always_sink_la_LIBADD = $(MODULE_LIBADD)
1725 module_always_sink_la_CFLAGS = $(AM_CFLAGS)
1726
1727 # Rescue streams module
1728 module_rescue_streams_la_SOURCES = modules/module-rescue-streams.c
1729 module_rescue_streams_la_LDFLAGS = $(MODULE_LDFLAGS)
1730 module_rescue_streams_la_LIBADD = $(MODULE_LIBADD)
1731 module_rescue_streams_la_CFLAGS = $(AM_CFLAGS)
1732
1733 # Automatically move streams to devices that are intended for their roles
1734 module_intended_roles_la_SOURCES = modules/module-intended-roles.c
1735 module_intended_roles_la_LDFLAGS = $(MODULE_LDFLAGS)
1736 module_intended_roles_la_LIBADD = $(MODULE_LIBADD)
1737 module_intended_roles_la_CFLAGS = $(AM_CFLAGS)
1738
1739 # Suspend-on-idle module
1740 module_suspend_on_idle_la_SOURCES = modules/module-suspend-on-idle.c
1741 module_suspend_on_idle_la_LDFLAGS = $(MODULE_LDFLAGS)
1742 module_suspend_on_idle_la_LIBADD = $(MODULE_LIBADD)
1743 module_suspend_on_idle_la_CFLAGS = $(AM_CFLAGS)
1744
1745 # echo-cancel module
1746 module_echo_cancel_la_SOURCES = \
1747                 modules/echo-cancel/module-echo-cancel.c modules/echo-cancel/echo-cancel.h \
1748                 modules/echo-cancel/speex.c \
1749                 modules/echo-cancel/adrian-aec.c modules/echo-cancel/adrian-aec.h \
1750                 modules/echo-cancel/adrian.c modules/echo-cancel/adrian.h
1751 module_echo_cancel_la_LDFLAGS = $(MODULE_LDFLAGS)
1752 module_echo_cancel_la_LIBADD = $(MODULE_LIBADD) $(LIBSPEEX_LIBS)
1753 module_echo_cancel_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(LIBSPEEX_CFLAGS)
1754 if HAVE_ORC
1755 ORC_SOURCE += modules/echo-cancel/adrian-aec
1756 nodist_module_echo_cancel_la_SOURCES = \
1757                 modules/echo-cancel/adrian-aec-orc-gen.c \
1758                 modules/echo-cancel/adrian-aec-orc-gen.h
1759 module_echo_cancel_la_LIBADD += $(ORC_LIBS)
1760 module_echo_cancel_la_CFLAGS += $(ORC_CFLAGS) -I$(top_builddir)/src/modules/echo-cancel
1761 endif
1762 if HAVE_WEBRTC
1763 module_echo_cancel_la_SOURCES += modules/echo-cancel/webrtc.cc
1764 module_echo_cancel_la_CFLAGS += -DHAVE_WEBRTC=1
1765 module_echo_cancel_la_CXXFLAGS = $(AM_CXXFLAGS) $(SERVER_CFLAGS) $(WEBRTC_CFLAGS) -DHAVE_WEBRTC=1
1766 module_echo_cancel_la_LIBADD += $(WEBRTC_LIBS)
1767 endif
1768
1769 # RTP modules
1770 module_rtp_send_la_SOURCES = modules/rtp/module-rtp-send.c
1771 module_rtp_send_la_LDFLAGS = $(MODULE_LDFLAGS)
1772 module_rtp_send_la_LIBADD = $(MODULE_LIBADD) librtp.la
1773 module_rtp_send_la_CFLAGS = $(AM_CFLAGS)
1774
1775 module_rtp_recv_la_SOURCES = modules/rtp/module-rtp-recv.c
1776 module_rtp_recv_la_LDFLAGS = $(MODULE_LDFLAGS)
1777 module_rtp_recv_la_LIBADD = $(MODULE_LIBADD) librtp.la
1778 module_rtp_recv_la_CFLAGS = $(AM_CFLAGS)
1779
1780 # JACK
1781
1782 module_jackdbus_detect_la_SOURCES = modules/jack/module-jackdbus-detect.c
1783 module_jackdbus_detect_la_LDFLAGS = $(MODULE_LDFLAGS)
1784 module_jackdbus_detect_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) $(JACK_LIBS)
1785 module_jackdbus_detect_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) $(JACK_CFLAGS)
1786
1787 module_jack_sink_la_SOURCES = modules/jack/module-jack-sink.c
1788 module_jack_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1789 module_jack_sink_la_LIBADD = $(MODULE_LIBADD) $(JACK_LIBS)
1790 module_jack_sink_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS)
1791
1792 module_jack_source_la_SOURCES = modules/jack/module-jack-source.c
1793 module_jack_source_la_LDFLAGS = $(MODULE_LDFLAGS)
1794 module_jack_source_la_LIBADD = $(MODULE_LIBADD) $(JACK_LIBS)
1795 module_jack_source_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS)
1796
1797 if HAVE_HAL_COMPAT
1798 module_hal_detect_la_SOURCES = modules/module-hal-detect-compat.c
1799 module_hal_detect_la_LIBADD = $(MODULE_LIBADD)
1800 module_hal_detect_la_CFLAGS = $(AM_CFLAGS)
1801 else
1802 module_hal_detect_la_SOURCES = modules/module-hal-detect.c
1803 module_hal_detect_la_LIBADD = $(MODULE_LIBADD) $(HAL_LIBS)
1804 module_hal_detect_la_CFLAGS = $(AM_CFLAGS) $(HAL_CFLAGS)
1805 endif
1806 module_hal_detect_la_LDFLAGS = $(MODULE_LDFLAGS)
1807
1808 module_udev_detect_la_SOURCES = modules/module-udev-detect.c
1809 module_udev_detect_la_LDFLAGS = $(MODULE_LDFLAGS)
1810 module_udev_detect_la_LIBADD = $(MODULE_LIBADD) $(UDEV_LIBS)
1811 module_udev_detect_la_CFLAGS = $(AM_CFLAGS) $(UDEV_CFLAGS)
1812
1813 module_console_kit_la_SOURCES = modules/module-console-kit.c
1814 module_console_kit_la_LDFLAGS = $(MODULE_LDFLAGS)
1815 module_console_kit_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS)
1816 module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1817
1818 # GConf support
1819 module_gconf_la_SOURCES = modules/gconf/module-gconf.c
1820 module_gconf_la_LDFLAGS = $(MODULE_LDFLAGS)
1821 module_gconf_la_LIBADD = $(MODULE_LIBADD)
1822 module_gconf_la_CFLAGS = $(AM_CFLAGS) -DPA_GCONF_HELPER=\"$(pulselibexecdir)/gconf-helper\"
1823
1824 gconf_helper_SOURCES = modules/gconf/gconf-helper.c
1825 gconf_helper_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la $(GCONF_LIBS)
1826 gconf_helper_CFLAGS = $(AM_CFLAGS) $(GCONF_CFLAGS)
1827 gconf_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
1828
1829 # Bluetooth proximity
1830 module_bluetooth_proximity_la_SOURCES = modules/bluetooth/module-bluetooth-proximity.c
1831 module_bluetooth_proximity_la_LDFLAGS = $(MODULE_LDFLAGS)
1832 module_bluetooth_proximity_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS)
1833 module_bluetooth_proximity_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -DPA_BT_PROXIMITY_HELPER=\"$(pulselibexecdir)/proximity-helper\"
1834
1835 proximity_helper_SOURCES = modules/bluetooth/proximity-helper.c
1836 proximity_helper_LDADD = $(AM_LDADD) $(BLUEZ_LIBS)
1837 proximity_helper_CFLAGS = $(AM_CFLAGS) $(BLUEZ_CFLAGS)
1838 proximity_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
1839
1840 # Bluetooth sink / source
1841 module_bluetooth_discover_la_SOURCES = modules/bluetooth/module-bluetooth-discover.c
1842 module_bluetooth_discover_la_LDFLAGS = $(MODULE_LDFLAGS)
1843 module_bluetooth_discover_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) libbluetooth-util.la
1844 module_bluetooth_discover_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1845
1846 libbluetooth_sbc_la_SOURCES = \
1847                 modules/bluetooth/sbc/sbc.c modules/bluetooth/sbc/sbc.h \
1848                 modules/bluetooth/sbc/sbc_primitives.c modules/bluetooth/sbc/sbc_primitives.h \
1849                 modules/bluetooth/sbc/sbc_primitives_armv6.h modules/bluetooth/sbc/sbc_primitives_armv6.c \
1850                 modules/bluetooth/sbc/sbc_primitives_iwmmxt.h modules/bluetooth/sbc/sbc_primitives_iwmmxt.c \
1851                 modules/bluetooth/sbc/sbc_primitives_mmx.c modules/bluetooth/sbc/sbc_primitives_mmx.h \
1852                 modules/bluetooth/sbc/sbc_primitives_neon.c modules/bluetooth/sbc/sbc_primitives_neon.h \
1853                 modules/bluetooth/sbc/sbc_math.h \
1854                 modules/bluetooth/sbc/sbc_tables.h
1855 libbluetooth_sbc_la_LDFLAGS = -avoid-version
1856 libbluetooth_sbc_la_LIBADD = $(MODULE_LIBADD)
1857 libbluetooth_sbc_la_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/src/modules/bluetooth/sbc
1858 BLUETOOTH_SBC_FILES = $(subst modules/bluetooth/,,$(libbluetooth_sbc_la_SOURCES))
1859
1860 libbluetooth_ipc_la_SOURCES = \
1861                 modules/bluetooth/a2dp-codecs.h \
1862                 modules/bluetooth/ipc.c modules/bluetooth/ipc.h
1863 libbluetooth_ipc_la_LDFLAGS = -avoid-version
1864 libbluetooth_ipc_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
1865 libbluetooth_ipc_la_CFLAGS = $(AM_CFLAGS)
1866 BLUETOOTH_IPC_FILES = $(subst modules/bluetooth/,,$(libbluetooth_ipc_la_SOURCES)) rtp.h
1867
1868 libbluetooth_util_la_SOURCES = modules/bluetooth/bluetooth-util.c modules/bluetooth/bluetooth-util.h
1869 libbluetooth_util_la_LDFLAGS = -avoid-version
1870 libbluetooth_util_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS)
1871 libbluetooth_util_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1872
1873 module_bluetooth_device_la_SOURCES = modules/bluetooth/module-bluetooth-device.c modules/bluetooth/rtp.h
1874 module_bluetooth_device_la_LDFLAGS = $(MODULE_LDFLAGS)
1875 module_bluetooth_device_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) libbluetooth-util.la libbluetooth-ipc.la libbluetooth-sbc.la
1876 module_bluetooth_device_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -I$(top_srcdir)/src/modules/bluetooth/sbc
1877
1878 # Apple Airtunes/RAOP
1879 module_raop_sink_la_SOURCES = modules/raop/module-raop-sink.c
1880 module_raop_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
1881 module_raop_sink_la_LIBADD = $(MODULE_LIBADD) librtp.la libraop.la
1882 module_raop_sink_la_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/src/modules/rtp
1883
1884 module_raop_discover_la_SOURCES = modules/raop/module-raop-discover.c
1885 module_raop_discover_la_LDFLAGS = $(MODULE_LDFLAGS)
1886 module_raop_discover_la_LIBADD = $(MODULE_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la
1887 module_raop_discover_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
1888
1889 # Rygel
1890 module_rygel_media_server_la_SOURCES = modules/module-rygel-media-server.c
1891 module_rygel_media_server_la_LDFLAGS = $(MODULE_LDFLAGS)
1892 module_rygel_media_server_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) libprotocol-http.la
1893 module_rygel_media_server_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
1894
1895 ###################################
1896 #        Some minor stuff         #
1897 ###################################
1898
1899 CLEANFILES += daemon/pulseaudio.desktop daemon/pulseaudio-kde.desktop
1900 DISTCLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11 start-pulseaudio-kde
1901
1902 if OS_IS_WIN32
1903 SYMLINK_PROGRAM=cd $(DESTDIR)$(bindir) && cp
1904 else
1905 SYMLINK_PROGRAM=ln -sf
1906 endif
1907 install-exec-hook:
1908 if HAVE_BLUEZ
1909         -chown root $(DESTDIR)$(pulselibexecdir)/proximity-helper
1910         -chmod u+s $(DESTDIR)$(pulselibexecdir)/proximity-helper
1911 endif
1912         $(SYMLINK_PROGRAM) pacat$(EXEEXT) $(DESTDIR)$(bindir)/parec$(EXEEXT)
1913         $(SYMLINK_PROGRAM) pacat$(EXEEXT) $(DESTDIR)$(bindir)/pamon$(EXEEXT)
1914         $(SYMLINK_PROGRAM) pacat$(EXEEXT) $(DESTDIR)$(bindir)/paplay$(EXEEXT)
1915         $(SYMLINK_PROGRAM) pacat$(EXEEXT) $(DESTDIR)$(bindir)/parecord$(EXEEXT)
1916         rm -f $(DESTDIR)$(libdir)/libpulsedsp.la
1917         rm -f $(DESTDIR)$(modlibexecdir)/*.la
1918
1919 uninstall-hook:
1920         rm -f $(DESTDIR)$(bindir)/parec$(EXEEXT)
1921         rm -f $(DESTDIR)$(bindir)/pamon$(EXEEXT)
1922         rm -f $(DESTDIR)$(bindir)/paplay$(EXEEXT)
1923         rm -f $(DESTDIR)$(bindir)/parecord$(EXEEXT)
1924         rm -f $(DESTDIR)$(libdir)/libpulsedsp.*
1925         rm -f $(DESTDIR)$(modlibexecdir)/*.so
1926
1927 massif: pulseaudio
1928         libtool --mode=execute valgrind --tool=massif --depth=6  --alloc-fn=pa_xmalloc --alloc-fn=pa_xmalloc0 --alloc-fn=pa_xrealloc --alloc-fn=dbus_realloc --alloc-fn=pa_xnew0_internal --alloc-fn=pa_xnew_internal ./pulseaudio
1929
1930 update-ffmpeg:
1931         wget -O pulsecore/ffmpeg/resample2.c http://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec/resample2.c?view=co
1932
1933 # We get things twice here, because sometimes gitweb will us just give a "Generating..." otherwise.
1934 update-sbc:
1935         for i in $(BLUETOOTH_SBC_FILES) ; do \
1936                 wget -O /dev/null http://git.kernel.org/\?p=bluetooth/bluez.git\;a=blob_plain\;f=$$i ; \
1937                 wget -O $(top_srcdir)/src/modules/bluetooth/$$i http://git.kernel.org/\?p=bluetooth/bluez.git\;a=blob_plain\;f=$$i ; \
1938         done
1939         for i in $(BLUETOOTH_IPC_FILES); do \
1940                 wget -O /dev/null http://git.kernel.org/\?p=bluetooth/bluez.git\;a=blob_plain\;f=audio/$$i ; \
1941                 wget -O $(top_srcdir)/src/modules/bluetooth/$$i http://git.kernel.org/\?p=bluetooth/bluez.git\;a=blob_plain\;f=audio/$$i ; \
1942         done
1943
1944 update-reserve:
1945         for i in reserve.c reserve.h reserve-monitor.c reserve-monitor.h ; do \
1946                 wget -O $(top_srcdir)/src/modules/$$i http://git.0pointer.de/\?p=reserve.git\;a=blob_plain\;f=$$i\;hb=master ; \
1947         done
1948
1949 update-rtkit:
1950         for i in rtkit.c rtkit.h ; do \
1951                 wget -O $(top_srcdir)/src/pulsecore/$$i http://git.0pointer.de/\?p=rtkit.git\;a=blob_plain\;f=$$i\;hb=master ; \
1952         done
1953
1954 # Automatically generate linker version script. We use the same one for all public .sos
1955 update-map-file:
1956         ( echo "PULSE_0 {" ; \
1957           echo "global:" ; \
1958           ctags -I PA_GCC_MALLOC,PA_GCC_ALLOC_SIZE2,PA_GCC_ALLOC_SIZE,PA_GCC_PURE,PA_GCC_CONST,PA_GCC_DEPRECATED,PA_GCC_PRINTF_ATTR -f - --c-kinds=p $(pulseinclude_HEADERS) | awk '/^pa_/ { print $$1 ";" }' | sort ; \
1959           echo "local:" ;  \
1960           echo "*;" ; \
1961           echo "};" ) > $(srcdir)/map-file
1962
1963 update-all: update-ffmpeg update-sbc update-map-file
1964
1965 .PHONY: utils/padsp massif update-all update-ffmpeg update-sbc update-map-file