configure.ac: Clean up the wording and lines at the end of the file.
[mpd-mk.git] / Makefile.am
blob86b0246faf4a0db5cb8fd5a7bfd028d0c519fa51
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         $(GME_CFLAGS) \
415         $(SIDPLAY_CFLAGS) \
416         $(FLUIDSYNTH_CFLAGS) \
417         $(WILDMIDI_CFLAGS) \
418         $(WAVPACK_CFLAGS) \
419         $(MAD_CFLAGS) \
420         $(MPG123_CFLAGS) \
421         $(FFMPEG_CFLAGS) \
422         $(CUE_CFLAGS)
424 DECODER_LIBS = \
425         $(VORBIS_LIBS) $(TREMOR_LIBS) \
426         $(FLAC_LIBS) \
427         $(SNDFILE_LIBS) \
428         $(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
429         $(MODPLUG_LIBS) \
430         $(GME_LIBS) \
431         $(SIDPLAY_LIBS) \
432         $(FLUIDSYNTH_LIBS) \
433         $(WILDMIDI_LIBS) \
434         $(WAVPACK_LIBS) \
435         $(MAD_LIBS) \
436         $(MPG123_LIBS) \
437         $(MP4FF_LIBS) \
438         $(FFMPEG_LIBS) \
439         $(CUE_LIBS)
441 DECODER_SRC = \
442         src/decoder_buffer.c \
443         src/decoder_plugin.c \
444         src/decoder_list.c
446 if HAVE_MAD
447 DECODER_SRC += src/decoder/mad_decoder_plugin.c
448 endif
450 if HAVE_MPG123
451 DECODER_SRC += src/decoder/mpg123_decoder_plugin.c
452 endif
454 if HAVE_MPCDEC
455 DECODER_SRC += src/decoder/mpcdec_decoder_plugin.c
456 endif
458 if HAVE_WAVPACK
459 DECODER_SRC += src/decoder/wavpack_decoder_plugin.c
460 endif
462 if HAVE_FAAD
463 DECODER_SRC += src/decoder/faad_decoder_plugin.c
464 endif
466 if HAVE_MP4
467 DECODER_SRC += src/decoder/mp4ff_decoder_plugin.c
468 endif
470 if HAVE_OGG_COMMON
471 DECODER_SRC += src/decoder/_ogg_common.c
472 endif
474 if HAVE_FLAC_COMMON
475 DECODER_SRC += \
476         src/decoder/flac_metadata.c \
477         src/decoder/flac_pcm.c \
478         src/decoder/_flac_common.c
479 endif
481 if ENABLE_VORBIS_DECODER
482 DECODER_SRC += src/decoder/vorbis_decoder_plugin.c
483 endif
485 if HAVE_FLAC
486 DECODER_SRC += src/decoder/flac_decoder_plugin.c
487 endif
489 if HAVE_OGGFLAC
490 DECODER_SRC += src/decoder/oggflac_decoder_plugin.c
491 endif
493 if HAVE_AUDIOFILE
494 DECODER_SRC += src/decoder/audiofile_decoder_plugin.c
495 endif
497 if ENABLE_MIKMOD_DECODER
498 DECODER_SRC += src/decoder/mikmod_decoder_plugin.c
499 endif
501 if HAVE_MODPLUG
502 DECODER_SRC += src/decoder/modplug_decoder_plugin.c
503 endif
505 if ENABLE_SIDPLAY
506 DECODER_SRC += src/decoder/sidplay_decoder_plugin.cxx
507 endif
509 if ENABLE_FLUIDSYNTH
510 DECODER_SRC += src/decoder/fluidsynth_decoder_plugin.c
511 endif
513 if ENABLE_WILDMIDI
514 DECODER_SRC += src/decoder/wildmidi_decoder_plugin.c
515 endif
517 if HAVE_FFMPEG
518 DECODER_SRC += src/decoder/ffmpeg_decoder_plugin.c
519 endif
521 if ENABLE_SNDFILE
522 DECODER_SRC += src/decoder/sndfile_decoder_plugin.c
523 endif
525 if HAVE_GME
526 DECODER_SRC += src/decoder/gme_decoder_plugin.c
527 endif
529 # encoder plugins
531 ENCODER_CFLAGS = \
532         $(LAME_CFLAGS) \
533         $(TWOLAME_CFLAGS) \
534         $(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
535         $(VORBISENC_CFLAGS)
537 ENCODER_LIBS = \
538         $(LAME_LIBS) \
539         $(TWOLAME_LIBS) \
540         $(FLAC_LIBS) \
541         $(VORBISENC_LIBS)
543 ENCODER_SRC =
545 if ENABLE_ENCODER
546 ENCODER_SRC += src/encoder_list.c
547 ENCODER_SRC += src/encoder/null_encoder.c
549 if ENABLE_WAVE_ENCODER
550 ENCODER_SRC += src/encoder/wave_encoder.c
551 endif
553 if ENABLE_VORBIS_ENCODER
554 ENCODER_SRC += src/encoder/vorbis_encoder.c
555 endif
557 if ENABLE_LAME_ENCODER
558 ENCODER_SRC += src/encoder/lame_encoder.c
559 endif
561 if ENABLE_TWOLAME_ENCODER
562 ENCODER_SRC += src/encoder/twolame_encoder.c
563 endif
565 if ENABLE_FLAC_ENCODER
566 ENCODER_SRC += src/encoder/flac_encoder.c
567 endif
568 endif
571 if HAVE_ZEROCONF
572 src_mpd_SOURCES += src/zeroconf.c
574 if HAVE_AVAHI
575 src_mpd_SOURCES += src/zeroconf-avahi.c
576 endif
578 if HAVE_BONJOUR
579 src_mpd_SOURCES += src/zeroconf-bonjour.c
580 endif
581 endif
583 if HAVE_CUE
584 DECODER_SRC += src/cue/cue_tag.c
585 endif
588 # input plugins
591 INPUT_CFLAGS = \
592         $(CURL_CFLAGS) \
593         $(MMS_CFLAGS)
595 INPUT_LIBS = \
596         $(CURL_LIBS) \
597         $(MMS_LIBS)
599 INPUT_SRC = \
600         src/input_init.c \
601         src/input_registry.c \
602         src/input_stream.c \
603         src/input/rewind_input_plugin.c \
604         src/input/file_input_plugin.c
606 if ENABLE_CURL
607 INPUT_SRC += src/input/curl_input_plugin.c \
608         src/icy_metadata.c
609 endif
611 if ENABLE_MMS
612 INPUT_SRC += src/input/mms_input_plugin.c
613 endif
616 OUTPUT_CFLAGS = \
617         $(AO_CFLAGS) \
618         $(ALSA_CFLAGS) \
619         $(JACK_CFLAGS) \
620         $(OPENAL_CFLAGS) \
621         $(PULSE_CFLAGS) \
622         $(SHOUT_CFLAGS)
624 OUTPUT_LIBS = \
625         $(AO_LIBS) \
626         $(ALSA_LIBS) \
627         $(JACK_LIBS) \
628         $(OPENAL_LIBS) \
629         $(PULSE_LIBS) \
630         $(SHOUT_LIBS)
632 OUTPUT_API_SRC = \
633         src/output_list.c \
634         src/output_all.c \
635         src/output_thread.c \
636         src/output_control.c \
637         src/output_state.c \
638         src/output_print.c \
639         src/output_command.c \
640         src/output_init.c
642 OUTPUT_SRC = \
643         src/output/null_plugin.c
645 MIXER_API_SRC = \
646         src/mixer_control.c \
647         src/mixer_type.c \
648         src/mixer_all.c \
649         src/mixer_api.c
651 MIXER_SRC = \
652         src/mixer/software_mixer_plugin.c
654 if HAVE_ALSA
655 OUTPUT_SRC += src/output/alsa_plugin.c
656 MIXER_SRC += src/mixer/alsa_mixer_plugin.c
657 endif
659 if HAVE_AO
660 OUTPUT_SRC += src/output/ao_plugin.c
661 endif
663 if HAVE_FIFO
664 OUTPUT_SRC += src/output/fifo_output_plugin.c
665 endif
667 if ENABLE_PIPE_OUTPUT
668 OUTPUT_SRC += src/output/pipe_output_plugin.c
669 endif
671 if HAVE_JACK
672 OUTPUT_SRC += src/output/jack_output_plugin.c
673 endif
675 if HAVE_MVP
676 OUTPUT_SRC += src/output/mvp_plugin.c
677 endif
679 if HAVE_OSS
680 OUTPUT_SRC += src/output/oss_plugin.c
681 MIXER_SRC += src/mixer/oss_mixer_plugin.c
682 endif
684 if HAVE_OPENAL
685 OUTPUT_SRC += src/output/openal_plugin.c
686 endif
688 if HAVE_OSX
689 OUTPUT_SRC += src/output/osx_plugin.c
690 endif
692 if HAVE_PULSE
693 OUTPUT_SRC += src/output/pulse_output_plugin.c
694 MIXER_SRC += src/mixer/pulse_mixer_plugin.c
695 endif
697 if HAVE_SHOUT
698 OUTPUT_SRC += src/output/shout_plugin.c
699 endif
701 if ENABLE_RECORDER_OUTPUT
702 OUTPUT_SRC += src/output/recorder_output_plugin.c
703 endif
705 if ENABLE_HTTPD_OUTPUT
706 OUTPUT_SRC += \
707         src/icy_server.c \
708         src/output/httpd_client.c \
709         src/output/httpd_output_plugin.c
710 endif
712 if ENABLE_SOLARIS_OUTPUT
713 OUTPUT_SRC += src/output/solaris_output_plugin.c
714 endif
718 # Playlist plugins
721 PLAYLIST_SRC = \
722         src/playlist/extm3u_playlist_plugin.c \
723         src/playlist/m3u_playlist_plugin.c \
724         src/playlist/pls_playlist_plugin.c \
725         src/playlist/xspf_playlist_plugin.c \
726         src/playlist/asx_playlist_plugin.c \
727         src/playlist_list.c
729 if ENABLE_LASTFM
730 PLAYLIST_SRC += src/playlist/lastfm_playlist_plugin.c
731 endif
733 if HAVE_CUE
734 PLAYLIST_SRC += src/playlist/cue_playlist_plugin.c
735 endif
737 if HAVE_FLAC
738 PLAYLIST_SRC += src/playlist/flac_playlist_plugin.c
739 endif
743 # Filter plugins
746 FILTER_SRC = \
747         src/filter/null_filter_plugin.c \
748         src/filter/chain_filter_plugin.c \
749         src/filter/autoconvert_filter_plugin.c \
750         src/filter/convert_filter_plugin.c \
751         src/filter/route_filter_plugin.c \
752         src/filter/normalize_filter_plugin.c \
753         src/filter/replay_gain_filter_plugin.c \
754         src/filter/volume_filter_plugin.c
758 # Sparse code analysis
760 # sparse is a semantic parser
761 # URL: git://www.kernel.org/pub/scm/devel/sparse/sparse.git
764 SPARSE = sparse
765 SPARSE_FLAGS =
766 SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) \
767         -I$(shell $(CC) -print-file-name=include) \
768         -I$(shell $(CC) -print-file-name=include-fixed)
769 SPARSE_CPPFLAGS += -D__SCHAR_MAX__=127 -D__SHRT_MAX__=32767 \
770         -D__INT_MAX__=2147483647 -D__LONG_MAX__=2147483647
771 sparse-check:
772         $(SPARSE) -I. $(src_mpd_CFLAGS) $(src_mpd_CPPFLAGS) $(SPARSE_FLAGS) $(SPARSE_CPPFLAGS) $(filter-out %.cxx,$(src_mpd_SOURCES))
774 .PHONY: sparse-check
778 # Test programs
781 if ENABLE_TEST
783 TESTS =
785 noinst_PROGRAMS = \
786         test/read_conf \
787         test/run_input \
788         test/dump_playlist \
789         test/run_decoder \
790         test/read_tags \
791         test/run_filter \
792         test/run_output \
793         test/read_mixer \
794         test/run_convert \
795         test/run_normalize \
796         test/software_volume
798 test_read_conf_CPPFLAGS = $(AM_CPPFLAGS) \
799         $(GLIB_CFLAGS)
800 test_read_conf_LDADD = $(MPD_LIBS) \
801         $(GLIB_LIBS)
802 test_read_conf_SOURCES = test/read_conf.c \
803         src/conf.c src/tokenizer.c src/utils.c
805 test_run_input_CPPFLAGS = $(AM_CPPFLAGS) \
806         $(ARCHIVE_CFLAGS) \
807         $(INPUT_CFLAGS)
808 test_run_input_LDADD = $(MPD_LIBS) \
809         $(ARCHIVE_LIBS) \
810         $(INPUT_LIBS) \
811         $(GLIB_LIBS)
812 test_run_input_SOURCES = test/run_input.c \
813         src/conf.c src/tokenizer.c src/utils.c \
814         src/tag.c src/tag_pool.c src/tag_save.c \
815         src/fd_util.c \
816         $(ARCHIVE_SRC) \
817         $(INPUT_SRC)
819 test_dump_playlist_CPPFLAGS = $(AM_CPPFLAGS) \
820         $(CUE_CFLAGS) \
821         $(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
822         $(ARCHIVE_CFLAGS) \
823         $(INPUT_CFLAGS)
824 test_dump_playlist_LDADD = $(MPD_LIBS) \
825         $(CUE_LIBS) \
826         $(FLAC_LIBS) \
827         $(ARCHIVE_LIBS) \
828         $(INPUT_LIBS) \
829         $(GLIB_LIBS)
830 test_dump_playlist_SOURCES = test/dump_playlist.c \
831         src/conf.c src/tokenizer.c src/utils.c \
832         src/uri.c \
833         src/song.c src/tag.c src/tag_pool.c src/tag_save.c \
834         src/text_input_stream.c src/fifo_buffer.c \
835         src/fd_util.c \
836         $(ARCHIVE_SRC) \
837         $(INPUT_SRC) \
838         $(PLAYLIST_SRC)
840 if HAVE_CUE
841 test_dump_playlist_SOURCES += src/cue/cue_tag.c
842 endif
844 if HAVE_FLAC
845 test_dump_playlist_SOURCES += \
846         src/replay_gain_info.c \
847         src/decoder/flac_metadata.c
848 endif
850 test_run_decoder_CPPFLAGS = $(AM_CPPFLAGS) \
851         $(TAG_CFLAGS) \
852         $(ARCHIVE_CFLAGS) \
853         $(INPUT_CFLAGS) $(DECODER_CFLAGS)
854 test_run_decoder_LDADD = $(MPD_LIBS) \
855         $(TAG_LIBS) \
856         $(ARCHIVE_LIBS) \
857         $(INPUT_LIBS) $(DECODER_LIBS) \
858         $(GLIB_LIBS)
859 test_run_decoder_SOURCES = test/run_decoder.c \
860         src/conf.c src/tokenizer.c src/utils.c src/log.c \
861         src/tag.c src/tag_pool.c \
862         src/replay_gain_info.c \
863         src/uri.c \
864         src/fd_util.c \
865         src/audio_check.c \
866         src/audio_format.c \
867         src/timer.c \
868         $(ARCHIVE_SRC) \
869         $(INPUT_SRC) \
870         $(TAG_SRC) \
871         $(DECODER_SRC)
873 test_read_tags_CPPFLAGS = $(AM_CPPFLAGS) \
874         $(TAG_CFLAGS) \
875         $(ARCHIVE_CFLAGS) \
876         $(INPUT_CFLAGS) $(DECODER_CFLAGS)
877 test_read_tags_LDADD = $(MPD_LIBS) \
878         $(TAG_LIBS) \
879         $(ARCHIVE_LIBS) \
880         $(INPUT_LIBS) $(DECODER_LIBS) \
881         $(GLIB_LIBS)
882 test_read_tags_SOURCES = test/read_tags.c \
883         src/conf.c src/tokenizer.c src/utils.c src/log.c \
884         src/tag.c src/tag_pool.c \
885         src/replay_gain_info.c \
886         src/uri.c \
887         src/fd_util.c \
888         src/audio_check.c \
889         src/timer.c \
890         $(ARCHIVE_SRC) \
891         $(INPUT_SRC) \
892         $(TAG_SRC) \
893         $(DECODER_SRC)
895 test_run_filter_CPPFLAGS = $(AM_CPPFLAGS)
896 test_run_filter_LDADD = $(MPD_LIBS) \
897         $(SAMPLERATE_LIBS) \
898         $(GLIB_LIBS)
899 test_run_filter_SOURCES = test/run_filter.c \
900         src/filter_plugin.c \
901         src/filter_registry.c \
902         src/conf.c src/tokenizer.c src/utils.c \
903         src/pcm_volume.c src/pcm_convert.c src/pcm_byteswap.c \
904         src/pcm_format.c src/pcm_channels.c src/pcm_dither.c \
905         src/pcm_pack.c \
906         src/pcm_resample.c src/pcm_resample_fallback.c \
907         src/audio_check.c \
908         src/audio_format.c \
909         src/audio_parser.c \
910         src/replay_gain_config.c \
911         src/replay_gain_info.c \
912         src/AudioCompress/compress.c \
913         $(FILTER_SRC)
915 if HAVE_LIBSAMPLERATE
916 test_run_filter_SOURCES += src/pcm_resample_libsamplerate.c
917 endif
919 if ENABLE_ENCODER
920 noinst_PROGRAMS += test/run_encoder
921 test_run_encoder_SOURCES = test/run_encoder.c \
922         src/conf.c src/tokenizer.c \
923         src/utils.c \
924         src/tag.c src/tag_pool.c \
925         src/audio_check.c \
926         src/audio_format.c \
927         src/audio_parser.c \
928         $(ENCODER_SRC)
929 test_run_encoder_LDADD = $(MPD_LIBS) \
930         $(ENCODER_LIBS) \
931         $(GLIB_LIBS)
932 endif
934 test_software_volume_SOURCES = test/software_volume.c \
935         src/audio_check.c \
936         src/audio_parser.c \
937         src/pcm_volume.c
938 test_software_volume_LDADD = \
939         $(GLIB_LIBS)
941 test_run_normalize_SOURCES = test/run_normalize.c \
942         src/audio_check.c \
943         src/audio_parser.c \
944         src/AudioCompress/compress.c
945 test_run_normalize_LDADD = \
946         $(GLIB_LIBS)
948 test_run_convert_SOURCES = test/run_convert.c \
949         src/fifo_buffer.c \
950         src/audio_format.c \
951         src/audio_check.c \
952         src/audio_parser.c \
953         src/pcm_channels.c \
954         src/pcm_format.c \
955         src/pcm_pack.c \
956         src/pcm_dither.c \
957         src/pcm_byteswap.c \
958         src/pcm_resample.c \
959         src/pcm_resample_fallback.c \
960         src/pcm_convert.c
961 test_run_convert_CPPFLAGS = $(AM_CPPFLAGS) $(SAMPLERATE_CFLAGS)
962 test_run_convert_LDADD = \
963         $(SAMPLERATE_LIBS) \
964         $(GLIB_LIBS)
966 if HAVE_LIBSAMPLERATE
967 test_run_convert_SOURCES += src/pcm_resample_libsamplerate.c
968 endif
970 test_run_output_CPPFLAGS = $(AM_CPPFLAGS) \
971         $(ENCODER_CFLAGS) \
972         $(OUTPUT_CFLAGS)
973 test_run_output_LDADD = $(MPD_LIBS) \
974         $(ENCODER_LIBS) \
975         $(OUTPUT_LIBS) \
976         $(GLIB_LIBS)
977 test_run_output_SOURCES = test/run_output.c \
978         src/conf.c src/tokenizer.c src/utils.c src/log.c \
979         src/audio_check.c \
980         src/audio_format.c \
981         src/audio_parser.c \
982         src/timer.c \
983         src/tag.c src/tag_pool.c \
984         src/fifo_buffer.c \
985         src/page.c \
986         src/socket_util.c \
987         src/output_init.c src/output_list.c \
988         $(ENCODER_SRC) \
989         src/mixer_api.c \
990         src/mixer_control.c \
991         src/mixer_type.c \
992         $(MIXER_SRC) \
993         src/filter_plugin.c src/filter/chain_filter_plugin.c \
994         src/filter_config.c \
995         src/filter/autoconvert_filter_plugin.c \
996         src/filter/convert_filter_plugin.c \
997         src/filter/replay_gain_filter_plugin.c \
998         src/filter/normalize_filter_plugin.c \
999         src/filter/volume_filter_plugin.c \
1000         src/pcm_volume.c \
1001         src/AudioCompress/compress.c \
1002         src/replay_gain_info.c \
1003         src/replay_gain_config.c \
1004         src/fd_util.c \
1005         $(OUTPUT_SRC)
1007 test_read_mixer_CPPFLAGS = $(AM_CPPFLAGS) \
1008         $(OUTPUT_CFLAGS)
1009 test_read_mixer_LDADD = $(MPD_LIBS) \
1010         $(OUTPUT_LIBS) \
1011         $(GLIB_LIBS)
1012 test_read_mixer_SOURCES = test/read_mixer.c \
1013         src/conf.c src/tokenizer.c src/utils.c src/log.c \
1014         src/mixer_control.c src/mixer_api.c \
1015         src/filter_plugin.c \
1016         src/filter/volume_filter_plugin.c \
1017         src/fd_util.c \
1018         $(MIXER_SRC)
1020 if ENABLE_BZIP2_TEST
1021 TESTS += test/test_archive_bzip2.sh
1022 endif
1024 if ENABLE_ZZIP_TEST
1025 TESTS += test/test_archive_zzip.sh
1026 endif
1028 if ENABLE_ISO9660_TEST
1029 TESTS += test/test_archive_iso9660.sh
1030 endif
1032 endif
1036 # Documentation
1039 man_MANS = doc/mpd.1 doc/mpd.conf.5
1040 doc_DATA = AUTHORS COPYING NEWS README UPGRADING doc/mpdconf.example
1042 DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
1044 if ENABLE_DOCUMENTATION
1045 protocoldir = $(docdir)/protocol
1046 protocol_DATA = $(wildcard doc/protocol/*.html)
1048 userdir = $(docdir)/user
1049 user_DATA = $(wildcard doc/user/*.html)
1051 developerdir = $(docdir)/developer
1052 developer_DATA = $(wildcard doc/developer/*.html)
1054 if HAVE_XMLTO
1056 DOCBOOK_HTML = $(patsubst %.xml,%/index.html,$(DOCBOOK_FILES))
1058 $(DOCBOOK_HTML): %/index.html: %.xml
1059         $(XMLTO) -o $(@D) --stringparam chunker.output.encoding=utf-8 html $<
1061 else
1063 DOCBOOK_HTML =
1065 endif
1067 doc/api/html/index.html: doc/doxygen.conf
1068         @mkdir -p $(@D)
1069         $(DOXYGEN) $<
1071 all-local: $(DOCBOOK_HTML) doc/api/html/index.html
1073 clean-local:
1074         rm -rf $(patsubst %.xml,%,$(DOCBOOK_FILES))
1075         rm -rf doc/api
1077 install-data-local: doc/api/html/index.html
1078         $(mkinstalldirs) $(DESTDIR)$(docdir)/api/html
1079         $(INSTALL_DATA) -c -m 644 doc/api/html/*.html doc/api/html/*.css \
1080                 doc/api/html/*.png doc/api/html/*.gif \
1081                 $(DESTDIR)$(docdir)/api/html
1083 upload: $(DOCBOOK_HTML) doc/api/html/index.html
1084         rsync -vpruz --delete doc/ cirrus@www.musicpd.org:/var/www/musicpd.org/www/doc/ \
1085                 --chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
1086                 --include=protocol --include=protocol/** \
1087                 --include=user --include=user/** \
1088                 --include=developer --include=developer/** \
1089                 --include=api --include=api/** \
1090                 --exclude=*
1092 endif
1096 # Distribution
1099 EXTRA_DIST = $(doc_DATA) autogen.sh \
1100         $(wildcard scripts/*.sh) \
1101         $(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf