Makefile.am 24.4 KB
Newer Older
1
ACLOCAL_AMFLAGS = -I m4
2
AUTOMAKE_OPTIONS = foreign 1.10 dist-bzip2 subdir-objects
Warren Dukes's avatar
Warren Dukes committed
3

4
AM_CPPFLAGS += -I$(srcdir)/src $(GLIB_CFLAGS)
5

6 7
AM_CPPFLAGS += -DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"'

8 9
bin_PROGRAMS = src/mpd

10 11
noinst_LIBRARIES =

12
src_mpd_CFLAGS = $(AM_CFLAGS) $(MPD_CFLAGS)
13
src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \
14
	$(AVAHI_CFLAGS) \
15
	$(LIBWRAP_CFLAGS) \
16
	$(SQLITE_CFLAGS) \
17
	$(ARCHIVE_CFLAGS) \
18
	$(INPUT_CFLAGS) \
19
	$(TAG_CFLAGS) \
20 21
	$(DECODER_CFLAGS) \
	$(ENCODER_CFLAGS) \
22
	$(FILTER_CFLAGS) \
23
	$(OUTPUT_CFLAGS)
24
src_mpd_LDADD = $(MPD_LIBS) \
25
	$(AVAHI_LIBS) \
26
	$(LIBWRAP_LDFLAGS) \
27
	$(SQLITE_LIBS) \
28
	$(ARCHIVE_LIBS) \
29
	$(INPUT_LIBS) \
30
	$(TAG_LIBS) \
31 32
	$(DECODER_LIBS) \
	$(ENCODER_LIBS) \
33
	$(OUTPUT_LIBS) \
34
	$(FILTER_LIBS) \
35
	$(GLIB_LIBS)
36 37

mpd_headers = \
38
	src/check.h \
39 40
	src/notify.h \
	src/ack.h \
41
	src/ape.h \
42 43
	src/audio.h \
	src/audio_format.h \
44
	src/audio_check.h \
45 46 47 48 49 50 51 52 53 54 55
	src/audio_parser.h \
	src/output_internal.h \
	src/output_api.h \
	src/output_plugin.h \
	src/output_list.h \
	src/output_all.h \
	src/output_thread.h \
	src/output_control.h \
	src/output_state.h \
	src/output_print.h \
	src/output_command.h \
56
	src/filter_internal.h \
57
	src/filter_config.h \
58 59
	src/filter_plugin.h \
	src/filter_registry.h \
60
	src/filter/autoconvert_filter_plugin.h \
61
	src/filter/chain_filter_plugin.h \
62
	src/filter/convert_filter_plugin.h \
63
	src/filter/replay_gain_filter_plugin.h \
64
	src/filter/volume_filter_plugin.h \
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
	src/command.h \
	src/idle.h \
	src/cmdline.h \
	src/conf.h \
	src/crossfade.h \
	src/dbUtils.h \
	src/decoder_thread.h \
	src/decoder_control.h \
	src/decoder_plugin.h \
	src/decoder_command.h \
	src/decoder_buffer.h \
	src/decoder_api.h \
	src/decoder_plugin.h \
	src/decoder_internal.h \
	src/directory.h \
	src/directory_save.h \
	src/directory_print.h \
	src/database.h \
	src/encoder_plugin.h \
	src/encoder_list.h \
	src/encoder_api.h \
86
	src/exclude.h \
87
	src/fd_util.h \
88
	src/glib_compat.h \
89
	src/update.h \
90
	src/update_internal.h \
91 92 93
	src/inotify_source.h \
	src/inotify_queue.h \
	src/inotify_update.h \
94 95 96
	src/dirvec.h \
	src/gcc.h \
	src/decoder_list.h \
97
	src/decoder_print.h \
98
	src/decoder/flac_compat.h \
99
	src/decoder/flac_metadata.h \
100
	src/decoder/flac_pcm.h \
101 102
	src/decoder/_flac_common.h \
	src/decoder/_ogg_common.h \
103
	src/input_init.h \
104
	src/input_plugin.h \
105
	src/input_registry.h \
106
	src/input_stream.h \
107
	src/input/file_input_plugin.h \
108
	src/input/ffmpeg_input_plugin.h \
109
	src/input/curl_input_plugin.h \
110
	src/input/rewind_input_plugin.h \
111
	src/input/mms_input_plugin.h \
112
	src/text_file.h \
113
	src/text_input_stream.h \
114
	src/icy_server.h \
115 116
	src/icy_metadata.h \
	src/client.h \
117
	src/client_internal.h \
118
	src/server_socket.h \
119 120 121 122
	src/listen.h \
	src/log.h \
	src/ls.h \
	src/main.h \
123
	src/mixer_all.h \
124
	src/mixer_api.h \
125
	src/mixer_control.h \
126
	src/mixer_list.h \
127
	src/event_pipe.h \
128
	src/mixer_plugin.h \
129
	src/mixer_type.h \
130
	src/mixer/software_mixer_plugin.h \
131
	src/mixer/pulse_mixer_plugin.h \
132
	src/daemon.h \
133
	src/AudioCompress/config.h \
134
	src/AudioCompress/compress.h \
135
	src/buffer.h \
136
	src/pipe.h \
137
	src/chunk.h \
138 139
	src/path.h \
	src/mapper.h \
140
	src/open.h \
141 142
	src/output/httpd_client.h \
	src/output/httpd_internal.h \
143
	src/output/pulse_output_plugin.h \
144
	src/output/winmm_output_plugin.h \
145
	src/page.h \
146 147 148 149
	src/pcm_utils.h \
	src/pcm_convert.h \
	src/pcm_volume.h \
	src/pcm_mix.h \
