input/tidal/Error: add method IsInvalidSession()
[mpd-mirror.git] / Makefile.am
blob094fbf13e599faf052225ee4d681a2deb6eecd4a
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/Reader.cxx src/input/Reader.hxx \
1331         src/input/TextInputStream.cxx src/input/TextInputStream.hxx \
1332         src/input/ThreadInputStream.cxx src/input/ThreadInputStream.hxx \
1333         src/input/AsyncInputStream.cxx src/input/AsyncInputStream.hxx \
1334         src/input/ProxyInputStream.cxx src/input/ProxyInputStream.hxx \
1335         src/input/plugins/RewindInputPlugin.cxx src/input/plugins/RewindInputPlugin.hxx \
1336         src/input/plugins/FileInputPlugin.cxx src/input/plugins/FileInputPlugin.hxx
1338 libinput_a_CPPFLAGS = $(AM_CPPFLAGS) \
1339         $(CURL_CFLAGS) \
1340         $(SMBCLIENT_CFLAGS) \
1341         $(NFS_CFLAGS) \
1342         $(CDIO_PARANOIA_CFLAGS) \
1343         $(FFMPEG_CFLAGS) \
1344         $(MMS_CFLAGS)
1346 INPUT_LIBS = \
1347         libinput.a \
1348         $(CURL_LIBS) \
1349         $(SMBCLIENT_LIBS) \
1350         $(NFS_LIBS) \
1351         $(CDIO_PARANOIA_LIBS) \
1352         $(FFMPEG_LIBS2) \
1353         $(MMS_LIBS)
1355 if ENABLE_ALSA
1356 libinput_a_SOURCES += \
1357         $(ALSA_SOURCES) \
1358         src/input/plugins/AlsaInputPlugin.cxx \
1359         src/input/plugins/AlsaInputPlugin.hxx
1360 INPUT_LIBS += $(ALSA_LIBS)
1361 endif
1364 if ENABLE_CURL
1365 libinput_a_SOURCES += \
1366         src/input/IcyInputStream.cxx src/input/IcyInputStream.hxx \
1367         src/input/plugins/CurlInputPlugin.cxx src/input/plugins/CurlInputPlugin.hxx \
1368         $(CURL_SOURCES) \
1369         src/IcyMetaDataParser.cxx src/IcyMetaDataParser.hxx
1370 endif
1372 if ENABLE_TIDAL
1373 libinput_a_SOURCES += \
1374         $(YAJL_SOURCES) \
1375         src/input/plugins/TidalError.hxx \
1376         src/input/plugins/TidalErrorParser.cxx src/input/plugins/TidalErrorParser.hxx \
1377         src/input/plugins/TidalLoginRequest.cxx src/input/plugins/TidalLoginRequest.hxx \
1378         src/input/plugins/TidalSessionManager.cxx src/input/plugins/TidalSessionManager.hxx \
1379         src/input/plugins/TidalTrackRequest.cxx src/input/plugins/TidalTrackRequest.hxx \
1380         src/input/plugins/TidalInputPlugin.cxx src/input/plugins/TidalInputPlugin.hxx
1381 INPUT_LIBS += $(YAJL_LIBS)
1382 endif
1384 if ENABLE_QOBUZ
1385 libinput_a_SOURCES += \
1386         $(YAJL_SOURCES) \
1387         src/lib/gcrypt/MD5.cxx src/lib/gcrypt/MD5.hxx \
1388         src/input/plugins/QobuzSession.hxx \
1389         src/input/plugins/QobuzClient.cxx src/input/plugins/QobuzClient.hxx \
1390         src/input/plugins/QobuzErrorParser.cxx src/input/plugins/QobuzErrorParser.hxx \
1391         src/input/plugins/QobuzLoginRequest.cxx src/input/plugins/QobuzLoginRequest.hxx \
1392         src/input/plugins/QobuzTrackRequest.cxx src/input/plugins/QobuzTrackRequest.hxx \
1393         src/input/plugins/QobuzInputPlugin.cxx src/input/plugins/QobuzInputPlugin.hxx
1394 INPUT_LIBS += $(YAJL_LIBS) $(LIBGCRYPT_LIBS)
1395 endif
1397 if ENABLE_SMBCLIENT
1398 libinput_a_SOURCES += \
1399         $(SMBCLIENT_SOURCES) \
1400         src/input/plugins/SmbclientInputPlugin.cxx src/input/plugins/SmbclientInputPlugin.hxx
1401 endif
1403 if ENABLE_NFS
1404 libinput_a_SOURCES += \
1405         $(NFS_SOURCES) \
1406         src/input/plugins/NfsInputPlugin.cxx src/input/plugins/NfsInputPlugin.hxx
1407 endif
1409 if ENABLE_CDIO_PARANOIA
1410 libinput_a_SOURCES += \
1411         src/input/plugins/CdioParanoiaInputPlugin.cxx \
1412         src/input/plugins/CdioParanoiaInputPlugin.hxx
1413 endif
1415 if ENABLE_FFMPEG
1416 libinput_a_SOURCES += \
1417         src/input/plugins/FfmpegInputPlugin.cxx src/input/plugins/FfmpegInputPlugin.hxx
1418 endif
1420 if ENABLE_MMS
1421 libinput_a_SOURCES += \
1422         src/input/plugins/MmsInputPlugin.cxx src/input/plugins/MmsInputPlugin.hxx
1423 endif
1425 liboutput_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1426         $(AO_CFLAGS) \
1427         $(ALSA_CFLAGS) \
1428         $(JACK_CFLAGS) \
1429         $(HAIKU_CFLAGS) \
1430         $(OPENAL_CFLAGS) \
1431         $(OPENSSL_CFLAGS) \
1432         $(PULSE_CFLAGS) \
1433         $(SNDIO_CFLAGS) \
1434         $(SHOUT_CFLAGS)
1436 OUTPUT_LIBS = \
1437         liboutput_plugins.a \
1438         $(LIBWRAP_LDFLAGS) \
1439         $(AO_LIBS) \
1440         $(ALSA_LIBS) \
1441         $(ROAR_LIBS) \
1442         $(JACK_LIBS) \
1443         $(HAIKU_LIBS) \
1444         $(OPENAL_LIBS) \
1445         $(SNDIO_LIBS) \
1446         $(SHOUT_LIBS)
1448 OUTPUT_API_SRC = \
1449         src/output/Client.hxx \
1450         src/output/OutputAPI.hxx \
1451         src/output/Filtered.cxx src/output/Filtered.hxx \
1452         src/output/Registry.cxx src/output/Registry.hxx \
1453         src/output/MultipleOutputs.cxx src/output/MultipleOutputs.hxx \
1454         src/output/SharedPipeConsumer.cxx src/output/SharedPipeConsumer.hxx \
1455         src/output/Source.cxx src/output/Source.hxx \
1456         src/output/Thread.cxx \
1457         src/output/Domain.cxx src/output/Domain.hxx \
1458         src/output/Control.cxx src/output/Control.hxx \
1459         src/output/State.cxx src/output/State.hxx \
1460         src/output/Print.cxx src/output/Print.hxx \
1461         src/output/OutputCommand.cxx src/output/OutputCommand.hxx \
1462         src/output/OutputPlugin.cxx src/output/OutputPlugin.hxx \
1463         src/output/Finish.cxx \
1464         src/output/Init.cxx
1466 liboutput_plugins_a_SOURCES = \
1467         src/output/Interface.cxx src/output/Interface.hxx \
1468         src/output/Timer.cxx src/output/Timer.hxx \
1469         src/output/plugins/NullOutputPlugin.cxx \
1470         src/output/plugins/NullOutputPlugin.hxx
1472 MIXER_LIBS = \
1473         libmixer_plugins.a \
1474         $(ALSA_LIBS) \
1475         $(PULSE_LIBS2)
1477 MIXER_API_SRC = \
1478         src/mixer/Listener.hxx \
1479         src/mixer/MixerPlugin.hxx \
1480         src/mixer/MixerList.hxx \
1481         src/mixer/MixerControl.cxx src/mixer/MixerControl.hxx \
1482         src/mixer/MixerType.cxx src/mixer/MixerType.hxx \
1483         src/mixer/MixerAll.cxx \
1484         src/mixer/MixerInternal.hxx
1486 libmixer_plugins_a_SOURCES = \
1487         src/mixer/plugins/NullMixerPlugin.cxx \
1488         src/mixer/plugins/SoftwareMixerPlugin.cxx \
1489         src/mixer/plugins/SoftwareMixerPlugin.hxx
1491 libmixer_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1492         $(ALSA_CFLAGS) \
1493         $(PULSE_CFLAGS)
1495 if ENABLE_ALSA
1496 liboutput_plugins_a_SOURCES += \
1497         $(ALSA_SOURCES) \
1498         src/output/plugins/AlsaOutputPlugin.cxx \
1499         src/output/plugins/AlsaOutputPlugin.hxx
1500 libmixer_plugins_a_SOURCES += \
1501         $(ALSA_SOURCES) \
1502         src/mixer/plugins/volume_mapping.h \
1503         src/mixer/plugins/volume_mapping.c \
1504         src/mixer/plugins/AlsaMixerPlugin.cxx
1505 endif
1507 if ANDROID
1508 liboutput_plugins_a_SOURCES += \
1509         src/output/plugins/sles/Object.hxx \
1510         src/output/plugins/sles/Engine.hxx \
1511         src/output/plugins/sles/Play.hxx \
1512         src/output/plugins/sles/AndroidSimpleBufferQueue.hxx \
1513         src/output/plugins/sles/SlesOutputPlugin.cxx \
1514         src/output/plugins/sles/SlesOutputPlugin.hxx
1515 OUTPUT_LIBS += -lOpenSLES
1516 endif
1518 if ENABLE_ROAR
1519 liboutput_plugins_a_SOURCES += \
1520         src/output/plugins/RoarOutputPlugin.cxx \
1521         src/output/plugins/RoarOutputPlugin.hxx
1522 libmixer_plugins_a_SOURCES += src/mixer/plugins/RoarMixerPlugin.cxx
1523 endif
1525 if ENABLE_AO
1526 liboutput_plugins_a_SOURCES += \
1527         src/output/plugins/AoOutputPlugin.cxx \
1528         src/output/plugins/AoOutputPlugin.hxx
1529 endif
1531 if HAVE_FIFO
1532 liboutput_plugins_a_SOURCES += \
1533         src/output/plugins/FifoOutputPlugin.cxx \
1534         src/output/plugins/FifoOutputPlugin.hxx
1535 endif
1537 if ENABLE_SNDIO
1538 liboutput_plugins_a_SOURCES += \
1539         src/output/plugins/SndioOutputPlugin.cxx \
1540         src/output/plugins/SndioOutputPlugin.hxx
1541 libmixer_plugins_a_SOURCES += src/mixer/plugins/SndioMixerPlugin.cxx
1542 endif
1544 if ENABLE_HAIKU
1545 liboutput_plugins_a_SOURCES += \
1546         src/output/plugins/HaikuOutputPlugin.cxx \
1547         src/output/plugins/HaikuOutputPlugin.hxx
1548 libmixer_plugins_a_SOURCES += \
1549         src/mixer/plugins/HaikuMixerPlugin.cxx
1550 endif
1552 if ENABLE_PIPE_OUTPUT
1553 liboutput_plugins_a_SOURCES += \
1554         src/output/plugins/PipeOutputPlugin.cxx \
1555         src/output/plugins/PipeOutputPlugin.hxx
1556 endif
1558 if ENABLE_JACK
1559 liboutput_plugins_a_SOURCES += \
1560         src/output/plugins/JackOutputPlugin.cxx \
1561         src/output/plugins/JackOutputPlugin.hxx
1562 endif
1564 if HAVE_OSS
1565 liboutput_plugins_a_SOURCES += \
1566         src/output/plugins/OssOutputPlugin.cxx \
1567         src/output/plugins/OssOutputPlugin.hxx
1568 libmixer_plugins_a_SOURCES += src/mixer/plugins/OssMixerPlugin.cxx
1569 endif
1571 if HAVE_OPENAL
1572 liboutput_plugins_a_SOURCES += \
1573         src/output/plugins/OpenALOutputPlugin.cxx \
1574         src/output/plugins/OpenALOutputPlugin.hxx
1575 endif
1577 if HAVE_OSX
1578 liboutput_plugins_a_SOURCES += \
1579         src/output/plugins/OSXOutputPlugin.cxx \
1580         src/output/plugins/OSXOutputPlugin.hxx
1581 endif
1582 libmixer_plugins_a_SOURCES += \
1583         src/mixer/plugins/OSXMixerPlugin.cxx
1585 if ENABLE_PULSE
1586 liboutput_plugins_a_SOURCES += \
1587         src/output/plugins/PulseOutputPlugin.cxx \
1588         src/output/plugins/PulseOutputPlugin.hxx
1589 libmixer_plugins_a_SOURCES += \
1590         src/mixer/plugins/PulseMixerPlugin.cxx src/mixer/plugins/PulseMixerPlugin.hxx
1592 noinst_LIBRARIES += libpulse.a
1593 libpulse_a_SOURCES = \
1594         src/lib/pulse/LockGuard.hxx \
1595         src/lib/pulse/LogError.cxx src/lib/pulse/LogError.hxx \
1596         src/lib/pulse/Error.cxx src/lib/pulse/Error.hxx \
1597         src/lib/pulse/Domain.cxx src/lib/pulse/Domain.hxx
1598 libpulse_a_CPPFLAGS = $(AM_CPPFLAGS) $(PULSE_CFLAGS)
1599 PULSE_LIBS2 = libpulse.a $(PULSE_LIBS)
1600 OUTPUT_LIBS += $(PULSE_LIBS2)
1601 endif
1603 if HAVE_SHOUT
1604 liboutput_plugins_a_SOURCES += \
1605         src/output/plugins/ShoutOutputPlugin.cxx \
1606         src/output/plugins/ShoutOutputPlugin.hxx
1607 endif
1609 if ENABLE_RECORDER_OUTPUT
1610 liboutput_plugins_a_SOURCES += \
1611         src/output/plugins/RecorderOutputPlugin.cxx \
1612         src/output/plugins/RecorderOutputPlugin.hxx
1613 endif
1615 if ENABLE_HTTPD_OUTPUT
1616 liboutput_plugins_a_SOURCES += \
1617         src/output/plugins/httpd/IcyMetaDataServer.cxx \
1618         src/output/plugins/httpd/IcyMetaDataServer.hxx \
1619         src/output/plugins/httpd/Page.cxx src/output/plugins/httpd/Page.hxx \
1620         src/output/plugins/httpd/HttpdInternal.hxx \
1621         src/output/plugins/httpd/HttpdClient.cxx \
1622         src/output/plugins/httpd/HttpdClient.hxx \
1623         src/output/plugins/httpd/HttpdOutputPlugin.cxx \
1624         src/output/plugins/httpd/HttpdOutputPlugin.hxx
1625 endif
1627 if ENABLE_SOLARIS_OUTPUT
1628 liboutput_plugins_a_SOURCES += \
1629         src/output/plugins/SolarisOutputPlugin.cxx src/output/plugins/SolarisOutputPlugin.hxx
1630 endif
1632 if ENABLE_WINMM_OUTPUT
1633 liboutput_plugins_a_SOURCES += \
1634         src/output/plugins/WinmmOutputPlugin.cxx \
1635         src/output/plugins/WinmmOutputPlugin.hxx
1636 libmixer_plugins_a_SOURCES += src/mixer/plugins/WinmmMixerPlugin.cxx
1637 endif
1641 # Playlist plugins
1644 libplaylist_plugins_a_SOURCES = \
1645         src/playlist/PlaylistPlugin.hxx \
1646         src/playlist/SongEnumerator.hxx \
1647         src/playlist/MemorySongEnumerator.cxx \
1648         src/playlist/MemorySongEnumerator.hxx \
1649         src/playlist/plugins/ExtM3uPlaylistPlugin.cxx \
1650         src/playlist/plugins/ExtM3uPlaylistPlugin.hxx \
1651         src/playlist/plugins/M3uPlaylistPlugin.cxx \
1652         src/playlist/plugins/M3uPlaylistPlugin.hxx \
1653         src/playlist/plugins/PlsPlaylistPlugin.cxx \
1654         src/playlist/plugins/PlsPlaylistPlugin.hxx \
1655         src/playlist/PlaylistRegistry.cxx src/playlist/PlaylistRegistry.hxx
1656 libplaylist_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1657         $(EXPAT_CFLAGS) \
1658         $(YAJL_CFLAGS) \
1659         $(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS))
1661 PLAYLIST_LIBS = \
1662         libplaylist_plugins.a \
1663         $(EXPAT_LIBS) \
1664         $(FLAC_LIBS)
1666 if ENABLE_FLAC
1667 libplaylist_plugins_a_SOURCES += \
1668         src/playlist/plugins/FlacPlaylistPlugin.cxx \
1669         src/playlist/plugins/FlacPlaylistPlugin.hxx
1670 endif
1672 if ENABLE_CUE
1673 libplaylist_plugins_a_SOURCES += \
1674         src/playlist/cue/CueParser.cxx src/playlist/cue/CueParser.hxx \
1675         src/playlist/plugins/CuePlaylistPlugin.cxx \
1676         src/playlist/plugins/CuePlaylistPlugin.hxx \
1677         src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx \
1678         src/playlist/plugins/EmbeddedCuePlaylistPlugin.hxx
1679 endif
1681 if ENABLE_SOUNDCLOUD
1682 libplaylist_plugins_a_SOURCES += \
1683         $(YAJL_SOURCES) \
1684         src/playlist/plugins/SoundCloudPlaylistPlugin.cxx \
1685         src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
1686 PLAYLIST_LIBS += $(YAJL_LIBS)
1687 endif
1689 if ENABLE_EXPAT
1690 libplaylist_plugins_a_SOURCES += \
1691         src/lib/expat/StreamExpatParser.cxx \
1692         src/lib/expat/ExpatParser.cxx src/lib/expat/ExpatParser.hxx \
1693         src/playlist/plugins/XspfPlaylistPlugin.cxx \
1694         src/playlist/plugins/XspfPlaylistPlugin.hxx \
1695         src/playlist/plugins/AsxPlaylistPlugin.cxx \
1696         src/playlist/plugins/AsxPlaylistPlugin.hxx \
1697         src/playlist/plugins/RssPlaylistPlugin.cxx \
1698         src/playlist/plugins/RssPlaylistPlugin.hxx
1699 endif
1702 # Filter plugins
1705 libfilter_api_a_SOURCES = \
1706         src/filter/Observer.cxx src/filter/Observer.hxx \
1707         src/filter/FilterPlugin.hxx \
1708         src/filter/Prepared.hxx \
1709         src/filter/Filter.cxx src/filter/Filter.hxx
1711 libfilter_plugins_a_SOURCES = \
1712         src/AudioCompress/config.h \
1713         src/AudioCompress/compress.h \
1714         src/AudioCompress/compress.c \
1715         src/filter/plugins/NullFilterPlugin.cxx \
1716         src/filter/plugins/ChainFilterPlugin.cxx \
1717         src/filter/plugins/ChainFilterPlugin.hxx \
1718         src/filter/plugins/AutoConvertFilterPlugin.cxx \
1719         src/filter/plugins/AutoConvertFilterPlugin.hxx \
1720         src/filter/plugins/ConvertFilterPlugin.cxx \
1721         src/filter/plugins/ConvertFilterPlugin.hxx \
1722         src/filter/plugins/RouteFilterPlugin.cxx \
1723         src/filter/plugins/NormalizeFilterPlugin.cxx \
1724         src/filter/plugins/NormalizeFilterPlugin.hxx \
1725         src/filter/plugins/ReplayGainFilterPlugin.cxx \
1726         src/filter/plugins/ReplayGainFilterPlugin.hxx \
1727         src/filter/plugins/VolumeFilterPlugin.cxx \
1728         src/filter/plugins/VolumeFilterPlugin.hxx
1730 libfilter_glue_a_SOURCES = \
1731         src/filter/FilterRegistry.cxx src/filter/FilterRegistry.hxx \
1732         src/filter/LoadOne.cxx src/filter/LoadOne.hxx \
1733         src/filter/LoadChain.cxx src/filter/LoadChain.hxx
1735 FILTER_LIBS = \
1736         libfilter_glue.a \
1737         libfilter_plugins.a \
1738         libfilter_api.a \
1739         $(PCM_LIBS)
1743 # systemd unit
1746 if HAVE_SYSTEMD
1747 systemdsystemunit_DATA = \
1748         systemd/system/mpd.socket \
1749         systemd/system/mpd.service
1750 endif
1752 if HAVE_SYSTEMD_USER
1753 systemduserunit_DATA = \
1754         systemd/user/mpd.service
1755 endif
1759 # Test programs
1762 if ENABLE_TEST
1764 C_TESTS = \
1765         test/test_util \
1766         test/test_byte_reverse \
1767         test/test_rewind \
1768         test/test_mixramp \
1769         test/test_pcm \
1770         test/test_protocol \
1771         test/test_queue_priority \
1772         test/TestFs \
1773         test/TestIcu
1775 if ENABLE_CURL
1776 C_TESTS += test/test_icy_parser
1777 endif
1779 if ENABLE_DATABASE
1780 C_TESTS += test/test_translate_song
1781 endif
1783 if ENABLE_ARCHIVE
1784 C_TESTS += test/test_archive
1785 endif
1787 TESTS = $(C_TESTS)
1789 noinst_PROGRAMS = \
1790         $(C_TESTS) \
1791         test/read_conf \
1792         test/run_resolver \
1793         test/run_input \
1794         test/WriteFile \
1795         test/dump_text_file \
1796         test/dump_playlist \
1797         test/run_decoder \
1798         test/read_tags \
1799         test/ReadApeTags \
1800         test/ContainerScan \
1801         test/run_filter \
1802         test/run_output \
1803         test/run_convert \
1804         test/run_normalize \
1805         test/software_volume
1807 if ENABLE_DATABASE
1808 noinst_PROGRAMS += test/DumpDatabase
1809 noinst_PROGRAMS += test/run_storage
1810 endif
1812 if ENABLE_NEIGHBOR_PLUGINS
1813 noinst_PROGRAMS += test/run_neighbor_explorer
1814 endif
1816 if HAVE_AVAHI
1817 noinst_PROGRAMS += test/run_avahi
1818 endif
1820 if ENABLE_ARCHIVE
1821 noinst_PROGRAMS += test/visit_archive
1822 endif
1824 if ENABLE_ID3TAG
1825 noinst_PROGRAMS += test/dump_rva2
1826 endif
1828 if ENABLE_ALSA
1829 # this debug program is still ALSA specific
1830 noinst_PROGRAMS += test/read_mixer
1831 endif
1833 test_read_conf_LDADD = \
1834         libconf.a \
1835         $(FS_LIBS) \
1836         $(ICU_LDADD) \
1837         libsystem.a \
1838         libutil.a
1839 test_read_conf_SOURCES = \
1840         src/Log.cxx src/LogBackend.cxx \
1841         test/read_conf.cxx
1843 test_run_resolver_LDADD = \
1844         libnet.a \
1845         libutil.a
1846 test_run_resolver_SOURCES = \
1847         src/Log.cxx src/LogBackend.cxx \
1848         test/run_resolver.cxx
1850 if ENABLE_DATABASE
1852 test_DumpDatabase_LDADD = \
1853         $(DB_LIBS) \
1854         $(TAG_LIBS) \
1855         libconf.a \
1856         libevent.a \
1857         libthread.a \
1858         $(FS_LIBS) \
1859         libsystem.a \
1860         $(ICU_LDADD) \
1861         libutil.a
1862 test_DumpDatabase_SOURCES = test/DumpDatabase.cxx \
1863         src/protocol/Ack.cxx \
1864         src/Log.cxx src/LogBackend.cxx \
1865         src/db/Registry.cxx \
1866         src/db/Selection.cxx \
1867         src/db/PlaylistVector.cxx \
1868         src/db/DatabaseLock.cxx \
1869         src/SongSave.cxx \
1870         src/DetachedSong.cxx \
1871         src/TagSave.cxx \
1872         src/SongFilter.cxx
1873 test_DumpDatabase_CPPFLAGS = $(AM_CPPFLAGS)
1875 if ENABLE_UPNP
1876 test_DumpDatabase_SOURCES += \
1877         $(CURL_SOURCES) \
1878         src/lib/expat/ExpatParser.cxx
1879 test_DumpDatabase_CPPFLAGS += $(CURL_CFLAGS)
1880 test_DumpDatabase_LDADD += $(CURL_LIBS)
1881 endif
1883 test_run_storage_LDADD = \
1884         $(STORAGE_LIBS) \
1885         $(FS_LIBS) \
1886         $(ICU_LDADD) \
1887         libevent.a \
1888         libthread.a \
1889         libsystem.a \
1890         libutil.a
1891 test_run_storage_SOURCES = \
1892         src/Log.cxx src/LogBackend.cxx \
1893         test/run_storage.cxx
1895 if ENABLE_WEBDAV
1896 test_run_storage_SOURCES += $(CURL_SOURCES)
1897 endif
1899 endif
1901 test_run_input_LDADD = \
1902         $(INPUT_LIBS) \
1903         $(ARCHIVE_LIBS) \
1904         $(TAG_LIBS) \
1905         libconf.a \
1906         libevent.a \
1907         libthread.a \
1908         $(FS_LIBS) \
1909         $(ICU_LDADD) \
1910         libsystem.a \
1911         libutil.a
1912 test_run_input_SOURCES = test/run_input.cxx \
1913         src/Log.cxx src/LogBackend.cxx \
1914         src/TagSave.cxx
1916 if ENABLE_NEIGHBOR_PLUGINS
1918 test_run_neighbor_explorer_SOURCES = \
1919         src/Log.cxx src/LogBackend.cxx \
1920         test/run_neighbor_explorer.cxx
1921 test_run_neighbor_explorer_LDADD = $(AM_LDADD) \
1922         $(NEIGHBOR_LIBS) \
1923         $(INPUT_LIBS) \
1924         $(ARCHIVE_LIBS) \
1925         libtag.a \
1926         libconf.a \
1927         libevent.a \
1928         $(FS_LIBS) \
1929         $(ICU_LDADD) \
1930         libsystem.a \
1931         libthread.a \
1932         libutil.a
1934 if ENABLE_UPNP
1935 test_run_neighbor_explorer_SOURCES += src/lib/expat/ExpatParser.cxx
1936 endif
1938 endif
1940 if ENABLE_ARCHIVE
1942 test_visit_archive_LDADD = \
1943         $(INPUT_LIBS) \
1944         $(ARCHIVE_LIBS) \
1945         $(TAG_LIBS) \
1946         libconf.a \
1947         libevent.a \
1948         libthread.a \
1949         $(FS_LIBS) \
1950         $(ICU_LDADD) \
1951         libsystem.a \
1952         libutil.a
1953 test_visit_archive_SOURCES = test/visit_archive.cxx \
1954         src/Log.cxx src/LogBackend.cxx \
1955         src/input/Open.cxx
1957 endif
1959 if ENABLE_ZLIB
1961 noinst_PROGRAMS += test/run_gzip test/run_gunzip
1963 test_run_gzip_LDADD = \
1964         libutil.a \
1965         $(FS_LIBS)
1966 test_run_gzip_SOURCES = test/run_gzip.cxx \
1967         src/Log.cxx src/LogBackend.cxx
1969 test_run_gunzip_SOURCES = test/run_gunzip.cxx \
1970         src/Log.cxx src/LogBackend.cxx
1971 test_run_gunzip_LDADD = \
1972         $(FS_LIBS) \
1973         $(ICU_LDADD) \
1974         libsystem.a \
1975         libutil.a
1977 endif
1979 test_WriteFile_LDADD = \
1980         $(FS_LIBS) \
1981         $(ICU_LDADD) \
1982         libsystem.a \
1983         libutil.a
1984 test_WriteFile_SOURCES = \
1985         src/Log.cxx src/LogBackend.cxx \
1986         test/WriteFile.cxx
1988 test_dump_text_file_LDADD = \
1989         $(INPUT_LIBS) \
1990         $(ARCHIVE_LIBS) \
1991         $(TAG_LIBS) \
1992         libconf.a \
1993         libevent.a \
1994         $(FS_LIBS) \
1995         $(ICU_LDADD) \
1996         libsystem.a \
1997         libthread.a \
1998         libutil.a
1999 test_dump_text_file_SOURCES = test/dump_text_file.cxx \
2000         src/Log.cxx src/LogBackend.cxx
2002 test_dump_playlist_LDADD = \
2003         $(PLAYLIST_LIBS) \
2004         $(FLAC_LIBS) \
2005         $(DECODER_LIBS) \
2006         $(TAG_LIBS) \
2007         $(XIPH_LIBS) \
2008         $(INPUT_LIBS) \
2009         $(ARCHIVE_LIBS) \
2010         libconf.a \
2011         libbasic.a \
2012         libevent.a \
2013         libthread.a \
2014         $(FS_LIBS) \
2015         $(ICU_LDADD) \
2016         libsystem.a \
2017         libutil.a \
2018         libpcm.a
2019 test_dump_playlist_SOURCES = test/dump_playlist.cxx \
2020         test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
2021         src/Log.cxx src/LogBackend.cxx \
2022         src/TagSave.cxx \
2023         src/TagFile.cxx \
2024         src/DetachedSong.cxx
2026 if ENABLE_FLAC
2027 test_dump_playlist_SOURCES += \
2028         src/ReplayGainInfo.cxx \
2029         src/decoder/plugins/FlacMetadata.cxx
2030 endif
2032 test_run_decoder_LDADD = \
2033         $(DECODER_LIBS) \
2034         libpcm.a \
2035         $(INPUT_LIBS) \
2036         $(ARCHIVE_LIBS) \
2037         $(TAG_LIBS) \
2038         libconf.a \
2039         libbasic.a \
2040         libevent.a \
2041         libthread.a \
2042         $(FS_LIBS) \
2043         $(ICU_LDADD) \
2044         libsystem.a \
2045         libutil.a
2046 test_run_decoder_SOURCES = test/run_decoder.cxx \
2047         test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
2048         src/DetachedSong.cxx \
2049         src/Log.cxx src/LogBackend.cxx \
2050         src/ReplayGainInfo.cxx
2052 test_read_tags_LDADD = \
2053         $(DECODER_LIBS) \
2054         libpcm.a \
2055         $(INPUT_LIBS) \
2056         $(ARCHIVE_LIBS) \
2057         $(TAG_LIBS) \
2058         libconf.a \
2059         libbasic.a \
2060         libevent.a \
2061         libthread.a \
2062         $(FS_LIBS) \
2063         $(ICU_LDADD) \
2064         libsystem.a \
2065         libutil.a
2066 test_read_tags_SOURCES = test/read_tags.cxx \
2067         test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
2068         src/DetachedSong.cxx \
2069         src/Log.cxx src/LogBackend.cxx \
2070         src/ReplayGainInfo.cxx
2072 test_ReadApeTags_LDADD = \
2073         $(TAG_LIBS) \
2074         $(INPUT_LIBS) \
2075         $(ARCHIVE_LIBS) \
2076         $(FS_LIBS) \
2077         $(ICU_LDADD) \
2078         libsystem.a \
2079         libutil.a
2080 test_ReadApeTags_SOURCES = \
2081         src/Log.cxx src/LogBackend.cxx \
2082         test/ReadApeTags.cxx
2084 test_ContainerScan_LDADD = \
2085         $(DECODER_LIBS) \
2086         libpcm.a \
2087         $(INPUT_LIBS) \
2088         $(ARCHIVE_LIBS) \
2089         $(TAG_LIBS) \
2090         libconf.a \
2091         libbasic.a \
2092         libevent.a \
2093         libthread.a \
2094         $(FS_LIBS) \
2095         $(ICU_LDADD) \
2096         libsystem.a \
2097         libutil.a
2098 test_ContainerScan_SOURCES = test/ContainerScan.cxx \
2099         src/DetachedSong.cxx \
2100         src/SongSave.cxx src/TagSave.cxx \
2101         src/Log.cxx src/LogBackend.cxx \
2102         src/ReplayGainInfo.cxx \
2103         $(DECODER_SRC)
2105 if ENABLE_ID3TAG
2106 test_dump_rva2_LDADD = \
2107         $(TAG_LIBS) \
2108         $(INPUT_LIBS) \
2109         $(ARCHIVE_LIBS) \
2110         $(FS_LIBS) \
2111         $(ICU_LDADD) \
2112         libsystem.a \
2113         libutil.a
2114 test_dump_rva2_SOURCES = \
2115         src/Log.cxx src/LogBackend.cxx \
2116         test/dump_rva2.cxx
2117 endif
2119 test_run_filter_LDADD = \
2120         $(FILTER_LIBS) \
2121         libconf.a \
2122         libbasic.a \
2123         $(FS_LIBS) \
2124         $(ICU_LDADD) \
2125         libsystem.a \
2126         libutil.a
2127 test_run_filter_SOURCES = test/run_filter.cxx \
2128         src/Log.cxx src/LogBackend.cxx
2130 if ENABLE_ENCODER
2131 noinst_PROGRAMS += test/run_encoder
2132 test_run_encoder_SOURCES = test/run_encoder.cxx \
2133         src/Log.cxx src/LogBackend.cxx
2134 test_run_encoder_LDADD = \
2135         $(ENCODER_LIBS) \
2136         $(TAG_LIBS) \
2137         libconf.a \
2138         libbasic.a \
2139         libpcm.a \
2140         libthread.a \
2141         $(FS_LIBS) \
2142         $(ICU_LDADD) \
2143         libsystem.a \
2144         libutil.a
2145 endif
2147 if ENABLE_VORBISENC
2148 noinst_PROGRAMS += test/test_vorbis_encoder
2149 test_test_vorbis_encoder_SOURCES = test/test_vorbis_encoder.cxx \
2150         src/Log.cxx src/LogBackend.cxx
2151 test_test_vorbis_encoder_CPPFLAGS = $(AM_CPPFLAGS) \
2152         $(ENCODER_CFLAGS)
2153 test_test_vorbis_encoder_LDADD = $(MPD_LIBS) \
2154         $(ENCODER_LIBS) \
2155         $(PCM_LIBS) \
2156         $(TAG_LIBS) \
2157         libconf.a \
2158         libbasic.a \
2159         $(FS_LIBS) \
2160         $(ICU_LDADD) \
2161         libsystem.a \
2162         libutil.a
2163 endif
2165 test_software_volume_SOURCES = test/software_volume.cxx \
2166         src/Log.cxx src/LogBackend.cxx
2167 test_software_volume_LDADD = \
2168         $(PCM_LIBS) \
2169         libbasic.a \
2170         libutil.a
2172 test_run_avahi_SOURCES = \
2173         src/Log.cxx src/LogBackend.cxx \
2174         src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/AvahiPoll.cxx \
2175         test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
2176         test/run_avahi.cxx
2177 test_run_avahi_CPPFLAGS = $(AM_CPPFLAGS) \
2178         $(AVAHI_CFLAGS)
2179 test_run_avahi_LDADD = \
2180         libevent.a \
2181         libsystem.a \
2182         libutil.a \
2183         $(AVAHI_LIBS)
2185 test_run_normalize_SOURCES = test/run_normalize.cxx \
2186         src/Log.cxx src/LogBackend.cxx \
2187         src/CheckAudioFormat.cxx \
2188         src/AudioCompress/compress.c \
2189         src/AudioParser.cxx
2190 test_run_normalize_LDADD = \
2191         libutil.a
2193 test_run_convert_SOURCES = test/run_convert.cxx \
2194         src/Log.cxx src/LogBackend.cxx
2195 test_run_convert_LDADD = \
2196         $(PCM_LIBS) \
2197         libconf.a \
2198         libbasic.a \
2199         $(FS_LIBS) \
2200         libsystem.a \
2201         $(ICU_LDADD) \
2202         libutil.a
2204 test_run_output_LDADD = $(MPD_LIBS) \
2205         $(OUTPUT_LIBS) \
2206         $(ENCODER_LIBS) \
2207         libmixer_plugins.a \
2208         $(PCM_LIBS) \
2209         $(TAG_LIBS) \
2210         libconf.a \
2211         libbasic.a \
2212         libevent.a \
2213         $(FS_LIBS) \
2214         $(ICU_LDADD) \
2215         libnet.a \
2216         libsystem.a \
2217         libthread.a \
2218         libutil.a
2219 test_run_output_SOURCES = test/run_output.cxx \
2220         test/NullMixerListener.hxx \
2221         src/Log.cxx src/LogBackend.cxx \
2222         src/output/Domain.cxx \
2223         src/output/Registry.cxx \
2224         src/output/OutputPlugin.cxx \
2225         src/mixer/MixerControl.cxx \
2226         src/mixer/MixerType.cxx
2228 test_read_mixer_LDADD = \
2229         libpcm.a \
2230         libmixer_plugins.a \
2231         $(OUTPUT_LIBS) \
2232         libfilter_api.a \
2233         libconf.a \
2234         libbasic.a \
2235         libevent.a \
2236         $(FS_LIBS) \
2237         $(ICU_LDADD) \
2238         libsystem.a \
2239         libutil.a
2240 test_read_mixer_SOURCES = test/read_mixer.cxx \
2241         test/NullMixerListener.hxx \
2242         src/Log.cxx src/LogBackend.cxx \
2243         src/mixer/MixerControl.cxx \
2244         src/filter/plugins/VolumeFilterPlugin.cxx
2246 if ENABLE_BZIP2_TEST
2247 TESTS += test/test_archive_bzip2.sh
2248 endif
2250 if ENABLE_ZZIP_TEST
2251 TESTS += test/test_archive_zzip.sh
2252 endif
2254 if ENABLE_ISO9660_TEST
2255 TESTS += test/test_archive_iso9660.sh
2256 endif
2258 if ENABLE_INOTIFY
2259 noinst_PROGRAMS += test/run_inotify
2260 test_run_inotify_SOURCES = test/run_inotify.cxx \
2261         test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
2262         src/Log.cxx src/LogBackend.cxx \
2263         src/db/update/InotifyDomain.cxx \
2264         src/db/update/InotifySource.cxx
2265 test_run_inotify_LDADD = \
2266         libevent.a \
2267         libsystem.a \
2268         libutil.a
2269 endif
2271 test_test_util_SOURCES = \
2272         test/DivideStringTest.hxx \
2273         test/SplitStringTest.hxx \
2274         test/UriUtilTest.hxx \
2275         test/MimeTypeTest.hxx \
2276         test/TestCircularBuffer.hxx \
2277         test/test_util.cxx
2278 test_test_util_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2279 test_test_util_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2280 test_test_util_LDADD = \
2281         libutil.a \
2282         $(CPPUNIT_LIBS)
2284 test_test_byte_reverse_SOURCES = \
2285         test/test_byte_reverse.cxx
2286 test_test_byte_reverse_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2287 test_test_byte_reverse_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2288 test_test_byte_reverse_LDADD = \
2289         libutil.a \
2290         $(CPPUNIT_LIBS)
2292 test_test_rewind_SOURCES = \
2293         src/Log.cxx src/LogBackend.cxx \
2294         test/test_rewind.cxx
2295 test_test_rewind_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2296 test_test_rewind_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2297 test_test_rewind_LDADD = \
2298         $(INPUT_LIBS) \
2299         libthread.a \
2300         libtag.a \
2301         libutil.a \
2302         $(CPPUNIT_LIBS)
2304 test_test_mixramp_SOURCES = \
2305         src/Log.cxx src/LogBackend.cxx \
2306         test/test_mixramp.cxx
2307 test_test_mixramp_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2308 test_test_mixramp_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2309 test_test_mixramp_LDADD = \
2310         libutil.a \
2311         $(CPPUNIT_LIBS)
2313 if ENABLE_CURL
2314 test_test_icy_parser_SOURCES = \
2315         src/Log.cxx src/LogBackend.cxx \
2316         test/test_icy_parser.cxx
2317 test_test_icy_parser_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2318 test_test_icy_parser_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2319 test_test_icy_parser_LDADD = \
2320         libtag.a \
2321         libutil.a \
2322         $(CPPUNIT_LIBS)
2323 endif
2325 test_test_pcm_SOURCES = \
2326         test/TestAudioFormat.cxx test/TestAudioFormat.hxx \
2327         test/test_pcm_util.hxx \
2328         test/test_pcm_dither.cxx \
2329         test/test_pcm_pack.cxx \
2330         test/test_pcm_channels.cxx \
2331         test/test_pcm_format.cxx \
2332         test/test_pcm_volume.cxx \
2333         test/test_pcm_mix.cxx \
2334         test/test_pcm_interleave.cxx \
2335         test/test_pcm_export.cxx \
2336         test/test_pcm_all.hxx \
2337         test/test_pcm_main.cxx
2338 test_test_pcm_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2339 test_test_pcm_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2340 test_test_pcm_LDADD = \
2341         $(PCM_LIBS) \
2342         libbasic.a \
2343         libutil.a \
2344         $(CPPUNIT_LIBS)
2346 test_test_archive_SOURCES = \
2347         src/Log.cxx src/LogBackend.cxx \
2348         test/test_archive.cxx
2349 test_test_archive_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2350 test_test_archive_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2351 test_test_archive_LDADD = \
2352         libarchive.a \
2353         libutil.a \
2354         $(CPPUNIT_LIBS)
2356 if ENABLE_DATABASE
2358 test_test_translate_song_SOURCES = \
2359         src/playlist/PlaylistSong.cxx \
2360         src/PlaylistError.cxx \
2361         src/DetachedSong.cxx \
2362         src/SongLoader.cxx \
2363         src/LocateUri.cxx \
2364         src/Log.cxx \
2365         test/test_translate_song.cxx
2366 test_test_translate_song_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2367 test_test_translate_song_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2368 test_test_translate_song_LDADD = \
2369         $(STORAGE_LIBS) \
2370         libtag.a \
2371         $(FS_LIBS) \
2372         $(ICU_LDADD) \
2373         libsystem.a \
2374         libutil.a \
2375         $(CPPUNIT_LIBS)
2377 endif
2379 test_test_protocol_SOURCES = \
2380         src/protocol/ArgParser.cxx \
2381         test/test_protocol.cxx
2382 test_test_protocol_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2383 test_test_protocol_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2384 test_test_protocol_LDADD = \
2385         libsystem.a \
2386         libutil.a \
2387         $(CPPUNIT_LIBS)
2389 test_test_queue_priority_SOURCES = \
2390         src/queue/Queue.cxx \
2391         src/DetachedSong.cxx \
2392         test/test_queue_priority.cxx
2393 test_test_queue_priority_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2394 test_test_queue_priority_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2395 test_test_queue_priority_LDADD = \
2396         libsystem.a \
2397         libutil.a \
2398         $(CPPUNIT_LIBS)
2400 test_TestFs_SOURCES = \
2401         test/TestFs.cxx
2402 test_TestFs_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2403 test_TestFs_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2404 test_TestFs_LDADD = \
2405         $(FS_LIBS) \
2406         $(CPPUNIT_LIBS)
2408 test_TestIcu_SOURCES = \
2409         test/TestIcu.cxx
2410 test_TestIcu_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS)
2411 test_TestIcu_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2412 test_TestIcu_LDADD = \
2413         $(ICU_LDADD) \
2414         libutil.a \
2415         $(CPPUNIT_LIBS)
2417 if ENABLE_DSD
2419 noinst_PROGRAMS += src/pcm/dsd2pcm/dsd2pcm
2421 src_pcm_dsd2pcm_dsd2pcm_SOURCES = \
2422         src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h \
2423         src/pcm/dsd2pcm/dsd2pcm.hpp \
2424         src/pcm/dsd2pcm/noiseshape.c src/pcm/dsd2pcm/noiseshape.h \
2425         src/pcm/dsd2pcm/noiseshape.hpp \
2426         src/pcm/dsd2pcm/main.cpp
2427 src_pcm_dsd2pcm_dsd2pcm_LDADD = libutil.a
2429 endif
2431 endif
2435 # Documentation
2438 man_MANS = doc/mpd.1 doc/mpd.conf.5
2439 doc_DATA = AUTHORS COPYING NEWS README.md doc/mpdconf.example
2441 DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
2443 if ENABLE_DOCUMENTATION
2444 protocoldir = $(docdir)/protocol
2445 protocol_DATA = $(wildcard doc/protocol/*.html)
2447 userdir = $(docdir)/user
2448 user_DATA = $(wildcard doc/user/*.html)
2450 developerdir = $(docdir)/developer
2451 developer_DATA = $(wildcard doc/developer/*.html)
2453 DOCBOOK_HTML = $(patsubst %.xml,%/index.html,$(DOCBOOK_FILES))
2455 DOCBOOK_INCLUDES = $(wildcard $(srcdir)/doc/include/*.xml)
2457 $(DOCBOOK_HTML): %/index.html: %.xml $(DOCBOOK_INCLUDES)
2458         $(XMLTO) -o $(@D) --stringparam chunker.output.encoding=utf-8 html --stringparam use.id.as.filename=1 $<
2460 doc/api/html/index.html: doc/doxygen.conf
2461         @$(MKDIR_P) $(@D)
2462         $(DOXYGEN) $<
2464 all-local: $(DOCBOOK_HTML) doc/api/html/index.html
2466 clean-local:
2467         rm -rf $(patsubst %.xml,%,$(DOCBOOK_FILES))
2468         rm -rf doc/api
2470 install-data-local: doc/api/html/index.html
2471         $(mkinstalldirs) $(DESTDIR)$(docdir)/api/html
2472         $(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
2473                 $(DESTDIR)$(docdir)/api/html
2475 uninstall-local:
2476         rm -f $(DESTDIR)$(docdir)/api/html/*.*
2478 upload: $(DOCBOOK_HTML) doc/api/html/index.html
2479         rsync -vpruz --delete doc/ www.musicpd.org:/var/www/mpd/doc/ \
2480                 --chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
2481                 --include=protocol --include=protocol/** \
2482                 --include=user --include=user/** \
2483                 --include=developer --include=developer/** \
2484                 --include=api --include=api/** \
2485                 --exclude=*
2487 endif
2491 # Distribution
2494 EXTRA_DIST = $(doc_DATA) autogen.sh \
2495         test/test_archive_bzip2.sh  \
2496         test/test_archive_iso9660.sh \
2497         test/test_archive_zzip.sh \
2498         $(wildcard $(srcdir)/scripts/*.rb) \
2499         $(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
2500         $(wildcard $(srcdir)/doc/include/*.xml) \
2501         systemd/system/mpd.socket \
2502         $(wildcard $(srcdir)/python/build/*.py) \
2503         android/AndroidManifest.xml \
2504         android/build.py \
2505         android/custom_rules.xml \
2506         android/res/values/strings.xml \
2507         android/src/Bridge.java \
2508         android/src/Loader.java \
2509         android/src/Main.java \
2510         win32/build.py \
2511         win32/res/mpd.rc.in win32/res/mpd.ico \
2512         src/haiku/App_MusicPD