input/qobuz: implement InputPlugin::scan_tags()
[mpd-mirror.git] / Makefile.am
blob3beb8bd717fedee0e63dbd1f12784ddc216036c3
1 ACLOCAL_AMFLAGS = -I m4
2 AUTOMAKE_OPTIONS = foreign 1.11 dist-xz subdir-objects
4 AM_CPPFLAGS += -I$(srcdir)/src $(BOOST_CPPFLAGS)
6 AM_CPPFLAGS += -DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"'
8 APK_NAME = mpd
9 if ANDROID
10 else
11 bin_PROGRAMS = src/mpd
12 endif
14 noinst_LIBRARIES = \
15         libmpd.a \
16         libutil.a \
17         libthread.a \
18         libnet.a \
19         libsystem.a \
20         libevent.a \
21         libicu.a \
22         libpcm.a \
23         libbasic.a \
24         libconf.a \
25         libtag.a \
26         libinput.a \
27         libfs.a \
28         libplaylist_plugins.a \
29         libdecoder.a \
30         libfilter_api.a \
31         libfilter_plugins.a \
32         libfilter_glue.a \
33         libmixer_plugins.a \
34         liboutput_plugins.a
36 libmpd_a_CPPFLAGS = $(AM_CPPFLAGS) \
37         $(LIBMPDCLIENT_CFLAGS) \
38         $(AVAHI_CFLAGS) \
39         $(LIBWRAP_CFLAGS) \
40         $(SQLITE_CFLAGS)
42 src_mpd_LDADD = \
43         libmpd.a \
44         $(NEIGHBOR_LIBS) \
45         $(DB_LIBS) \
46         $(STORAGE_LIBS) \
47         $(PLAYLIST_LIBS) \
48         $(AVAHI_LIBS) \
49         $(LIBWRAP_LDFLAGS) \
50         $(SQLITE_LIBS) \
51         $(DECODER_LIBS) \
52         $(INPUT_LIBS) \
53         $(ARCHIVE_LIBS) \
54         $(OUTPUT_LIBS) \
55         $(TAG_LIBS) \
56         $(FILTER_LIBS) \
57         $(ENCODER_LIBS) \
58         $(MIXER_LIBS) \
59         libconf.a \
60         libbasic.a \
61         libevent.a \
62         libthread.a \
63         libnet.a \
64         $(FS_LIBS) \
65         libsystem.a \
66         $(ICU_LDADD) \
67         libutil.a \
68         $(SYSTEMD_DAEMON_LIBS)
70 src_mpd_SOURCES = \
71         src/Main.cxx src/Main.hxx
73 libmpd_a_SOURCES = \
74         $(OUTPUT_API_SRC) \
75         $(MIXER_API_SRC) \
76         src/check.h \
77         src/Compiler.h \
78         src/open.h \
79         src/notify.cxx src/notify.hxx \
80         src/protocol/Ack.cxx src/protocol/Ack.hxx \
81         src/protocol/ArgParser.cxx src/protocol/ArgParser.hxx \
82         src/protocol/Result.cxx src/protocol/Result.hxx \
83         src/command/Request.hxx \
84         src/command/CommandResult.hxx \
85         src/command/CommandError.cxx src/command/CommandError.hxx \
86         src/command/AllCommands.cxx src/command/AllCommands.hxx \
87         src/command/QueueCommands.cxx src/command/QueueCommands.hxx \
88         src/command/TagCommands.cxx src/command/TagCommands.hxx \
89         src/command/PlayerCommands.cxx src/command/PlayerCommands.hxx \
90         src/command/PlaylistCommands.cxx src/command/PlaylistCommands.hxx \
91         src/command/FileCommands.cxx src/command/FileCommands.hxx \
92         src/command/OutputCommands.cxx src/command/OutputCommands.hxx \
93         src/command/MessageCommands.cxx src/command/MessageCommands.hxx \
94         src/command/ClientCommands.cxx src/command/ClientCommands.hxx \
95         src/command/PartitionCommands.cxx src/command/PartitionCommands.hxx \
96         src/command/OtherCommands.cxx src/command/OtherCommands.hxx \
97         src/command/CommandListBuilder.cxx src/command/CommandListBuilder.hxx \
98         src/Idle.cxx src/Idle.hxx \
99         src/IdleFlags.cxx src/IdleFlags.hxx \
100         src/decoder/DecoderError.cxx src/decoder/DecoderError.hxx \
101         src/decoder/DecoderThread.cxx src/decoder/DecoderThread.hxx \
102         src/decoder/DecoderCommand.hxx \
103         src/decoder/DecoderControl.cxx src/decoder/DecoderControl.hxx \
104         src/decoder/Client.hxx \
105         src/decoder/DecoderPlugin.hxx \
106         src/decoder/Bridge.cxx src/decoder/Bridge.hxx \
107         src/decoder/DecoderPrint.cxx src/decoder/DecoderPrint.hxx \
108         src/client/Client.cxx src/client/Client.hxx \
109         src/client/ClientInternal.hxx \
110         src/client/ClientEvent.cxx \
111         src/client/ClientExpire.cxx \
112         src/client/ClientGlobal.cxx \
113         src/client/ClientIdle.cxx \
114         src/client/ClientList.cxx src/client/ClientList.hxx \
115         src/client/ClientNew.cxx \
116         src/client/ClientProcess.cxx \
117         src/client/ClientRead.cxx \
118         src/client/ClientWrite.cxx \
119         src/client/ClientMessage.cxx src/client/ClientMessage.hxx \
120         src/client/ClientSubscribe.cxx \
121         src/client/ClientFile.cxx \
122         src/client/Response.cxx src/client/Response.hxx \
123         src/Listen.cxx src/Listen.hxx \
124         src/LogInit.cxx src/LogInit.hxx \
125         src/LogBackend.cxx src/LogBackend.hxx \
126         src/Log.cxx src/Log.hxx src/LogV.hxx \
127         src/LogLevel.hxx \
128         src/ls.cxx src/ls.hxx \
129         src/Instance.cxx src/Instance.hxx \
130         src/win32/Win32Main.cxx \
131         src/MixRampInfo.hxx \
132         src/MusicBuffer.cxx src/MusicBuffer.hxx \
133         src/MusicPipe.cxx src/MusicPipe.hxx \
134         src/MusicChunk.cxx src/MusicChunk.hxx \
135         src/Mapper.cxx src/Mapper.hxx \
136         src/Partition.cxx src/Partition.hxx \
137         src/Permission.cxx src/Permission.hxx \
138         src/player/CrossFade.cxx src/player/CrossFade.hxx \
139         src/player/Thread.cxx src/player/Thread.hxx \
140         src/player/Control.cxx src/player/Control.hxx \
141         src/player/Listener.hxx \
142         src/player/Outputs.hxx \
143         src/PlaylistError.cxx src/PlaylistError.hxx \
144         src/PlaylistPrint.cxx src/PlaylistPrint.hxx \
145         src/PlaylistSave.cxx src/PlaylistSave.hxx \
146         src/playlist/PlaylistStream.cxx src/playlist/PlaylistStream.hxx \
147         src/playlist/PlaylistMapper.cxx src/playlist/PlaylistMapper.hxx \
148         src/playlist/PlaylistAny.cxx src/playlist/PlaylistAny.hxx \
149         src/playlist/PlaylistSong.cxx src/playlist/PlaylistSong.hxx \
150         src/playlist/PlaylistQueue.cxx src/playlist/PlaylistQueue.hxx \
151         src/playlist/Print.cxx src/playlist/Print.hxx \
152         src/BulkEdit.hxx \
153         src/db/PlaylistVector.cxx src/db/PlaylistVector.hxx \
154         src/db/PlaylistInfo.hxx \
155         src/queue/IdTable.hxx \
156         src/queue/Queue.cxx src/queue/Queue.hxx \
157         src/queue/QueuePrint.cxx src/queue/QueuePrint.hxx \
158         src/queue/QueueSave.cxx src/queue/QueueSave.hxx \
159         src/queue/Playlist.cxx src/queue/Playlist.hxx \
160         src/queue/PlaylistControl.cxx \
161         src/queue/PlaylistEdit.cxx \
162         src/queue/PlaylistTag.cxx \
163         src/queue/PlaylistState.cxx src/queue/PlaylistState.hxx \
164         src/queue/Listener.hxx \
165         src/PluginUnavailable.hxx \
166         src/ReplayGainGlobal.cxx src/ReplayGainGlobal.hxx \
167         src/DetachedSong.cxx src/DetachedSong.hxx \
168         src/LocateUri.cxx src/LocateUri.hxx \
169         src/SongUpdate.cxx \
170         src/SongLoader.cxx src/SongLoader.hxx \
171         src/SongPrint.cxx src/SongPrint.hxx \
172         src/SongSave.cxx src/SongSave.hxx \
173         src/StateFile.cxx src/StateFile.hxx \
174         src/Stats.cxx src/Stats.hxx \
175         src/TagPrint.cxx src/TagPrint.hxx \
176         src/TagSave.cxx src/TagSave.hxx \
177         src/TagFile.cxx src/TagFile.hxx \
178         src/TagStream.cxx src/TagStream.hxx \
179         src/TimePrint.cxx src/TimePrint.hxx \
180         src/mixer/Volume.cxx src/mixer/Volume.hxx \
181         src/Chrono.hxx \
182         src/SongFilter.cxx src/SongFilter.hxx \
183         src/PlaylistFile.cxx src/PlaylistFile.hxx
185 if ANDROID
186 else
187 libmpd_a_SOURCES += \
188         src/unix/SignalHandlers.cxx src/unix/SignalHandlers.hxx \
189         src/CommandLine.cxx src/CommandLine.hxx
191 if ENABLE_DAEMON
192 libmpd_a_SOURCES += \
193         src/unix/Daemon.cxx src/unix/Daemon.hxx \
194         src/unix/PidFile.hxx
195 endif
197 endif
199 if ENABLE_DATABASE
200 libmpd_a_SOURCES += \
201         src/queue/PlaylistUpdate.cxx \
202         src/command/StorageCommands.cxx src/command/StorageCommands.hxx \
203         src/command/DatabaseCommands.cxx src/command/DatabaseCommands.hxx \
204         src/db/Count.cxx src/db/Count.hxx \
205         src/db/LightSong.cxx src/db/LightSong.hxx \
206         src/db/LightDirectory.hxx \
207         src/db/update/UpdateDomain.cxx src/db/update/UpdateDomain.hxx \
208         src/db/update/Service.cxx src/db/update/Service.hxx \
209         src/db/update/Queue.cxx src/db/update/Queue.hxx \
210         src/db/update/UpdateIO.cxx src/db/update/UpdateIO.hxx \
211         src/db/update/Editor.cxx src/db/update/Editor.hxx \
212         src/db/update/Walk.cxx src/db/update/Walk.hxx \
213         src/db/update/UpdateSong.cxx \
214         src/db/update/Container.cxx \
215         src/db/update/Remove.cxx src/db/update/Remove.hxx \
216         src/db/update/ExcludeList.cxx src/db/update/ExcludeList.hxx \
217         src/db/Uri.hxx \
218         src/db/DatabaseGlue.cxx src/db/DatabaseGlue.hxx \
219         src/db/Configured.cxx src/db/Configured.hxx \
220         src/db/DatabaseSong.cxx src/db/DatabaseSong.hxx \
221         src/db/DatabasePrint.cxx src/db/DatabasePrint.hxx \
222         src/db/DatabaseQueue.cxx src/db/DatabaseQueue.hxx \
223         src/db/DatabasePlaylist.cxx src/db/DatabasePlaylist.hxx \
224         src/db/DatabaseError.hxx \
225         src/db/DatabaseLock.cxx src/db/DatabaseLock.hxx \
226         src/db/DatabasePlugin.hxx \
227         src/db/Interface.hxx \
228         src/db/Stats.hxx \
229         src/db/DatabaseListener.hxx \
230         src/db/Visitor.hxx \
231         src/db/Selection.cxx src/db/Selection.hxx
232 endif
234 CURL_SOURCES = \
235         src/lib/curl/Delegate.cxx src/lib/curl/Delegate.hxx \
236         src/lib/curl/Parser.hxx \
237         src/lib/curl/Version.cxx src/lib/curl/Version.hxx \
238         src/lib/curl/Init.cxx src/lib/curl/Init.hxx \
239         src/lib/curl/Global.cxx src/lib/curl/Global.hxx \
240         src/lib/curl/Request.cxx src/lib/curl/Request.hxx \
241         src/lib/curl/Form.cxx src/lib/curl/Form.hxx \
242         src/lib/curl/Handler.hxx \
243         src/lib/curl/Easy.hxx \
244         src/lib/curl/Multi.hxx \
245         src/lib/curl/Slist.hxx
247 YAJL_SOURCES = \
248         src/lib/yajl/ResponseParser.cxx src/lib/yajl/ResponseParser.hxx \
249         src/lib/yajl/ParseInputStream.cxx src/lib/yajl/ParseInputStream.hxx \
250         src/lib/yajl/Callbacks.hxx \
251         src/lib/yajl/Handle.hxx
253 UPNP_SOURCES = \
254         src/lib/upnp/Compat.hxx \
255         src/lib/upnp/Init.cxx src/lib/upnp/Init.hxx \
256         src/lib/upnp/ClientInit.cxx src/lib/upnp/ClientInit.hxx \
257         src/lib/upnp/Device.cxx src/lib/upnp/Device.hxx \
258         src/lib/upnp/ContentDirectoryService.cxx src/lib/upnp/ContentDirectoryService.hxx \
259         src/lib/upnp/Discovery.cxx src/lib/upnp/Discovery.hxx \
260         src/lib/upnp/ixmlwrap.cxx src/lib/upnp/ixmlwrap.hxx \
261         src/lib/upnp/Callback.hxx \
262         src/lib/upnp/Util.cxx src/lib/upnp/Util.hxx \
263         src/lib/upnp/UniqueIxml.hxx \
264         src/lib/upnp/Action.hxx
266 ALSA_SOURCES = \
267         src/lib/alsa/Version.cxx src/lib/alsa/Version.hxx \
268         src/lib/alsa/AllowedFormat.cxx src/lib/alsa/AllowedFormat.hxx \
269         src/lib/alsa/HwSetup.cxx src/lib/alsa/HwSetup.hxx \
270         src/lib/alsa/Format.hxx \
271         src/lib/alsa/PeriodBuffer.hxx \
272         src/lib/alsa/NonBlock.cxx src/lib/alsa/NonBlock.hxx
275 # Android native library
278 if ANDROID
280 noinst_LIBRARIES += libjava.a
281 libjava_a_SOURCES = \
282         src/java/Class.hxx \
283         src/java/Exception.hxx \
284         src/java/Global.cxx src/java/Global.hxx \
285         src/java/Object.hxx \
286         src/java/Ref.hxx \
287         src/java/File.cxx src/java/File.hxx \
288         src/java/String.cxx src/java/String.hxx
290 noinst_LIBRARIES += libandroid.a
291 libandroid_a_SOURCES = \
292         src/android/Context.cxx src/android/Context.hxx \
293         src/android/Environment.cxx src/android/Environment.hxx
294 libandroid_a_CPPFLAGS = $(AM_CPPFLAGS) -Iandroid/build/include
296 noinst_LIBRARIES += libmain.a
297 libmain_a_SOURCES = \
298         src/Main.cxx src/Main.hxx
299 libmain_a_CPPFLAGS = $(AM_CPPFLAGS) -Iandroid/build/include
301 src_mpd_LDADD += libandroid.a libjava.a
303 all-local: android/build/$(APK_NAME)-debug.apk
304 clean-local:
305         rm -rf android/build
307 libmpd.so: $(filter %.a,$(src_mpd_LDADD)) libmain.a
308         $(AM_V_CXXLD)$(CXXLD) -shared -Wl,--no-undefined,-shared,-Bsymbolic -llog -lz -o $@ $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) src/libmain_a-Main.o $(src_mpd_LDADD) $(LIBS)
310 ANDROID_SDK_BUILD_TOOLS_VERSION = 27.0.0
311 ANDROID_SDK_PLATFORM = android-17
313 ANDROID_BUILD_TOOLS_DIR = $(ANDROID_SDK)/build-tools/$(ANDROID_SDK_BUILD_TOOLS_VERSION)
314 ANDROID_SDK_PLATFORM_DIR = $(ANDROID_SDK)/platforms/$(ANDROID_SDK_PLATFORM)
316 JAVAC = javac
317 AAPT = $(ANDROID_BUILD_TOOLS_DIR)/aapt
318 DX = $(ANDROID_BUILD_TOOLS_DIR)/dx
319 ZIPALIGN = $(ANDROID_BUILD_TOOLS_DIR)/zipalign
321 ANDROID_XML_RES := $(wildcard $(srcdir)/android/res/*/*.xml)
322 ANDROID_XML_RES_COPIES := $(patsubst $(srcdir)/android/%,android/build/%,$(ANDROID_XML_RES))
324 JAVA_SOURCE_NAMES = Bridge.java Loader.java Main.java
325 JAVA_SOURCE_PATHS = $(addprefix $(srcdir)/android/src/,$(JAVA_SOURCE_NAMES))
327 JAVA_CLASSFILES_DIR = android/build/classes
329 $(ANDROID_XML_RES_COPIES): $(ANDROID_XML_RES)
330         @$(MKDIR_P) $(dir $@)
331         cp $(patsubst android/build/%,$(srcdir)/android/%,$@) $@
333 android/build/resources.apk: $(ANDROID_XML_RES_COPIES) android/build/res/drawable/icon.png
334         @$(MKDIR_P) android/build/gen
335         $(AAPT) package -f -m --auto-add-overlay \
336                 --custom-package org.musicpd \
337                 -M $(srcdir)/android/AndroidManifest.xml \
338                 -S android/build/res \
339                 -J android/build/gen \
340                 -I $(ANDROID_SDK_PLATFORM_DIR)/android.jar \
341                 -F android/build/resources.apk
343 # R.java is generated by aapt, when resources.apk is generated
344 android/build/gen/org/musicpd/R.java: android/build/resources.apk
346 android/build/classes.dex: $(JAVA_SOURCE_PATHS) android/build/gen/org/musicpd/R.java
347         @$(MKDIR_P) $(JAVA_CLASSFILES_DIR)
348         $(JAVAC) -source 1.5 -target 1.5 -Xlint:-options \
349                 -cp $(ANDROID_SDK_PLATFORM_DIR)/android.jar:$(JAVA_CLASSFILES_DIR) \
350                 -d $(JAVA_CLASSFILES_DIR) $^
351         $(DX) --dex --output $@ $(JAVA_CLASSFILES_DIR)
353 android/build/include/org_musicpd_Bridge.h: android/build/classes.dex
354         javah -classpath $(ANDROID_SDK_PLATFORM_DIR)/android.jar:$(JAVA_CLASSFILES_DIR) -d $(@D) org.musicpd.Bridge
356 BUILT_SOURCES = android/build/include/org_musicpd_Bridge.h
358 android/build/lib/armeabi-v7a/libmpd.so: libmpd.so
359         mkdir -p $(@D)
360         rm -f $@
361         $(STRIP) -o $@ $<
363 android/build/res/drawable/icon.png: mpd.svg
364         mkdir -p $(@D)
365         rsvg-convert --width=48 --height=48 $< -o $@
367 .DELETE_ON_ERROR: android/build/unsigned.apk
368 android/build/unsigned.apk: android/build/classes.dex android/build/resources.apk android/build/lib/armeabi-v7a/libmpd.so
369         cp android/build/resources.apk $@
370         cd $(dir $@) && zip -q -r $(notdir $@) classes.dex lib
372 android/build/$(APK_NAME)-debug.apk: android/build/unsigned.apk
373         jarsigner -keystore $(HOME)/.android/debug.keystore -storepass android -signedjar $@ $< androiddebugkey
375 android/build/$(APK_NAME)-release-unaligned.apk: android/build/unsigned.apk
376         jarsigner -digestalg SHA1 -sigalg MD5withRSA -storepass:env ANDROID_KEYSTORE_PASS -keystore $(ANDROID_KEYSTORE) -signedjar $@ $< $(ANDROID_KEY_ALIAS)
378 android/build/$(APK_NAME).apk: android/build/$(APK_NAME)-release-unaligned.apk
379         $(ZIPALIGN) -f 4 $< $@
381 endif
384 # Windows resource file
387 win32/res/mpd.$(OBJEXT): %.$(OBJEXT): %.rc
388         $(WINDRES) -i $< -o $@
390 if HAVE_WINDOWS
391 noinst_DATA = win32/res/mpd.rc
393 EXTRA_src_mpd_DEPENDENCIES = win32/res/mpd.$(OBJEXT)
394 src_mpd_LDFLAGS = -Wl,win32/res/mpd.$(OBJEXT)
395 endif
398 # Haiku resource file
401 src/haiku/mpd.rsrc: src/haiku/mpd.rdef
402         $(RC) -o $@ $<
404 if ENABLE_HAIKU
405 noinst_DATA = src/haiku/mpd.rdef
407 EXTRA_src_mpd_DEPENDENCIES = src/haiku/mpd.rsrc
409 src/mpd.haiku-rsrc-done: src/mpd src/haiku/mpd.rsrc
410         $(XRES) -o src/mpd src/haiku/mpd.rsrc
411         @touch src/mpd.haiku-rsrc-done
413 all-local: src/mpd.haiku-rsrc-done
415 clean-local:
416         rm -rf src/haiku/mpd.rsrc src/mpd.haiku-rsrc-done
417 endif
419 if ENABLE_DATABASE
420 if ENABLE_INOTIFY
421 libmpd_a_SOURCES += \
422         src/db/update/InotifyDomain.cxx src/db/update/InotifyDomain.hxx \
423         src/db/update/InotifySource.cxx src/db/update/InotifySource.hxx \
424         src/db/update/InotifyQueue.cxx src/db/update/InotifyQueue.hxx \
425         src/db/update/InotifyUpdate.cxx src/db/update/InotifyUpdate.hxx
426 endif
427 endif
429 if ENABLE_SQLITE
430 libmpd_a_SOURCES += \
431         src/command/StickerCommands.cxx src/command/StickerCommands.hxx \
432         src/lib/sqlite/Error.cxx src/lib/sqlite/Error.hxx \
433         src/lib/sqlite/Util.hxx \
434         src/sticker/Match.hxx \
435         src/sticker/StickerDatabase.cxx src/sticker/StickerDatabase.hxx \
436         src/sticker/StickerPrint.cxx src/sticker/StickerPrint.hxx \
437         src/sticker/SongSticker.cxx src/sticker/SongSticker.hxx
438 endif
440 # Generic utility library
442 libutil_a_SOURCES = \
443         src/util/Exception.cxx src/util/Exception.hxx \
444         src/util/RuntimeError.hxx \
445         src/util/Macros.hxx \
446         src/util/BindMethod.hxx \
447         src/util/Cast.hxx \
448         src/util/Chrono.hxx \
449         src/util/Clamp.hxx \
450         src/util/DeleteDisposer.hxx \
451         src/util/Alloc.cxx src/util/Alloc.hxx \
452         src/util/AllocatedArray.hxx \
453         src/util/VarSize.hxx \
454         src/util/ScopeExit.hxx \
455         src/util/Domain.hxx \
456         src/util/ReusableArray.hxx \
457         src/util/ASCII.hxx \
458         src/util/UTF8.cxx src/util/UTF8.hxx \
459         src/util/CharUtil.hxx \
460         src/util/WCharUtil.hxx \
461         src/util/NumberParser.hxx \
462         src/util/MimeType.cxx src/util/MimeType.hxx \
463         src/util/StringBuffer.hxx \
464         src/util/StringFormat.hxx \
465         src/util/StringPointer.hxx \
466         src/util/StringView.cxx src/util/StringView.hxx \
467         src/util/WStringView.hxx \
468         src/util/TStringView.hxx \
469         src/util/ConcatString.hxx \
470         src/util/AllocatedString.cxx src/util/AllocatedString.hxx \
471         src/util/TruncateString.cxx src/util/TruncateString.hxx \
472         src/util/StringStrip.cxx src/util/StringStrip.hxx \
473         src/util/StringUtil.cxx src/util/StringUtil.hxx \
474         src/util/StringCompare.cxx src/util/StringCompare.hxx \
475         src/util/WStringCompare.cxx src/util/WStringCompare.hxx \
476         src/util/StringAPI.hxx \
477         src/util/WStringAPI.hxx \
478         src/util/DivideString.cxx src/util/DivideString.hxx \
479         src/util/SplitString.cxx src/util/SplitString.hxx \
480         src/util/IterableSplitString.hxx \
481         src/util/FormatString.cxx src/util/FormatString.hxx \
482         src/util/Tokenizer.cxx src/util/Tokenizer.hxx \
483         src/util/TextFile.hxx \
484         src/util/TimeParser.cxx src/util/TimeParser.hxx \
485         src/util/UriUtil.cxx src/util/UriUtil.hxx \
486         src/util/Manual.hxx \
487         src/util/StaticFifoBuffer.hxx \
488         src/util/ForeignFifoBuffer.hxx \
489         src/util/DynamicFifoBuffer.hxx \
490         src/util/ConstBuffer.hxx \
491         src/util/WritableBuffer.hxx \
492         src/util/CircularBuffer.hxx \
493         src/util/LazyRandomEngine.cxx src/util/LazyRandomEngine.hxx \
494         src/util/SliceBuffer.hxx \
495         src/util/HugeAllocator.cxx src/util/HugeAllocator.hxx \
496         src/util/PeakBuffer.cxx src/util/PeakBuffer.hxx \
497         src/util/OptionParser.cxx src/util/OptionParser.hxx \
498         src/util/OptionDef.hxx \
499         src/util/ByteReverse.cxx src/util/ByteReverse.hxx \
500         src/util/format.c src/util/format.h \
501         src/util/bit_reverse.c src/util/bit_reverse.h
503 # Multi-threading library
505 libthread_a_SOURCES = \
506         src/thread/SafeSingleton.hxx \
507         src/thread/Util.cxx src/thread/Util.hxx \
508         src/thread/Name.hxx \
509         src/thread/Slack.hxx \
510         src/thread/Mutex.hxx \
511         src/thread/PosixMutex.hxx \
512         src/thread/CriticalSection.hxx \
513         src/thread/Cond.hxx \
514         src/thread/PosixCond.hxx \
515         src/thread/WindowsCond.hxx \
516         src/thread/Thread.cxx src/thread/Thread.hxx \
517         src/thread/Id.hxx
519 # Networking library
521 libnet_a_SOURCES = \
522         src/net/Features.hxx \
523         src/net/ToString.cxx src/net/ToString.hxx \
524         src/net/Resolver.cxx src/net/Resolver.hxx \
525         src/net/StaticSocketAddress.cxx src/net/StaticSocketAddress.hxx \
526         src/net/AllocatedSocketAddress.cxx src/net/AllocatedSocketAddress.hxx \
527         src/net/IPv4Address.cxx src/net/IPv4Address.hxx \
528         src/net/SocketAddress.cxx src/net/SocketAddress.hxx \
529         src/net/SocketUtil.cxx src/net/SocketUtil.hxx \
530         src/net/SocketDescriptor.cxx src/net/SocketDescriptor.hxx \
531         src/net/UniqueSocketDescriptor.hxx \
532         src/net/SocketError.cxx src/net/SocketError.hxx
534 # System library
536 libsystem_a_SOURCES = \
537         src/system/ByteOrder.hxx \
538         src/system/Error.hxx \
539         src/system/FatalError.cxx src/system/FatalError.hxx \
540         src/system/FileDescriptor.cxx src/system/FileDescriptor.hxx \
541         src/system/UniqueFileDescriptor.hxx \
542         src/system/EventPipe.cxx src/system/EventPipe.hxx \
543         src/system/EventFD.cxx src/system/EventFD.hxx \
544         src/system/SignalFD.cxx src/system/SignalFD.hxx \
545         src/system/EPollFD.cxx src/system/EPollFD.hxx \
546         src/system/PeriodClock.hxx \
547         src/system/Clock.cxx src/system/Clock.hxx
549 # Event loop library
551 libevent_a_SOURCES = \
552         src/event/WakeFD.hxx \
553         src/event/PollGroup.hxx \
554         src/event/PollGroupEPoll.hxx \
555         src/event/PollGroupPoll.hxx src/event/PollGroupPoll.cxx \
556         src/event/PollGroupWinSelect.hxx src/event/PollGroupWinSelect.cxx \
557         src/event/PollResultGeneric.hxx \
558         src/event/SignalMonitor.hxx src/event/SignalMonitor.cxx \
559         src/event/TimerEvent.hxx src/event/TimerEvent.cxx \
560         src/event/IdleMonitor.hxx src/event/IdleMonitor.cxx \
561         src/event/DeferEvent.cxx src/event/DeferEvent.hxx \
562         src/event/MaskMonitor.hxx src/event/MaskMonitor.cxx \
563         src/event/SocketMonitor.cxx src/event/SocketMonitor.hxx \
564         src/event/BufferedSocket.cxx src/event/BufferedSocket.hxx \
565         src/event/FullyBufferedSocket.cxx src/event/FullyBufferedSocket.hxx \
566         src/event/MultiSocketMonitor.cxx src/event/MultiSocketMonitor.hxx \
567         src/event/ServerSocket.cxx src/event/ServerSocket.hxx \
568         src/event/Call.hxx src/event/Call.cxx \
569         src/event/Thread.cxx src/event/Thread.hxx \
570         src/event/Loop.cxx src/event/Loop.hxx
572 # UTF-8 library
574 libicu_a_SOURCES = \
575         src/lib/icu/CaseFold.cxx src/lib/icu/CaseFold.hxx \
576         src/lib/icu/Compare.cxx src/lib/icu/Compare.hxx \
577         src/lib/icu/Collate.cxx src/lib/icu/Collate.hxx \
578         src/lib/icu/Converter.cxx src/lib/icu/Converter.hxx
580 if HAVE_ICU
581 libicu_a_SOURCES += \
582         src/lib/icu/Util.cxx src/lib/icu/Util.hxx \
583         src/lib/icu/Init.cxx src/lib/icu/Init.hxx
584 endif
586 if HAVE_WINDOWS
587 libicu_a_SOURCES += \
588         src/lib/icu/Win32.cxx src/lib/icu/Win32.hxx
589 endif
591 libicu_a_CPPFLAGS = $(AM_CPPFLAGS) \
592         $(ICU_CFLAGS)
594 ICU_LDADD = libicu.a $(ICU_LIBS)
596 # PCM library
598 libpcm_a_SOURCES = \
599         src/CheckAudioFormat.cxx src/CheckAudioFormat.hxx \
600         src/AudioFormat.cxx src/AudioFormat.hxx \
601         src/AudioParser.cxx src/AudioParser.hxx \
602         src/pcm/SampleFormat.cxx src/pcm/SampleFormat.hxx \
603         src/pcm/Traits.hxx \
604         src/pcm/Interleave.cxx src/pcm/Interleave.hxx \
605         src/pcm/PcmBuffer.cxx src/pcm/PcmBuffer.hxx \
606         src/pcm/PcmExport.cxx src/pcm/PcmExport.hxx \
607         src/pcm/PcmConvert.cxx src/pcm/PcmConvert.hxx \
608         src/pcm/PcmDop.cxx src/pcm/PcmDop.hxx \
609         src/pcm/Volume.cxx src/pcm/Volume.hxx \
610         src/pcm/Silence.cxx src/pcm/Silence.hxx \
611         src/pcm/PcmMix.cxx src/pcm/PcmMix.hxx \
612         src/pcm/PcmChannels.cxx src/pcm/PcmChannels.hxx \
613         src/pcm/PcmPack.cxx src/pcm/PcmPack.hxx \
614         src/pcm/PcmFormat.cxx src/pcm/PcmFormat.hxx \
615         src/pcm/FloatConvert.hxx \
616         src/pcm/ShiftConvert.hxx \
617         src/pcm/Neon.hxx \
618         src/pcm/FormatConverter.cxx src/pcm/FormatConverter.hxx \
619         src/pcm/ChannelsConverter.cxx src/pcm/ChannelsConverter.hxx \
620         src/pcm/Order.cxx src/pcm/Order.hxx \
621         src/pcm/Resampler.hxx \
622         src/pcm/GlueResampler.cxx src/pcm/GlueResampler.hxx \
623         src/pcm/FallbackResampler.cxx src/pcm/FallbackResampler.hxx \
624         src/pcm/ConfiguredResampler.cxx src/pcm/ConfiguredResampler.hxx \
625         src/pcm/PcmDither.cxx src/pcm/PcmDither.hxx \
626         src/pcm/PcmPrng.hxx \
627         src/pcm/PcmUtils.hxx
628 libpcm_a_CPPFLAGS = $(AM_CPPFLAGS) \
629         $(SOXR_CFLAGS) \
630         $(LIBSAMPLERATE_CFLAGS)
632 PCM_LIBS = \
633         libpcm.a \
634         $(SOXR_LIBS) \
635         $(LIBSAMPLERATE_LIBS)
637 if ENABLE_DSD
638 libpcm_a_SOURCES += \
639         src/pcm/Dsd16.cxx src/pcm/Dsd16.hxx \
640         src/pcm/Dsd32.cxx src/pcm/Dsd32.hxx \
641         src/pcm/PcmDsd.cxx src/pcm/PcmDsd.hxx \
642         src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h
643 endif
645 if ENABLE_LIBSAMPLERATE
646 libpcm_a_SOURCES += \
647         src/pcm/LibsamplerateResampler.cxx src/pcm/LibsamplerateResampler.hxx
648 endif
650 if ENABLE_SOXR
651 libpcm_a_SOURCES += \
652         src/pcm/SoxrResampler.cxx src/pcm/SoxrResampler.hxx
653 endif
655 # Xiph codec support library
657 if HAVE_XIPH
659 noinst_LIBRARIES += libxiph.a
661 libxiph_a_SOURCES = \
662         src/lib/xiph/VorbisComment.hxx \
663         src/lib/xiph/VorbisComments.cxx src/lib/xiph/VorbisComments.hxx \
664         src/lib/xiph/XiphTags.cxx src/lib/xiph/XiphTags.hxx
665 libxiph_a_CPPFLAGS = $(AM_CPPFLAGS) \
666         $(OGG_CFLAGS)
668 if HAVE_OGG
669 libxiph_a_SOURCES += \
670         src/lib/xiph/OggVisitor.cxx src/lib/xiph/OggVisitor.hxx \
671         src/lib/xiph/OggSerial.cxx src/lib/xiph/OggSerial.hxx \
672         src/lib/xiph/OggSyncState.cxx src/lib/xiph/OggSyncState.hxx \
673         src/lib/xiph/OggFind.cxx src/lib/xiph/OggFind.hxx \
674         src/lib/xiph/OggPage.hxx \
675         src/lib/xiph/OggPacket.cxx src/lib/xiph/OggPacket.hxx \
676         src/lib/xiph/OggStreamState.hxx
677 endif
679 XIPH_LIBS = libxiph.a \
680         $(OGG_LIBS)
682 endif
684 # File system library
686 FS_LIBS = libfs.a
688 libfs_a_SOURCES = \
689         src/fs/io/Reader.hxx \
690         src/fs/io/PeekReader.cxx src/fs/io/PeekReader.hxx \
691         src/fs/io/FileReader.cxx src/fs/io/FileReader.hxx \
692         src/fs/io/BufferedReader.cxx src/fs/io/BufferedReader.hxx \
693         src/fs/io/TextFile.cxx src/fs/io/TextFile.hxx \
694         src/fs/io/OutputStream.hxx \
695         src/fs/io/StdioOutputStream.hxx \
696         src/fs/io/FileOutputStream.cxx src/fs/io/FileOutputStream.hxx \
697         src/fs/io/BufferedOutputStream.cxx src/fs/io/BufferedOutputStream.hxx \
698         src/fs/Domain.cxx src/fs/Domain.hxx \
699         src/fs/Limits.hxx \
700         src/fs/Traits.cxx src/fs/Traits.hxx \
701         src/fs/Config.cxx src/fs/Config.hxx \
702         src/fs/Charset.cxx src/fs/Charset.hxx \
703         src/fs/Path.cxx src/fs/Path2.cxx src/fs/Path.hxx \
704         src/fs/AllocatedPath.cxx src/fs/AllocatedPath.hxx \
705         src/fs/NarrowPath.hxx \
706         src/fs/FileSystem.cxx src/fs/FileSystem.hxx \
707         src/fs/FileInfo.hxx \
708         src/fs/Glob.hxx \
709         src/fs/StandardDirectory.cxx src/fs/StandardDirectory.hxx \
710         src/fs/CheckFile.cxx src/fs/CheckFile.hxx \
711         src/fs/DirectoryReader.cxx src/fs/DirectoryReader.hxx
712 libfs_a_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS)
714 if ENABLE_ZLIB
715 libfs_a_SOURCES += \
716         src/lib/zlib/Error.cxx src/lib/zlib/Error.hxx \
717         src/fs/io/GunzipReader.cxx src/fs/io/GunzipReader.hxx \
718         src/fs/io/AutoGunzipReader.cxx src/fs/io/AutoGunzipReader.hxx \
719         src/fs/io/GzipOutputStream.cxx src/fs/io/GzipOutputStream.hxx
720 FS_LIBS += $(ZLIB_LIBS)
721 endif
723 if HAVE_WINDOWS
724 # for PathMatchSpec()
725 FS_LIBS += -lshlwapi
726 endif
728 # Storage library
730 SMBCLIENT_SOURCES = \
731         src/lib/smbclient/Domain.cxx src/lib/smbclient/Domain.hxx \
732         src/lib/smbclient/Mutex.cxx src/lib/smbclient/Mutex.hxx \
733         src/lib/smbclient/Init.cxx src/lib/smbclient/Init.hxx
735 NFS_SOURCES = \
736         src/lib/nfs/Callback.hxx \
737         src/lib/nfs/Cancellable.hxx \
738         src/lib/nfs/Lease.hxx \
739         src/lib/nfs/Connection.cxx src/lib/nfs/Connection.hxx \
740         src/lib/nfs/Manager.cxx src/lib/nfs/Manager.hxx \
741         src/lib/nfs/Glue.cxx src/lib/nfs/Glue.hxx \
742         src/lib/nfs/Base.cxx src/lib/nfs/Base.hxx \
743         src/lib/nfs/FileReader.cxx src/lib/nfs/FileReader.hxx \
744         src/lib/nfs/Blocking.cxx src/lib/nfs/Blocking.hxx
746 if ENABLE_DATABASE
748 noinst_LIBRARIES += libstorage.a
750 libstorage_a_SOURCES = \
751         src/storage/StoragePlugin.hxx \
752         src/storage/Registry.cxx src/storage/Registry.hxx \
753         src/storage/StorageInterface.cxx src/storage/StorageInterface.hxx \
754         src/storage/CompositeStorage.cxx src/storage/CompositeStorage.hxx \
755         src/storage/MemoryDirectoryReader.cxx src/storage/MemoryDirectoryReader.hxx \
756         src/storage/Configured.cxx src/storage/Configured.hxx \
757         src/storage/plugins/LocalStorage.cxx src/storage/plugins/LocalStorage.hxx \
758         src/storage/StorageState.cxx src/storage/StorageState.hxx \
759         src/storage/FileInfo.hxx
761 libstorage_a_CPPFLAGS = $(AM_CPPFLAGS) \
762         $(NFS_CFLAGS) \
763         $(SMBCLIENT_CFLAGS)
765 STORAGE_LIBS = \
766         libstorage.a \
767         $(CURL_LIBS) \
768         $(EXPAT_LIBS) \
769         $(NFS_LIBS) \
770         $(SMBCLIENT_LIBS)
772 if ENABLE_SMBCLIENT
773 libstorage_a_SOURCES += \
774         $(SMBCLIENT_SOURCES) \
775         src/storage/plugins/SmbclientStorage.cxx src/storage/plugins/SmbclientStorage.hxx
776 endif
778 if ENABLE_NFS
779 libstorage_a_SOURCES += \
780         $(NFS_SOURCES) \
781         src/storage/plugins/NfsStorage.cxx src/storage/plugins/NfsStorage.hxx
782 endif
784 if ENABLE_WEBDAV
785 libstorage_a_SOURCES += \
786         src/lib/expat/ExpatParser.cxx \
787         src/storage/plugins/CurlStorage.cxx src/storage/plugins/CurlStorage.hxx
788 endif
790 endif
792 # neighbor plugins
794 if ENABLE_NEIGHBOR_PLUGINS
796 libmpd_a_SOURCES += \
797         src/command/NeighborCommands.cxx \
798         src/command/NeighborCommands.hxx
800 noinst_LIBRARIES += libneighbor.a
802 libneighbor_a_SOURCES = \
803         src/neighbor/Registry.cxx src/neighbor/Registry.hxx \
804         src/neighbor/Glue.cxx src/neighbor/Glue.hxx \
805         src/neighbor/Info.hxx \
806         src/neighbor/Listener.hxx \
807         src/neighbor/Explorer.hxx \
808         src/neighbor/NeighborPlugin.hxx
810 libneighbor_a_CPPFLAGS = $(AM_CPPFLAGS) \
811         $(UPNP_CFLAGS) \
812         $(SMBCLIENT_CFLAGS)
814 if ENABLE_SMBCLIENT
815 libneighbor_a_SOURCES += \
816         $(SMBCLIENT_SOURCES) \
817         src/neighbor/plugins/SmbclientNeighborPlugin.cxx src/neighbor/plugins/SmbclientNeighborPlugin.hxx
818 endif
820 NEIGHBOR_LIBS = \
821         $(SMBCLIENT_LIBS) \
822         libneighbor.a
824 if ENABLE_UPNP
825 libneighbor_a_SOURCES += \
826         $(UPNP_SOURCES) \
827         src/neighbor/plugins/UpnpNeighborPlugin.cxx src/neighbor/plugins/UpnpNeighborPlugin.hxx
828 NEIGHBOR_LIBS += \
829         $(EXPAT_LIBS) \
830         $(UPNP_LIBS)
831 endif
833 endif
835 # database plugins
837 if ENABLE_DATABASE
839 noinst_LIBRARIES += libdb_plugins.a
841 libdb_plugins_a_SOURCES = \
842         src/PlaylistDatabase.cxx src/PlaylistDatabase.hxx \
843         src/db/Registry.cxx src/db/Registry.hxx \
844         src/db/Helpers.cxx src/db/Helpers.hxx \
845         src/db/UniqueTags.cxx src/db/UniqueTags.hxx \
846         src/db/plugins/simple/DatabaseSave.cxx \
847         src/db/plugins/simple/DatabaseSave.hxx \
848         src/db/plugins/simple/DirectorySave.cxx \
849         src/db/plugins/simple/DirectorySave.hxx \
850         src/db/plugins/simple/Directory.cxx \
851         src/db/plugins/simple/Directory.hxx \
852         src/db/plugins/simple/Song.cxx \
853         src/db/plugins/simple/Song.hxx \
854         src/db/plugins/simple/SongSort.cxx \
855         src/db/plugins/simple/SongSort.hxx \
856         src/db/plugins/simple/Mount.cxx \
857         src/db/plugins/simple/Mount.hxx \
858         src/db/plugins/simple/PrefixedLightSong.hxx \
859         src/db/plugins/simple/SimpleDatabasePlugin.cxx \
860         src/db/plugins/simple/SimpleDatabasePlugin.hxx
861 libdb_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
862         $(UPNP_CFLAGS)
864 if ENABLE_LIBMPDCLIENT
865 libdb_plugins_a_SOURCES += \
866         src/db/plugins/ProxyDatabasePlugin.cxx src/db/plugins/ProxyDatabasePlugin.hxx
867 endif
869 DB_LIBS = \
870         libdb_plugins.a \
871         $(LIBMPDCLIENT_LIBS)
873 if ENABLE_UPNP
874 libdb_plugins_a_SOURCES += \
875         $(UPNP_SOURCES) \
876         src/db/plugins/upnp/UpnpDatabasePlugin.cxx src/db/plugins/upnp/UpnpDatabasePlugin.hxx \
877         src/db/plugins/upnp/Tags.cxx src/db/plugins/upnp/Tags.hxx \
878         src/db/plugins/upnp/ContentDirectoryService.cxx \
879         src/db/plugins/upnp/Directory.cxx src/db/plugins/upnp/Directory.hxx \
880         src/db/plugins/upnp/Object.cxx src/db/plugins/upnp/Object.hxx
881 DB_LIBS += \
882         $(EXPAT_LIBS) \
883         $(UPNP_LIBS)
884 endif
886 endif
888 # archive plugins
890 if ENABLE_ARCHIVE
892 noinst_LIBRARIES += libarchive.a
894 libmpd_a_SOURCES +=  \
895         src/TagArchive.cxx src/TagArchive.hxx \
896         src/db/update/Archive.cxx
898 libarchive_a_SOURCES = \
899         src/archive/ArchiveDomain.cxx src/archive/ArchiveDomain.hxx \
900         src/archive/ArchiveLookup.cxx src/archive/ArchiveLookup.hxx \
901         src/archive/ArchiveList.cxx src/archive/ArchiveList.hxx \
902         src/archive/ArchivePlugin.cxx src/archive/ArchivePlugin.hxx \
903         src/archive/ArchiveVisitor.hxx \
904         src/archive/ArchiveFile.hxx \
905         src/input/plugins/ArchiveInputPlugin.cxx src/input/plugins/ArchiveInputPlugin.hxx
906 libarchive_a_CPPFLAGS = $(AM_CPPFLAGS) \
907         $(BZ2_CFLAGS) \
908         $(ISO9660_CFLAGS) \
909         $(ZZIP_CFLAGS)
911 ARCHIVE_LIBS = \
912         libarchive.a \
913         $(BZ2_LIBS) \
914         $(ISO9660_LIBS) \
915         $(ZZIP_LIBS)
917 if ENABLE_BZ2
918 libarchive_a_SOURCES += \
919         src/archive/plugins/Bzip2ArchivePlugin.cxx \
920         src/archive/plugins/Bzip2ArchivePlugin.hxx
921 endif
923 if ENABLE_ZZIP
924 libarchive_a_SOURCES += \
925         src/archive/plugins/ZzipArchivePlugin.cxx \
926         src/archive/plugins/ZzipArchivePlugin.hxx
927 endif
929 if ENABLE_ISO9660
930 libarchive_a_SOURCES += \
931         src/archive/plugins/Iso9660ArchivePlugin.cxx \
932         src/archive/plugins/Iso9660ArchivePlugin.hxx
933 endif
935 else
936 ARCHIVE_LIBS =
937 endif
939 libbasic_a_SOURCES = \
940         src/ReplayGainConfig.hxx \
941         src/ReplayGainMode.cxx src/ReplayGainMode.hxx \
942         src/ReplayGainInfo.cxx src/ReplayGainInfo.hxx
944 # configuration library
946 libconf_a_SOURCES = \
947         src/config/ConfigDefaults.hxx \
948         src/config/ConfigPath.cxx src/config/ConfigPath.hxx \
949         src/config/Data.cxx src/config/Data.hxx \
950         src/config/Block.cxx src/config/Block.hxx \
951         src/config/Param.cxx src/config/Param.hxx \
952         src/config/ConfigParser.cxx src/config/ConfigParser.hxx \
953         src/config/ConfigGlobal.cxx src/config/ConfigGlobal.hxx \
954         src/config/ConfigFile.cxx src/config/ConfigFile.hxx \
955         src/config/ConfigTemplates.cxx src/config/ConfigTemplates.hxx \
956         src/config/ConfigError.cxx src/config/ConfigError.hxx \
957         src/config/ConfigOption.hxx
959 # tag plugins
961 libtag_a_CPPFLAGS = $(AM_CPPFLAGS) \
962         $(ID3TAG_CFLAGS)
963 TAG_LIBS = \
964         libtag.a \
965         $(ID3TAG_LIBS)
967 libtag_a_SOURCES =\
968         src/tag/Type.h \
969         src/tag/Tag.cxx src/tag/Tag.hxx \
970         src/tag/Builder.cxx src/tag/Builder.hxx \
971         src/tag/Item.hxx \
972         src/tag/Handler.cxx src/tag/Handler.hxx \
973         src/tag/Mask.hxx \
974         src/tag/Settings.cxx src/tag/Settings.hxx \
975         src/tag/Config.cxx src/tag/Config.hxx \
976         src/tag/ParseName.cxx src/tag/ParseName.hxx \
977         src/tag/Names.c \
978         src/tag/FixString.cxx src/tag/FixString.hxx \
979         src/tag/Pool.cxx src/tag/Pool.hxx \
980         src/tag/Table.cxx src/tag/Table.hxx \
981         src/tag/Set.cxx src/tag/Set.hxx \
982         src/tag/Format.cxx src/tag/Format.hxx \
983         src/tag/VorbisComment.cxx src/tag/VorbisComment.hxx \
984         src/tag/ReplayGain.cxx src/tag/ReplayGain.hxx \
985         src/tag/MixRamp.cxx src/tag/MixRamp.hxx \
986         src/tag/Generic.cxx src/tag/Generic.hxx \
987         src/tag/Id3MusicBrainz.cxx src/tag/Id3MusicBrainz.hxx \
988         src/tag/ApeLoader.cxx src/tag/ApeLoader.hxx \
989         src/tag/ApeReplayGain.cxx src/tag/ApeReplayGain.hxx \
990         src/tag/ApeTag.cxx src/tag/ApeTag.hxx
992 if ENABLE_ID3TAG
993 libtag_a_SOURCES += \
994         src/tag/Id3Load.cxx src/tag/Id3Load.hxx \
995         src/tag/Id3Unique.hxx \
996         src/tag/Id3Scan.cxx src/tag/Id3Scan.hxx \
997         src/tag/Rva2.cxx src/tag/Rva2.hxx \
998         src/tag/Riff.cxx src/tag/Riff.hxx \
999         src/tag/Aiff.cxx src/tag/Aiff.hxx
1000 endif
1002 # ffmpeg
1004 if ENABLE_FFMPEG
1005 noinst_LIBRARIES += libffmpeg.a
1006 libffmpeg_a_SOURCES = \
1007         src/lib/ffmpeg/Init.cxx src/lib/ffmpeg/Init.hxx \
1008         src/lib/ffmpeg/Time.hxx \
1009         src/lib/ffmpeg/Buffer.hxx \
1010         src/lib/ffmpeg/LogError.cxx src/lib/ffmpeg/LogError.hxx \
1011         src/lib/ffmpeg/LogCallback.cxx src/lib/ffmpeg/LogCallback.hxx \
1012         src/lib/ffmpeg/Error.cxx src/lib/ffmpeg/Error.hxx \
1013         src/lib/ffmpeg/Domain.cxx src/lib/ffmpeg/Domain.hxx
1014 libffmpeg_a_CPPFLAGS = $(AM_CPPFLAGS) \
1015         $(FFMPEG_CFLAGS)
1016 FFMPEG_LIBS2 = libffmpeg.a $(FFMPEG_LIBS)
1017 endif
1019 # decoder plugins
1021 libdecoder_a_SOURCES = \
1022         src/decoder/plugins/PcmDecoderPlugin.cxx \
1023         src/decoder/plugins/PcmDecoderPlugin.hxx \
1024         src/decoder/DecoderAPI.cxx src/decoder/DecoderAPI.hxx \
1025         src/decoder/Reader.cxx src/decoder/Reader.hxx \
1026         src/decoder/DecoderBuffer.cxx src/decoder/DecoderBuffer.hxx \
1027         src/decoder/DecoderPlugin.cxx \
1028         src/decoder/DecoderList.cxx src/decoder/DecoderList.hxx
1029 libdecoder_a_CPPFLAGS = $(AM_CPPFLAGS) \
1030         $(VORBIS_CFLAGS) $(TREMOR_CFLAGS) \
1031         $(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
1032         $(SNDFILE_CFLAGS) \
1033         $(AUDIOFILE_CFLAGS) \
1034         $(LIBMIKMOD_CFLAGS) \
1035         $(GME_CFLAGS) \
1036         $(SIDPLAY_CFLAGS) \
1037         $(FLUIDSYNTH_CFLAGS) \
1038         $(WILDMIDI_CFLAGS) \
1039         $(WAVPACK_CFLAGS) \
1040         $(MAD_CFLAGS) \
1041         $(MPG123_CFLAGS) \
1042         $(OPUS_CFLAGS) \
1043         $(FFMPEG_CFLAGS) \
1044         $(MPCDEC_CFLAGS) \
1045         $(ADPLUG_CFLAGS) \
1046         $(FAAD_CFLAGS)
1048 DECODER_LIBS = \
1049         libdecoder.a \
1050         $(XIPH_LIBS) \
1051         $(VORBIS_LIBS) $(TREMOR_LIBS) \
1052         $(FLAC_LIBS) \
1053         $(SNDFILE_LIBS) \
1054         $(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
1055         $(GME_LIBS) \
1056         $(SIDPLAY_LIBS) \
1057         $(FLUIDSYNTH_LIBS) \
1058         $(WILDMIDI_LIBS) \
1059         $(WAVPACK_LIBS) \
1060         $(MAD_LIBS) \
1061         $(MPG123_LIBS) \
1062         $(OPUS_LIBS) \
1063         $(FFMPEG_LIBS2) \
1064         $(MPCDEC_LIBS) \
1065         $(ADPLUG_LIBS) \
1066         $(FAAD_LIBS)
1068 if ENABLE_DSD
1069 libdecoder_a_SOURCES += \
1070         src/decoder/plugins/DsdiffDecoderPlugin.cxx \
1071         src/decoder/plugins/DsdiffDecoderPlugin.hxx \
1072         src/decoder/plugins/DsfDecoderPlugin.cxx \
1073         src/decoder/plugins/DsfDecoderPlugin.hxx \
1074         src/decoder/plugins/DsdLib.cxx \
1075         src/decoder/plugins/DsdLib.hxx
1076 endif
1078 if ENABLE_MAD
1079 libdecoder_a_SOURCES += \
1080         src/decoder/plugins/MadDecoderPlugin.cxx \
1081         src/decoder/plugins/MadDecoderPlugin.hxx
1082 endif
1084 if ENABLE_MPG123
1085 libdecoder_a_SOURCES += \
1086         src/decoder/plugins/Mpg123DecoderPlugin.cxx \
1087         src/decoder/plugins/Mpg123DecoderPlugin.hxx
1088 endif
1090 if ENABLE_MPCDEC
1091 libdecoder_a_SOURCES += \
1092         src/decoder/plugins/MpcdecDecoderPlugin.cxx \
1093         src/decoder/plugins/MpcdecDecoderPlugin.hxx
1094 endif
1096 if ENABLE_OPUS
1097 libdecoder_a_SOURCES += \
1098         src/decoder/plugins/OpusDomain.cxx src/decoder/plugins/OpusDomain.hxx \
1099         src/decoder/plugins/OpusReader.hxx \
1100         src/decoder/plugins/OpusHead.hxx \
1101         src/decoder/plugins/OpusHead.cxx \
1102         src/decoder/plugins/OpusTags.cxx \
1103         src/decoder/plugins/OpusTags.hxx \
1104         src/decoder/plugins/OpusDecoderPlugin.cxx \
1105         src/decoder/plugins/OpusDecoderPlugin.h
1106 endif
1108 if ENABLE_WAVPACK
1109 libdecoder_a_SOURCES += \
1110         src/decoder/plugins/WavpackDecoderPlugin.cxx \
1111         src/decoder/plugins/WavpackDecoderPlugin.hxx
1112 endif
1114 if ENABLE_ADPLUG
1115 libdecoder_a_SOURCES += \
1116         src/decoder/plugins/AdPlugDecoderPlugin.cxx \
1117         src/decoder/plugins/AdPlugDecoderPlugin.h
1118 endif
1120 if ENABLE_FAAD
1121 libdecoder_a_SOURCES += \
1122         src/decoder/plugins/FaadDecoderPlugin.cxx src/decoder/plugins/FaadDecoderPlugin.hxx
1123 endif
1125 if HAVE_OGG
1126 libdecoder_a_SOURCES += \
1127         src/decoder/plugins/OggDecoder.cxx src/decoder/plugins/OggDecoder.hxx
1128 endif
1130 if HAVE_XIPH
1131 libdecoder_a_SOURCES += \
1132         src/decoder/plugins/OggCodec.cxx src/decoder/plugins/OggCodec.hxx
1133 endif
1135 if ENABLE_VORBIS_DECODER
1136 libdecoder_a_SOURCES += \
1137         src/decoder/plugins/VorbisDomain.cxx src/decoder/plugins/VorbisDomain.hxx \
1138         src/decoder/plugins/VorbisDecoderPlugin.cxx src/decoder/plugins/VorbisDecoderPlugin.h
1139 endif
1141 if ENABLE_FLAC
1142 libdecoder_a_SOURCES += \
1143         src/decoder/plugins/FlacInput.cxx src/decoder/plugins/FlacInput.hxx \
1144         src/decoder/plugins/FlacIOHandle.cxx src/decoder/plugins/FlacIOHandle.hxx \
1145         src/decoder/plugins/FlacMetadata.cxx src/decoder/plugins/FlacMetadata.hxx \
1146         src/decoder/plugins/FlacPcm.cxx src/decoder/plugins/FlacPcm.hxx \
1147         src/decoder/plugins/FlacDomain.cxx src/decoder/plugins/FlacDomain.hxx \
1148         src/decoder/plugins/FlacCommon.cxx src/decoder/plugins/FlacCommon.hxx \
1149         src/decoder/plugins/FlacStreamDecoder.hxx \
1150         src/decoder/plugins/FlacDecoderPlugin.cxx \
1151         src/decoder/plugins/FlacDecoderPlugin.h
1152 endif
1154 if ENABLE_AUDIOFILE
1155 libdecoder_a_SOURCES += \
1156         src/decoder/plugins/AudiofileDecoderPlugin.cxx \
1157         src/decoder/plugins/AudiofileDecoderPlugin.hxx
1158 endif
1160 if ENABLE_MIKMOD_DECODER
1161 libdecoder_a_SOURCES += \
1162         src/decoder/plugins/MikmodDecoderPlugin.cxx \
1163         src/decoder/plugins/MikmodDecoderPlugin.hxx
1164 endif
1166 if ENABLE_MODPLUG
1167 libmodplug_decoder_plugin_a_SOURCES = \
1168         src/decoder/plugins/ModplugDecoderPlugin.cxx \
1169         src/decoder/plugins/ModplugDecoderPlugin.hxx
1170 libmodplug_decoder_plugin_a_CXXFLAGS = $(AM_CXXFLAGS) $(MODPLUG_CFLAGS)
1171 libmodplug_decoder_plugin_a_CPPFLAGS = $(AM_CPPFLAGS)
1172 noinst_LIBRARIES += libmodplug_decoder_plugin.a
1173 DECODER_LIBS += libmodplug_decoder_plugin.a $(MODPLUG_LIBS)
1174 endif
1176 if ENABLE_SIDPLAY
1177 libdecoder_a_SOURCES += \
1178         src/decoder/plugins/SidplayDecoderPlugin.cxx \
1179         src/decoder/plugins/SidplayDecoderPlugin.hxx
1180 endif
1182 if ENABLE_FLUIDSYNTH
1183 libdecoder_a_SOURCES += \
1184         src/decoder/plugins/FluidsynthDecoderPlugin.cxx \
1185         src/decoder/plugins/FluidsynthDecoderPlugin.hxx
1186 endif
1188 if ENABLE_WILDMIDI
1189 libdecoder_a_SOURCES += \
1190         src/decoder/plugins/WildmidiDecoderPlugin.cxx \
1191         src/decoder/plugins/WildmidiDecoderPlugin.hxx
1192 endif
1194 if ENABLE_FFMPEG
1195 libdecoder_a_SOURCES += \
1196         src/decoder/plugins/FfmpegIo.cxx \
1197         src/decoder/plugins/FfmpegIo.hxx \
1198         src/decoder/plugins/FfmpegMetaData.cxx \
1199         src/decoder/plugins/FfmpegMetaData.hxx \
1200         src/decoder/plugins/FfmpegDecoderPlugin.cxx \
1201         src/decoder/plugins/FfmpegDecoderPlugin.hxx
1202 endif
1204 if ENABLE_SNDFILE
1205 libdecoder_a_SOURCES += \
1206         src/decoder/plugins/SndfileDecoderPlugin.cxx \
1207         src/decoder/plugins/SndfileDecoderPlugin.hxx
1208 endif
1210 if ENABLE_GME
1211 libdecoder_a_SOURCES += \
1212         src/decoder/plugins/GmeDecoderPlugin.cxx src/decoder/plugins/GmeDecoderPlugin.hxx
1213 endif
1215 # encoder plugins
1217 if ENABLE_ENCODER
1219 noinst_LIBRARIES += libencoder_plugins.a
1221 libencoder_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1222         $(LAME_CFLAGS) \
1223         $(TWOLAME_CFLAGS) \
1224         $(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
1225         $(OPUS_CFLAGS) \
1226         $(SHINE_CFLAGS) \
1227         $(VORBISENC_CFLAGS)
1229 ENCODER_LIBS = \
1230         libencoder_plugins.a \
1231         $(XIPH_LIBS) \
1232         $(LAME_LIBS) \
1233         $(TWOLAME_LIBS) \
1234         $(FLAC_LIBS) \
1235         $(OPUS_LIBS) \
1236         $(SHINE_LIBS) \
1237         $(VORBISENC_LIBS)
1239 libencoder_plugins_a_SOURCES = \
1240         src/encoder/Configured.cxx src/encoder/Configured.hxx \
1241         src/encoder/EncoderAPI.hxx \
1242         src/encoder/EncoderInterface.hxx \
1243         src/encoder/EncoderPlugin.hxx \
1244         src/encoder/ToOutputStream.cxx src/encoder/ToOutputStream.hxx \
1245         src/encoder/plugins/NullEncoderPlugin.cxx \
1246         src/encoder/plugins/NullEncoderPlugin.hxx \
1247         src/encoder/EncoderList.cxx src/encoder/EncoderList.hxx
1249 if ENABLE_WAVE_ENCODER
1250 libencoder_plugins_a_SOURCES += \
1251         src/encoder/plugins/WaveEncoderPlugin.cxx \
1252         src/encoder/plugins/WaveEncoderPlugin.hxx
1253 endif
1255 if HAVE_OGG
1256 libencoder_plugins_a_SOURCES += \
1257         src/encoder/plugins/OggEncoder.hxx
1258 endif
1260 if ENABLE_VORBISENC
1261 libencoder_plugins_a_SOURCES += \
1262         src/encoder/plugins/VorbisEncoderPlugin.cxx \
1263         src/encoder/plugins/VorbisEncoderPlugin.hxx
1264 endif
1266 if ENABLE_OPUS
1267 libencoder_plugins_a_SOURCES += \
1268         src/encoder/plugins/OpusEncoderPlugin.cxx \
1269         src/encoder/plugins/OpusEncoderPlugin.hxx
1270 endif
1272 if ENABLE_LAME
1273 libencoder_plugins_a_SOURCES += \
1274         src/encoder/plugins/LameEncoderPlugin.cxx \
1275         src/encoder/plugins/LameEncoderPlugin.hxx
1276 endif
1278 if ENABLE_TWOLAME
1279 libencoder_plugins_a_SOURCES += \
1280         src/encoder/plugins/TwolameEncoderPlugin.cxx \
1281         src/encoder/plugins/TwolameEncoderPlugin.hxx
1282 endif
1284 if ENABLE_FLAC_ENCODER
1285 libencoder_plugins_a_SOURCES += \
1286         src/encoder/plugins/FlacEncoderPlugin.cxx \
1287         src/encoder/plugins/FlacEncoderPlugin.hxx
1288 endif
1290 if ENABLE_SHINE
1291 libencoder_plugins_a_SOURCES += \
1292         src/encoder/plugins/ShineEncoderPlugin.cxx \
1293         src/encoder/plugins/ShineEncoderPlugin.hxx
1294 endif
1296 else
1297 ENCODER_LIBS =
1298 endif
1301 if HAVE_ZEROCONF
1302 libmpd_a_SOURCES += \
1303         src/zeroconf/ZeroconfInternal.hxx \
1304         src/zeroconf/ZeroconfGlue.cxx src/zeroconf/ZeroconfGlue.hxx
1306 if HAVE_AVAHI
1307 libmpd_a_SOURCES += \
1308         src/zeroconf/AvahiPoll.cxx src/zeroconf/AvahiPoll.hxx \
1309         src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/ZeroconfAvahi.hxx
1310 endif
1312 if HAVE_BONJOUR
1313 libmpd_a_SOURCES += src/zeroconf/ZeroconfBonjour.cxx src/zeroconf/ZeroconfBonjour.hxx
1314 endif
1315 endif
1318 # input plugins
1321 libinput_a_SOURCES = \
1322         src/input/Init.cxx src/input/Init.hxx \
1323         src/input/Registry.cxx src/input/Registry.hxx \
1324         src/input/Open.cxx \
1325         src/input/LocalOpen.cxx src/input/LocalOpen.hxx \
1326         src/input/Offset.hxx \
1327         src/input/InputStream.cxx src/input/InputStream.hxx \
1328         src/input/Ptr.hxx \
1329         src/input/InputPlugin.hxx \
1330         src/input/RemoteTagScanner.hxx \
1331         src/input/Reader.cxx src/input/Reader.hxx \
1332         src/input/TextInputStream.cxx src/input/TextInputStream.hxx \
1333         src/input/ThreadInputStream.cxx src/input/ThreadInputStream.hxx \
1334         src/input/AsyncInputStream.cxx src/input/AsyncInputStream.hxx \
1335         src/input/ProxyInputStream.cxx src/input/ProxyInputStream.hxx \
1336         src/input/plugins/RewindInputPlugin.cxx src/input/plugins/RewindInputPlugin.hxx \
1337         src/input/plugins/FileInputPlugin.cxx src/input/plugins/FileInputPlugin.hxx
1339 libinput_a_CPPFLAGS = $(AM_CPPFLAGS) \
1340         $(CURL_CFLAGS) \
1341         $(SMBCLIENT_CFLAGS) \
1342         $(NFS_CFLAGS) \
1343         $(CDIO_PARANOIA_CFLAGS) \
1344         $(FFMPEG_CFLAGS) \
1345         $(MMS_CFLAGS)
1347 INPUT_LIBS = \
1348         libinput.a \
1349         $(CURL_LIBS) \
1350         $(SMBCLIENT_LIBS) \
1351         $(NFS_LIBS) \
1352         $(CDIO_PARANOIA_LIBS) \
1353         $(FFMPEG_LIBS2) \
1354         $(MMS_LIBS)
1356 if ENABLE_ALSA
1357 libinput_a_SOURCES += \
1358         $(ALSA_SOURCES) \
1359         src/input/plugins/AlsaInputPlugin.cxx \
1360         src/input/plugins/AlsaInputPlugin.hxx
1361 INPUT_LIBS += $(ALSA_LIBS)
1362 endif
1365 if ENABLE_CURL
1366 libinput_a_SOURCES += \
1367         src/input/IcyInputStream.cxx src/input/IcyInputStream.hxx \
1368         src/input/plugins/CurlInputPlugin.cxx src/input/plugins/CurlInputPlugin.hxx \
1369         $(CURL_SOURCES) \
1370         src/IcyMetaDataParser.cxx src/IcyMetaDataParser.hxx
1371 endif
1373 if ENABLE_TIDAL
1374 libinput_a_SOURCES += \
1375         $(YAJL_SOURCES) \
1376         src/input/plugins/TidalError.hxx \
1377         src/input/plugins/TidalErrorParser.cxx src/input/plugins/TidalErrorParser.hxx \
1378         src/input/plugins/TidalLoginRequest.cxx src/input/plugins/TidalLoginRequest.hxx \
1379         src/input/plugins/TidalSessionManager.cxx src/input/plugins/TidalSessionManager.hxx \
1380         src/input/plugins/TidalTrackRequest.cxx src/input/plugins/TidalTrackRequest.hxx \
1381         src/input/plugins/TidalTagScanner.cxx src/input/plugins/TidalTagScanner.hxx \
1382         src/input/plugins/TidalInputPlugin.cxx src/input/plugins/TidalInputPlugin.hxx
1383 INPUT_LIBS += $(YAJL_LIBS)
1384 endif
1386 if ENABLE_QOBUZ
1387 libinput_a_SOURCES += \
1388         $(YAJL_SOURCES) \
1389         src/lib/gcrypt/MD5.cxx src/lib/gcrypt/MD5.hxx \
1390         src/input/plugins/QobuzSession.hxx \
1391         src/input/plugins/QobuzClient.cxx src/input/plugins/QobuzClient.hxx \
1392         src/input/plugins/QobuzErrorParser.cxx src/input/plugins/QobuzErrorParser.hxx \
1393         src/input/plugins/QobuzLoginRequest.cxx src/input/plugins/QobuzLoginRequest.hxx \
1394         src/input/plugins/QobuzTrackRequest.cxx src/input/plugins/QobuzTrackRequest.hxx \
1395         src/input/plugins/QobuzTagScanner.cxx src/input/plugins/QobuzTagScanner.hxx \
1396         src/input/plugins/QobuzInputPlugin.cxx src/input/plugins/QobuzInputPlugin.hxx
1397 INPUT_LIBS += $(YAJL_LIBS) $(LIBGCRYPT_LIBS)
1398 endif
1400 if ENABLE_SMBCLIENT
1401 libinput_a_SOURCES += \
1402         $(SMBCLIENT_SOURCES) \
1403         src/input/plugins/SmbclientInputPlugin.cxx src/input/plugins/SmbclientInputPlugin.hxx
1404 endif
1406 if ENABLE_NFS
1407 libinput_a_SOURCES += \
1408         $(NFS_SOURCES) \
1409         src/input/plugins/NfsInputPlugin.cxx src/input/plugins/NfsInputPlugin.hxx
1410 endif
1412 if ENABLE_CDIO_PARANOIA
1413 libinput_a_SOURCES += \
1414         src/input/plugins/CdioParanoiaInputPlugin.cxx \
1415         src/input/plugins/CdioParanoiaInputPlugin.hxx
1416 endif
1418 if ENABLE_FFMPEG
1419 libinput_a_SOURCES += \
1420         src/input/plugins/FfmpegInputPlugin.cxx src/input/plugins/FfmpegInputPlugin.hxx
1421 endif
1423 if ENABLE_MMS
1424 libinput_a_SOURCES += \
1425         src/input/plugins/MmsInputPlugin.cxx src/input/plugins/MmsInputPlugin.hxx
1426 endif
1428 liboutput_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1429         $(AO_CFLAGS) \
1430         $(ALSA_CFLAGS) \
1431         $(JACK_CFLAGS) \
1432         $(HAIKU_CFLAGS) \
1433         $(OPENAL_CFLAGS) \
1434         $(OPENSSL_CFLAGS) \
1435         $(PULSE_CFLAGS) \
1436         $(SNDIO_CFLAGS) \
1437         $(SHOUT_CFLAGS)
1439 OUTPUT_LIBS = \
1440         liboutput_plugins.a \
1441         $(LIBWRAP_LDFLAGS) \
1442         $(AO_LIBS) \
1443         $(ALSA_LIBS) \
1444         $(ROAR_LIBS) \
1445         $(JACK_LIBS) \
1446         $(HAIKU_LIBS) \
1447         $(OPENAL_LIBS) \
1448         $(SNDIO_LIBS) \
1449         $(SHOUT_LIBS)
1451 OUTPUT_API_SRC = \
1452         src/output/Client.hxx \
1453         src/output/OutputAPI.hxx \
1454         src/output/Filtered.cxx src/output/Filtered.hxx \
1455         src/output/Registry.cxx src/output/Registry.hxx \
1456         src/output/MultipleOutputs.cxx src/output/MultipleOutputs.hxx \
1457         src/output/SharedPipeConsumer.cxx src/output/SharedPipeConsumer.hxx \
1458         src/output/Source.cxx src/output/Source.hxx \
1459         src/output/Thread.cxx \
1460         src/output/Domain.cxx src/output/Domain.hxx \
1461         src/output/Control.cxx src/output/Control.hxx \
1462         src/output/State.cxx src/output/State.hxx \
1463         src/output/Print.cxx src/output/Print.hxx \
1464         src/output/OutputCommand.cxx src/output/OutputCommand.hxx \
1465         src/output/OutputPlugin.cxx src/output/OutputPlugin.hxx \
1466         src/output/Finish.cxx \
1467         src/output/Init.cxx
1469 liboutput_plugins_a_SOURCES = \
1470         src/output/Interface.cxx src/output/Interface.hxx \
1471         src/output/Timer.cxx src/output/Timer.hxx \
1472         src/output/plugins/NullOutputPlugin.cxx \
1473         src/output/plugins/NullOutputPlugin.hxx
1475 MIXER_LIBS = \
1476         libmixer_plugins.a \
1477         $(ALSA_LIBS) \
1478         $(PULSE_LIBS2)
1480 MIXER_API_SRC = \
1481         src/mixer/Listener.hxx \
1482         src/mixer/MixerPlugin.hxx \
1483         src/mixer/MixerList.hxx \
1484         src/mixer/MixerControl.cxx src/mixer/MixerControl.hxx \
1485         src/mixer/MixerType.cxx src/mixer/MixerType.hxx \
1486         src/mixer/MixerAll.cxx \
1487         src/mixer/MixerInternal.hxx
1489 libmixer_plugins_a_SOURCES = \
1490         src/mixer/plugins/NullMixerPlugin.cxx \
1491         src/mixer/plugins/SoftwareMixerPlugin.cxx \
1492         src/mixer/plugins/SoftwareMixerPlugin.hxx
1494 libmixer_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1495         $(ALSA_CFLAGS) \
1496         $(PULSE_CFLAGS)
1498 if ENABLE_ALSA
1499 liboutput_plugins_a_SOURCES += \
1500         $(ALSA_SOURCES) \
1501         src/output/plugins/AlsaOutputPlugin.cxx \
1502         src/output/plugins/AlsaOutputPlugin.hxx
1503 libmixer_plugins_a_SOURCES += \
1504         $(ALSA_SOURCES) \
1505         src/mixer/plugins/volume_mapping.h \
1506         src/mixer/plugins/volume_mapping.c \
1507         src/mixer/plugins/AlsaMixerPlugin.cxx
1508 endif
1510 if ANDROID
1511 liboutput_plugins_a_SOURCES += \
1512         src/output/plugins/sles/Object.hxx \
1513         src/output/plugins/sles/Engine.hxx \
1514         src/output/plugins/sles/Play.hxx \
1515         src/output/plugins/sles/AndroidSimpleBufferQueue.hxx \
1516         src/output/plugins/sles/SlesOutputPlugin.cxx \
1517         src/output/plugins/sles/SlesOutputPlugin.hxx
1518 OUTPUT_LIBS += -lOpenSLES
1519 endif
1521 if ENABLE_ROAR
1522 liboutput_plugins_a_SOURCES += \
1523         src/output/plugins/RoarOutputPlugin.cxx \
1524         src/output/plugins/RoarOutputPlugin.hxx
1525 libmixer_plugins_a_SOURCES += src/mixer/plugins/RoarMixerPlugin.cxx
1526 endif
1528 if ENABLE_AO
1529 liboutput_plugins_a_SOURCES += \
1530         src/output/plugins/AoOutputPlugin.cxx \
1531         src/output/plugins/AoOutputPlugin.hxx
1532 endif
1534 if HAVE_FIFO
1535 liboutput_plugins_a_SOURCES += \
1536         src/output/plugins/FifoOutputPlugin.cxx \
1537         src/output/plugins/FifoOutputPlugin.hxx
1538 endif
1540 if ENABLE_SNDIO
1541 liboutput_plugins_a_SOURCES += \
1542         src/output/plugins/SndioOutputPlugin.cxx \
1543         src/output/plugins/SndioOutputPlugin.hxx
1544 libmixer_plugins_a_SOURCES += src/mixer/plugins/SndioMixerPlugin.cxx
1545 endif
1547 if ENABLE_HAIKU
1548 liboutput_plugins_a_SOURCES += \
1549         src/output/plugins/HaikuOutputPlugin.cxx \
1550         src/output/plugins/HaikuOutputPlugin.hxx
1551 libmixer_plugins_a_SOURCES += \
1552         src/mixer/plugins/HaikuMixerPlugin.cxx
1553 endif
1555 if ENABLE_PIPE_OUTPUT
1556 liboutput_plugins_a_SOURCES += \
1557         src/output/plugins/PipeOutputPlugin.cxx \
1558         src/output/plugins/PipeOutputPlugin.hxx
1559 endif
1561 if ENABLE_JACK
1562 liboutput_plugins_a_SOURCES += \
1563         src/output/plugins/JackOutputPlugin.cxx \
1564         src/output/plugins/JackOutputPlugin.hxx
1565 endif
1567 if HAVE_OSS
1568 liboutput_plugins_a_SOURCES += \
1569         src/output/plugins/OssOutputPlugin.cxx \
1570         src/output/plugins/OssOutputPlugin.hxx
1571 libmixer_plugins_a_SOURCES += src/mixer/plugins/OssMixerPlugin.cxx
1572 endif
1574 if HAVE_OPENAL
1575 liboutput_plugins_a_SOURCES += \
1576         src/output/plugins/OpenALOutputPlugin.cxx \
1577         src/output/plugins/OpenALOutputPlugin.hxx
1578 endif
1580 if HAVE_OSX
1581 liboutput_plugins_a_SOURCES += \
1582         src/output/plugins/OSXOutputPlugin.cxx \
1583         src/output/plugins/OSXOutputPlugin.hxx
1584 endif
1585 libmixer_plugins_a_SOURCES += \
1586         src/mixer/plugins/OSXMixerPlugin.cxx
1588 if ENABLE_PULSE
1589 liboutput_plugins_a_SOURCES += \
1590         src/output/plugins/PulseOutputPlugin.cxx \
1591         src/output/plugins/PulseOutputPlugin.hxx
1592 libmixer_plugins_a_SOURCES += \
1593         src/mixer/plugins/PulseMixerPlugin.cxx src/mixer/plugins/PulseMixerPlugin.hxx
1595 noinst_LIBRARIES += libpulse.a
1596 libpulse_a_SOURCES = \
1597         src/lib/pulse/LockGuard.hxx \
1598         src/lib/pulse/LogError.cxx src/lib/pulse/LogError.hxx \
1599         src/lib/pulse/Error.cxx src/lib/pulse/Error.hxx \
1600         src/lib/pulse/Domain.cxx src/lib/pulse/Domain.hxx
1601 libpulse_a_CPPFLAGS = $(AM_CPPFLAGS) $(PULSE_CFLAGS)
1602 PULSE_LIBS2 = libpulse.a $(PULSE_LIBS)
1603 OUTPUT_LIBS += $(PULSE_LIBS2)
1604 endif
1606 if HAVE_SHOUT
1607 liboutput_plugins_a_SOURCES += \
1608         src/output/plugins/ShoutOutputPlugin.cxx \
1609         src/output/plugins/ShoutOutputPlugin.hxx
1610 endif
1612 if ENABLE_RECORDER_OUTPUT
1613 liboutput_plugins_a_SOURCES += \
1614         src/output/plugins/RecorderOutputPlugin.cxx \
1615         src/output/plugins/RecorderOutputPlugin.hxx
1616 endif
1618 if ENABLE_HTTPD_OUTPUT
1619 liboutput_plugins_a_SOURCES += \
1620         src/output/plugins/httpd/IcyMetaDataServer.cxx \
1621         src/output/plugins/httpd/IcyMetaDataServer.hxx \
1622         src/output/plugins/httpd/Page.cxx src/output/plugins/httpd/Page.hxx \
1623         src/output/plugins/httpd/HttpdInternal.hxx \
1624         src/output/plugins/httpd/HttpdClient.cxx \
1625         src/output/plugins/httpd/HttpdClient.hxx \
1626         src/output/plugins/httpd/HttpdOutputPlugin.cxx \
1627         src/output/plugins/httpd/HttpdOutputPlugin.hxx
1628 endif
1630 if ENABLE_SOLARIS_OUTPUT
1631 liboutput_plugins_a_SOURCES += \
1632         src/output/plugins/SolarisOutputPlugin.cxx src/output/plugins/SolarisOutputPlugin.hxx
1633 endif
1635 if ENABLE_WINMM_OUTPUT
1636 liboutput_plugins_a_SOURCES += \
1637         src/output/plugins/WinmmOutputPlugin.cxx \
1638         src/output/plugins/WinmmOutputPlugin.hxx
1639 libmixer_plugins_a_SOURCES += src/mixer/plugins/WinmmMixerPlugin.cxx
1640 endif
1644 # Playlist plugins
1647 libplaylist_plugins_a_SOURCES = \
1648         src/playlist/PlaylistPlugin.hxx \
1649         src/playlist/SongEnumerator.hxx \
1650         src/playlist/MemorySongEnumerator.cxx \
1651         src/playlist/MemorySongEnumerator.hxx \
1652         src/playlist/plugins/ExtM3uPlaylistPlugin.cxx \
1653         src/playlist/plugins/ExtM3uPlaylistPlugin.hxx \
1654         src/playlist/plugins/M3uPlaylistPlugin.cxx \
1655         src/playlist/plugins/M3uPlaylistPlugin.hxx \
1656         src/playlist/plugins/PlsPlaylistPlugin.cxx \
1657         src/playlist/plugins/PlsPlaylistPlugin.hxx \
1658         src/playlist/PlaylistRegistry.cxx src/playlist/PlaylistRegistry.hxx
1659 libplaylist_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1660         $(EXPAT_CFLAGS) \
1661         $(YAJL_CFLAGS) \
1662         $(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS))
1664 PLAYLIST_LIBS = \
1665         libplaylist_plugins.a \
1666         $(EXPAT_LIBS) \
1667         $(FLAC_LIBS)
1669 if ENABLE_FLAC
1670 libplaylist_plugins_a_SOURCES += \
1671         src/playlist/plugins/FlacPlaylistPlugin.cxx \
1672         src/playlist/plugins/FlacPlaylistPlugin.hxx
1673 endif
1675 if ENABLE_CUE
1676 libplaylist_plugins_a_SOURCES += \
1677         src/playlist/cue/CueParser.cxx src/playlist/cue/CueParser.hxx \
1678         src/playlist/plugins/CuePlaylistPlugin.cxx \
1679         src/playlist/plugins/CuePlaylistPlugin.hxx \
1680         src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx \
1681         src/playlist/plugins/EmbeddedCuePlaylistPlugin.hxx
1682 endif
1684 if ENABLE_SOUNDCLOUD
1685 libplaylist_plugins_a_SOURCES += \
1686         $(YAJL_SOURCES) \
1687         src/playlist/plugins/SoundCloudPlaylistPlugin.cxx \
1688         src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
1689 PLAYLIST_LIBS += $(YAJL_LIBS)
1690 endif
1692 if ENABLE_EXPAT
1693 libplaylist_plugins_a_SOURCES += \
1694         src/lib/expat/StreamExpatParser.cxx \
1695         src/lib/expat/ExpatParser.cxx src/lib/expat/ExpatParser.hxx \
1696         src/playlist/plugins/XspfPlaylistPlugin.cxx \
1697         src/playlist/plugins/XspfPlaylistPlugin.hxx \
1698         src/playlist/plugins/AsxPlaylistPlugin.cxx \
1699         src/playlist/plugins/AsxPlaylistPlugin.hxx \
1700         src/playlist/plugins/RssPlaylistPlugin.cxx \
1701         src/playlist/plugins/RssPlaylistPlugin.hxx
1702 endif
1705 # Filter plugins
1708 libfilter_api_a_SOURCES = \
1709         src/filter/Observer.cxx src/filter/Observer.hxx \
1710         src/filter/FilterPlugin.hxx \
1711         src/filter/Prepared.hxx \
1712         src/filter/Filter.cxx src/filter/Filter.hxx
1714 libfilter_plugins_a_SOURCES = \
1715         src/AudioCompress/config.h \
1716         src/AudioCompress/compress.h \
1717         src/AudioCompress/compress.c \
1718         src/filter/plugins/NullFilterPlugin.cxx \
1719         src/filter/plugins/ChainFilterPlugin.cxx \
1720         src/filter/plugins/ChainFilterPlugin.hxx \
1721         src/filter/plugins/AutoConvertFilterPlugin.cxx \
1722         src/filter/plugins/AutoConvertFilterPlugin.hxx \
1723         src/filter/plugins/ConvertFilterPlugin.cxx \
1724         src/filter/plugins/ConvertFilterPlugin.hxx \
1725         src/filter/plugins/RouteFilterPlugin.cxx \
1726         src/filter/plugins/NormalizeFilterPlugin.cxx \
1727         src/filter/plugins/NormalizeFilterPlugin.hxx \
1728         src/filter/plugins/ReplayGainFilterPlugin.cxx \
1729         src/filter/plugins/ReplayGainFilterPlugin.hxx \
1730         src/filter/plugins/VolumeFilterPlugin.cxx \
1731         src/filter/plugins/VolumeFilterPlugin.hxx
1733 libfilter_glue_a_SOURCES = \
1734         src/filter/FilterRegistry.cxx src/filter/FilterRegistry.hxx \
1735         src/filter/LoadOne.cxx src/filter/LoadOne.hxx \
1736         src/filter/LoadChain.cxx src/filter/LoadChain.hxx
1738 FILTER_LIBS = \
1739         libfilter_glue.a \
1740         libfilter_plugins.a \
1741         libfilter_api.a \
1742         $(PCM_LIBS)
1746 # systemd unit
1749 if HAVE_SYSTEMD
1750 systemdsystemunit_DATA = \
1751         systemd/system/mpd.socket \
1752         systemd/system/mpd.service
1753 endif
1755 if HAVE_SYSTEMD_USER
1756 systemduserunit_DATA = \
1757         systemd/user/mpd.service
1758 endif
1762 # Test programs
1765 if ENABLE_TEST
1767 C_TESTS = \
1768         test/test_util \
1769         test/test_byte_reverse \
1770         test/test_rewind \
1771         test/test_mixramp \
1772         test/test_pcm \
1773         test/test_protocol \
1774         test/test_queue_priority \
1775         test/TestFs \
1776         test/TestIcu
1778 if ENABLE_CURL
1779 C_TESTS += test/test_icy_parser
1780 endif
1782 if ENABLE_DATABASE
1783 C_TESTS += test/test_translate_song
1784 endif
1786 if ENABLE_ARCHIVE
1787 C_TESTS += test/test_archive
1788 endif
1790 TESTS = $(C_TESTS)
1792 noinst_PROGRAMS = \
1793         $(C_TESTS) \
1794         test/read_conf \
1795         test/run_resolver \
1796         test/run_input \
1797         test/WriteFile \
1798         test/dump_text_file \
1799         test/dump_playlist \
1800         test/run_decoder \
1801         test/read_tags \
1802         test/ReadApeTags \
1803         test/ContainerScan \
1804         test/run_filter \
1805         test/run_output \
1806         test/run_convert \
1807         test/run_normalize \
1808         test/software_volume
1810 if ENABLE_DATABASE
1811 noinst_PROGRAMS += test/DumpDatabase
1812 noinst_PROGRAMS += test/run_storage
1813 endif
1815 if ENABLE_NEIGHBOR_PLUGINS
1816 noinst_PROGRAMS += test/run_neighbor_explorer
1817 endif
1819 if HAVE_AVAHI
1820 noinst_PROGRAMS += test/run_avahi
1821 endif
1823 if ENABLE_ARCHIVE
1824 noinst_PROGRAMS += test/visit_archive
1825 endif
1827 if ENABLE_ID3TAG
1828 noinst_PROGRAMS += test/dump_rva2
1829 endif
1831 if ENABLE_ALSA
1832 # this debug program is still ALSA specific
1833 noinst_PROGRAMS += test/read_mixer
1834 endif
1836 test_read_conf_LDADD = \
1837         libconf.a \
1838         $(FS_LIBS) \
1839         $(ICU_LDADD) \
1840         libsystem.a \
1841         libutil.a
1842 test_read_conf_SOURCES = \
1843         src/Log.cxx src/LogBackend.cxx \
1844         test/read_conf.cxx
1846 test_run_resolver_LDADD = \
1847         libnet.a \
1848         libutil.a
1849 test_run_resolver_SOURCES = \
1850         src/Log.cxx src/LogBackend.cxx \
1851         test/run_resolver.cxx
1853 if ENABLE_DATABASE
1855 test_DumpDatabase_LDADD = \
1856         $(DB_LIBS) \
1857         $(TAG_LIBS) \
1858         libconf.a \
1859         libevent.a \
1860         libthread.a \
1861         $(FS_LIBS) \
1862         libsystem.a \
1863         $(ICU_LDADD) \
1864         libutil.a
1865 test_DumpDatabase_SOURCES = test/DumpDatabase.cxx \
1866         src/protocol/Ack.cxx \
1867         src/Log.cxx src/LogBackend.cxx \
1868         src/db/Registry.cxx \
1869         src/db/Selection.cxx \
1870         src/db/PlaylistVector.cxx \
1871         src/db/DatabaseLock.cxx \
1872         src/SongSave.cxx \
1873         src/DetachedSong.cxx \
1874         src/TagSave.cxx \
1875         src/SongFilter.cxx
1876 test_DumpDatabase_CPPFLAGS = $(AM_CPPFLAGS)
1878 if ENABLE_UPNP
1879 test_DumpDatabase_SOURCES += \
1880         $(CURL_SOURCES) \
1881         src/lib/expat/ExpatParser.cxx
1882 test_DumpDatabase_CPPFLAGS += $(CURL_CFLAGS)
1883 test_DumpDatabase_LDADD += $(CURL_LIBS)
1884 endif
1886 test_run_storage_LDADD = \
1887         $(STORAGE_LIBS) \
1888         $(FS_LIBS) \
1889         $(ICU_LDADD) \
1890         libevent.a \
1891         libthread.a \
1892         libsystem.a \
1893         libutil.a
1894 test_run_storage_SOURCES = \
1895         src/Log.cxx src/LogBackend.cxx \
1896         test/run_storage.cxx
1898 if ENABLE_WEBDAV
1899 test_run_storage_SOURCES += $(CURL_SOURCES)
1900 endif
1902 endif
1904 test_run_input_LDADD = \
1905         $(INPUT_LIBS) \
1906         $(ARCHIVE_LIBS) \
1907         $(TAG_LIBS) \
1908         libconf.a \
1909         libevent.a \
1910         libthread.a \
1911         $(FS_LIBS) \
1912         $(ICU_LDADD) \
1913         libsystem.a \
1914         libutil.a
1915 test_run_input_SOURCES = test/run_input.cxx \
1916         src/Log.cxx src/LogBackend.cxx \
1917         src/TagSave.cxx
1919 if ENABLE_NEIGHBOR_PLUGINS
1921 test_run_neighbor_explorer_SOURCES = \
1922         src/Log.cxx src/LogBackend.cxx \
1923         test/run_neighbor_explorer.cxx
1924 test_run_neighbor_explorer_LDADD = $(AM_LDADD) \
1925         $(NEIGHBOR_LIBS) \
1926         $(INPUT_LIBS) \
1927         $(ARCHIVE_LIBS) \
1928         libtag.a \
1929         libconf.a \
1930         libevent.a \
1931         $(FS_LIBS) \
1932         $(ICU_LDADD) \
1933         libsystem.a \
1934         libthread.a \
1935         libutil.a
1937 if ENABLE_UPNP
1938 test_run_neighbor_explorer_SOURCES += src/lib/expat/ExpatParser.cxx
1939 endif
1941 endif
1943 if ENABLE_ARCHIVE
1945 test_visit_archive_LDADD = \
1946         $(INPUT_LIBS) \
1947         $(ARCHIVE_LIBS) \
1948         $(TAG_LIBS) \
1949         libconf.a \
1950         libevent.a \
1951         libthread.a \
1952         $(FS_LIBS) \
1953         $(ICU_LDADD) \
1954         libsystem.a \
1955         libutil.a
1956 test_visit_archive_SOURCES = test/visit_archive.cxx \
1957         src/Log.cxx src/LogBackend.cxx \
1958         src/input/Open.cxx
1960 endif
1962 if ENABLE_ZLIB
1964 noinst_PROGRAMS += test/run_gzip test/run_gunzip
1966 test_run_gzip_LDADD = \
1967         libutil.a \
1968         $(FS_LIBS)
1969 test_run_gzip_SOURCES = test/run_gzip.cxx \
1970         src/Log.cxx src/LogBackend.cxx
1972 test_run_gunzip_SOURCES = test/run_gunzip.cxx \
1973         src/Log.cxx src/LogBackend.cxx
1974 test_run_gunzip_LDADD = \
1975         $(FS_LIBS) \
1976         $(ICU_LDADD) \
1977         libsystem.a \
1978         libutil.a
1980 endif
1982 test_WriteFile_LDADD = \
1983         $(FS_LIBS) \
1984         $(ICU_LDADD) \
1985         libsystem.a \
1986         libutil.a
1987 test_WriteFile_SOURCES = \
1988         src/Log.cxx src/LogBackend.cxx \
1989         test/WriteFile.cxx
1991 test_dump_text_file_LDADD = \
1992         $(INPUT_LIBS) \
1993         $(ARCHIVE_LIBS) \
1994         $(TAG_LIBS) \
1995         libconf.a \
1996         libevent.a \
1997         $(FS_LIBS) \
1998         $(ICU_LDADD) \
1999         libsystem.a \
2000         libthread.a \
2001         libutil.a
2002 test_dump_text_file_SOURCES = test/dump_text_file.cxx \
2003         src/Log.cxx src/LogBackend.cxx
2005 test_dump_playlist_LDADD = \
2006         $(PLAYLIST_LIBS) \
2007         $(FLAC_LIBS) \
2008         $(DECODER_LIBS) \
2009         $(TAG_LIBS) \
2010         $(XIPH_LIBS) \
2011         $(INPUT_LIBS) \
2012         $(ARCHIVE_LIBS) \
2013         libconf.a \
2014         libbasic.a \
2015         libevent.a \
2016         libthread.a \
2017         $(FS_LIBS) \
2018         $(ICU_LDADD) \
2019         libsystem.a \
2020         libutil.a \
2021         libpcm.a
2022 test_dump_playlist_SOURCES = test/dump_playlist.cxx \
2023         test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
2024         src/Log.cxx src/LogBackend.cxx \
2025         src/TagSave.cxx \
2026         src/TagFile.cxx \
2027         src/DetachedSong.cxx
2029 if ENABLE_FLAC
2030 test_dump_playlist_SOURCES += \
2031         src/ReplayGainInfo.cxx \
2032         src/decoder/plugins/FlacMetadata.cxx
2033 endif
2035 test_run_decoder_LDADD = \
2036         $(DECODER_LIBS) \
2037         libpcm.a \
2038         $(INPUT_LIBS) \
2039         $(ARCHIVE_LIBS) \
2040         $(TAG_LIBS) \
2041         libconf.a \
2042         libbasic.a \
2043         libevent.a \
2044         libthread.a \
2045         $(FS_LIBS) \
2046         $(ICU_LDADD) \
2047         libsystem.a \
2048         libutil.a
2049 test_run_decoder_SOURCES = test/run_decoder.cxx \
2050         test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
2051         src/DetachedSong.cxx \
2052         src/Log.cxx src/LogBackend.cxx \
2053         src/ReplayGainInfo.cxx
2055 test_read_tags_LDADD = \
2056         $(DECODER_LIBS) \
2057         libpcm.a \
2058         $(INPUT_LIBS) \
2059         $(ARCHIVE_LIBS) \
2060         $(TAG_LIBS) \
2061         libconf.a \
2062         libbasic.a \
2063         libevent.a \
2064         libthread.a \
2065         $(FS_LIBS) \
2066         $(ICU_LDADD) \
2067         libsystem.a \
2068         libutil.a
2069 test_read_tags_SOURCES = test/read_tags.cxx \
2070         test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
2071         src/DetachedSong.cxx \
2072         src/Log.cxx src/LogBackend.cxx \
2073         src/ReplayGainInfo.cxx
2075 test_ReadApeTags_LDADD = \
2076         $(TAG_LIBS) \
2077         $(INPUT_LIBS) \
2078         $(ARCHIVE_LIBS) \
2079         $(FS_LIBS) \
2080         $(ICU_LDADD) \
2081         libsystem.a \
2082         libutil.a
2083 test_ReadApeTags_SOURCES = \
2084         src/Log.cxx src/LogBackend.cxx \
2085         test/ReadApeTags.cxx
2087 test_ContainerScan_LDADD = \
2088         $(DECODER_LIBS) \
2089         libpcm.a \
2090         $(INPUT_LIBS) \
2091         $(ARCHIVE_LIBS) \
2092         $(TAG_LIBS) \
2093         libconf.a \
2094         libbasic.a \
2095         libevent.a \
2096         libthread.a \
2097         $(FS_LIBS) \
2098         $(ICU_LDADD) \
2099         libsystem.a \
2100         libutil.a
2101 test_ContainerScan_SOURCES = test/ContainerScan.cxx \
2102         src/DetachedSong.cxx \
2103         src/SongSave.cxx src/TagSave.cxx \
2104         src/Log.cxx src/LogBackend.cxx \
2105         src/ReplayGainInfo.cxx \
2106         $(DECODER_SRC)
2108 if ENABLE_ID3TAG
2109 test_dump_rva2_LDADD = \
2110         $(TAG_LIBS) \
2111         $(INPUT_LIBS) \
2112         $(ARCHIVE_LIBS) \
2113         $(FS_LIBS) \
2114         $(ICU_LDADD) \
2115         libsystem.a \
2116         libutil.a
2117 test_dump_rva2_SOURCES = \
2118         src/Log.cxx src/LogBackend.cxx \
2119         test/dump_rva2.cxx
2120 endif
2122 test_run_filter_LDADD = \
2123         $(FILTER_LIBS) \
2124         libconf.a \
2125         libbasic.a \
2126         $(FS_LIBS) \
2127         $(ICU_LDADD) \
2128         libsystem.a \
2129         libutil.a
2130 test_run_filter_SOURCES = test/run_filter.cxx \
2131         src/Log.cxx src/LogBackend.cxx
2133 if ENABLE_ENCODER
2134 noinst_PROGRAMS += test/run_encoder
2135 test_run_encoder_SOURCES = test/run_encoder.cxx \
2136         src/Log.cxx src/LogBackend.cxx
2137 test_run_encoder_LDADD = \
2138         $(ENCODER_LIBS) \
2139         $(TAG_LIBS) \
2140         libconf.a \
2141         libbasic.a \
2142         libpcm.a \
2143         libthread.a \
2144         $(FS_LIBS) \
2145         $(ICU_LDADD) \
2146         libsystem.a \
2147         libutil.a
2148 endif
2150 if ENABLE_VORBISENC
2151 noinst_PROGRAMS += test/test_vorbis_encoder
2152 test_test_vorbis_encoder_SOURCES = test/test_vorbis_encoder.cxx \
2153         src/Log.cxx src/LogBackend.cxx
2154 test_test_vorbis_encoder_CPPFLAGS = $(AM_CPPFLAGS) \
2155         $(ENCODER_CFLAGS)
2156 test_test_vorbis_encoder_LDADD = $(MPD_LIBS) \
2157         $(ENCODER_LIBS) \
2158         $(PCM_LIBS) \
2159         $(TAG_LIBS) \
2160         libconf.a \
2161         libbasic.a \
2162         $(FS_LIBS) \
2163         $(ICU_LDADD) \
2164         libsystem.a \
2165         libutil.a
2166 endif
2168 test_software_volume_SOURCES = test/software_volume.cxx \
2169         src/Log.cxx src/LogBackend.cxx
2170 test_software_volume_LDADD = \
2171         $(PCM_LIBS) \
2172         libbasic.a \
2173         libutil.a
2175 test_run_avahi_SOURCES = \
2176         src/Log.cxx src/LogBackend.cxx \
2177         src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/AvahiPoll.cxx \
2178         test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
2179         test/run_avahi.cxx
2180 test_run_avahi_CPPFLAGS = $(AM_CPPFLAGS) \
2181         $(AVAHI_CFLAGS)
2182 test_run_avahi_LDADD = \
2183         libevent.a \
2184         libsystem.a \
2185         libutil.a \
2186         $(AVAHI_LIBS)
2188 test_run_normalize_SOURCES = test/run_normalize.cxx \
2189         src/Log.cxx src/LogBackend.cxx \
2190         src/CheckAudioFormat.cxx \
2191         src/AudioCompress/compress.c \
2192         src/AudioParser.cxx
2193 test_run_normalize_LDADD = \
2194         libutil.a
2196 test_run_convert_SOURCES = test/run_convert.cxx \
2197         src/Log.cxx src/LogBackend.cxx
2198 test_run_convert_LDADD = \
2199         $(PCM_LIBS) \
2200         libconf.a \
2201         libbasic.a \
2202         $(FS_LIBS) \
2203         libsystem.a \
2204         $(ICU_LDADD) \
2205         libutil.a
2207 test_run_output_LDADD = $(MPD_LIBS) \
2208         $(OUTPUT_LIBS) \
2209         $(ENCODER_LIBS) \
2210         libmixer_plugins.a \
2211         $(PCM_LIBS) \
2212         $(TAG_LIBS) \
2213         libconf.a \
2214         libbasic.a \
2215         libevent.a \
2216         $(FS_LIBS) \
2217         $(ICU_LDADD) \
2218         libnet.a \
2219         libsystem.a \
2220         libthread.a \
2221         libutil.a
2222 test_run_output_SOURCES = test/run_output.cxx \
2223         test/NullMixerListener.hxx \
2224         src/Log.cxx src/LogBackend.cxx \
2225         src/output/Domain.cxx \
2226         src/output/Registry.cxx \
2227         src/output/OutputPlugin.cxx \
2228         src/mixer/MixerControl.cxx \
2229         src/mixer/MixerType.cxx
2231 test_read_mixer_LDADD = \
2232         libpcm.a \
2233         libmixer_plugins.a \
2234         $(OUTPUT_LIBS) \
2235         libfilter_api.a \
2236         libconf.a \
2237         libbasic.a \
2238         libevent.a \
2239         $(FS_LIBS) \
2240         $(ICU_LDADD) \
2241         libsystem.a \
2242         libutil.a
2243 test_read_mixer_SOURCES = test/read_mixer.cxx \
2244         test/NullMixerListener.hxx \
2245         src/Log.cxx src/LogBackend.cxx \
2246         src/mixer/MixerControl.cxx \
2247         src/filter/plugins/VolumeFilterPlugin.cxx
2249 if ENABLE_BZIP2_TEST
2250 TESTS += test/test_archive_bzip2.sh
2251 endif
2253 if ENABLE_ZZIP_TEST
2254 TESTS += test/test_archive_zzip.sh
2255 endif
2257 if ENABLE_ISO9660_TEST
2258 TESTS += test/test_archive_iso9660.sh
2259 endif
2261 if ENABLE_INOTIFY
2262 noinst_PROGRAMS += test/run_inotify
2263 test_run_inotify_SOURCES = test/run_inotify.cxx \
2264         test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
2265         src/Log.cxx src/LogBackend.cxx \
2266         src/db/update/InotifyDomain.cxx \
2267         src/db/update/InotifySource.cxx
2268 test_run_inotify_LDADD = \
2269         libevent.a \
2270         libsystem.a \
2271         libutil.a
2272 endif
2274 test_test_util_SOURCES = \
2275         test/DivideStringTest.hxx \
2276         test/SplitStringTest.hxx \
2277         test/UriUtilTest.hxx \
2278         test/MimeTypeTest.hxx \
2279         test/TestCircularBuffer.hxx \
2280         test/test_util.cxx
2281 test_test_util_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2282 test_test_util_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2283 test_test_util_LDADD = \
2284         libutil.a \
2285         $(CPPUNIT_LIBS)
2287 test_test_byte_reverse_SOURCES = \
2288         test/test_byte_reverse.cxx
2289 test_test_byte_reverse_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2290 test_test_byte_reverse_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2291 test_test_byte_reverse_LDADD = \
2292         libutil.a \
2293         $(CPPUNIT_LIBS)
2295 test_test_rewind_SOURCES = \
2296         src/Log.cxx src/LogBackend.cxx \
2297         test/test_rewind.cxx
2298 test_test_rewind_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2299 test_test_rewind_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2300 test_test_rewind_LDADD = \
2301         $(INPUT_LIBS) \
2302         libthread.a \
2303         libtag.a \
2304         libutil.a \
2305         $(CPPUNIT_LIBS)
2307 test_test_mixramp_SOURCES = \
2308         src/Log.cxx src/LogBackend.cxx \
2309         test/test_mixramp.cxx
2310 test_test_mixramp_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2311 test_test_mixramp_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2312 test_test_mixramp_LDADD = \
2313         libutil.a \
2314         $(CPPUNIT_LIBS)
2316 if ENABLE_CURL
2317 test_test_icy_parser_SOURCES = \
2318         src/Log.cxx src/LogBackend.cxx \
2319         test/test_icy_parser.cxx
2320 test_test_icy_parser_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2321 test_test_icy_parser_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2322 test_test_icy_parser_LDADD = \
2323         libtag.a \
2324         libutil.a \
2325         $(CPPUNIT_LIBS)
2326 endif
2328 test_test_pcm_SOURCES = \
2329         test/TestAudioFormat.cxx test/TestAudioFormat.hxx \
2330         test/test_pcm_util.hxx \
2331         test/test_pcm_dither.cxx \
2332         test/test_pcm_pack.cxx \
2333         test/test_pcm_channels.cxx \
2334         test/test_pcm_format.cxx \
2335         test/test_pcm_volume.cxx \
2336         test/test_pcm_mix.cxx \
2337         test/test_pcm_interleave.cxx \
2338         test/test_pcm_export.cxx \
2339         test/test_pcm_all.hxx \
2340         test/test_pcm_main.cxx
2341 test_test_pcm_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2342 test_test_pcm_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2343 test_test_pcm_LDADD = \
2344         $(PCM_LIBS) \
2345         libbasic.a \
2346         libutil.a \
2347         $(CPPUNIT_LIBS)
2349 test_test_archive_SOURCES = \
2350         src/Log.cxx src/LogBackend.cxx \
2351         test/test_archive.cxx
2352 test_test_archive_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2353 test_test_archive_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2354 test_test_archive_LDADD = \
2355         libarchive.a \
2356         libutil.a \
2357         $(CPPUNIT_LIBS)
2359 if ENABLE_DATABASE
2361 test_test_translate_song_SOURCES = \
2362         src/playlist/PlaylistSong.cxx \
2363         src/PlaylistError.cxx \
2364         src/DetachedSong.cxx \
2365         src/SongLoader.cxx \
2366         src/LocateUri.cxx \
2367         src/Log.cxx \
2368         test/test_translate_song.cxx
2369 test_test_translate_song_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2370 test_test_translate_song_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2371 test_test_translate_song_LDADD = \
2372         $(STORAGE_LIBS) \
2373         libtag.a \
2374         $(FS_LIBS) \
2375         $(ICU_LDADD) \
2376         libsystem.a \
2377         libutil.a \
2378         $(CPPUNIT_LIBS)
2380 endif
2382 test_test_protocol_SOURCES = \
2383         src/protocol/ArgParser.cxx \
2384         test/test_protocol.cxx
2385 test_test_protocol_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2386 test_test_protocol_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2387 test_test_protocol_LDADD = \
2388         libsystem.a \
2389         libutil.a \
2390         $(CPPUNIT_LIBS)
2392 test_test_queue_priority_SOURCES = \
2393         src/queue/Queue.cxx \
2394         src/DetachedSong.cxx \
2395         test/test_queue_priority.cxx
2396 test_test_queue_priority_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2397 test_test_queue_priority_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2398 test_test_queue_priority_LDADD = \
2399         libsystem.a \
2400         libutil.a \
2401         $(CPPUNIT_LIBS)
2403 test_TestFs_SOURCES = \
2404         test/TestFs.cxx
2405 test_TestFs_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2406 test_TestFs_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2407 test_TestFs_LDADD = \
2408         $(FS_LIBS) \
2409         $(CPPUNIT_LIBS)
2411 test_TestIcu_SOURCES = \
2412         test/TestIcu.cxx
2413 test_TestIcu_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2414 test_TestIcu_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2415 test_TestIcu_LDADD = \
2416         $(ICU_LDADD) \
2417         libutil.a \
2418         $(CPPUNIT_LIBS)
2420 if ENABLE_DSD
2422 noinst_PROGRAMS += src/pcm/dsd2pcm/dsd2pcm
2424 src_pcm_dsd2pcm_dsd2pcm_SOURCES = \
2425         src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h \
2426         src/pcm/dsd2pcm/dsd2pcm.hpp \
2427         src/pcm/dsd2pcm/noiseshape.c src/pcm/dsd2pcm/noiseshape.h \
2428         src/pcm/dsd2pcm/noiseshape.hpp \
2429         src/pcm/dsd2pcm/main.cpp
2430 src_pcm_dsd2pcm_dsd2pcm_LDADD = libutil.a
2432 endif
2434 endif
2438 # Documentation
2441 man_MANS = doc/mpd.1 doc/mpd.conf.5
2442 doc_DATA = AUTHORS COPYING NEWS README.md doc/mpdconf.example
2444 DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
2446 if ENABLE_DOCUMENTATION
2447 protocoldir = $(docdir)/protocol
2448 protocol_DATA = $(wildcard doc/protocol/*.html)
2450 userdir = $(docdir)/user
2451 user_DATA = $(wildcard doc/user/*.html)
2453 developerdir = $(docdir)/developer
2454 developer_DATA = $(wildcard doc/developer/*.html)
2456 DOCBOOK_HTML = $(patsubst %.xml,%/index.html,$(DOCBOOK_FILES))
2458 DOCBOOK_INCLUDES = $(wildcard $(srcdir)/doc/include/*.xml)
2460 $(DOCBOOK_HTML): %/index.html: %.xml $(DOCBOOK_INCLUDES)
2461         $(XMLTO) -o $(@D) --stringparam chunker.output.encoding=utf-8 html --stringparam use.id.as.filename=1 $<
2463 doc/api/html/index.html: doc/doxygen.conf
2464         @$(MKDIR_P) $(@D)
2465         $(DOXYGEN) $<
2467 all-local: $(DOCBOOK_HTML) doc/api/html/index.html
2469 clean-local:
2470         rm -rf $(patsubst %.xml,%,$(DOCBOOK_FILES))
2471         rm -rf doc/api
2473 install-data-local: doc/api/html/index.html
2474         $(mkinstalldirs) $(DESTDIR)$(docdir)/api/html
2475         $(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
2476                 $(DESTDIR)$(docdir)/api/html
2478 uninstall-local:
2479         rm -f $(DESTDIR)$(docdir)/api/html/*.*
2481 upload: $(DOCBOOK_HTML) doc/api/html/index.html
2482         rsync -vpruz --delete doc/ www.musicpd.org:/var/www/mpd/doc/ \
2483                 --chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
2484                 --include=protocol --include=protocol/** \
2485                 --include=user --include=user/** \
2486                 --include=developer --include=developer/** \
2487                 --include=api --include=api/** \
2488                 --exclude=*
2490 endif
2494 # Distribution
2497 EXTRA_DIST = $(doc_DATA) autogen.sh \
2498         test/test_archive_bzip2.sh  \
2499         test/test_archive_iso9660.sh \
2500         test/test_archive_zzip.sh \
2501         $(wildcard $(srcdir)/scripts/*.rb) \
2502         $(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
2503         $(wildcard $(srcdir)/doc/include/*.xml) \
2504         systemd/system/mpd.socket \
2505         $(wildcard $(srcdir)/python/build/*.py) \
2506         android/AndroidManifest.xml \
2507         android/build.py \
2508         android/custom_rules.xml \
2509         android/res/values/strings.xml \
2510         android/src/Bridge.java \
2511         android/src/Loader.java \
2512         android/src/Main.java \
2513         win32/build.py \
2514         win32/res/mpd.rc.in win32/res/mpd.ico \
2515         src/haiku/App_MusicPD