150
	src/pcm_byteswap.h \
151 152 153
	src/pcm_channels.h \
	src/pcm_format.h \
	src/pcm_resample.h \
154
	src/pcm_resample_internal.h \
155
	src/pcm_dither.h \
156
	src/pcm_pack.h \
157 158 159 160 161 162 163 164 165
	src/pcm_prng.h \
	src/permission.h \
	src/player_thread.h \
	src/player_control.h \
	src/playlist.h \
	src/playlist_internal.h \
	src/playlist_print.h \
	src/playlist_save.h \
	src/playlist_state.h \
166 167
	src/playlist_plugin.h \
	src/playlist_list.h \
168
	src/playlist_mapper.h \
169
	src/playlist_any.h \
170
	src/playlist_song.h \
171
	src/playlist_queue.h \
172 173
	src/playlist_vector.h \
	src/playlist_database.h \
174
	src/playlist/extm3u_playlist_plugin.h \
175
	src/playlist/m3u_playlist_plugin.h \
Qball Cow's avatar
Qball Cow committed
176
	src/playlist/pls_playlist_plugin.h \
177
	src/playlist/xspf_playlist_plugin.h \
178
	src/playlist/asx_playlist_plugin.h \
179
	src/playlist/rss_playlist_plugin.h \
180
	src/playlist/lastfm_playlist_plugin.h \
181
	src/playlist/cue_playlist_plugin.h \
182
	src/playlist/flac_playlist_plugin.h \
183
	src/poison.h \
184
	src/riff.h \
185
	src/aiff.h \
186 187 188
	src/queue.h \
	src/queue_print.h \
	src/queue_save.h \
189
	src/refcount.h \
190
	src/replay_gain_config.h \
191
	src/replay_gain_info.h \
192
	src/replay_gain_ape.h \
193 194 195 196 197 198
	src/sig_handlers.h \
	src/song.h \
	src/song_print.h \
	src/song_save.h \
	src/song_sticker.h \
	src/songvec.h \
199
	src/socket_util.h \
200 201 202
	src/state_file.h \
	src/stats.h \
	src/sticker.h \
203
	src/sticker_print.h \
204 205 206
	src/tag.h \
	src/tag_internal.h \
	src/tag_pool.h \
207
	src/tag_table.h \
208
	src/tag_ape.h \
209
	src/tag_id3.h \
210
	src/tag_rva2.h \
211 212
	src/tag_print.h \
	src/tag_save.h \
213
	src/tokenizer.h \
214
	src/strset.h \
215
	src/uri.h \
216 217 218 219 220 221 222 223 224
	src/utils.h \
	src/volume.h \
	src/zeroconf.h src/zeroconf-internal.h \
	src/locate.h \
	src/stored_playlist.h \
	src/timer.h \
	src/archive_api.h \
	src/archive_internal.h \
	src/archive_list.h \
225
	src/archive_plugin.h \
226 227 228
	src/archive/bz2_archive_plugin.h \
	src/archive/iso9660_archive_plugin.h \
	src/archive/zzip_archive_plugin.h \
229
	src/input/archive_input_plugin.h \
Qball Cow's avatar
Qball Cow committed
230 231
	src/cue/cue_tag.h\
	src/mpd_error.h
232 233 234

src_mpd_SOURCES = \
	$(mpd_headers) \
235 236
	$(ARCHIVE_SRC) \
	$(INPUT_SRC) \
237
	$(PLAYLIST_SRC) \
238
	$(TAG_SRC) \
239 240
	$(DECODER_SRC) \
	$(ENCODER_SRC) \
241
	$(OUTPUT_API_SRC) $(OUTPUT_SRC) \
242
	$(MIXER_API_SRC) $(MIXER_SRC) \
243
	$(FILTER_SRC) \
244
	src/glib_socket.h \
245 246
	src/notify.c \
	src/audio.c \
247
	src/audio_check.c \
248
	src/audio_format.c \
249 250 251 252 253 254 255 256 257 258
	src/audio_parser.c \
	src/command.c \
	src/idle.c \
	src/cmdline.c \
	src/conf.c \
	src/crossfade.c \
	src/dbUtils.c \
	src/decoder_thread.c \
	src/decoder_control.c \
	src/decoder_api.c \
259
	src/decoder_internal.c \
260
	src/decoder_print.c \
261 262 263 264 265
	src/directory.c \
	src/directory_save.c \
	src/directory_print.c \
	src/database.c \
	src/dirvec.c \
266
	src/exclude.c \
267
	src/fd_util.c \
268 269
	src/fifo_buffer.c src/fifo_buffer.h \
	src/growing_fifo.c src/growing_fifo.h \
270
	src/filter_config.c \
271 272
	src/filter_plugin.c \
	src/filter_registry.c \
273
	src/update.c \
274 275 276
	src/update_queue.c \
	src/update_walk.c \
	src/update_remove.c \
277
	src/client.c \
278 279 280 281 282 283 284 285 286
	src/client_event.c \
	src/client_expire.c \
	src/client_global.c \
	src/client_idle.c \
	src/client_list.c \
	src/client_new.c \
	src/client_process.c \
	src/client_read.c \
	src/client_write.c \
287
	src/server_socket.c \
288 289 290 291
	src/listen.c \
	src/log.c \
	src/ls.c \
	src/main.c \
292
	src/main_win32.c \
293 294
	src/event_pipe.c \
	src/daemon.c \
295
	src/AudioCompress/compress.c \
296
	src/buffer.c \
297
	src/pipe.c \
298
	src/chunk.c \
