configure.ac: Don't allow UNIX IPC to be configured for a native Windows build.
[mpd-mk.git] / Makefile.am
blobaa7b709979c4e57eaab4fa5ba1f5a17ff70b8d2e
1 ACLOCAL_AMFLAGS = -I m4
2 AUTOMAKE_OPTIONS = foreign 1.10 dist-bzip2 subdir-objects
4 AM_CPPFLAGS = -I$(srcdir)/src $(GLIB_CFLAGS)
6 AM_CPPFLAGS += -DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"'
8 bin_PROGRAMS = src/mpd
10 src_mpd_CFLAGS = $(AM_CFLAGS) $(MPD_CFLAGS)
11 src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \
12         $(LIBWRAP_CFLAGS) \
13         $(SQLITE_CFLAGS) \
14         $(ARCHIVE_CFLAGS) \
15         $(INPUT_CFLAGS) \
16         $(TAG_CFLAGS) \
17         $(DECODER_CFLAGS) \
18         $(ENCODER_CFLAGS) \
19         $(FILTER_CFLAGS) \
20         $(OUTPUT_CFLAGS)
21 src_mpd_LDADD = $(MPD_LIBS) \
22         $(LIBWRAP_LDFLAGS) \
23         $(SQLITE_LIBS) \
24         $(ARCHIVE_LIBS) \
25         $(INPUT_LIBS) \
26         $(TAG_LIBS) \
27         $(DECODER_LIBS) \
28         $(ENCODER_LIBS) \
29         $(OUTPUT_LIBS) \
30         $(FILTER_LIBS) \
31         $(GLIB_LIBS)
33 mpd_headers = \
34         src/check.h \
35         src/notify.h \
36         src/ack.h \
37         src/audio.h \
38         src/audio_format.h \
39         src/audio_check.h \
40         src/audio_parser.h \
41         src/output_internal.h \
42         src/output_api.h \
43         src/output_plugin.h \
44         src/output_list.h \
45         src/output_all.h \
46         src/output_thread.h \
47         src/output_control.h \
48         src/output_state.h \
49         src/output_print.h \
50         src/output_command.h \
51         src/filter_internal.h \
52         src/filter_config.h \
53         src/filter_plugin.h \
54         src/filter_registry.h \
55         src/filter/autoconvert_filter_plugin.h \
56         src/filter/chain_filter_plugin.h \
57         src/filter/convert_filter_plugin.h \
58         src/filter/replay_gain_filter_plugin.h \
59         src/filter/volume_filter_plugin.h \
60         src/command.h \
61         src/idle.h \
62         src/cmdline.h \
63         src/conf.h \
64         src/crossfade.h \
65         src/dbUtils.h \
66         src/decoder_thread.h \
67         src/decoder_control.h \
68         src/decoder_plugin.h \
69         src/decoder_command.h \
70         src/decoder_buffer.h \
71         src/decoder_api.h \
72         src/decoder_plugin.h \
73         src/decoder_internal.h \
74         src/directory.h \
75         src/directory_save.h \
76         src/directory_print.h \
77         src/database.h \
78         src/encoder_plugin.h \
79         src/encoder_list.h \
80         src/encoder_api.h \
81         src/exclude.h \
82         src/fd_util.h \
83         src/fifo_buffer.h \
84         src/glib_compat.h \
85         src/update.h \
86         src/update_internal.h \
87         src/inotify_source.h \
88         src/inotify_queue.h \
89         src/inotify_update.h \
90         src/dirvec.h \
91         src/gcc.h \
92         src/decoder_list.h \
93         src/decoder_print.h \
94         src/decoder/flac_compat.h \
95         src/decoder/flac_metadata.h \
96         src/decoder/flac_pcm.h \
97         src/decoder/_flac_common.h \
98         src/decoder/_ogg_common.h \
99         src/input_init.h \
100         src/input_plugin.h \
101         src/input_registry.h \
102         src/input_stream.h \
103         src/input/file_input_plugin.h \
104         src/input/curl_input_plugin.h \
105         src/input/rewind_input_plugin.h \
106         src/input/mms_input_plugin.h \
107         src/text_file.h \
108         src/text_input_stream.h \
109         src/icy_server.h \
110         src/icy_metadata.h \
111         src/client.h \
112         src/client_internal.h \
113         src/listen.h \
114         src/log.h \
115         src/ls.h \
116         src/main.h \
117         src/mixer_all.h \
118         src/mixer_api.h \
119         src/mixer_control.h \
120         src/mixer_list.h \
121         src/event_pipe.h \
122         src/mixer_plugin.h \
123         src/mixer_type.h \
124         src/mixer/software_mixer_plugin.h \
125         src/mixer/pulse_mixer_plugin.h \
126         src/daemon.h \
127         src/AudioCompress/config.h \
128         src/AudioCompress/compress.h \
129         src/buffer.h \
130         src/pipe.h \
131         src/chunk.h \
132         src/path.h \
133         src/mapper.h \
134         src/output/httpd_client.h \
135         src/output/httpd_internal.h \
136         src/output/pulse_output_plugin.h \
137         src/page.h \
138         src/pcm_buffer.h \
139         src/pcm_utils.h \
140         src/pcm_convert.h \
141         src/pcm_volume.h \
142         src/pcm_mix.h \
143         src/pcm_byteswap.h \
144         src/pcm_channels.h \
145         src/pcm_format.h \
146         src/pcm_resample.h \
147         src/pcm_resample_internal.h \
148         src/pcm_dither.h \
149         src/pcm_pack.h \
150         src/pcm_prng.h \
151         src/permission.h \
152         src/player_thread.h \
153         src/player_control.h \
154         src/playlist.h \
155         src/playlist_internal.h \
156         src/playlist_print.h \
157         src/playlist_save.h \
158         src/playlist_state.h \
159         src/playlist_plugin.h \
160         src/playlist_list.h \
161         src/playlist_mapper.h \
162         src/playlist_song.h \
163         src/playlist_queue.h \
164         src/playlist/extm3u_playlist_plugin.h \
165         src/playlist/m3u_playlist_plugin.h \
166         src/playlist/pls_playlist_plugin.h \
167         src/playlist/xspf_playlist_plugin.h \
168         src/playlist/asx_playlist_plugin.h \
169         src/playlist/lastfm_playlist_plugin.h \
170         src/playlist/cue_playlist_plugin.h \
171         src/playlist/flac_playlist_plugin.h \
172         src/poison.h \
173         src/riff.h \
174         src/aiff.h \
175         src/queue.h \
176         src/queue_print.h \
177         src/queue_save.h \
178         src/replay_gain_config.h \
179         src/replay_gain_info.h \
180         src/sig_handlers.h \
181         src/song.h \
182         src/song_print.h \
183         src/song_save.h \
184         src/song_sticker.h \
185         src/songvec.h \
186         src/socket_util.h \
187         src/state_file.h \
188         src/stats.h \
189         src/sticker.h \
190         src/sticker_print.h \
191         src/tag.h \
192         src/tag_internal.h \
193         src/tag_pool.h \
194         src/tag_ape.h \
195         src/tag_id3.h \
196         src/tag_print.h \
197         src/tag_save.h \
198         src/tokenizer.h \
199         src/strset.h \
200         src/uri.h \
201         src/utils.h \
202         src/volume.h \
203         src/zeroconf.h src/zeroconf-internal.h \
204         src/locate.h \
205         src/stored_playlist.h \
206         src/timer.h \
207         src/archive_api.h \
208         src/archive_internal.h \
209         src/archive_list.h \
210         src/archive_plugin.h \
211         src/archive/bz2_archive_plugin.h \
212         src/archive/iso9660_archive_plugin.h \
213         src/archive/zzip_archive_plugin.h \
214         src/input/archive_input_plugin.h \
215         src/cue/cue_tag.h
217 src_mpd_SOURCES = \
218         $(mpd_headers) \
219         $(ARCHIVE_SRC) \
220         $(INPUT_SRC) \
221         $(PLAYLIST_SRC) \
222         $(TAG_SRC) \
223         $(DECODER_SRC) \
224         $(ENCODER_SRC) \
225         $(OUTPUT_API_SRC) $(OUTPUT_SRC) \
226         $(MIXER_API_SRC) $(MIXER_SRC) \
227         $(FILTER_SRC) \
228         src/notify.c \
229         src/audio.c \
230         src/audio_check.c \
231         src/audio_format.c \
232         src/audio_parser.c \
233         src/command.c \
234         src/idle.c \
235         src/cmdline.c \
236         src/conf.c \
237         src/crossfade.c \
238         src/dbUtils.c \
239         src/decoder_thread.c \
240         src/decoder_control.c \
241         src/decoder_api.c \
242         src/decoder_internal.c \
243         src/decoder_print.c \
244         src/directory.c \
245         src/directory_save.c \
246         src/directory_print.c \
247         src/database.c \
248         src/dirvec.c \
249         src/exclude.c \
250         src/fd_util.c \
251         src/fifo_buffer.c \
252         src/filter_config.c \
253         src/filter_plugin.c \
254         src/filter_registry.c \
255         src/update.c \
256         src/update_queue.c \
257         src/update_walk.c \
258         src/update_remove.c \
259         src/client.c \
260         src/client_event.c \
261         src/client_expire.c \
262         src/client_global.c \
263         src/client_idle.c \
264         src/client_list.c \
265         src/client_new.c \
266         src/client_process.c \
267         src/client_read.c \
268         src/client_write.c \
269         src/listen.c \
270         src/log.c \
271         src/ls.c \
272         src/main.c \
273         src/event_pipe.c \
274         src/daemon.c \
275         src/AudioCompress/compress.c \
276         src/buffer.c \
277         src/pipe.c \
278         src/chunk.c \
279         src/path.c \
280         src/mapper.c \
281         src/page.c \
282         src/pcm_convert.c \
283         src/pcm_volume.c \
284         src/pcm_mix.c \
285         src/pcm_byteswap.c \
286         src/pcm_channels.c \
287         src/pcm_pack.c \
288         src/pcm_format.c \
289         src/pcm_resample.c \
290         src/pcm_resample_fallback.c \
291         src/pcm_dither.c \
292         src/permission.c \
293         src/player_thread.c \
294         src/player_control.c \
295         src/playlist.c \
296         src/playlist_global.c \
297         src/playlist_control.c \
298         src/playlist_edit.c \
299         src/playlist_print.c \
300         src/playlist_save.c \
301         src/playlist_mapper.c \
302         src/playlist_song.c \
303         src/playlist_state.c \
304         src/playlist_queue.c \
305         src/queue.c \
306         src/queue_print.c \
307         src/queue_save.c \
308         src/replay_gain_config.c \
309         src/replay_gain_info.c \
310         src/sig_handlers.c \
311         src/song.c \
312         src/song_update.c \
313         src/song_print.c \
314         src/song_save.c \
315         src/songvec.c \
316         src/socket_util.c \
317         src/state_file.c \
318         src/stats.c \
319         src/tag.c \
320         src/tag_pool.c \
321         src/tag_print.c \
322         src/tag_save.c \
323         src/tokenizer.c \
324         src/text_file.c \
325         src/text_input_stream.c \
326         src/strset.c \
327         src/uri.c \
328         src/utils.c \
329         src/volume.c \
330         src/locate.c \
331         src/stored_playlist.c \
332         src/timer.c
334 if ENABLE_INOTIFY
335 src_mpd_SOURCES += \
336         src/inotify_source.c \
337         src/inotify_queue.c \
338         src/inotify_update.c
339 endif
341 if ENABLE_SQLITE
342 src_mpd_SOURCES += \
343         src/sticker.c \
344         src/sticker_print.c \
345         src/song_sticker.c
346 endif
348 FILTER_CFLAGS = \
349         $(SAMPLERATE_CFLAGS)
350 FILTER_LIBS = \
351         $(SAMPLERATE_LIBS)
353 if HAVE_LIBSAMPLERATE
354 src_mpd_SOURCES += src/pcm_resample_libsamplerate.c
355 endif
357 # archive plugins
359 ARCHIVE_CFLAGS = \
360         $(ISO9660_CFLAGS) \
361         $(ZZIP_CFLAGS)
363 ARCHIVE_LIBS = \
364         $(ISO9660_LIBS) \
365         $(ZZIP_LIBS)
367 ARCHIVE_SRC =
369 if HAVE_BZ2
370 ARCHIVE_SRC += src/archive/bz2_archive_plugin.c
371 endif
373 if HAVE_ZZIP
374 ARCHIVE_SRC += src/archive/zzip_archive_plugin.c
375 endif
377 if HAVE_ISO9660
378 ARCHIVE_SRC += src/archive/iso9660_archive_plugin.c
379 endif
381 if ENABLE_ARCHIVE
382 ARCHIVE_SRC += \
383         src/archive_api.c \
384         src/archive_list.c \
385         src/archive_plugin.c \
386         src/input/archive_input_plugin.c
387 endif
390 # tag plugins
392 TAG_CFLAGS = \
393         $(ID3TAG_CFLAGS)
394 TAG_LIBS = \
395         $(ID3TAG_LIBS)
397 TAG_SRC = \
398         src/tag_ape.c
400 if HAVE_ID3TAG
401 TAG_SRC += src/tag_id3.c \
402         src/riff.c src/aiff.c
403 endif
405 # decoder plugins
407 DECODER_CFLAGS = \
408         $(VORBIS_CFLAGS) $(TREMOR_CFLAGS) \
409         $(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
410         $(SNDFILE_CFLAGS) \
411         $(AUDIOFILE_CFLAGS) \
412         $(LIBMIKMOD_CFLAGS) \
413         $(MODPLUG_CFLAGS) \
414         $(SIDPLAY_CFLAGS) \
415         $(FLUIDSYNTH_CFLAGS) \
416         $(WILDMIDI_CFLAGS) \
417         $(WAVPACK_CFLAGS) \
418         $(MAD_CFLAGS) \
419         $(MPG123_CFLAGS) \
420         $(FFMPEG_CFLAGS) \
421         $(CUE_CFLAGS)
423 DECODER_LIBS = \
424         $(VORBIS_LIBS) $(TREMOR_LIBS) \
425         $(FLAC_LIBS) \
426         $(SNDFILE_LIBS) \
427         $(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
428         $(MODPLUG_LIBS) \
429         $(SIDPLAY_LIBS) \
430         $(FLUIDSYNTH_LIBS) \
431         $(WILDMIDI_LIBS) \
432         $(WAVPACK_LIBS) \
433         $(MAD_LIBS) \
434         $(MPG123_LIBS) \
435         $(MP4FF_LIBS) \
436         $(FFMPEG_LIBS) \
437         $(CUE_LIBS)
439 DECODER_SRC = \
440         src/decoder_buffer.c \
441         src/decoder_plugin.c \
442         src/decoder_list.c
444 if HAVE_MAD
445 DECODER_SRC += src/decoder/mad_decoder_plugin.c
446 endif
448 if HAVE_MPG123
449 DECODER_SRC += src/decoder/mpg123_decoder_plugin.c
450 endif
452 if HAVE_MPCDEC
453 DECODER_SRC += src/decoder/mpcdec_decoder_plugin.c
454 endif
456 if HAVE_WAVPACK
457 DECODER_SRC += src/decoder/wavpack_decoder_plugin.c
458 endif
460 if HAVE_FAAD
461 DECODER_SRC += src/decoder/faad_decoder_plugin.c
462 endif
464 if HAVE_MP4
465 DECODER_SRC += src/decoder/mp4ff_decoder_plugin.c
466 endif
468 if HAVE_OGG_COMMON
469 DECODER_SRC += src/decoder/_ogg_common.c
470 endif
472 if HAVE_FLAC_COMMON
473 DECODER_SRC += \
474         src/decoder/flac_metadata.c \
475         src/decoder/flac_pcm.c \
476         src/decoder/_flac_common.c
477 endif
479 if ENABLE_VORBIS_DECODER
480 DECODER_SRC += src/decoder/vorbis_decoder_plugin.c
481 endif
483 if HAVE_FLAC
484 DECODER_SRC += src/decoder/flac_decoder_plugin.c
485 endif
487 if HAVE_OGGFLAC
488 DECODER_SRC += src/decoder/oggflac_decoder_plugin.c
489 endif
491 if HAVE_AUDIOFILE
492 DECODER_SRC += src/decoder/audiofile_decoder_plugin.c
493 endif
495 if ENABLE_MIKMOD_DECODER
496 DECODER_SRC += src/decoder/mikmod_decoder_plugin.c
497 endif
499 if HAVE_MODPLUG
500 DECODER_SRC += src/decoder/modplug_decoder_plugin.c
501 endif
503 if ENABLE_SIDPLAY
504 DECODER_SRC += src/decoder/sidplay_decoder_plugin.cxx
505 endif
507 if ENABLE_FLUIDSYNTH
508 DECODER_SRC += src/decoder/fluidsynth_decoder_plugin.c
509 endif
511 if ENABLE_WILDMIDI
512 DECODER_SRC += src/decoder/wildmidi_decoder_plugin.c
513 endif
515 if HAVE_FFMPEG
516 DECODER_SRC += src/decoder/ffmpeg_decoder_plugin.c
517 endif
519 if ENABLE_SNDFILE
520 DECODER_SRC += src/decoder/sndfile_decoder_plugin.c
521 endif
523 # encoder plugins
525 ENCODER_CFLAGS = \
526         $(LAME_CFLAGS) \
527         $(TWOLAME_CFLAGS) \
528         $(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
529         $(VORBISENC_CFLAGS)
531 ENCODER_LIBS = \
532         $(LAME_LIBS) \
533         $(TWOLAME_LIBS) \
534         $(FLAC_LIBS) \
535         $(VORBISENC_LIBS)
537 ENCODER_SRC =
539 if ENABLE_ENCODER
540 ENCODER_SRC += src/encoder_list.c
541 ENCODER_SRC += src/encoder/null_encoder.c
543 if ENABLE_WAVE_ENCODER
544 ENCODER_SRC += src/encoder/wave_encoder.c
545 endif
547 if ENABLE_VORBIS_ENCODER
548 ENCODER_SRC += src/encoder/vorbis_encoder.c
549 endif
551 if ENABLE_LAME_ENCODER
552 ENCODER_SRC += src/encoder/lame_encoder.c
553 endif
555 if ENABLE_TWOLAME_ENCODER
556 ENCODER_SRC += src/encoder/twolame_encoder.c
557 endif
559 if ENABLE_FLAC_ENCODER
560 ENCODER_SRC += src/encoder/flac_encoder.c
561 endif
562 endif
565 if HAVE_ZEROCONF
566 src_mpd_SOURCES += src/zeroconf.c
568 if HAVE_AVAHI
569 src_mpd_SOURCES += src/zeroconf-avahi.c
570 endif
572 if HAVE_BONJOUR
573 src_mpd_SOURCES += src/zeroconf-bonjour.c
574 endif
575 endif
577 if HAVE_CUE
578 DECODER_SRC += src/cue/cue_tag.c
579 endif
582 # input plugins
585 INPUT_CFLAGS = \
586         $(CURL_CFLAGS) \
587         $(MMS_CFLAGS)
589 INPUT_LIBS = \
590         $(CURL_LIBS) \
591         $(MMS_LIBS)
593 INPUT_SRC = \
594         src/input_init.c \
595         src/input_registry.c \
596         src/input_stream.c \
597         src/input/rewind_input_plugin.c \
598         src/input/file_input_plugin.c
600 if ENABLE_CURL
601 INPUT_SRC += src/input/curl_input_plugin.c \
602         src/icy_metadata.c
603 endif
605 if ENABLE_MMS
606 INPUT_SRC += src/input/mms_input_plugin.c
607 endif
610 OUTPUT_CFLAGS = \
611         $(AO_CFLAGS) \
612         $(ALSA_CFLAGS) \
613         $(JACK_CFLAGS) \
614         $(OPENAL_CFLAGS) \
615         $(PULSE_CFLAGS) \
616         $(SHOUT_CFLAGS)
618 OUTPUT_LIBS = \
619         $(AO_LIBS) \
620         $(ALSA_LIBS) \
621         $(JACK_LIBS) \
622         $(OPENAL_LIBS) \
623         $(PULSE_LIBS) \
624         $(SHOUT_LIBS)
626 OUTPUT_API_SRC = \
627         src/output_list.c \
628         src/output_all.c \
629         src/output_thread.c \
630         src/output_control.c \
631         src/output_state.c \
632         src/output_print.c \
633         src/output_command.c \
634         src/output_init.c
636 OUTPUT_SRC = \
637         src/output/null_plugin.c
639 MIXER_API_SRC = \
640         src/mixer_control.c \
641         src/mixer_type.c \
642         src/mixer_all.c \
643         src/mixer_api.c
645 MIXER_SRC = \
646         src/mixer/software_mixer_plugin.c
648 if HAVE_ALSA
649 OUTPUT_SRC += src/output/alsa_plugin.c
650 MIXER_SRC += src/mixer/alsa_mixer_plugin.c
651 endif
653 if HAVE_AO
654 OUTPUT_SRC += src/output/ao_plugin.c
655 endif
657 if HAVE_FIFO
658 OUTPUT_SRC += src/output/fifo_output_plugin.c
659 endif
661 if ENABLE_PIPE_OUTPUT
662 OUTPUT_SRC += src/output/pipe_output_plugin.c
663 endif
665 if HAVE_JACK
666 OUTPUT_SRC += src/output/jack_output_plugin.c
667 endif
669 if HAVE_MVP
670 OUTPUT_SRC += src/output/mvp_plugin.c
671 endif
673 if HAVE_OSS
674 OUTPUT_SRC += src/output/oss_plugin.c
675 MIXER_SRC += src/mixer/oss_mixer_plugin.c
676 endif
678 if HAVE_OPENAL
679 OUTPUT_SRC += src/output/openal_plugin.c
680 endif
682 if HAVE_OSX
683 OUTPUT_SRC += src/output/osx_plugin.c
684 endif
686 if HAVE_PULSE
687 OUTPUT_SRC += src/output/pulse_output_plugin.c
688 MIXER_SRC += src/mixer/pulse_mixer_plugin.c
689 endif
691 if HAVE_SHOUT
692 OUTPUT_SRC += src/output/shout_plugin.c
693 endif
695 if ENABLE_RECORDER_OUTPUT
696 OUTPUT_SRC += src/output/recorder_output_plugin.c
697 endif
699 if ENABLE_HTTPD_OUTPUT
700 OUTPUT_SRC += \
701         src/icy_server.c \
702         src/output/httpd_client.c \
703         src/output/httpd_output_plugin.c
704 endif
706 if ENABLE_SOLARIS_OUTPUT
707 OUTPUT_SRC += src/output/solaris_output_plugin.c
708 endif
712 # Playlist plugins
715 PLAYLIST_SRC = \
716         src/playlist/extm3u_playlist_plugin.c \
717         src/playlist/m3u_playlist_plugin.c \
718         src/playlist/pls_playlist_plugin.c \
719         src/playlist/xspf_playlist_plugin.c \
720         src/playlist/asx_playlist_plugin.c \
721         src/playlist_list.c
723 if ENABLE_LASTFM
724 PLAYLIST_SRC += src/playlist/lastfm_playlist_plugin.c
725 endif
727 if HAVE_CUE
728 PLAYLIST_SRC += src/playlist/cue_playlist_plugin.c
729 endif
731 if HAVE_FLAC
732 PLAYLIST_SRC += src/playlist/flac_playlist_plugin.c
733 endif
737 # Filter plugins
740 FILTER_SRC = \
741         src/filter/null_filter_plugin.c \
742         src/filter/chain_filter_plugin.c \
743         src/filter/autoconvert_filter_plugin.c \
744         src/filter/convert_filter_plugin.c \
745         src/filter/route_filter_plugin.c \
746         src/filter/normalize_filter_plugin.c \
747         src/filter/replay_gain_filter_plugin.c \
748         src/filter/volume_filter_plugin.c
752 # Sparse code analysis
754 # sparse is a semantic parser
755 # URL: git://www.kernel.org/pub/scm/devel/sparse/sparse.git
758 SPARSE = sparse
759 SPARSE_FLAGS =
760 SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) \
761         -I$(shell $(CC) -print-file-name=include) \
762         -I$(shell $(CC) -print-file-name=include-fixed)
763 SPARSE_CPPFLAGS += -D__SCHAR_MAX__=127 -D__SHRT_MAX__=32767 \
764         -D__INT_MAX__=2147483647 -D__LONG_MAX__=2147483647
765 sparse-check:
766         $(SPARSE) -I. $(src_mpd_CFLAGS) $(src_mpd_CPPFLAGS) $(SPARSE_FLAGS) $(SPARSE_CPPFLAGS) $(filter-out %.cxx,$(src_mpd_SOURCES))
768 .PHONY: sparse-check
772 # Test programs
775 if ENABLE_TEST
777 TESTS =
779 noinst_PROGRAMS = \
780         test/read_conf \
781         test/run_input \
782         test/dump_playlist \
783         test/run_decoder \
784         test/read_tags \
785         test/run_filter \
786         test/run_output \
787         test/read_mixer \
788         test/run_convert \
789         test/run_normalize \
790         test/software_volume
792 test_read_conf_CPPFLAGS = $(AM_CPPFLAGS) \
793         $(GLIB_CFLAGS)
794 test_read_conf_LDADD = $(MPD_LIBS) \
795         $(GLIB_LIBS)
796 test_read_conf_SOURCES = test/read_conf.c \
797         src/conf.c src/tokenizer.c src/utils.c
799 test_run_input_CPPFLAGS = $(AM_CPPFLAGS) \
800         $(ARCHIVE_CFLAGS) \
801         $(INPUT_CFLAGS)
802 test_run_input_LDADD = $(MPD_LIBS) \
803         $(ARCHIVE_LIBS) \
804         $(INPUT_LIBS) \
805         $(GLIB_LIBS)
806 test_run_input_SOURCES = test/run_input.c \
807         src/conf.c src/tokenizer.c src/utils.c \
808         src/tag.c src/tag_pool.c src/tag_save.c \
809         src/fd_util.c \
810         $(ARCHIVE_SRC) \
811         $(INPUT_SRC)
813 test_dump_playlist_CPPFLAGS = $(AM_CPPFLAGS) \
814         $(CUE_CFLAGS) \
815         $(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
816         $(ARCHIVE_CFLAGS) \
817         $(INPUT_CFLAGS)
818 test_dump_playlist_LDADD = $(MPD_LIBS) \
819         $(CUE_LIBS) \
820         $(FLAC_LIBS) \
821         $(ARCHIVE_LIBS) \
822         $(INPUT_LIBS) \
823         $(GLIB_LIBS)
824 test_dump_playlist_SOURCES = test/dump_playlist.c \
825         src/conf.c src/tokenizer.c src/utils.c \
826         src/uri.c \
827         src/song.c src/tag.c src/tag_pool.c src/tag_save.c \
828         src/text_input_stream.c src/fifo_buffer.c \
829         src/fd_util.c \
830         $(ARCHIVE_SRC) \
831         $(INPUT_SRC) \
832         $(PLAYLIST_SRC)
834 if HAVE_CUE
835 test_dump_playlist_SOURCES += src/cue/cue_tag.c
836 endif
838 if HAVE_FLAC
839 test_dump_playlist_SOURCES += \
840         src/replay_gain_info.c \
841         src/decoder/flac_metadata.c
842 endif
844 test_run_decoder_CPPFLAGS = $(AM_CPPFLAGS) \
845         $(TAG_CFLAGS) \
846         $(ARCHIVE_CFLAGS) \
847         $(INPUT_CFLAGS) $(DECODER_CFLAGS)
848 test_run_decoder_LDADD = $(MPD_LIBS) \
849         $(TAG_LIBS) \
850         $(ARCHIVE_LIBS) \
851         $(INPUT_LIBS) $(DECODER_LIBS) \
852         $(GLIB_LIBS)
853 test_run_decoder_SOURCES = test/run_decoder.c \
854         src/conf.c src/tokenizer.c src/utils.c src/log.c \
855         src/tag.c src/tag_pool.c \
856         src/replay_gain_info.c \
857         src/uri.c \
858         src/fd_util.c \
859         src/audio_check.c \
860         src/audio_format.c \
861         src/timer.c \
862         $(ARCHIVE_SRC) \
863         $(INPUT_SRC) \
864         $(TAG_SRC) \
865         $(DECODER_SRC)
867 test_read_tags_CPPFLAGS = $(AM_CPPFLAGS) \
868         $(TAG_CFLAGS) \
869         $(ARCHIVE_CFLAGS) \
870         $(INPUT_CFLAGS) $(DECODER_CFLAGS)
871 test_read_tags_LDADD = $(MPD_LIBS) \
872         $(TAG_LIBS) \
873         $(ARCHIVE_LIBS) \
874         $(INPUT_LIBS) $(DECODER_LIBS) \
875         $(GLIB_LIBS)
876 test_read_tags_SOURCES = test/read_tags.c \
877         src/conf.c src/tokenizer.c src/utils.c src/log.c \
878         src/tag.c src/tag_pool.c \
879         src/replay_gain_info.c \
880         src/uri.c \
881         src/fd_util.c \
882         src/audio_check.c \
883         src/timer.c \
884         $(ARCHIVE_SRC) \
885         $(INPUT_SRC) \
886         $(TAG_SRC) \
887         $(DECODER_SRC)
889 test_run_filter_CPPFLAGS = $(AM_CPPFLAGS)
890 test_run_filter_LDADD = $(MPD_LIBS) \
891         $(SAMPLERATE_LIBS) \
892         $(GLIB_LIBS)
893 test_run_filter_SOURCES = test/run_filter.c \
894         src/filter_plugin.c \
895         src/filter_registry.c \
896         src/conf.c src/tokenizer.c src/utils.c \
897         src/pcm_volume.c src/pcm_convert.c src/pcm_byteswap.c \
898         src/pcm_format.c src/pcm_channels.c src/pcm_dither.c \
899         src/pcm_pack.c \
900         src/pcm_resample.c src/pcm_resample_fallback.c \
901         src/audio_check.c \
902         src/audio_format.c \
903         src/audio_parser.c \
904         src/replay_gain_config.c \
905         src/replay_gain_info.c \
906         src/AudioCompress/compress.c \
907         $(FILTER_SRC)
909 if HAVE_LIBSAMPLERATE
910 test_run_filter_SOURCES += src/pcm_resample_libsamplerate.c
911 endif
913 if ENABLE_ENCODER
914 noinst_PROGRAMS += test/run_encoder
915 test_run_encoder_SOURCES = test/run_encoder.c \
916         src/conf.c src/tokenizer.c \
917         src/utils.c \
918         src/tag.c src/tag_pool.c \
919         src/audio_check.c \
920         src/audio_format.c \
921         src/audio_parser.c \
922         $(ENCODER_SRC)
923 test_run_encoder_LDADD = $(MPD_LIBS) \
924         $(ENCODER_LIBS) \
925         $(GLIB_LIBS)
926 endif
928 test_software_volume_SOURCES = test/software_volume.c \
929         src/audio_check.c \
930         src/audio_parser.c \
931         src/pcm_volume.c
932 test_software_volume_LDADD = \
933         $(GLIB_LIBS)
935 test_run_normalize_SOURCES = test/run_normalize.c \
936         src/audio_check.c \
937         src/audio_parser.c \
938         src/AudioCompress/compress.c
939 test_run_normalize_LDADD = \
940         $(GLIB_LIBS)
942 test_run_convert_SOURCES = test/run_convert.c \
943         src/fifo_buffer.c \
944         src/audio_format.c \
945         src/audio_check.c \
946         src/audio_parser.c \
947         src/pcm_channels.c \
948         src/pcm_format.c \
949         src/pcm_pack.c \
950         src/pcm_dither.c \
951         src/pcm_byteswap.c \
952         src/pcm_resample.c \
953         src/pcm_resample_fallback.c \
954         src/pcm_convert.c
955 test_run_convert_CPPFLAGS = $(AM_CPPFLAGS) $(SAMPLERATE_CFLAGS)
956 test_run_convert_LDADD = \
957         $(SAMPLERATE_LIBS) \
958         $(GLIB_LIBS)
960 if HAVE_LIBSAMPLERATE
961 test_run_convert_SOURCES += src/pcm_resample_libsamplerate.c
962 endif
964 test_run_output_CPPFLAGS = $(AM_CPPFLAGS) \
965         $(ENCODER_CFLAGS) \
966         $(OUTPUT_CFLAGS)
967 test_run_output_LDADD = $(MPD_LIBS) \
968         $(ENCODER_LIBS) \
969         $(OUTPUT_LIBS) \
970         $(GLIB_LIBS)
971 test_run_output_SOURCES = test/run_output.c \
972         src/conf.c src/tokenizer.c src/utils.c src/log.c \
973         src/audio_check.c \
974         src/audio_format.c \
975         src/audio_parser.c \
976         src/timer.c \
977         src/tag.c src/tag_pool.c \
978         src/fifo_buffer.c \
979         src/page.c \
980         src/socket_util.c \
981         src/output_init.c src/output_list.c \
982         $(ENCODER_SRC) \
983         src/mixer_api.c \
984         src/mixer_control.c \
985         src/mixer_type.c \
986         $(MIXER_SRC) \
987         src/filter_plugin.c src/filter/chain_filter_plugin.c \
988         src/filter_config.c \
989         src/filter/autoconvert_filter_plugin.c \
990         src/filter/convert_filter_plugin.c \
991         src/filter/replay_gain_filter_plugin.c \
992         src/filter/normalize_filter_plugin.c \
993         src/filter/volume_filter_plugin.c \
994         src/pcm_volume.c \
995         src/AudioCompress/compress.c \
996         src/replay_gain_info.c \
997         src/replay_gain_config.c \
998         src/fd_util.c \
999         $(OUTPUT_SRC)
1001 test_read_mixer_CPPFLAGS = $(AM_CPPFLAGS) \
1002         $(OUTPUT_CFLAGS)
1003 test_read_mixer_LDADD = $(MPD_LIBS) \
1004         $(OUTPUT_LIBS) \
1005         $(GLIB_LIBS)
1006 test_read_mixer_SOURCES = test/read_mixer.c \
1007         src/conf.c src/tokenizer.c src/utils.c src/log.c \
1008         src/mixer_control.c src/mixer_api.c \
1009         src/filter_plugin.c \
1010         src/filter/volume_filter_plugin.c \
1011         src/fd_util.c \
1012         $(MIXER_SRC)
1014 if ENABLE_BZIP2_TEST
1015 TESTS += test/test_archive_bzip2.sh
1016 endif
1018 if ENABLE_ZZIP_TEST
1019 TESTS += test/test_archive_zzip.sh
1020 endif
1022 if ENABLE_ISO9660_TEST
1023 TESTS += test/test_archive_iso9660.sh
1024 endif
1026 endif
1030 # Documentation
1033 man_MANS = doc/mpd.1 doc/mpd.conf.5
1034 doc_DATA = AUTHORS COPYING NEWS README UPGRADING doc/mpdconf.example
1036 DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
1038 if ENABLE_DOCUMENTATION
1039 protocoldir = $(docdir)/protocol
1040 protocol_DATA = $(wildcard doc/protocol/*.html)
1042 userdir = $(docdir)/user
1043 user_DATA = $(wildcard doc/user/*.html)
1045 developerdir = $(docdir)/developer
1046 developer_DATA = $(wildcard doc/developer/*.html)
1048 if HAVE_XMLTO
1050 DOCBOOK_HTML = $(patsubst %.xml,%/index.html,$(DOCBOOK_FILES))
1052 $(DOCBOOK_HTML): %/index.html: %.xml
1053         $(XMLTO) -o $(@D) --stringparam chunker.output.encoding=utf-8 html $<
1055 else
1057 DOCBOOK_HTML =
1059 endif
1061 doc/api/html/index.html: doc/doxygen.conf
1062         @mkdir -p $(@D)
1063         $(DOXYGEN) $<
1065 all-local: $(DOCBOOK_HTML) doc/api/html/index.html
1067 clean-local:
1068         rm -rf $(patsubst %.xml,%,$(DOCBOOK_FILES))
1069         rm -rf doc/api
1071 install-data-local: doc/api/html/index.html
1072         $(mkinstalldirs) $(DESTDIR)$(docdir)/api/html
1073         $(INSTALL_DATA) -c -m 644 doc/api/html/*.html doc/api/html/*.css \
1074                 doc/api/html/*.png doc/api/html/*.gif \
1075                 $(DESTDIR)$(docdir)/api/html
1077 upload: $(DOCBOOK_HTML) doc/api/html/index.html
1078         rsync -vpruz --delete doc/ cirrus@www.musicpd.org:/var/www/musicpd.org/www/doc/ \
1079                 --chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
1080                 --include=protocol --include=protocol/** \
1081                 --include=user --include=user/** \
1082                 --include=developer --include=developer/** \
1083                 --include=api --include=api/** \
1084                 --exclude=*
1086 endif
1090 # Distribution
1093 EXTRA_DIST = $(doc_DATA) autogen.sh \
1094         $(wildcard scripts/*.sh) \
1095         $(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf