Makefile.am: added per-subsystem variables

Added "make" variables for the sources and dependencies of each
subsystem (archive, input, output, decoder, encoder, mixer).
This commit is contained in:
Max Kellermann 2009-02-25 16:44:11 +01:00
parent 6823217697
commit 02c9c3e0d8

View File

@ -9,38 +9,20 @@ bin_PROGRAMS = src/mpd
src_mpd_CFLAGS = $(MPD_CFLAGS) src_mpd_CFLAGS = $(MPD_CFLAGS)
src_mpd_CPPFLAGS = -I$(srcdir)/src \ src_mpd_CPPFLAGS = -I$(srcdir)/src \
$(SQLITE_CFLAGS) \ $(SQLITE_CFLAGS) \
$(CURL_CFLAGS) \
$(MMS_CFLAGS) \
$(AO_CFLAGS) $(ALSA_CFLAGS) \
$(SHOUT_CFLAGS) \
$(OGGVORBIS_CFLAGS) $(VORBISENC_CFLAGS) \
$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
$(AUDIOFILE_CFLAGS) $(LIBMIKMOD_CFLAGS) \
$(MODPLUG_CFLAGS) \
$(SIDPLAY_CFLAGS) \
$(FLUIDSYNTH_CFLAGS) \
$(WILDMIDI_CFLAGS) \
$(ID3TAG_CFLAGS) \ $(ID3TAG_CFLAGS) \
$(MAD_CFLAGS) \ $(GLIB_CFLAGS) \
$(FFMPEG_CFLAGS) \ $(INPUT_CFLAGS) \
$(GLIB_CFLAGS) $(DECODER_CFLAGS) \
$(ENCODER_CFLAGS) \
$(OUTPUT_CFLAGS)
src_mpd_LDADD = $(MPD_LIBS) \ src_mpd_LDADD = $(MPD_LIBS) \
$(SQLITE_LIBS) \ $(SQLITE_LIBS) \
$(CURL_LIBS) \
$(MMS_LIBS) \
$(AO_LIBS) $(ALSA_LIBS) \
$(SHOUT_LIBS) \
$(OGGVORBIS_LIBS) $(VORBISENC_LIBS) $(FLAC_LIBS) \
$(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
$(MODPLUG_LIBS) \
$(SIDPLAY_LIBS) \
$(FLUIDSYNTH_LIBS) \
$(WILDMIDI_LIBS) \
$(ID3TAG_LIBS) \ $(ID3TAG_LIBS) \
$(MAD_LIBS) \ $(GLIB_LIBS) \
$(MP4FF_LIBS) \ $(INPUT_LIBS) \
$(FFMPEG_LIBS) \ $(DECODER_LIBS) \
$(GLIB_LIBS) $(ENCODER_LIBS) \
$(OUTPUT_LIBS)
mpd_headers = \ mpd_headers = \
src/notify.h \ src/notify.h \
@ -157,20 +139,16 @@ mpd_headers = \
src_mpd_SOURCES = \ src_mpd_SOURCES = \
$(mpd_headers) \ $(mpd_headers) \
$(ARCHIVE_SRC) \
$(INPUT_SRC) \
$(DECODER_SRC) \
$(ENCODER_SRC) \
$(OUTPUT_SRC) \
$(MIXER_SRC) \
src/notify.c \ src/notify.c \
src/audio.c \ src/audio.c \
src/audio_parser.c \ src/audio_parser.c \
src/audioOutput.c \ src/audioOutput.c \
src/output_api.c \
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 \
src/output_init.c \
src/output/null_plugin.c \
src/buffer2array.c \ src/buffer2array.c \
src/command.c \ src/command.c \
src/idle.c \ src/idle.c \
@ -180,7 +158,6 @@ src_mpd_SOURCES = \
src/dbUtils.c \ src/dbUtils.c \
src/decoder_thread.c \ src/decoder_thread.c \
src/decoder_control.c \ src/decoder_control.c \
src/decoder_buffer.c \
src/decoder_api.c \ src/decoder_api.c \
src/directory.c \ src/directory.c \
src/directory_save.c \ src/directory_save.c \
@ -188,9 +165,6 @@ src_mpd_SOURCES = \
src/database.c \ src/database.c \
src/dirvec.c \ src/dirvec.c \
src/update.c \ src/update.c \
src/decoder_list.c \
src/input_stream.c \
src/input_file.c \
src/client.c \ src/client.c \
src/listen.c \ src/listen.c \
src/log.c \ src/log.c \
@ -198,7 +172,6 @@ src_mpd_SOURCES = \
src/main.c \ src/main.c \
src/event_pipe.c \ src/event_pipe.c \
src/daemon.c \ src/daemon.c \
src/mixer_api.c \
src/normalize.c \ src/normalize.c \
src/compress.c \ src/compress.c \
src/pipe.c \ src/pipe.c \
@ -260,20 +233,22 @@ endif
# archive plugins # archive plugins
ARCHIVE_SRC =
if HAVE_BZ2 if HAVE_BZ2
src_mpd_SOURCES += src/archive/bz2_plugin.c ARCHIVE_SRC += src/archive/bz2_plugin.c
endif endif
if HAVE_ZIP if HAVE_ZIP
src_mpd_SOURCES += src/archive/zip_plugin.c ARCHIVE_SRC += src/archive/zip_plugin.c
endif endif
if HAVE_ISO if HAVE_ISO
src_mpd_SOURCES += src/archive/iso_plugin.c ARCHIVE_SRC += src/archive/iso_plugin.c
endif endif
if ENABLE_ARCHIVE if ENABLE_ARCHIVE
src_mpd_SOURCES += \ ARCHIVE_SRC += \
src/archive_api.c \ src/archive_api.c \
src/archive_list.c \ src/archive_list.c \
src/input_archive.c src/input_archive.c
@ -282,85 +257,120 @@ endif
# decoder plugins # decoder plugins
DECODER_CFLAGS = \
$(OGGVORBIS_CFLAGS) \
$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
$(AUDIOFILE_CFLAGS) \
$(LIBMIKMOD_CFLAGS) \
$(MODPLUG_CFLAGS) \
$(SIDPLAY_CFLAGS) \
$(FLUIDSYNTH_CFLAGS) \
$(WILDMIDI_CFLAGS) \
$(MAD_CFLAGS) \
$(FFMPEG_CFLAGS)
DECODER_LIBS = \
$(OGGVORBIS_LIBS) $(FLAC_LIBS) \
$(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
$(MODPLUG_LIBS) \
$(SIDPLAY_LIBS) \
$(FLUIDSYNTH_LIBS) \
$(WILDMIDI_LIBS) \
$(MAD_LIBS) \
$(MP4FF_LIBS) \
$(FFMPEG_LIBS)
DECODER_SRC = \
src/decoder_buffer.c \
src/decoder_list.c
if HAVE_MAD if HAVE_MAD
src_mpd_SOURCES += src/decoder/mad_plugin.c DECODER_SRC += src/decoder/mad_plugin.c
endif endif
if HAVE_MPCDEC if HAVE_MPCDEC
src_mpd_SOURCES += src/decoder/mpcdec_plugin.c DECODER_SRC += src/decoder/mpcdec_plugin.c
endif endif
if HAVE_WAVPACK if HAVE_WAVPACK
src_mpd_SOURCES += src/decoder/wavpack_plugin.c DECODER_SRC += src/decoder/wavpack_plugin.c
endif endif
if HAVE_FAAD if HAVE_FAAD
src_mpd_SOURCES += src/decoder/faad_plugin.c DECODER_SRC += src/decoder/faad_plugin.c
endif endif
if HAVE_MP4 if HAVE_MP4
src_mpd_SOURCES += src/decoder/mp4ff_plugin.c DECODER_SRC += src/decoder/mp4ff_plugin.c
endif endif
if HAVE_OGG_COMMON if HAVE_OGG_COMMON
src_mpd_SOURCES += src/decoder/_ogg_common.c DECODER_SRC += src/decoder/_ogg_common.c
endif endif
if HAVE_FLAC_COMMON if HAVE_FLAC_COMMON
src_mpd_SOURCES += src/decoder/_flac_common.c DECODER_SRC += src/decoder/_flac_common.c
endif endif
if HAVE_OGGVORBIS if HAVE_OGGVORBIS
src_mpd_SOURCES += src/decoder/vorbis_plugin.c DECODER_SRC += src/decoder/vorbis_plugin.c
endif endif
if HAVE_FLAC if HAVE_FLAC
src_mpd_SOURCES += src/decoder/flac_plugin.c DECODER_SRC += src/decoder/flac_plugin.c
endif endif
if HAVE_OGGFLAC if HAVE_OGGFLAC
src_mpd_SOURCES += src/decoder/oggflac_plugin.c DECODER_SRC += src/decoder/oggflac_plugin.c
endif endif
if HAVE_AUDIOFILE if HAVE_AUDIOFILE
src_mpd_SOURCES += src/decoder/audiofile_plugin.c DECODER_SRC += src/decoder/audiofile_plugin.c
endif endif
if HAVE_MIKMOD if HAVE_MIKMOD
src_mpd_SOURCES += src/decoder/mikmod_plugin.c DECODER_SRC += src/decoder/mikmod_plugin.c
endif endif
if HAVE_MODPLUG if HAVE_MODPLUG
src_mpd_SOURCES += src/decoder/modplug_plugin.c DECODER_SRC += src/decoder/modplug_plugin.c
endif endif
if ENABLE_SIDPLAY if ENABLE_SIDPLAY
src_mpd_SOURCES += src/decoder/sidplay_plugin.cxx DECODER_SRC += src/decoder/sidplay_plugin.cxx
endif endif
if ENABLE_FLUIDSYNTH if ENABLE_FLUIDSYNTH
src_mpd_SOURCES += src/decoder/fluidsynth_plugin.c DECODER_SRC += src/decoder/fluidsynth_plugin.c
endif endif
if ENABLE_WILDMIDI if ENABLE_WILDMIDI
src_mpd_SOURCES += src/decoder/wildmidi_plugin.c DECODER_SRC += src/decoder/wildmidi_plugin.c
endif endif
if HAVE_FFMPEG if HAVE_FFMPEG
src_mpd_SOURCES += src/decoder/ffmpeg_plugin.c DECODER_SRC += src/decoder/ffmpeg_plugin.c
endif endif
# encoder plugins # encoder plugins
ENCODER_CFLAGS = \
$(VORBISENC_CFLAGS)
ENCODER_LIBS = \
$(VORBISENC_LIBS)
ENCODER_SRC =
if ENABLE_ENCODER if ENABLE_ENCODER
src_mpd_SOURCES += src/encoder_list.c ENCODER_SRC += src/encoder_list.c
if ENABLE_VORBIS_ENCODER if ENABLE_VORBIS_ENCODER
src_mpd_SOURCES += src/encoder/vorbis_encoder.c ENCODER_SRC += src/encoder/vorbis_encoder.c
endif endif
if ENABLE_LAME_ENCODER if ENABLE_LAME_ENCODER
src_mpd_SOURCES += src/encoder/lame_encoder.c ENCODER_SRC += src/encoder/lame_encoder.c
endif endif
endif endif
@ -378,51 +388,92 @@ endif
endif endif
#
# input plugins
#
INPUT_CFLAGS = \
$(CURL_CFLAGS) \
$(MMS_CFLAGS)
INPUT_LIBS = \
$(CURL_LIBS) \
$(MMS_LIBS)
INPUT_SRC = \
src/input_stream.c \
src/input_file.c
if HAVE_CURL if HAVE_CURL
src_mpd_SOURCES += src/input_curl.c src/icy_metadata.c INPUT_SRC += src/input_curl.c src/icy_metadata.c
endif endif
if ENABLE_MMS if ENABLE_MMS
src_mpd_SOURCES += src/input_mms.c INPUT_SRC += src/input_mms.c
endif endif
OUTPUT_CFLAGS = \
$(AO_CFLAGS) \
$(ALSA_CFLAGS) \
$(SHOUT_CFLAGS)
OUTPUT_LIBS = \
$(AO_LIBS) \
$(ALSA_LIBS) \
$(SHOUT_LIBS)
OUTPUT_SRC = \
src/output_api.c \
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 \
src/output_init.c \
src/output/null_plugin.c
MIXER_SRC = \
src/mixer_api.c
if HAVE_ALSA if HAVE_ALSA
src_mpd_SOURCES += src/output/alsa_plugin.c OUTPUT_SRC += src/output/alsa_plugin.c
src_mpd_SOURCES += src/mixer/alsa_mixer.c MIXER_SRC += src/mixer/alsa_mixer.c
endif endif
if HAVE_AO if HAVE_AO
src_mpd_SOURCES += src/output/ao_plugin.c OUTPUT_SRC += src/output/ao_plugin.c
endif endif
if HAVE_FIFO if HAVE_FIFO
src_mpd_SOURCES += src/output/fifo_plugin.c OUTPUT_SRC += src/output/fifo_plugin.c
endif endif
if HAVE_JACK if HAVE_JACK
src_mpd_SOURCES += src/output/jack_plugin.c OUTPUT_SRC += src/output/jack_plugin.c
endif endif
if HAVE_MVP if HAVE_MVP
src_mpd_SOURCES += src/output/mvp_plugin.c OUTPUT_SRC += src/output/mvp_plugin.c
endif endif
if HAVE_OSS if HAVE_OSS
src_mpd_SOURCES += src/output/oss_plugin.c OUTPUT_SRC += src/output/oss_plugin.c
src_mpd_SOURCES += src/mixer/oss_mixer.c MIXER_SRC += src/mixer/oss_mixer.c
endif endif
if HAVE_OSX if HAVE_OSX
src_mpd_SOURCES += src/output/osx_plugin.c OUTPUT_SRC += src/output/osx_plugin.c
endif endif
if HAVE_PULSE if HAVE_PULSE
src_mpd_SOURCES += src/output/pulse_plugin.c OUTPUT_SRC += src/output/pulse_plugin.c
endif endif
if HAVE_SHOUT if HAVE_SHOUT
src_mpd_SOURCES += src/output/shout_plugin.c OUTPUT_SRC += src/output/shout_plugin.c
endif endif