299 300
	src/path.c \
	src/mapper.c \
301
	src/page.c \
302
	src/pcm_buffer.c src/pcm_buffer.h \
303 304 305
	src/pcm_convert.c \
	src/pcm_volume.c \
	src/pcm_mix.c \
306
	src/pcm_byteswap.c \
307
	src/pcm_channels.c \
308
	src/pcm_pack.c \
309 310
	src/pcm_format.c \
	src/pcm_resample.c \
311
	src/pcm_resample_fallback.c \
312 313 314 315 316 317 318 319 320 321
	src/pcm_dither.c \
	src/permission.c \
	src/player_thread.c \
	src/player_control.c \
	src/playlist.c \
	src/playlist_global.c \
	src/playlist_control.c \
	src/playlist_edit.c \
	src/playlist_print.c \
	src/playlist_save.c \
322
	src/playlist_mapper.c \
323
	src/playlist_any.c \
324
	src/playlist_song.c \
325
	src/playlist_state.c \
326
	src/playlist_queue.c \
327 328
	src/playlist_vector.c \
	src/playlist_database.c \
329 330 331
	src/queue.c \
	src/queue_print.c \
	src/queue_save.c \
332
	src/replay_gain_config.c \
333
	src/replay_gain_info.c \
334 335
	src/sig_handlers.c \
	src/song.c \
336
	src/song_update.c \
337 338 339
	src/song_print.c \
	src/song_save.c \
	src/songvec.c \
340
	src/socket_util.c \
341 342 343 344 345 346
	src/state_file.c \
	src/stats.c \
	src/tag.c \
	src/tag_pool.c \
	src/tag_print.c \
	src/tag_save.c \
347
	src/tokenizer.c \
348
	src/text_file.c \
349
	src/text_input_stream.c \
350
	src/strset.c \
351
	src/uri.c \
352 353 354 355 356 357
	src/utils.c \
	src/volume.c \
	src/locate.c \
	src/stored_playlist.c \
	src/timer.c

358
if ENABLE_INOTIFY
359 360 361 362 363 364
src_mpd_SOURCES += \
	src/inotify_source.c \
	src/inotify_queue.c \
	src/inotify_update.c
endif

365
if ENABLE_SQLITE
366 367 368 369
src_mpd_SOURCES += \
	src/sticker.c \
	src/sticker_print.c \
	src/song_sticker.c
370 371
endif

372 373 374 375 376
FILTER_CFLAGS = \
	$(SAMPLERATE_CFLAGS)
FILTER_LIBS = \
	$(SAMPLERATE_LIBS)

377 378 379 380 381 382
if HAVE_LIBSAMPLERATE
src_mpd_SOURCES += src/pcm_resample_libsamplerate.c
endif

# archive plugins

383
ARCHIVE_CFLAGS = \
384
	$(ISO9660_CFLAGS) \
385 386 387
	$(ZZIP_CFLAGS)

ARCHIVE_LIBS = \
388
	$(ISO9660_LIBS) \
389 390
	$(ZZIP_LIBS)

391 392
ARCHIVE_SRC =

393
if HAVE_BZ2
394
ARCHIVE_SRC += src/archive/bz2_archive_plugin.c
395 396
endif

397 398
if HAVE_ZZIP
ARCHIVE_SRC += src/archive/zzip_archive_plugin.c
399 400
endif

401 402
if HAVE_ISO9660
ARCHIVE_SRC += src/archive/iso9660_archive_plugin.c
403 404 405
endif

if ENABLE_ARCHIVE
406
ARCHIVE_SRC += \
407 408
	src/archive_api.c \
	src/archive_list.c \
409
	src/archive_plugin.c \
410
	src/input/archive_input_plugin.c
411 412 413
endif


414 415 416 417 418 419 420 421
# tag plugins

TAG_CFLAGS = \
	$(ID3TAG_CFLAGS)
TAG_LIBS = \
	$(ID3TAG_LIBS)

TAG_SRC = \
422
	src/ape.c \
423
	src/replay_gain_ape.c \
424 425 426 427
	src/tag_ape.c

if HAVE_ID3TAG
TAG_SRC += src/tag_id3.c \
428
	src/tag_rva2.c \
429 430 431
	src/riff.c src/aiff.c
endif

432 433
# decoder plugins

434
DECODER_CFLAGS = \
435
	$(VORBIS_CFLAGS) $(TREMOR_CFLAGS) \
436
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
437
	$(SNDFILE_CFLAGS) \
438 439
	$(AUDIOFILE_CFLAGS) \
	$(LIBMIKMOD_CFLAGS) \
440
	$(GME_CFLAGS) \
441 442 443
	$(SIDPLAY_CFLAGS) \
	$(FLUIDSYNTH_CFLAGS) \
	$(WILDMIDI_CFLAGS) \
444
	$(WAVPACK_CFLAGS) \
445
	$(MAD_CFLAGS) \
446
	$(MPG123_CFLAGS) \
447 448
	$(FFMPEG_CFLAGS) \
	$(CUE_CFLAGS)
449 450

DECODER_LIBS = \
451
	$(VORBIS_LIBS) $(TREMOR_LIBS) \
452
	$(FLAC_LIBS) \
453
	$(SNDFILE_LIBS) \
454
	$(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
455
	$(GME_LIBS) \
456 457 458
	$(SIDPLAY_LIBS) \
	$(FLUIDSYNTH_LIBS) \
	$(WILDMIDI_LIBS) \
459
	$(WAVPACK_LIBS) \
460
	$(MAD_LIBS) \
461
	$(MPG123_LIBS) \
462
	$(MP4FF_LIBS) \
463 464
	$(FFMPEG_LIBS) \
	$(CUE_LIBS)
465 466 467

DECODER_SRC = \
	src/decoder_buffer.c \
468
	src/decoder_plugin.c \
469 470
	src/decoder_list.c

471
if HAVE_MAD
472
DECODER_SRC += src/decoder/mad_decoder_plugin.c
473 474
endif

475 476 477 478
if HAVE_MPG123
DECODER_SRC += src/decoder/mpg123_decoder_plugin.c
endif

479
if HAVE_MPCDEC
480
DECODER_SRC += src/decoder/mpcdec_decoder_plugin.c
481 482 483
endif

if HAVE_WAVPACK
484
DECODER_SRC += src/decoder/wavpack_decoder_plugin.c
485 486 487
endif

if HAVE_FAAD
488
DECODER_SRC += src/decoder/faad_decoder_plugin.c
489 490 491
endif

if HAVE_MP4
492
DECODER_SRC += src/decoder/mp4ff_decoder_plugin.c
493 494 495
endif

if HAVE_OGG_COMMON
496
DECODER_SRC += src/decoder/_ogg_common.c
497 498 499
endif

if HAVE_FLAC_COMMON
500 501
DECODER_SRC += \
	src/decoder/flac_metadata.c \
502
	src/decoder/flac_pcm.c \
503
	src/decoder/_flac_common.c
504 505
endif

506
if ENABLE_VORBIS_DECODER
507
DECODER_SRC += src/decoder/vorbis_decoder_plugin.c
508 509 510
endif

if HAVE_FLAC
511
DECODER_SRC += src/decoder/flac_decoder_plugin.c
512 513 514
endif

if HAVE_OGGFLAC
515
DECODER_SRC += src/decoder/oggflac_decoder_plugin.c
516 517 518
endif

if HAVE_AUDIOFILE
519
DECODER_SRC += src/decoder/audiofile_decoder_plugin.c
520 521
endif

522
if ENABLE_MIKMOD_DECODER
523
DECODER_SRC += src/decoder/mikmod_decoder_plugin.c
524 525 526
endif

if HAVE_MODPLUG
527 528 529 530 531
libmodplug_decoder_plugin_a_SOURCES = src/decoder/modplug_decoder_plugin.c
libmodplug_decoder_plugin_a_CFLAGS = $(src_mpd_CFLAGS) $(MODPLUG_CFLAGS)
libmodplug_decoder_plugin_a_CPPFLAGS = $(src_mpd_CPPFLAGS)
noinst_LIBRARIES += libmodplug_decoder_plugin.a
DECODER_LIBS += libmodplug_decoder_plugin.a $(MODPLUG_LIBS)
532 533 534
endif

if ENABLE_SIDPLAY
535
DECODER_SRC += src/decoder/sidplay_decoder_plugin.cxx
536 537 538
endif

if ENABLE_FLUIDSYNTH
539
DECODER_SRC += src/decoder/fluidsynth_decoder_plugin.c
540 541 542
endif

if ENABLE_WILDMIDI
543
DECODER_SRC += src/decoder/wildmidi_decoder_plugin.c
544 545 546
endif

if HAVE_FFMPEG
547
DECODER_SRC += src/decoder/ffmpeg_decoder_plugin.c
548 549
endif

550 551 552 553
if ENABLE_SNDFILE
DECODER_SRC += src/decoder/sndfile_decoder_plugin.c
endif

554 555 556 557
if HAVE_GME
DECODER_SRC += src/decoder/gme_decoder_plugin.c
endif

558 559
# encoder plugins

560
ENCODER_CFLAGS = \
561
	$(LAME_CFLAGS) \
562
	$(TWOLAME_CFLAGS) \
563
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
564 565 566
	$(VORBISENC_CFLAGS)

ENCODER_LIBS = \
567
	$(LAME_LIBS) \
568
	$(TWOLAME_LIBS) \
569
	$(FLAC_LIBS) \
570 571 572 573
	$(VORBISENC_LIBS)

ENCODER_SRC =

574
if ENABLE_ENCODER
575
ENCODER_SRC += src/encoder_list.c
576
ENCODER_SRC += src/encoder/null_encoder.c
577

578 579 580 581
if ENABLE_WAVE_ENCODER
ENCODER_SRC += src/encoder/wave_encoder.c
endif

582
if ENABLE_VORBIS_ENCODER
583
ENCODER_SRC += src/encoder/vorbis_encoder.c
584 585 586
endif

if ENABLE_LAME_ENCODER
587
ENCODER_SRC += src/encoder/lame_encoder.c
588
endif
589 590 591 592

if ENABLE_TWOLAME_ENCODER
ENCODER_SRC += src/encoder/twolame_encoder.c
endif
593 594 595 596

if ENABLE_FLAC_ENCODER
ENCODER_SRC += src/encoder/flac_encoder.c
endif
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611
endif


if HAVE_ZEROCONF
src_mpd_SOURCES += src/zeroconf.c

if HAVE_AVAHI
src_mpd_SOURCES += src/zeroconf-avahi.c
endif

if HAVE_BONJOUR
src_mpd_SOURCES += src/zeroconf-bonjour.c
endif
endif

612 613 614
if HAVE_CUE
DECODER_SRC += src/cue/cue_tag.c
endif
615

616 617 618 619 620 621
#
# input plugins
#

INPUT_CFLAGS = \
	$(CURL_CFLAGS) \
622
	$(FFMPEG_CFLAGS) \
623 624 625 626
	$(MMS_CFLAGS)

INPUT_LIBS = \
	$(CURL_LIBS) \
627
	$(FFMPEG_LIBS) \
628 629 630
	$(MMS_LIBS)

INPUT_SRC = \
631
	src/input_init.c \
632
	src/input_registry.c \
633
	src/input_stream.c \
634
	src/input/rewind_input_plugin.c \
635
	src/input/file_input_plugin.c
636

637
if ENABLE_CURL
638 639
INPUT_SRC += src/input/curl_input_plugin.c \
	src/icy_metadata.c
640
endif
641

642 643 644 645
if HAVE_FFMPEG
INPUT_SRC += src/input/ffmpeg_input_plugin.c
endif

646
if ENABLE_MMS
647
INPUT_SRC += src/input/mms_input_plugin.c
648 649 650
endif


651 652 653
OUTPUT_CFLAGS = \
	$(AO_CFLAGS) \
	$(ALSA_CFLAGS) \
654
	$(FFADO_CFLAGS) \
655
	$(JACK_CFLAGS) \
656
	$(OPENAL_CFLAGS) \
657
	$(PULSE_CFLAGS) \
658 659 660
	$(SHOUT_CFLAGS)

OUTPUT_LIBS = \
661
	$(LIBWRAP_LDFLAGS) \
662 663
	$(AO_LIBS) \
	$(ALSA_LIBS) \
664
	$(FFADO_LIBS) \
665
	$(JACK_LIBS) \
666
	$(OPENAL_LIBS) \
667
	$(PULSE_LIBS) \
668 669
	$(SHOUT_LIBS)

670
OUTPUT_API_SRC = \
671 672 673 674 675 676 677
	src/output_list.c \
	src/output_all.c \
	src/output_thread.c \
	src/output_control.c \
	src/output_state.c \
	src/output_print.c \
	src/output_command.c \
678 679 680
	src/output_init.c

OUTPUT_SRC = \
681 682
	src/output/null_plugin.c

683 684
MIXER_API_SRC = \
	src/mixer_control.c \
685
	src/mixer_type.c \
686
	src/mixer_all.c \
687 688
	src/mixer_api.c

689 690
MIXER_SRC = \
	src/mixer/software_mixer_plugin.c
691

692
if HAVE_ALSA
693
OUTPUT_SRC += src/output/alsa_plugin.c
694
MIXER_SRC += src/mixer/alsa_mixer_plugin.c
695 696
endif

697 698 699 700
if ENABLE_FFADO_OUTPUT
OUTPUT_SRC += src/output/ffado_output_plugin.c
endif

701
if HAVE_AO
702
OUTPUT_SRC += src/output/ao_plugin.c
703 704 705
endif

if HAVE_FIFO
706
OUTPUT_SRC += src/output/fifo_output_plugin.c
707 708
endif

709 710 711 712
if ENABLE_PIPE_OUTPUT
OUTPUT_SRC += src/output/pipe_output_plugin.c
endif

713
if HAVE_JACK
714
OUTPUT_SRC += src/output/jack_output_plugin.c
715 716 717
endif

if HAVE_MVP
718
OUTPUT_SRC += src/output/mvp_plugin.c
719 720 721
endif

if HAVE_OSS
722
OUTPUT_SRC += src/output/oss_plugin.c
723
MIXER_SRC += src/mixer/oss_mixer_plugin.c
724 725
endif

Serge Ziryukin's avatar
Serge Ziryukin committed
726 727 728 729
if HAVE_OPENAL
OUTPUT_SRC += src/output/openal_plugin.c
endif

730
if HAVE_OSX
731
OUTPUT_SRC += src/output/osx_plugin.c
732 733 734
endif

if HAVE_PULSE
735 736
OUTPUT_SRC += src/output/pulse_output_plugin.c
MIXER_SRC += src/mixer/pulse_mixer_plugin.c
737 738 739
endif

if HAVE_SHOUT
740
OUTPUT_SRC += src/output/shout_plugin.c
741 742
endif

743 744 745 746
if ENABLE_RECORDER_OUTPUT
OUTPUT_SRC += src/output/recorder_output_plugin.c
endif

747 748
if ENABLE_HTTPD_OUTPUT
OUTPUT_SRC += \
749
	src/icy_server.c \
750 751 752 753
	src/output/httpd_client.c \
	src/output/httpd_output_plugin.c
endif

754 755 756 757
if ENABLE_SOLARIS_OUTPUT
OUTPUT_SRC += src/output/solaris_output_plugin.c
endif

758 759
if ENABLE_WINMM_OUTPUT
OUTPUT_SRC += src/output/winmm_output_plugin.c
760
MIXER_SRC += src/mixer/winmm_mixer_plugin.c
761 762
endif

763

764 765 766 767 768
#
# Playlist plugins
#

PLAYLIST_SRC = \
769
	src/playlist/extm3u_playlist_plugin.c \
770
	src/playlist/m3u_playlist_plugin.c \
Qball Cow's avatar
Qball Cow committed
771
	src/playlist/pls_playlist_plugin.c \
772
	src/playlist/xspf_playlist_plugin.c \
773
	src/playlist/asx_playlist_plugin.c \
774
	src/playlist/rss_playlist_plugin.c \
775 776
	src/playlist_list.c

777 778 779 780
if ENABLE_LASTFM
PLAYLIST_SRC += src/playlist/lastfm_playlist_plugin.c
endif

781 782 783 784
if HAVE_CUE
PLAYLIST_SRC += src/playlist/cue_playlist_plugin.c
endif

785 786 787 788
if HAVE_FLAC
PLAYLIST_SRC += src/playlist/flac_playlist_plugin.c
endif

789

790 791 792 793 794 795
#
# Filter plugins
#

FILTER_SRC = \
	src/filter/null_filter_plugin.c \
796
	src/filter/chain_filter_plugin.c \
797
	src/filter/autoconvert_filter_plugin.c \
798
	src/filter/convert_filter_plugin.c \
799
	src/filter/route_filter_plugin.c \
800
	src/filter/normalize_filter_plugin.c \
801
	src/filter/replay_gain_filter_plugin.c \
802 803 804
	src/filter/volume_filter_plugin.c


805 806 807 808 809 810 811 812 813
#
# systemd unit
#

if HAVE_SYSTEMD
systemdsystemunit_DATA = \
	mpd.service
endif

814 815 816 817 818 819 820 821 822 823 824 825
#
# Sparse code analysis
#
# sparse is a semantic parser
# URL: git://www.kernel.org/pub/scm/devel/sparse/sparse.git
#

SPARSE = sparse
SPARSE_FLAGS =
SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) \
	-I$(shell $(CC) -print-file-name=include) \
	-I$(shell $(CC) -print-file-name=include-fixed)
826 827
SPARSE_CPPFLAGS += -D__SCHAR_MAX__=127 -D__SHRT_MAX__=32767 \
	-D__INT_MAX__=2147483647 -D__LONG_MAX__=2147483647
828
sparse-check:
829
	$(SPARSE) -I. $(src_mpd_CFLAGS) $(src_mpd_CPPFLAGS) $(SPARSE_FLAGS) $(SPARSE_CPPFLAGS) $(filter-out %.cxx,$(src_mpd_SOURCES))
830 831 832

.PHONY: sparse-check

833 834 835 836 837 838 839

#
# Test programs
#

if ENABLE_TEST

840 841
TESTS =

842
noinst_PROGRAMS = \
843
	test/read_conf \
844
	test/run_input \
845
	test/dump_playlist \
846
	test/run_decoder \
847
	test/read_tags \
848
	test/run_filter \
849
	test/run_output \
850
	test/run_convert \
851
	test/run_normalize \
852 853
	test/software_volume

854 855 856 857 858
if HAVE_ALSA
# this debug program is still ALSA specific
noinst_PROGRAMS += test/read_mixer
endif

859 860 861 862 863
test_read_conf_CPPFLAGS = $(AM_CPPFLAGS) \
	$(GLIB_CFLAGS)
test_read_conf_LDADD = $(MPD_LIBS) \
	$(GLIB_LIBS)
test_read_conf_SOURCES = test/read_conf.c \
864
	src/conf.c src/tokenizer.c src/utils.c
865

866
test_run_input_CPPFLAGS = $(AM_CPPFLAGS) \
867
	$(ARCHIVE_CFLAGS) \
868 869
	$(INPUT_CFLAGS)
test_run_input_LDADD = $(MPD_LIBS) \
870
	$(ARCHIVE_LIBS) \
871 872 873
	$(INPUT_LIBS) \
	$(GLIB_LIBS)
test_run_input_SOURCES = test/run_input.c \
874
	test/stdbin.h \
875
	src/conf.c src/tokenizer.c src/utils.c \
876
	src/tag.c src/tag_pool.c src/tag_save.c \
877
	src/fd_util.c \
878 879 880
	$(ARCHIVE_SRC) \
	$(INPUT_SRC)

881
test_dump_playlist_CPPFLAGS = $(AM_CPPFLAGS) \
882
	$(CUE_CFLAGS) \
883
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
884 885 886
	$(ARCHIVE_CFLAGS) \
	$(INPUT_CFLAGS)
test_dump_playlist_LDADD = $(MPD_LIBS) \
887
	$(CUE_LIBS) \
888
	$(FLAC_LIBS) \
889 890 891 892 893 894 895 896
	$(ARCHIVE_LIBS) \
	$(INPUT_LIBS) \
	$(GLIB_LIBS)
test_dump_playlist_SOURCES = test/dump_playlist.c \
	src/conf.c src/tokenizer.c src/utils.c \
	src/uri.c \
	src/song.c src/tag.c src/tag_pool.c src/tag_save.c \
	src/text_input_stream.c src/fifo_buffer.c \
897
	src/fd_util.c \
898 899 900 901
	$(ARCHIVE_SRC) \
	$(INPUT_SRC) \
	$(PLAYLIST_SRC)

902 903 904 905
if HAVE_CUE
test_dump_playlist_SOURCES += src/cue/cue_tag.c
endif

906 907 908 909 910 911
if HAVE_FLAC
test_dump_playlist_SOURCES += \
	src/replay_gain_info.c \
	src/decoder/flac_metadata.c
endif

912
test_run_decoder_CPPFLAGS = $(AM_CPPFLAGS) \
913
	$(TAG_CFLAGS) \
914
	$(ARCHIVE_CFLAGS) \
915 916
	$(INPUT_CFLAGS) $(DECODER_CFLAGS)
test_run_decoder_LDADD = $(MPD_LIBS) \
917
	$(TAG_LIBS) \
918
	$(ARCHIVE_LIBS) \
919 920
	$(INPUT_LIBS) $(DECODER_LIBS) \
	$(GLIB_LIBS)
921
test_run_decoder_SOURCES = test/run_decoder.c \
922
	test/stdbin.h \
923
	src/conf.c src/tokenizer.c src/utils.c src/log.c \
924
	src/tag.c src/tag_pool.c \
925
	src/replay_gain_info.c \
926
	src/uri.c \
927
	src/fd_util.c \
928
	src/audio_check.c \
929
	src/audio_format.c \
930
	src/timer.c \
931
	src/pcm_buffer.c \
932 933
	$(ARCHIVE_SRC) \
	$(INPUT_SRC) \
934
	$(TAG_SRC) \
935 936 937
	$(DECODER_SRC)

test_read_tags_CPPFLAGS = $(AM_CPPFLAGS) \
938
	$(TAG_CFLAGS) \
939
	$(ARCHIVE_CFLAGS) \
940 941
	$(INPUT_CFLAGS) $(DECODER_CFLAGS)
test_read_tags_LDADD = $(MPD_LIBS) \
942
	$(TAG_LIBS) \
943
	$(ARCHIVE_LIBS) \
944 945
	$(INPUT_LIBS) $(DECODER_LIBS) \
	$(GLIB_LIBS)
946
test_read_tags_SOURCES = test/read_tags.c \
947
	src/conf.c src/tokenizer.c src/utils.c src/log.c \
948
	src/tag.c src/tag_pool.c \
949
	src/replay_gain_info.c \
950
	src/uri.c \
951
	src/fd_util.c \
952
	src/audio_check.c \
953
	src/timer.c \
954
	src/pcm_buffer.c \
955 956
	$(ARCHIVE_SRC) \
	$(INPUT_SRC) \
957
	$(TAG_SRC) \
958
	$(DECODER_SRC)
959

960 961
test_run_filter_CPPFLAGS = $(AM_CPPFLAGS)
test_run_filter_LDADD = $(MPD_LIBS) \
962
	$(SAMPLERATE_LIBS) \
963 964
	$(GLIB_LIBS)
test_run_filter_SOURCES = test/run_filter.c \
965
	test/stdbin.h \
966 967
	src/filter_plugin.c \
	src/filter_registry.c \
968
	src/conf.c src/tokenizer.c src/utils.c \
969
	src/pcm_volume.c src/pcm_convert.c src/pcm_byteswap.c \
970
	src/pcm_format.c src/pcm_channels.c src/pcm_dither.c \
971
	src/pcm_pack.c \
972
	src/pcm_resample.c src/pcm_resample_fallback.c \
973
	src/pcm_buffer.c \
974
	src/audio_check.c \
975
	src/audio_format.c \
976
	src/audio_parser.c \
977 978
	src/replay_gain_config.c \
	src/replay_gain_info.c \
979
	src/AudioCompress/compress.c \
980 981
	$(FILTER_SRC)

982 983 984 985
if HAVE_LIBSAMPLERATE
test_run_filter_SOURCES += src/pcm_resample_libsamplerate.c
endif

986 987
if ENABLE_ENCODER
noinst_PROGRAMS += test/run_encoder
988
test_run_encoder_SOURCES = test/run_encoder.c \
989
	test/stdbin.h \
990
	src/conf.c src/tokenizer.c \
991
	src/utils.c \
992
	src/tag.c src/tag_pool.c \
993
	src/audio_check.c \
994
	src/audio_format.c \
995
	src/audio_parser.c \
996
	src/pcm_buffer.c \
997
	src/fifo_buffer.c src/growing_fifo.c \
998
	$(ENCODER_SRC)
999 1000
test_run_encoder_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ENCODER_CFLAGS)
1001
test_run_encoder_LDADD = $(MPD_LIBS) \
1002 1003
	$(ENCODER_LIBS) \
	$(GLIB_LIBS)
1004
endif
1005

1006
test_software_volume_SOURCES = test/software_volume.c \
1007
	test/stdbin.h \
1008
	src/audio_check.c \
1009 1010
	src/audio_parser.c \
	src/pcm_volume.c
1011 1012
test_software_volume_LDADD = \
	$(GLIB_LIBS)
1013

1014
test_run_normalize_SOURCES = test/run_normalize.c \
1015
	test/stdbin.h \
1016 1017
	src/audio_check.c \
	src/audio_parser.c \
1018
	src/AudioCompress/compress.c
1019 1020 1021
test_run_normalize_LDADD = \
	$(GLIB_LIBS)

1022
test_run_convert_SOURCES = test/run_convert.c \
1023
	src/fifo_buffer.c \
1024
	src/audio_format.c \
1025 1026
	src/audio_check.c \
	src/audio_parser.c \
1027
	src/pcm_buffer.c \
1028 1029
	src/pcm_channels.c \
	src/pcm_format.c \
1030
	src/pcm_pack.c \
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044
	src/pcm_dither.c \
	src/pcm_byteswap.c \
	src/pcm_resample.c \
	src/pcm_resample_fallback.c \
	src/pcm_convert.c
test_run_convert_CPPFLAGS = $(AM_CPPFLAGS) $(SAMPLERATE_CFLAGS)
test_run_convert_LDADD = \
	$(SAMPLERATE_LIBS) \
	$(GLIB_LIBS)

if HAVE_LIBSAMPLERATE
test_run_convert_SOURCES += src/pcm_resample_libsamplerate.c
endif

1045
test_run_output_CFLAGS = $(AM_CFLAGS) $(MPD_CFLAGS)
1046 1047 1048 1049 1050
test_run_output_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ENCODER_CFLAGS) \
	$(OUTPUT_CFLAGS)
test_run_output_LDADD = $(MPD_LIBS) \
	$(ENCODER_LIBS) \
1051 1052
	$(OUTPUT_LIBS) \
	$(GLIB_LIBS)
1053
test_run_output_SOURCES = test/run_output.c \
1054
	test/stdbin.h \
1055
	src/conf.c src/tokenizer.c src/utils.c src/log.c \
1056
	src/audio_check.c \
1057
	src/audio_format.c \
1058 1059
	src/audio_parser.c \
	src/timer.c \
1060
	src/tag.c src/tag_pool.c \
1061
	src/fifo_buffer.c src/growing_fifo.c \
1062 1063
	src/page.c \
	src/socket_util.c \
1064 1065
	src/output_init.c src/output_list.c \
	$(ENCODER_SRC) \
1066
	src/mixer_api.c \
1067
	src/mixer_control.c \
1068
	src/mixer_type.c \
1069
	$(MIXER_SRC) \
1070
	src/filter_plugin.c src/filter/chain_filter_plugin.c \
1071
	src/filter_config.c \
1072
	src/filter/autoconvert_filter_plugin.c \
1073
	src/filter/convert_filter_plugin.c \
1074
	src/filter/replay_gain_filter_plugin.c \
1075
	src/filter/normalize_filter_plugin.c \
1076 1077
	src/filter/volume_filter_plugin.c \
	src/pcm_volume.c \
1078
	src/pcm_buffer.c \
1079
	src/AudioCompress/compress.c \
1080 1081
	src/replay_gain_info.c \
	src/replay_gain_config.c \
1082
	src/fd_util.c \
1083
	src/server_socket.c \
1084 1085
	$(OUTPUT_SRC)

1086 1087 1088 1089 1090 1091
test_read_mixer_CPPFLAGS = $(AM_CPPFLAGS) \
	$(OUTPUT_CFLAGS)
test_read_mixer_LDADD = $(MPD_LIBS) \
	$(OUTPUT_LIBS) \
	$(GLIB_LIBS)
test_read_mixer_SOURCES = test/read_mixer.c \
1092
	src/conf.c src/tokenizer.c src/utils.c src/log.c \
1093
	src/mixer_control.c src/mixer_api.c \
1094 1095
	src/filter_plugin.c \
	src/filter/volume_filter_plugin.c \
1096
	src/fd_util.c \
1097
	src/pcm_buffer.c \
1098
	$(MIXER_SRC)
1099

1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111
if ENABLE_BZIP2_TEST
TESTS += test/test_archive_bzip2.sh
endif

if ENABLE_ZZIP_TEST
TESTS += test/test_archive_zzip.sh
endif

if ENABLE_ISO9660_TEST
TESTS += test/test_archive_iso9660.sh
endif

1112 1113 1114 1115 1116 1117 1118 1119 1120
if ENABLE_INOTIFY
noinst_PROGRAMS += test/run_inotify
test_run_inotify_SOURCES = test/run_inotify.c \
	src/fd_util.c \
	src/fifo_buffer.c \
	src/inotify_source.c
test_run_inotify_LDADD = $(GLIB_LIBS)
endif

1121 1122 1123 1124 1125 1126 1127 1128
endif


#
# Documentation
#

man_MANS = doc/mpd.1 doc/mpd.conf.5
Max Kellermann's avatar
Max Kellermann committed
1129
doc_DATA = AUTHORS COPYING NEWS README UPGRADING doc/mpdconf.example
1130

1131
DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
1132

1133 1134 1135 1136
if ENABLE_DOCUMENTATION
protocoldir = $(docdir)/protocol
protocol_DATA = $(wildcard doc/protocol/*.html)

1137 1138 1139
userdir = $(docdir)/user
user_DATA = $(wildcard doc/user/*.html)

1140 1141 1142
developerdir = $(docdir)/developer
developer_DATA = $(wildcard doc/developer/*.html)

1143 1144 1145 1146
if HAVE_XMLTO

DOCBOOK_HTML = $(patsubst %.xml,%/index.html,$(DOCBOOK_FILES))

1147
$(DOCBOOK_HTML): %/index.html: %.xml
1148
	$(XMLTO) -o $(@D) --stringparam chunker.output.encoding=utf-8 html $<
1149

1150 1151 1152 1153 1154 1155
else

DOCBOOK_HTML =

endif

1156
doc/api/html/index.html: doc/doxygen.conf
1157
	@mkdir -p $(@D)
1158 1159
	[ "$(srcdir)" = "." ] || sed '/INPUT *=/ s/\([^ ]\+\/\)/$(subst /,\/,$(srcdir))\/\1/g' $(srcdir)/doc/doxygen.conf >doc/doxygen.conf
	$(DOXYGEN) doc/doxygen.conf
1160

1161 1162 1163 1164 1165 1166 1167 1168
all-local: $(DOCBOOK_HTML) doc/api/html/index.html

clean-local:
	rm -rf $(patsubst %.xml,%,$(DOCBOOK_FILES))
	rm -rf doc/api

install-data-local: doc/api/html/index.html
	$(mkinstalldirs) $(DESTDIR)$(docdir)/api/html
1169
	$(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
1170
		$(DESTDIR)$(docdir)/api/html
1171

1172 1173 1174
uninstall-local:
	rm -f $(DESTDIR)$(docdir)/api/html/*.*

1175 1176 1177 1178 1179
upload: $(DOCBOOK_HTML) doc/api/html/index.html
	rsync -vpruz --delete doc/ cirrus@www.musicpd.org:/var/www/musicpd.org/www/doc/ \
		--chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
		--include=protocol --include=protocol/** \
		--include=user --include=user/** \
1180
		--include=developer --include=developer/** \
1181 1182 1183
		--include=api --include=api/** \
		--exclude=*

1184 1185 1186
endif


1187 1188 1189
#
# Distribution
#
Eric Wong's avatar
Eric Wong committed
1190

1191
EXTRA_DIST = $(doc_DATA) autogen.sh \
1192
	$(wildcard scripts/*.sh) \
1193
	$(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf