Makefile.am 58.5 KB
Newer Older
1
ACLOCAL_AMFLAGS = -I m4
2
AUTOMAKE_OPTIONS = foreign 1.11 dist-xz subdir-objects
Warren Dukes's avatar
Warren Dukes committed
3

4
AM_CPPFLAGS += -I$(srcdir)/src $(GLIB_CFLAGS) $(BOOST_CPPFLAGS)
5

6 7
AM_CPPFLAGS += -DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"'

Max Kellermann's avatar
Max Kellermann committed
8 9
if ANDROID
else
10
bin_PROGRAMS = src/mpd
Max Kellermann's avatar
Max Kellermann committed
11
endif
12

13
noinst_LIBRARIES = \
14
	libmpd.a \
15
	libutil.a \
16
	libthread.a \
17
	libsystem.a \
18
	libevent.a \
19
	libicu.a \
20
	libpcm.a \
21
	libconf.a \
22 23
	libtag.a \
	libinput.a \
24
	libfs.a \
25
	libplaylist_plugins.a \
26
	libdecoder.a \
27 28 29
	libfilter_plugins.a \
	libmixer_plugins.a \
	liboutput_plugins.a
30

Max Kellermann's avatar
Max Kellermann committed
31 32
libmpd_a_DEPENDENCIES =

33
libmpd_a_CPPFLAGS = $(AM_CPPFLAGS) \
34
	$(LIBMPDCLIENT_CFLAGS) \
35
	$(AVAHI_CFLAGS) \
36
	$(LIBWRAP_CFLAGS) \
37
	$(SQLITE_CFLAGS)
38

39
src_mpd_LDADD = \
40
	libmpd.a \
41
	$(NEIGHBOR_LIBS) \
42
	$(DB_LIBS) \
43
	$(STORAGE_LIBS) \
44
	$(PLAYLIST_LIBS) \
45
	$(AVAHI_LIBS) \
46
	$(LIBWRAP_LDFLAGS) \
47
	$(SQLITE_LIBS) \
48
	$(DECODER_LIBS) \
49
	$(INPUT_LIBS) \
50
	$(ARCHIVE_LIBS) \
51
	$(TAG_LIBS) \
52
	$(OUTPUT_LIBS) \
53
	$(FILTER_LIBS) \
54
	$(ENCODER_LIBS) \
55
	$(MIXER_LIBS) \
56
	libconf.a \
57
	libevent.a \
58
	libthread.a \
59
	libsystem.a \
60
	$(ICU_LDADD) \
61
	libutil.a \
62
	$(FS_LIBS) \
63
	$(SYSTEMD_DAEMON_LIBS) \
64
	$(GLIB_LIBS)
65 66

src_mpd_SOURCES = \
67 68 69
	src/Main.cxx src/Main.hxx

libmpd_a_SOURCES = \
70 71
	$(OUTPUT_API_SRC) \
	$(MIXER_API_SRC) \
72
	src/check.h \
73
	src/Compiler.h \
74 75
	src/open.h \
	src/poison.h \
Max Kellermann's avatar
Max Kellermann committed
76
	src/notify.cxx src/notify.hxx \
77
	src/AudioConfig.cxx src/AudioConfig.hxx \
78
	src/CheckAudioFormat.cxx src/CheckAudioFormat.hxx \
79
	src/AudioFormat.cxx src/AudioFormat.hxx \
80
	src/AudioParser.cxx src/AudioParser.hxx \
81
	src/protocol/Ack.cxx src/protocol/Ack.hxx \
Max Kellermann's avatar
Max Kellermann committed
82 83
	src/protocol/ArgParser.cxx src/protocol/ArgParser.hxx \
	src/protocol/Result.cxx src/protocol/Result.hxx \
84 85 86 87
	src/command/CommandResult.hxx \
	src/command/CommandError.cxx src/command/CommandError.hxx \
	src/command/AllCommands.cxx src/command/AllCommands.hxx \
	src/command/QueueCommands.cxx src/command/QueueCommands.hxx \
88
	src/command/TagCommands.cxx src/command/TagCommands.hxx \
89 90
	src/command/PlayerCommands.cxx src/command/PlayerCommands.hxx \
	src/command/PlaylistCommands.cxx src/command/PlaylistCommands.hxx \
91
	src/command/FileCommands.cxx src/command/FileCommands.hxx \
92 93 94 95
	src/command/OutputCommands.cxx src/command/OutputCommands.hxx \
	src/command/MessageCommands.cxx src/command/MessageCommands.hxx \
	src/command/OtherCommands.cxx src/command/OtherCommands.hxx \
	src/command/CommandListBuilder.cxx src/command/CommandListBuilder.hxx \
Max Kellermann's avatar
Max Kellermann committed
96
	src/Idle.cxx src/Idle.hxx \
97
	src/CrossFade.cxx src/CrossFade.hxx \
98 99 100 101 102 103 104 105
	src/decoder/DecoderError.cxx src/decoder/DecoderError.hxx \
	src/decoder/DecoderThread.cxx src/decoder/DecoderThread.hxx \
	src/decoder/DecoderCommand.hxx \
	src/decoder/DecoderControl.cxx src/decoder/DecoderControl.hxx \
	src/decoder/DecoderAPI.cxx src/decoder/DecoderAPI.hxx \
	src/decoder/DecoderPlugin.hxx \
	src/decoder/DecoderInternal.cxx src/decoder/DecoderInternal.hxx \
	src/decoder/DecoderPrint.cxx src/decoder/DecoderPrint.hxx \
106 107 108 109
	src/filter/FilterConfig.cxx src/filter/FilterConfig.hxx \
	src/filter/FilterPlugin.cxx src/filter/FilterPlugin.hxx \
	src/filter/FilterInternal.hxx \
	src/filter/FilterRegistry.cxx src/filter/FilterRegistry.hxx \
110 111 112 113 114 115 116 117 118 119 120 121 122
	src/client/Client.cxx src/client/Client.hxx \
	src/client/ClientInternal.hxx \
	src/client/ClientEvent.cxx \
	src/client/ClientExpire.cxx \
	src/client/ClientGlobal.cxx \
	src/client/ClientIdle.cxx \
	src/client/ClientList.cxx src/client/ClientList.hxx \
	src/client/ClientNew.cxx \
	src/client/ClientProcess.cxx \
	src/client/ClientRead.cxx \
	src/client/ClientWrite.cxx \
	src/client/ClientMessage.cxx src/client/ClientMessage.hxx \
	src/client/ClientSubscribe.cxx \
123
	src/client/ClientFile.cxx \
Max Kellermann's avatar
Max Kellermann committed
124
	src/Listen.cxx src/Listen.hxx \
125
	src/LogInit.cxx src/LogInit.hxx \
126
	src/LogBackend.cxx src/LogBackend.hxx \
127
	src/Log.cxx src/Log.hxx src/LogV.hxx \
128
	src/LogLevel.hxx \
129
	src/ls.cxx src/ls.hxx \
130
	src/IOThread.cxx src/IOThread.hxx \
131
	src/Instance.cxx src/Instance.hxx \
132
	src/win32/Win32Main.cxx \
133
	src/GlobalEvents.cxx src/GlobalEvents.hxx \
134
	src/MixRampInfo.hxx \
135 136 137
	src/MusicBuffer.cxx src/MusicBuffer.hxx \
	src/MusicPipe.cxx src/MusicPipe.hxx \
	src/MusicChunk.cxx src/MusicChunk.hxx \
Max Kellermann's avatar
Max Kellermann committed
138
	src/Mapper.cxx src/Mapper.hxx \
139
	src/Partition.cxx src/Partition.hxx \
140
	src/Permission.cxx src/Permission.hxx \
141
	src/PlayerThread.cxx src/PlayerThread.hxx \
142
	src/PlayerControl.cxx src/PlayerControl.hxx \
143
	src/PlayerListener.hxx \
144
	src/PlaylistError.cxx src/PlaylistError.hxx \
145
	src/PlaylistGlobal.cxx src/PlaylistGlobal.hxx \
146
	src/PlaylistPrint.cxx src/PlaylistPrint.hxx \
147
	src/PlaylistSave.cxx src/PlaylistSave.hxx \
148
	src/playlist/PlaylistStream.cxx src/playlist/PlaylistStream.hxx \
149 150 151 152 153
	src/playlist/PlaylistMapper.cxx src/playlist/PlaylistMapper.hxx \
	src/playlist/PlaylistAny.cxx src/playlist/PlaylistAny.hxx \
	src/playlist/PlaylistSong.cxx src/playlist/PlaylistSong.hxx \
	src/playlist/PlaylistQueue.cxx src/playlist/PlaylistQueue.hxx \
	src/playlist/Print.cxx src/playlist/Print.hxx \
154
	src/BulkEdit.hxx \
155 156
	src/db/PlaylistVector.cxx src/db/PlaylistVector.hxx \
	src/db/PlaylistInfo.hxx \
Max Kellermann's avatar
Max Kellermann committed
157 158 159 160
	src/queue/IdTable.hxx \
	src/queue/Queue.cxx src/queue/Queue.hxx \
	src/queue/QueuePrint.cxx src/queue/QueuePrint.hxx \
	src/queue/QueueSave.cxx src/queue/QueueSave.hxx \
161 162 163 164 165
	src/queue/Playlist.cxx src/queue/Playlist.hxx \
	src/queue/PlaylistControl.cxx \
	src/queue/PlaylistEdit.cxx \
	src/queue/PlaylistTag.cxx \
	src/queue/PlaylistState.cxx src/queue/PlaylistState.hxx \
166 167
	src/ReplayGainConfig.cxx src/ReplayGainConfig.hxx \
	src/ReplayGainInfo.cxx src/ReplayGainInfo.hxx \
168
	src/DetachedSong.cxx src/DetachedSong.hxx \
169
	src/SongUpdate.cxx \
170
	src/SongLoader.cxx src/SongLoader.hxx \
Max Kellermann's avatar
Max Kellermann committed
171
	src/SongPrint.cxx src/SongPrint.hxx \
172 173
	src/SongSave.cxx src/SongSave.hxx \
	src/StateFile.cxx src/StateFile.hxx \
174
	src/Stats.cxx src/Stats.hxx \
Max Kellermann's avatar
Max Kellermann committed
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 \
Max Kellermann's avatar
Max Kellermann committed
180
	src/mixer/Volume.cxx src/mixer/Volume.hxx \
181
	src/Chrono.hxx \
182
	src/SongFilter.cxx src/SongFilter.hxx \
Max Kellermann's avatar
Max Kellermann committed
183
	src/PlaylistFile.cxx src/PlaylistFile.hxx
184

185 186 187 188 189 190 191 192 193
if ANDROID
else
libmpd_a_SOURCES += \
	src/unix/SignalHandlers.cxx src/unix/SignalHandlers.hxx \
	src/unix/Daemon.cxx src/unix/Daemon.hxx \
	src/unix/PidFile.hxx \
	src/CommandLine.cxx src/CommandLine.hxx
endif

194
if ENABLE_DATABASE
195
libmpd_a_SOURCES += \
196
	src/queue/PlaylistUpdate.cxx \
197
	src/command/StorageCommands.cxx src/command/StorageCommands.hxx \
198
	src/command/DatabaseCommands.cxx src/command/DatabaseCommands.hxx \
199
	src/db/Count.cxx src/db/Count.hxx \
200 201 202 203 204 205 206 207 208 209 210 211 212 213
	src/db/LightSong.cxx src/db/LightSong.hxx \
	src/db/LightDirectory.hxx \
	src/db/update/UpdateDomain.cxx src/db/update/UpdateDomain.hxx \
	src/db/update/Service.cxx src/db/update/Service.hxx \
	src/db/update/Queue.cxx src/db/update/Queue.hxx \
	src/db/update/UpdateIO.cxx src/db/update/UpdateIO.hxx \
	src/db/update/Editor.cxx src/db/update/Editor.hxx \
	src/db/update/Walk.cxx src/db/update/Walk.hxx \
	src/db/update/UpdateSong.cxx \
	src/db/update/Container.cxx \
	src/db/update/Remove.cxx src/db/update/Remove.hxx \
	src/db/update/ExcludeList.cxx src/db/update/ExcludeList.hxx \
	src/db/Uri.hxx \
	src/db/DatabaseGlue.cxx src/db/DatabaseGlue.hxx \
214
	src/db/Configured.cxx src/db/Configured.hxx \
215 216 217 218 219 220 221
	src/db/DatabaseSong.cxx src/db/DatabaseSong.hxx \
	src/db/DatabasePrint.cxx src/db/DatabasePrint.hxx \
	src/db/DatabaseQueue.cxx src/db/DatabaseQueue.hxx \
	src/db/DatabasePlaylist.cxx src/db/DatabasePlaylist.hxx \
	src/db/DatabaseError.cxx src/db/DatabaseError.hxx \
	src/db/DatabaseLock.cxx src/db/DatabaseLock.hxx \
	src/db/DatabasePlugin.hxx \
222 223
	src/db/Interface.hxx \
	src/db/Stats.hxx \
224 225 226 227 228
	src/db/DatabaseListener.hxx \
	src/db/Visitor.hxx \
	src/db/Selection.cxx src/db/Selection.hxx
endif

229
UPNP_SOURCES = \
230
	src/lib/upnp/Init.cxx src/lib/upnp/Init.hxx \
231
	src/lib/upnp/ClientInit.cxx src/lib/upnp/ClientInit.hxx \
232 233 234 235 236
	src/lib/upnp/Device.cxx src/lib/upnp/Device.hxx \
	src/lib/upnp/ContentDirectoryService.cxx src/lib/upnp/ContentDirectoryService.hxx \
	src/lib/upnp/Discovery.cxx src/lib/upnp/Discovery.hxx \
	src/lib/upnp/Domain.cxx src/lib/upnp/Domain.hxx \
	src/lib/upnp/ixmlwrap.cxx src/lib/upnp/ixmlwrap.hxx \
237
	src/lib/upnp/Callback.hxx \
238 239 240 241
	src/lib/upnp/Util.cxx src/lib/upnp/Util.hxx \
	src/lib/upnp/WorkQueue.hxx \
	src/lib/upnp/Action.hxx

242 243 244 245 246
#
# Android native library
#

if ANDROID
Max Kellermann's avatar
Max Kellermann committed
247

248 249 250 251 252 253 254 255 256 257
noinst_LIBRARIES += libjava.a
libjava_a_SOURCES = \
	src/java/Class.hxx \
	src/java/Exception.hxx \
	src/java/Global.cxx src/java/Global.hxx \
	src/java/Object.hxx \
	src/java/Ref.hxx \
	src/java/File.cxx src/java/File.hxx \
	src/java/String.cxx src/java/String.hxx

258 259
noinst_LIBRARIES += libandroid.a
libandroid_a_SOURCES = \
260
	src/android/Context.cxx src/android/Context.hxx \
261 262 263
	src/android/Environment.cxx src/android/Environment.hxx
libandroid_a_CPPFLAGS = $(AM_CPPFLAGS) -Iandroid/build/include

Max Kellermann's avatar
Max Kellermann committed
264 265 266 267 268
noinst_LIBRARIES += libmain.a
libmain_a_SOURCES = \
	src/Main.cxx src/Main.hxx
libmain_a_CPPFLAGS = $(AM_CPPFLAGS) -Iandroid/build/include

269
src_mpd_LDADD += libandroid.a libjava.a
270

Max Kellermann's avatar
Max Kellermann committed
271 272 273 274 275 276 277 278 279
all-local: android/build/bin/Main-debug.apk
clean-local:
	rm -rf android/build

libmpd.so: $(filter %.a,$(src_mpd_LDADD)) libmain.a
	$(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)

android/build/build.xml: android/AndroidManifest.xml
	rm -rf android/build
280 281 282
	mkdir -p android/build/include android/build/res android/build/src/org
	ln -s $(abs_srcdir)/android/AndroidManifest.xml $(abs_srcdir)/android/custom_rules.xml android/build
	ln -s $(abs_srcdir)/android/src android/build/src/org/musicpd
283
	ln -s $(abs_srcdir)/android/res/values android/build/res
284
	$(ANDROID_SDK)/tools/android update project --path android/build --target android-17
Max Kellermann's avatar
Max Kellermann committed
285 286 287 288 289 290 291 292 293 294 295 296

android/build/bin/classes/org/musicpd/Bridge.class: android/src/Bridge.java android/build/build.xml
	cd android/build && ant compile-jni-classes

android/build/include/org_musicpd_Bridge.h: android/build/bin/classes/org/musicpd/Bridge.class
	javah -classpath $(ANDROID_SDK)/platforms/android-17/android.jar:android/build/bin/classes -d $(@D) org.musicpd.Bridge

libmpd_a_DEPENDENCIES += android/build/include/org_musicpd_Bridge.h

android/build/libs/armeabi-v7a/libmpd.so: libmpd.so android/build/build.xml
	mkdir -p $(@D)
	rm -f $@
297
	$(STRIP) -o $@ $<
Max Kellermann's avatar
Max Kellermann committed
298

299 300 301 302
android/build/res/drawable/icon.png: mpd.svg
	mkdir -p $(@D)
	rsvg-convert --width=48 --height=48 $< -o $@

303 304
APK_DEPS = android/build/res/drawable/icon.png \
	android/build/libs/armeabi-v7a/libmpd.so \
305
	$(wildcard $(srcdir)/android/src/*.java) \
306 307 308
	android/build/build.xml

android/build/bin/Main-debug.apk: $(APK_DEPS)
Max Kellermann's avatar
Max Kellermann committed
309 310
	cd android/build && ant nodeps debug

311
android/build/bin/Main-release-unsigned.apk: $(APK_DEPS)
Max Kellermann's avatar
Max Kellermann committed
312 313 314 315 316
	cd android/build && ant nodeps release

android/build/bin/Main-release-unaligned.apk: android/build/bin/Main-release-unsigned.apk
	jarsigner -digestalg SHA1 -sigalg MD5withRSA -storepass:env ANDROID_KEYSTORE_PASS -keystore $(ANDROID_KEYSTORE) -signedjar $@ $< $(ANDROID_KEY_ALIAS)

317 318
ANDROID_SDK_BUILD_TOOLS_VERSION = 20.0.0

Max Kellermann's avatar
Max Kellermann committed
319
android/build/bin/Main.apk: android/build/bin/Main-release-unaligned.apk
320
	$(ANDROID_SDK)/build-tools/$(ANDROID_SDK_BUILD_TOOLS_VERSION)/zipalign -f 4 $< $@
Max Kellermann's avatar
Max Kellermann committed
321

322 323
endif

324 325 326 327
#
# Windows resource file
#

328
src/win32/mpd_win32_rc.$(OBJEXT): src/win32/mpd_win32_rc.rc
329 330 331
	$(WINDRES) -i $< -o $@

if HAVE_WINDOWS
332
noinst_DATA = src/win32/mpd_win32_rc.rc
333

334
EXTRA_src_mpd_DEPENDENCIES = src/win32/mpd_win32_rc.$(OBJEXT)
335
src_mpd_LDFLAGS = -Wl,src/win32/mpd_win32_rc.$(OBJEXT)
336 337
endif

338
if ENABLE_DATABASE
339
if ENABLE_INOTIFY
340
libmpd_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
341 342 343 344
	src/db/update/InotifyDomain.cxx src/db/update/InotifyDomain.hxx \
	src/db/update/InotifySource.cxx src/db/update/InotifySource.hxx \
	src/db/update/InotifyQueue.cxx src/db/update/InotifyQueue.hxx \
	src/db/update/InotifyUpdate.cxx src/db/update/InotifyUpdate.hxx
345
endif
346
endif
347

348
if ENABLE_SQLITE
349
libmpd_a_SOURCES += \
350
	src/command/StickerCommands.cxx src/command/StickerCommands.hxx \
351 352 353
	src/sticker/StickerDatabase.cxx src/sticker/StickerDatabase.hxx \
	src/sticker/StickerPrint.cxx src/sticker/StickerPrint.hxx \
	src/sticker/SongSticker.cxx src/sticker/SongSticker.hxx
354 355
endif

356 357 358
# Generic utility library

libutil_a_SOURCES = \
359
	src/util/Macros.hxx \
360
	src/util/Cast.hxx \
361
	src/util/Clamp.hxx \
362
	src/util/Alloc.cxx src/util/Alloc.hxx \
363
	src/util/VarSize.hxx \
364
	src/util/Error.cxx src/util/Error.hxx \
365
	src/util/Domain.hxx \
366
	src/util/ReusableArray.hxx \
367
	src/util/ASCII.hxx \
Max Kellermann's avatar
Max Kellermann committed
368
	src/util/UTF8.cxx src/util/UTF8.hxx \
369
	src/util/CharUtil.hxx \
370
	src/util/NumberParser.hxx \
371
	src/util/StringUtil.cxx src/util/StringUtil.hxx \
372
	src/util/SplitString.cxx src/util/SplitString.hxx \
373
	src/util/FormatString.cxx src/util/FormatString.hxx \
374
	src/util/Tokenizer.cxx src/util/Tokenizer.hxx \
375
	src/util/TextFile.hxx \
Max Kellermann's avatar
Max Kellermann committed
376
	src/util/UriUtil.cxx src/util/UriUtil.hxx \
377
	src/util/Manual.hxx \
378
	src/util/RefCount.hxx \
379
	src/util/StaticFifoBuffer.hxx \
380
	src/util/ForeignFifoBuffer.hxx \
381
	src/util/DynamicFifoBuffer.hxx \
382
	src/util/ConstBuffer.hxx \
383
	src/util/WritableBuffer.hxx \
384
	src/util/CircularBuffer.hxx \
385
	src/util/LazyRandomEngine.cxx src/util/LazyRandomEngine.hxx \
386
	src/util/SliceBuffer.hxx \
387
	src/util/HugeAllocator.cxx src/util/HugeAllocator.hxx \
388
	src/util/PeakBuffer.cxx src/util/PeakBuffer.hxx \
389
	src/util/OptionParser.cxx src/util/OptionParser.hxx \
390
	src/util/OptionDef.hxx \
391
	src/util/ByteReverse.cxx src/util/ByteReverse.hxx \
392 393
	src/util/bit_reverse.c src/util/bit_reverse.h

394 395 396
# Multi-threading library

libthread_a_SOURCES = \
397
	src/thread/Util.hxx \
398
	src/thread/Name.hxx \
399
	src/thread/Slack.hxx \
400 401 402 403 404 405
	src/thread/Mutex.hxx \
	src/thread/PosixMutex.hxx \
	src/thread/CriticalSection.hxx \
	src/thread/Cond.hxx \
	src/thread/PosixCond.hxx \
	src/thread/WindowsCond.hxx \
406
	src/thread/Thread.cxx src/thread/Thread.hxx \
407 408
	src/thread/Id.hxx

409 410 411
# System library

libsystem_a_SOURCES = \
412
	src/system/ByteOrder.hxx \
413 414 415
	src/system/FatalError.cxx src/system/FatalError.hxx \
	src/system/fd_util.c src/system/fd_util.h \
	src/system/SocketUtil.cxx src/system/SocketUtil.hxx \
416
	src/system/SocketError.cxx src/system/SocketError.hxx \
417
	src/system/Resolver.cxx src/system/Resolver.hxx \
418 419
	src/system/EventPipe.cxx src/system/EventPipe.hxx \
	src/system/EventFD.cxx src/system/EventFD.hxx \
420
	src/system/SignalFD.cxx src/system/SignalFD.hxx \
421
	src/system/EPollFD.cxx src/system/EPollFD.hxx \
422
	src/system/PeriodClock.hxx \
423
	src/system/Clock.cxx src/system/Clock.hxx
424

425 426 427
# Event loop library

libevent_a_SOURCES = \
428
	src/event/WakeFD.hxx \
429 430
	src/event/PollGroup.hxx \
	src/event/PollGroupEPoll.hxx \
431
	src/event/PollGroupPoll.hxx src/event/PollGroupPoll.cxx \
432 433
	src/event/PollGroupWinSelect.hxx src/event/PollGroupWinSelect.cxx \
	src/event/PollResultGeneric.hxx \
434
	src/event/SignalMonitor.hxx src/event/SignalMonitor.cxx \
435
	src/event/TimeoutMonitor.hxx src/event/TimeoutMonitor.cxx \
436
	src/event/IdleMonitor.hxx src/event/IdleMonitor.cxx \
437
	src/event/DeferredMonitor.hxx src/event/DeferredMonitor.cxx \
438 439
	src/event/SocketMonitor.cxx src/event/SocketMonitor.hxx \
	src/event/BufferedSocket.cxx src/event/BufferedSocket.hxx \
440
	src/event/FullyBufferedSocket.cxx src/event/FullyBufferedSocket.hxx \
441
	src/event/MultiSocketMonitor.cxx src/event/MultiSocketMonitor.hxx \
442
	src/event/ServerSocket.cxx src/event/ServerSocket.hxx \
443
	src/event/Call.hxx src/event/Call.cxx \
444
	src/event/Loop.cxx src/event/Loop.hxx
445

446 447 448 449 450 451
# UTF-8 library

libicu_a_SOURCES = \
	src/lib/icu/Collate.cxx src/lib/icu/Collate.hxx \
	src/lib/icu/Error.cxx src/lib/icu/Error.hxx

452 453 454 455 456
if HAVE_ICU
libicu_a_SOURCES += \
	src/lib/icu/Init.cxx src/lib/icu/Init.hxx
endif

nanotech's avatar
nanotech committed
457 458 459
libicu_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ICU_CFLAGS)

460 461
ICU_LDADD = libicu.a $(ICU_LIBS)

462 463 464
# PCM library

libpcm_a_SOURCES = \
465
	src/pcm/Domain.cxx src/pcm/Domain.hxx \
466
	src/pcm/Traits.hxx \
467
	src/pcm/PcmBuffer.cxx src/pcm/PcmBuffer.hxx \
468
	src/pcm/PcmExport.cxx src/pcm/PcmExport.hxx \
Max Kellermann's avatar
Max Kellermann committed
469
	src/pcm/PcmConvert.cxx src/pcm/PcmConvert.hxx \
470
	src/pcm/PcmDop.cxx src/pcm/PcmDop.hxx \
471
	src/pcm/Volume.cxx src/pcm/Volume.hxx \
Max Kellermann's avatar
Max Kellermann committed
472 473
	src/pcm/PcmMix.cxx src/pcm/PcmMix.hxx \
	src/pcm/PcmChannels.cxx src/pcm/PcmChannels.hxx \
474
	src/pcm/PcmPack.cxx src/pcm/PcmPack.hxx \
Max Kellermann's avatar
Max Kellermann committed
475
	src/pcm/PcmFormat.cxx src/pcm/PcmFormat.hxx \
476 477
	src/pcm/FloatConvert.hxx \
	src/pcm/ShiftConvert.hxx \
478
	src/pcm/Neon.hxx \
479
	src/pcm/FormatConverter.cxx src/pcm/FormatConverter.hxx \
480
	src/pcm/ChannelsConverter.cxx src/pcm/ChannelsConverter.hxx \
481
	src/pcm/Resampler.hxx \
482
	src/pcm/GlueResampler.cxx src/pcm/GlueResampler.hxx \
483 484
	src/pcm/FallbackResampler.cxx src/pcm/FallbackResampler.hxx \
	src/pcm/ConfiguredResampler.cxx src/pcm/ConfiguredResampler.hxx \
Max Kellermann's avatar
Max Kellermann committed
485 486 487
	src/pcm/PcmDither.cxx src/pcm/PcmDither.hxx \
	src/pcm/PcmPrng.hxx \
	src/pcm/PcmUtils.hxx
488
libpcm_a_CPPFLAGS = $(AM_CPPFLAGS) \
489
	$(SOXR_CFLAGS) \
490
	$(SAMPLERATE_CFLAGS)
491 492 493

PCM_LIBS = \
	libpcm.a \
494
	$(SOXR_LIBS) \
495 496
	$(SAMPLERATE_LIBS)

497 498 499 500 501 502
if ENABLE_DSD
libpcm_a_SOURCES += \
	src/pcm/PcmDsd.cxx src/pcm/PcmDsd.hxx \
	src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h
endif

503
if HAVE_LIBSAMPLERATE
504 505
libpcm_a_SOURCES += \
	src/pcm/LibsamplerateResampler.cxx src/pcm/LibsamplerateResampler.hxx
506 507
endif

508 509 510 511 512
if HAVE_SOXR
libpcm_a_SOURCES += \
	src/pcm/SoxrResampler.cxx src/pcm/SoxrResampler.hxx
endif

513 514
# File system library

515 516
FS_LIBS = libfs.a

517
libfs_a_SOURCES = \
518
	src/fs/io/Reader.hxx \
519
	src/fs/io/PeekReader.cxx src/fs/io/PeekReader.hxx \
520
	src/fs/io/FileReader.cxx src/fs/io/FileReader.hxx \
521
	src/fs/io/BufferedReader.cxx src/fs/io/BufferedReader.hxx \
522 523
	src/fs/io/TextFile.cxx src/fs/io/TextFile.hxx \
	src/fs/io/OutputStream.hxx \
524
	src/fs/io/StdioOutputStream.hxx \
525 526
	src/fs/io/FileOutputStream.cxx src/fs/io/FileOutputStream.hxx \
	src/fs/io/BufferedOutputStream.cxx src/fs/io/BufferedOutputStream.hxx \
527
	src/fs/Domain.cxx src/fs/Domain.hxx \
528
	src/fs/Limits.hxx \
Max Kellermann's avatar
Max Kellermann committed
529
	src/fs/Traits.cxx src/fs/Traits.hxx \
530 531
	src/fs/Config.cxx src/fs/Config.hxx \
	src/fs/Charset.cxx src/fs/Charset.hxx \
532
	src/fs/Path.cxx src/fs/Path.hxx \
533
	src/fs/AllocatedPath.cxx src/fs/AllocatedPath.hxx \
534
	src/fs/FileSystem.cxx src/fs/FileSystem.hxx \
535
	src/fs/StandardDirectory.cxx src/fs/StandardDirectory.hxx \
536
	src/fs/CheckFile.cxx src/fs/CheckFile.hxx \
537
	src/fs/DirectoryReader.hxx
538 539 540 541
libfs_a_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS)

if HAVE_ZLIB
libfs_a_SOURCES += \
542
	src/lib/zlib/Domain.cxx src/lib/zlib/Domain.hxx \
543
	src/fs/io/GunzipReader.cxx src/fs/io/GunzipReader.hxx \
544
	src/fs/io/AutoGunzipReader.cxx src/fs/io/AutoGunzipReader.hxx \
545
	src/fs/io/GzipOutputStream.cxx src/fs/io/GzipOutputStream.hxx
546 547
FS_LIBS += $(ZLIB_LIBS)
endif
548

549 550
# Storage library

551
SMBCLIENT_SOURCES = \
552
	src/lib/smbclient/Domain.cxx src/lib/smbclient/Domain.hxx \
553
	src/lib/smbclient/Mutex.cxx src/lib/smbclient/Mutex.hxx \
554 555
	src/lib/smbclient/Init.cxx src/lib/smbclient/Init.hxx

556
NFS_SOURCES = \
557 558
	src/lib/nfs/Callback.hxx \
	src/lib/nfs/Cancellable.hxx \
559
	src/lib/nfs/Lease.hxx \
560 561 562
	src/lib/nfs/Connection.cxx src/lib/nfs/Connection.hxx \
	src/lib/nfs/Manager.cxx src/lib/nfs/Manager.hxx \
	src/lib/nfs/Glue.cxx src/lib/nfs/Glue.hxx \
563
	src/lib/nfs/Base.cxx src/lib/nfs/Base.hxx \
564
	src/lib/nfs/FileReader.cxx src/lib/nfs/FileReader.hxx \
565
	src/lib/nfs/Blocking.cxx src/lib/nfs/Blocking.hxx \
566 567
	src/lib/nfs/Domain.cxx src/lib/nfs/Domain.hxx

568 569 570 571 572
if ENABLE_DATABASE

noinst_LIBRARIES += libstorage.a

libstorage_a_SOURCES = \
573 574
	src/storage/StoragePlugin.hxx \
	src/storage/Registry.cxx src/storage/Registry.hxx \
575
	src/storage/StorageInterface.cxx src/storage/StorageInterface.hxx \
576
	src/storage/CompositeStorage.cxx src/storage/CompositeStorage.hxx \
577
	src/storage/MemoryDirectoryReader.cxx src/storage/MemoryDirectoryReader.hxx \
578
	src/storage/Configured.cxx src/storage/Configured.hxx \
579
	src/storage/plugins/LocalStorage.cxx src/storage/plugins/LocalStorage.hxx \
580 581
	src/storage/FileInfo.hxx

582
libstorage_a_CPPFLAGS = $(AM_CPPFLAGS) \
583
	$(NFS_CFLAGS) \
584 585
	$(SMBCLIENT_CFLAGS)

586
STORAGE_LIBS = \
587
	libstorage.a \
588
	$(NFS_LIBS) \
589
	$(SMBCLIENT_LIBS)
590

591 592
if ENABLE_SMBCLIENT
libstorage_a_SOURCES += \
593
	$(SMBCLIENT_SOURCES) \
594
	src/storage/plugins/SmbclientStorage.cxx src/storage/plugins/SmbclientStorage.hxx
595 596
endif

597 598
if ENABLE_NFS
libstorage_a_SOURCES += \
599
	$(NFS_SOURCES) \
600
	src/storage/plugins/NfsStorage.cxx src/storage/plugins/NfsStorage.hxx
601 602
endif

603 604
endif

605 606 607 608
# neighbor plugins

if ENABLE_NEIGHBOR_PLUGINS

609
libmpd_a_SOURCES += \
610 611 612
	src/command/NeighborCommands.cxx \
	src/command/NeighborCommands.hxx

613 614
noinst_LIBRARIES += libneighbor.a

615 616 617 618 619 620 621 622 623 624 625 626 627
libneighbor_a_SOURCES = \
	src/neighbor/Registry.cxx src/neighbor/Registry.hxx \
	src/neighbor/Glue.cxx src/neighbor/Glue.hxx \
	src/neighbor/Info.hxx \
	src/neighbor/Listener.hxx \
	src/neighbor/Explorer.hxx \
	src/neighbor/NeighborPlugin.hxx

libneighbor_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(SMBCLIENT_CFLAGS)

if ENABLE_SMBCLIENT
libneighbor_a_SOURCES += \
628
	$(SMBCLIENT_SOURCES) \
629 630 631 632 633 634 635
	src/neighbor/plugins/SmbclientNeighborPlugin.cxx src/neighbor/plugins/SmbclientNeighborPlugin.hxx
endif

NEIGHBOR_LIBS = \
	$(SMBCLIENT_LIBS) \
	libneighbor.a

636 637 638 639 640 641 642 643 644
if HAVE_LIBUPNP
libneighbor_a_SOURCES += \
	$(UPNP_SOURCES) \
	src/neighbor/plugins/UpnpNeighborPlugin.cxx src/neighbor/plugins/UpnpNeighborPlugin.hxx
NEIGHBOR_LIBS += \
	$(EXPAT_LIBS) \
	$(UPNP_LIBS)
endif

645 646
endif

647 648
# database plugins

649 650 651 652
if ENABLE_DATABASE

noinst_LIBRARIES += libdb_plugins.a

653
libdb_plugins_a_SOURCES = \
654
	src/PlaylistDatabase.cxx src/PlaylistDatabase.hxx \
Max Kellermann's avatar
Max Kellermann committed
655 656
	src/db/Registry.cxx src/db/Registry.hxx \
	src/db/Helpers.cxx src/db/Helpers.hxx \
657
	src/db/UniqueTags.cxx src/db/UniqueTags.hxx \
658 659 660 661
	src/db/plugins/simple/DatabaseSave.cxx \
	src/db/plugins/simple/DatabaseSave.hxx \
	src/db/plugins/simple/DirectorySave.cxx \
	src/db/plugins/simple/DirectorySave.hxx \
Max Kellermann's avatar
Max Kellermann committed
662
	src/db/plugins/LazyDatabase.cxx src/db/plugins/LazyDatabase.hxx \
663 664 665 666 667 668
	src/db/plugins/simple/Directory.cxx \
	src/db/plugins/simple/Directory.hxx \
	src/db/plugins/simple/Song.cxx \
	src/db/plugins/simple/Song.hxx \
	src/db/plugins/simple/SongSort.cxx \
	src/db/plugins/simple/SongSort.hxx \
Max Kellermann's avatar
Max Kellermann committed
669 670 671
	src/db/plugins/simple/Mount.cxx \
	src/db/plugins/simple/Mount.hxx \
	src/db/plugins/simple/PrefixedLightSong.hxx \
672 673
	src/db/plugins/simple/SimpleDatabasePlugin.cxx \
	src/db/plugins/simple/SimpleDatabasePlugin.hxx
674

675 676
if HAVE_LIBMPDCLIENT
libdb_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
677
	src/db/plugins/ProxyDatabasePlugin.cxx src/db/plugins/ProxyDatabasePlugin.hxx
678 679
endif

680
DB_LIBS = \
681 682
	libdb_plugins.a \
	$(LIBMPDCLIENT_LIBS)
683

684 685
if HAVE_LIBUPNP
libdb_plugins_a_SOURCES += \
686
	$(UPNP_SOURCES) \
687
	src/db/plugins/upnp/UpnpDatabasePlugin.cxx src/db/plugins/upnp/UpnpDatabasePlugin.hxx \
Max Kellermann's avatar
Max Kellermann committed
688
	src/db/plugins/upnp/Tags.cxx src/db/plugins/upnp/Tags.hxx \
689
	src/db/plugins/upnp/ContentDirectoryService.cxx \
Max Kellermann's avatar
Max Kellermann committed
690 691
	src/db/plugins/upnp/Directory.cxx src/db/plugins/upnp/Directory.hxx \
	src/db/plugins/upnp/Object.cxx src/db/plugins/upnp/Object.hxx
692 693 694 695 696
DB_LIBS += \
	$(EXPAT_LIBS) \
	$(UPNP_LIBS)
endif

697 698
endif

699 700
# archive plugins

701 702 703 704
if ENABLE_ARCHIVE

noinst_LIBRARIES += libarchive.a

705
libmpd_a_SOURCES +=  \
706
	src/db/update/Archive.cxx
707

708
libarchive_a_SOURCES = \
709 710 711 712 713 714
	src/archive/ArchiveDomain.cxx src/archive/ArchiveDomain.hxx \
	src/archive/ArchiveLookup.cxx src/archive/ArchiveLookup.hxx \
	src/archive/ArchiveList.cxx src/archive/ArchiveList.hxx \
	src/archive/ArchivePlugin.cxx src/archive/ArchivePlugin.hxx \
	src/archive/ArchiveVisitor.hxx \
	src/archive/ArchiveFile.hxx \
Max Kellermann's avatar
Max Kellermann committed
715
	src/input/plugins/ArchiveInputPlugin.cxx src/input/plugins/ArchiveInputPlugin.hxx
716
libarchive_a_CPPFLAGS = $(AM_CPPFLAGS) \
717
	$(BZ2_CFLAGS) \
718
	$(ISO9660_CFLAGS) \
719 720 721
	$(ZZIP_CFLAGS)

ARCHIVE_LIBS = \
722
	libarchive.a \
723
	$(BZ2_LIBS) \
724
	$(ISO9660_LIBS) \
725 726
	$(ZZIP_LIBS)

727
if HAVE_BZ2
728
libarchive_a_SOURCES += \
729 730
	src/archive/plugins/Bzip2ArchivePlugin.cxx \
	src/archive/plugins/Bzip2ArchivePlugin.hxx
731 732
endif

733
if HAVE_ZZIP
734
libarchive_a_SOURCES += \
735 736
	src/archive/plugins/ZzipArchivePlugin.cxx \
	src/archive/plugins/ZzipArchivePlugin.hxx
737 738
endif

739
if HAVE_ISO9660
740
libarchive_a_SOURCES += \
741 742
	src/archive/plugins/Iso9660ArchivePlugin.cxx \
	src/archive/plugins/Iso9660ArchivePlugin.hxx
743 744
endif

745 746
else
ARCHIVE_LIBS =
747 748
endif

749 750 751
# configuration library

libconf_a_SOURCES = \
752 753 754 755 756 757 758 759 760
	src/config/ConfigDefaults.hxx \
	src/config/ConfigPath.cxx src/config/ConfigPath.hxx \
	src/config/ConfigData.cxx src/config/ConfigData.hxx \
	src/config/ConfigParser.cxx src/config/ConfigParser.hxx \
	src/config/ConfigGlobal.cxx src/config/ConfigGlobal.hxx \
	src/config/ConfigFile.cxx src/config/ConfigFile.hxx \
	src/config/ConfigTemplates.cxx src/config/ConfigTemplates.hxx \
	src/config/ConfigError.cxx src/config/ConfigError.hxx \
	src/config/ConfigOption.hxx
761

762 763
# tag plugins

764
libtag_a_CPPFLAGS = $(AM_CPPFLAGS) \
765 766
	$(ID3TAG_CFLAGS)
TAG_LIBS = \
767
	libtag.a \
768 769
	$(ID3TAG_LIBS)

770
libtag_a_SOURCES =\
771 772
	src/tag/TagType.h \
	src/tag/Tag.cxx src/tag/Tag.hxx \
773
	src/tag/TagBuilder.cxx src/tag/TagBuilder.hxx \
774
	src/tag/TagItem.hxx \
775
	src/tag/TagHandler.cxx src/tag/TagHandler.hxx \
776
	src/tag/TagSettings.c src/tag/TagSettings.h \
777
	src/tag/TagConfig.cxx src/tag/TagConfig.hxx \
778
	src/tag/TagNames.c \
779
	src/tag/TagString.cxx src/tag/TagString.hxx \
780 781
	src/tag/TagPool.cxx src/tag/TagPool.hxx \
	src/tag/TagTable.cxx src/tag/TagTable.hxx \
782
	src/tag/Set.cxx src/tag/Set.hxx \
783
	src/tag/VorbisComment.cxx src/tag/VorbisComment.hxx \
784
	src/tag/ReplayGain.cxx src/tag/ReplayGain.hxx \
785
	src/tag/MixRamp.cxx src/tag/MixRamp.hxx \
786 787 788
	src/tag/ApeLoader.cxx src/tag/ApeLoader.hxx \
	src/tag/ApeReplayGain.cxx src/tag/ApeReplayGain.hxx \
	src/tag/ApeTag.cxx src/tag/ApeTag.hxx
789 790

if HAVE_ID3TAG
791
libtag_a_SOURCES += \
792 793
	src/tag/TagId3.cxx src/tag/TagId3.hxx \
	src/tag/TagRva2.cxx src/tag/TagRva2.hxx \
794 795
	src/tag/Riff.cxx src/tag/Riff.hxx \
	src/tag/Aiff.cxx src/tag/Aiff.hxx
796 797
endif

798 799 800 801 802
# ffmpeg

if HAVE_FFMPEG
noinst_LIBRARIES += libffmpeg.a
libffmpeg_a_SOURCES = \
803
	src/lib/ffmpeg/Error.cxx src/lib/ffmpeg/Error.hxx \
804
	src/lib/ffmpeg/Domain.cxx src/lib/ffmpeg/Domain.hxx
805 806
libffmpeg_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(FFMPEG_CFLAGS)
807 808 809
FFMPEG_LIBS2 = libffmpeg.a $(FFMPEG_LIBS)
endif

810 811
# decoder plugins

812
libdecoder_a_SOURCES = \
813 814 815 816 817
	src/decoder/plugins/PcmDecoderPlugin.cxx \
	src/decoder/plugins/PcmDecoderPlugin.hxx \
	src/decoder/DecoderBuffer.cxx src/decoder/DecoderBuffer.hxx \
	src/decoder/DecoderPlugin.cxx \
	src/decoder/DecoderList.cxx src/decoder/DecoderList.hxx
818
libdecoder_a_CPPFLAGS = $(AM_CPPFLAGS) \
819
	$(VORBIS_CFLAGS) $(TREMOR_CFLAGS) \
820
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
821
	$(SNDFILE_CFLAGS) \
822 823
	$(AUDIOFILE_CFLAGS) \
	$(LIBMIKMOD_CFLAGS) \
824
	$(GME_CFLAGS) \
825 826 827
	$(SIDPLAY_CFLAGS) \
	$(FLUIDSYNTH_CFLAGS) \
	$(WILDMIDI_CFLAGS) \
828
	$(WAVPACK_CFLAGS) \
829
	$(MAD_CFLAGS) \
830
	$(MPG123_CFLAGS) \
831
	$(MP4V2_CFLAGS) \
832
	$(OPUS_CFLAGS) \
833
	$(FFMPEG_CFLAGS) \
834
	$(MPCDEC_CFLAGS) \
835
	$(ADPLUG_CFLAGS) \
836
	$(FAAD_CFLAGS)
837 838

DECODER_LIBS = \
839
	libdecoder.a \
840
	$(VORBIS_LIBS) $(TREMOR_LIBS) \
841
	$(FLAC_LIBS) \
842
	$(SNDFILE_LIBS) \
843
	$(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
844
	$(GME_LIBS) \
845 846 847
	$(SIDPLAY_LIBS) \
	$(FLUIDSYNTH_LIBS) \
	$(WILDMIDI_LIBS) \
848
	$(WAVPACK_LIBS) \
849
	$(MAD_LIBS) \
850
	$(MPG123_LIBS) \
851
	$(MP4V2_LIBS) \
852
	$(OPUS_LIBS) \
853
	$(FFMPEG_LIBS2) \
854
	$(MPCDEC_LIBS) \
855
	$(ADPLUG_LIBS) \
856
	$(FAAD_LIBS)
857

858
if ENABLE_DSD
Max Kellermann's avatar
Max Kellermann committed
859 860 861 862 863 864 865
libdecoder_a_SOURCES += \
	src/decoder/plugins/DsdiffDecoderPlugin.cxx \
	src/decoder/plugins/DsdiffDecoderPlugin.hxx \
	src/decoder/plugins/DsfDecoderPlugin.cxx \
	src/decoder/plugins/DsfDecoderPlugin.hxx \
	src/decoder/plugins/DsdLib.cxx \
	src/decoder/plugins/DsdLib.hxx
866 867
endif

868
if HAVE_MAD
869
libdecoder_a_SOURCES += \
870 871
	src/decoder/plugins/MadDecoderPlugin.cxx \
	src/decoder/plugins/MadDecoderPlugin.hxx
872 873
endif

874
if HAVE_MPG123
875
libdecoder_a_SOURCES += \
876 877
	src/decoder/plugins/Mpg123DecoderPlugin.cxx \
	src/decoder/plugins/Mpg123DecoderPlugin.hxx
878 879
endif

880
if HAVE_MPCDEC
881
libdecoder_a_SOURCES += \
882 883
	src/decoder/plugins/MpcdecDecoderPlugin.cxx \
	src/decoder/plugins/MpcdecDecoderPlugin.hxx
884 885
endif

886
if HAVE_OPUS
887
libdecoder_a_SOURCES += \
888 889 890 891 892 893 894 895 896 897 898 899
	src/decoder/plugins/OggUtil.cxx \
	src/decoder/plugins/OggUtil.hxx \
	src/decoder/plugins/OggSyncState.hxx \
	src/decoder/plugins/OggFind.cxx src/decoder/plugins/OggFind.hxx \
	src/decoder/plugins/OpusDomain.cxx src/decoder/plugins/OpusDomain.hxx \
	src/decoder/plugins/OpusReader.hxx \
	src/decoder/plugins/OpusHead.hxx \
	src/decoder/plugins/OpusHead.cxx \
	src/decoder/plugins/OpusTags.cxx \
	src/decoder/plugins/OpusTags.hxx \
	src/decoder/plugins/OpusDecoderPlugin.cxx \
	src/decoder/plugins/OpusDecoderPlugin.h
900 901
endif

902
if HAVE_WAVPACK
903
libdecoder_a_SOURCES += \
904 905
	src/decoder/plugins/WavpackDecoderPlugin.cxx \
	src/decoder/plugins/WavpackDecoderPlugin.hxx
906 907
endif

908
if HAVE_ADPLUG
909
libdecoder_a_SOURCES += \
910 911
	src/decoder/plugins/AdPlugDecoderPlugin.cxx \
	src/decoder/plugins/AdPlugDecoderPlugin.h
912 913
endif

914
if HAVE_FAAD
915
libdecoder_a_SOURCES += \
916
	src/decoder/plugins/FaadDecoderPlugin.cxx src/decoder/plugins/FaadDecoderPlugin.hxx
917 918
endif

919
if HAVE_XIPH
920
libdecoder_a_SOURCES += \
921 922
	src/decoder/plugins/XiphTags.cxx src/decoder/plugins/XiphTags.hxx \
	src/decoder/plugins/OggCodec.cxx src/decoder/plugins/OggCodec.hxx
923 924
endif

925
if ENABLE_VORBIS_DECODER
926
libdecoder_a_SOURCES += \
927 928 929
	src/decoder/plugins/VorbisDomain.cxx src/decoder/plugins/VorbisDomain.hxx \
	src/decoder/plugins/VorbisComments.cxx src/decoder/plugins/VorbisComments.hxx \
	src/decoder/plugins/VorbisDecoderPlugin.cxx src/decoder/plugins/VorbisDecoderPlugin.h
930 931 932
endif

if HAVE_FLAC
933
libdecoder_a_SOURCES += \
934 935 936 937 938 939 940 941
	src/decoder/plugins/FlacInput.cxx src/decoder/plugins/FlacInput.hxx \
	src/decoder/plugins/FlacIOHandle.cxx src/decoder/plugins/FlacIOHandle.hxx \
	src/decoder/plugins/FlacMetadata.cxx src/decoder/plugins/FlacMetadata.hxx \
	src/decoder/plugins/FlacPcm.cxx src/decoder/plugins/FlacPcm.hxx \
	src/decoder/plugins/FlacDomain.cxx src/decoder/plugins/FlacDomain.hxx \
	src/decoder/plugins/FlacCommon.cxx src/decoder/plugins/FlacCommon.hxx \
	src/decoder/plugins/FlacDecoderPlugin.cxx \
	src/decoder/plugins/FlacDecoderPlugin.h
942 943 944
endif

if HAVE_AUDIOFILE
945
libdecoder_a_SOURCES += \
946 947
	src/decoder/plugins/AudiofileDecoderPlugin.cxx \
	src/decoder/plugins/AudiofileDecoderPlugin.hxx
948 949
endif

950
if ENABLE_MIKMOD_DECODER
951
libdecoder_a_SOURCES += \
952 953
	src/decoder/plugins/MikmodDecoderPlugin.cxx \
	src/decoder/plugins/MikmodDecoderPlugin.hxx
954 955 956
endif

if HAVE_MODPLUG
957
libmodplug_decoder_plugin_a_SOURCES = \
958 959
	src/decoder/plugins/ModplugDecoderPlugin.cxx \
	src/decoder/plugins/ModplugDecoderPlugin.hxx
960
libmodplug_decoder_plugin_a_CXXFLAGS = $(AM_CXXFLAGS) $(MODPLUG_CFLAGS)
961
libmodplug_decoder_plugin_a_CPPFLAGS = $(AM_CPPFLAGS)
962 963
noinst_LIBRARIES += libmodplug_decoder_plugin.a
DECODER_LIBS += libmodplug_decoder_plugin.a $(MODPLUG_LIBS)
964 965
endif

966 967 968 969 970 971
if HAVE_MP4V2
libdecoder_a_SOURCES += \
	src/decoder/plugins/Mp4v2DecoderPlugin.cxx \
	src/decoder/plugins/Mp4v2DecoderPlugin.hxx
endif

972
if ENABLE_SIDPLAY
973
libdecoder_a_SOURCES += \
974 975
	src/decoder/plugins/SidplayDecoderPlugin.cxx \
	src/decoder/plugins/SidplayDecoderPlugin.hxx
976 977 978
endif

if ENABLE_FLUIDSYNTH
979
libdecoder_a_SOURCES += \
980 981
	src/decoder/plugins/FluidsynthDecoderPlugin.cxx \
	src/decoder/plugins/FluidsynthDecoderPlugin.hxx
982 983 984
endif

if ENABLE_WILDMIDI
985
libdecoder_a_SOURCES += \
986 987
	src/decoder/plugins/WildmidiDecoderPlugin.cxx \
	src/decoder/plugins/WildmidiDecoderPlugin.hxx
988 989 990
endif

if HAVE_FFMPEG
991
libdecoder_a_SOURCES += \
992 993 994 995
	src/decoder/plugins/FfmpegMetaData.cxx \
	src/decoder/plugins/FfmpegMetaData.hxx \
	src/decoder/plugins/FfmpegDecoderPlugin.cxx \
	src/decoder/plugins/FfmpegDecoderPlugin.hxx
996 997
endif

998
if ENABLE_SNDFILE
999
libdecoder_a_SOURCES += \
1000 1001
	src/decoder/plugins/SndfileDecoderPlugin.cxx \
	src/decoder/plugins/SndfileDecoderPlugin.hxx
1002 1003
endif

1004
if HAVE_GME
1005
libdecoder_a_SOURCES += \
1006
	src/decoder/plugins/GmeDecoderPlugin.cxx src/decoder/plugins/GmeDecoderPlugin.hxx
1007 1008
endif

1009 1010
# encoder plugins

1011 1012 1013 1014 1015
if ENABLE_ENCODER

noinst_LIBRARIES += libencoder_plugins.a

libencoder_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1016
	$(LAME_CFLAGS) \
1017
	$(TWOLAME_CFLAGS) \
1018
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
1019
	$(OPUS_CFLAGS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
1020
	$(SHINE_CFLAGS) \
1021 1022 1023
	$(VORBISENC_CFLAGS)

ENCODER_LIBS = \
1024
	libencoder_plugins.a \
1025
	$(LAME_LIBS) \
1026
	$(TWOLAME_LIBS) \
1027
	$(FLAC_LIBS) \
1028
	$(OPUS_LIBS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
1029
	$(SHINE_LIBS) \
1030 1031
	$(VORBISENC_LIBS)

1032
libencoder_plugins_a_SOURCES = \
1033 1034
	src/encoder/EncoderAPI.hxx \
	src/encoder/EncoderPlugin.hxx \
1035 1036 1037 1038
	src/encoder/plugins/OggStream.hxx \
	src/encoder/plugins/NullEncoderPlugin.cxx \
	src/encoder/plugins/NullEncoderPlugin.hxx \
	src/encoder/EncoderList.cxx src/encoder/EncoderList.hxx
1039

1040 1041
if HAVE_OGG_ENCODER
libencoder_plugins_a_SOURCES += \
1042 1043 1044
	src/encoder/plugins/OggSerial.cxx \
	src/encoder/plugins/OggSerial.hxx \
	src/encoder/plugins/OggStream.hxx
1045 1046
endif

1047
if ENABLE_WAVE_ENCODER
1048
libencoder_plugins_a_SOURCES += \
1049 1050
	src/encoder/plugins/WaveEncoderPlugin.cxx \
	src/encoder/plugins/WaveEncoderPlugin.hxx
1051 1052
endif

1053
if ENABLE_VORBIS_ENCODER
1054
libencoder_plugins_a_SOURCES += \
1055 1056
	src/encoder/plugins/VorbisEncoderPlugin.cxx \
	src/encoder/plugins/VorbisEncoderPlugin.hxx
1057 1058
endif

1059 1060
if HAVE_OPUS
libencoder_plugins_a_SOURCES += \
1061 1062
	src/encoder/plugins/OpusEncoderPlugin.cxx \
	src/encoder/plugins/OpusEncoderPlugin.hxx
1063 1064
endif

1065
if ENABLE_LAME_ENCODER
1066
libencoder_plugins_a_SOURCES += \
1067 1068
	src/encoder/plugins/LameEncoderPlugin.cxx \
	src/encoder/plugins/LameEncoderPlugin.hxx
1069
endif
1070 1071

if ENABLE_TWOLAME_ENCODER
1072
libencoder_plugins_a_SOURCES += \
1073 1074
	src/encoder/plugins/TwolameEncoderPlugin.cxx \
	src/encoder/plugins/TwolameEncoderPlugin.hxx
1075
endif
1076 1077

if ENABLE_FLAC_ENCODER
1078
libencoder_plugins_a_SOURCES += \
1079 1080
	src/encoder/plugins/FlacEncoderPlugin.cxx \
	src/encoder/plugins/FlacEncoderPlugin.hxx
1081
endif
1082

Andrée Ekroth's avatar
Andrée Ekroth committed
1083 1084
if ENABLE_SHINE_ENCODER
libencoder_plugins_a_SOURCES += \
1085 1086
	src/encoder/plugins/ShineEncoderPlugin.cxx \
	src/encoder/plugins/ShineEncoderPlugin.hxx
Andrée Ekroth's avatar
Andrée Ekroth committed
1087 1088
endif

1089 1090
else
ENCODER_LIBS =
1091 1092 1093 1094
endif


if HAVE_ZEROCONF
1095
libmpd_a_SOURCES += \
1096 1097
	src/zeroconf/ZeroconfInternal.hxx \
	src/zeroconf/ZeroconfGlue.cxx src/zeroconf/ZeroconfGlue.hxx
1098 1099

if HAVE_AVAHI
1100
libmpd_a_SOURCES += \
1101 1102
	src/zeroconf/AvahiPoll.cxx src/zeroconf/AvahiPoll.hxx \
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/ZeroconfAvahi.hxx
1103 1104 1105
endif

if HAVE_BONJOUR
1106
libmpd_a_SOURCES += src/zeroconf/ZeroconfBonjour.cxx src/zeroconf/ZeroconfBonjour.hxx
1107 1108 1109
endif
endif

1110 1111 1112 1113
#
# input plugins
#

1114
libinput_a_SOURCES = \
1115
	src/input/Domain.cxx src/input/Domain.hxx \
Max Kellermann's avatar
Max Kellermann committed
1116 1117
	src/input/Init.cxx src/input/Init.hxx \
	src/input/Registry.cxx src/input/Registry.hxx \
1118
	src/input/Open.cxx \
1119
	src/input/LocalOpen.cxx src/input/LocalOpen.hxx \
1120
	src/input/Offset.hxx \
Max Kellermann's avatar
Max Kellermann committed
1121 1122 1123
	src/input/InputStream.cxx src/input/InputStream.hxx \
	src/input/InputPlugin.hxx \
	src/input/TextInputStream.cxx src/input/TextInputStream.hxx \
1124
	src/input/ThreadInputStream.cxx src/input/ThreadInputStream.hxx \
1125
	src/input/AsyncInputStream.cxx src/input/AsyncInputStream.hxx \
1126
	src/input/ProxyInputStream.cxx src/input/ProxyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1127 1128
	src/input/plugins/RewindInputPlugin.cxx src/input/plugins/RewindInputPlugin.hxx \
	src/input/plugins/FileInputPlugin.cxx src/input/plugins/FileInputPlugin.hxx
1129 1130

libinput_a_CPPFLAGS = $(AM_CPPFLAGS) \
1131
	$(CURL_CFLAGS) \
1132
	$(SMBCLIENT_CFLAGS) \
1133
	$(NFS_CFLAGS) \
1134
	$(CDIO_PARANOIA_CFLAGS) \
1135
	$(FFMPEG_CFLAGS) \
1136
	$(DESPOTIFY_CFLAGS) \
1137 1138 1139
	$(MMS_CFLAGS)

INPUT_LIBS = \
1140
	libinput.a \
1141
	$(CURL_LIBS) \
1142
	$(SMBCLIENT_LIBS) \
1143
	$(NFS_LIBS) \
1144
	$(CDIO_PARANOIA_LIBS) \
1145
	$(FFMPEG_LIBS2) \
1146
	$(DESPOTIFY_LIBS) \
1147 1148
	$(MMS_LIBS)

1149 1150
if HAVE_ALSA
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1151 1152
	src/input/plugins/AlsaInputPlugin.cxx \
	src/input/plugins/AlsaInputPlugin.hxx
1153 1154 1155 1156
INPUT_LIBS += $(ALSA_LIBS)
endif


1157
if ENABLE_CURL
1158
libinput_a_SOURCES += \
1159
	src/input/IcyInputStream.cxx src/input/IcyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1160
	src/input/plugins/CurlInputPlugin.cxx src/input/plugins/CurlInputPlugin.hxx \
1161
	src/IcyMetaDataParser.cxx src/IcyMetaDataParser.hxx
1162
endif
1163

1164 1165
if ENABLE_SMBCLIENT
libinput_a_SOURCES += \
1166
	$(SMBCLIENT_SOURCES) \
Max Kellermann's avatar
Max Kellermann committed
1167
	src/input/plugins/SmbclientInputPlugin.cxx src/input/plugins/SmbclientInputPlugin.hxx
1168 1169
endif

1170 1171
if ENABLE_NFS
libinput_a_SOURCES += \
1172
	$(NFS_SOURCES) \
1173 1174 1175
	src/input/plugins/NfsInputPlugin.cxx src/input/plugins/NfsInputPlugin.hxx
endif

1176
if ENABLE_CDIO_PARANOIA
1177
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1178 1179
	src/input/plugins/CdioParanoiaInputPlugin.cxx \
	src/input/plugins/CdioParanoiaInputPlugin.hxx
1180 1181
endif

1182
if HAVE_FFMPEG
1183
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1184
	src/input/plugins/FfmpegInputPlugin.cxx src/input/plugins/FfmpegInputPlugin.hxx
1185 1186
endif

1187
if ENABLE_MMS
1188
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1189
	src/input/plugins/MmsInputPlugin.cxx src/input/plugins/MmsInputPlugin.hxx
1190 1191
endif

1192
if ENABLE_DESPOTIFY
1193
libinput_a_SOURCES += \
1194 1195
	src/lib/despotify/DespotifyUtils.cxx \
	src/lib/despotify/DespotifyUtils.hxx \
Max Kellermann's avatar
Max Kellermann committed
1196 1197
	src/input/plugins/DespotifyInputPlugin.cxx \
	src/input/plugins/DespotifyInputPlugin.hxx
1198 1199
endif

1200

1201
liboutput_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1202 1203
	$(AO_CFLAGS) \
	$(ALSA_CFLAGS) \
1204
	$(JACK_CFLAGS) \
1205
	$(OPENAL_CFLAGS) \
1206
	$(OPENSSL_CFLAGS) \
1207
	$(PULSE_CFLAGS) \
1208 1209 1210
	$(SHOUT_CFLAGS)

OUTPUT_LIBS = \
1211
	liboutput_plugins.a \
1212
	$(LIBWRAP_LDFLAGS) \
1213 1214
	$(AO_LIBS) \
	$(ALSA_LIBS) \
1215
	$(ROAR_LIBS) \
1216
	$(JACK_LIBS) \
1217
	$(OPENAL_LIBS) \
1218
	$(PULSE_LIBS) \
1219 1220
	$(SHOUT_LIBS)

1221
OUTPUT_API_SRC = \
1222
	src/output/OutputAPI.hxx \
1223 1224
	src/output/Internal.hxx \
	src/output/Registry.cxx src/output/Registry.hxx \
1225
	src/output/MultipleOutputs.cxx src/output/MultipleOutputs.hxx \
1226
	src/output/OutputThread.cxx \
1227
	src/output/Domain.cxx src/output/Domain.hxx \
1228
	src/output/OutputControl.cxx \
1229 1230 1231 1232
	src/output/OutputState.cxx src/output/OutputState.hxx \
	src/output/OutputPrint.cxx src/output/OutputPrint.hxx \
	src/output/OutputCommand.cxx src/output/OutputCommand.hxx \
	src/output/OutputPlugin.cxx src/output/OutputPlugin.hxx \
1233 1234
	src/output/Finish.cxx \
	src/output/Init.cxx
1235

1236
liboutput_plugins_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1237
	src/output/Timer.cxx src/output/Timer.hxx \
1238 1239
	src/output/plugins/NullOutputPlugin.cxx \
	src/output/plugins/NullOutputPlugin.hxx
1240

1241 1242 1243 1244
MIXER_LIBS = \
	libmixer_plugins.a \
	$(PULSE_LIBS)

1245
MIXER_API_SRC = \
1246
	src/mixer/Listener.hxx \
Max Kellermann's avatar
Max Kellermann committed
1247 1248 1249 1250
	src/mixer/MixerPlugin.hxx \
	src/mixer/MixerList.hxx \
	src/mixer/MixerControl.cxx src/mixer/MixerControl.hxx \
	src/mixer/MixerType.cxx src/mixer/MixerType.hxx \
1251
	src/mixer/MixerAll.cxx \
Max Kellermann's avatar
Max Kellermann committed
1252
	src/mixer/MixerInternal.hxx
1253

1254
libmixer_plugins_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1255 1256
	src/mixer/plugins/SoftwareMixerPlugin.cxx \
	src/mixer/plugins/SoftwareMixerPlugin.hxx
1257 1258 1259
libmixer_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ALSA_CFLAGS) \
	$(PULSE_CFLAGS)
1260

1261
if HAVE_ALSA
1262
liboutput_plugins_a_SOURCES += \
1263 1264
	src/output/plugins/AlsaOutputPlugin.cxx \
	src/output/plugins/AlsaOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1265
libmixer_plugins_a_SOURCES += src/mixer/plugins/AlsaMixerPlugin.cxx
1266 1267
endif

1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278
if ANDROID
liboutput_plugins_a_SOURCES += \
	src/output/plugins/sles/Object.hxx \
	src/output/plugins/sles/Engine.hxx \
	src/output/plugins/sles/Play.hxx \
	src/output/plugins/sles/AndroidSimpleBufferQueue.hxx \
	src/output/plugins/sles/SlesOutputPlugin.cxx \
	src/output/plugins/sles/SlesOutputPlugin.hxx
OUTPUT_LIBS += -lOpenSLES
endif

1279
if HAVE_ROAR
1280
liboutput_plugins_a_SOURCES += \
1281 1282
	src/output/plugins/RoarOutputPlugin.cxx \
	src/output/plugins/RoarOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1283
libmixer_plugins_a_SOURCES += src/mixer/plugins/RoarMixerPlugin.cxx
1284 1285
endif

1286
if HAVE_AO
1287
liboutput_plugins_a_SOURCES += \
1288 1289
	src/output/plugins/AoOutputPlugin.cxx \
	src/output/plugins/AoOutputPlugin.hxx
1290 1291 1292
endif

if HAVE_FIFO
1293
liboutput_plugins_a_SOURCES += \
1294 1295
	src/output/plugins/FifoOutputPlugin.cxx \
	src/output/plugins/FifoOutputPlugin.hxx
1296 1297
endif

1298
if ENABLE_PIPE_OUTPUT
1299
liboutput_plugins_a_SOURCES += \
1300 1301
	src/output/plugins/PipeOutputPlugin.cxx \
	src/output/plugins/PipeOutputPlugin.hxx
1302 1303
endif

1304
if HAVE_JACK
1305
liboutput_plugins_a_SOURCES += \
1306 1307
	src/output/plugins/JackOutputPlugin.cxx \
	src/output/plugins/JackOutputPlugin.hxx
1308 1309 1310
endif

if HAVE_OSS
1311
liboutput_plugins_a_SOURCES += \
1312 1313
	src/output/plugins/OssOutputPlugin.cxx \
	src/output/plugins/OssOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1314
libmixer_plugins_a_SOURCES += src/mixer/plugins/OssMixerPlugin.cxx
1315 1316
endif

Serge Ziryukin's avatar
Serge Ziryukin committed
1317
if HAVE_OPENAL
1318
liboutput_plugins_a_SOURCES += \
1319 1320
	src/output/plugins/OpenALOutputPlugin.cxx \
	src/output/plugins/OpenALOutputPlugin.hxx
Serge Ziryukin's avatar
Serge Ziryukin committed
1321 1322
endif

1323
if HAVE_OSX
1324
liboutput_plugins_a_SOURCES += \
1325 1326
	src/output/plugins/OSXOutputPlugin.cxx \
	src/output/plugins/OSXOutputPlugin.hxx
1327 1328 1329
endif

if HAVE_PULSE
1330
liboutput_plugins_a_SOURCES += \
1331 1332
	src/output/plugins/PulseOutputPlugin.cxx \
	src/output/plugins/PulseOutputPlugin.hxx
1333
libmixer_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1334
	src/mixer/plugins/PulseMixerPlugin.cxx src/mixer/plugins/PulseMixerPlugin.hxx
1335 1336 1337
endif

if HAVE_SHOUT
1338
liboutput_plugins_a_SOURCES += \
1339 1340
	src/output/plugins/ShoutOutputPlugin.cxx \
	src/output/plugins/ShoutOutputPlugin.hxx
1341 1342
endif

1343
if ENABLE_RECORDER_OUTPUT
1344
liboutput_plugins_a_SOURCES += \
1345 1346
	src/output/plugins/RecorderOutputPlugin.cxx \
	src/output/plugins/RecorderOutputPlugin.hxx
1347 1348
endif

1349
if ENABLE_HTTPD_OUTPUT
1350
liboutput_plugins_a_SOURCES += \
1351 1352 1353 1354 1355 1356 1357 1358
	src/output/plugins/httpd/IcyMetaDataServer.cxx \
	src/output/plugins/httpd/IcyMetaDataServer.hxx \
	src/output/plugins/httpd/Page.cxx src/output/plugins/httpd/Page.hxx \
	src/output/plugins/httpd/HttpdInternal.hxx \
	src/output/plugins/httpd/HttpdClient.cxx \
	src/output/plugins/httpd/HttpdClient.hxx \
	src/output/plugins/httpd/HttpdOutputPlugin.cxx \
	src/output/plugins/httpd/HttpdOutputPlugin.hxx
1359 1360
endif

1361
if ENABLE_SOLARIS_OUTPUT
1362
liboutput_plugins_a_SOURCES += \
1363
	src/output/plugins/SolarisOutputPlugin.cxx src/output/plugins/SolarisOutputPlugin.hxx
1364 1365
endif

1366
if ENABLE_WINMM_OUTPUT
1367
liboutput_plugins_a_SOURCES += \
1368 1369
	src/output/plugins/WinmmOutputPlugin.cxx \
	src/output/plugins/WinmmOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1370
libmixer_plugins_a_SOURCES += src/mixer/plugins/WinmmMixerPlugin.cxx
1371 1372
endif

1373

1374 1375 1376 1377
#
# Playlist plugins
#

1378
libplaylist_plugins_a_SOURCES = \
1379 1380
	src/playlist/PlaylistPlugin.hxx \
	src/playlist/SongEnumerator.hxx \
1381 1382
	src/playlist/CloseSongEnumerator.cxx \
	src/playlist/CloseSongEnumerator.hxx \
1383 1384
	src/playlist/MemorySongEnumerator.cxx \
	src/playlist/MemorySongEnumerator.hxx \
1385
	src/playlist/cue/CueParser.cxx src/playlist/cue/CueParser.hxx \
1386 1387 1388 1389 1390 1391 1392 1393 1394
	src/playlist/plugins/ExtM3uPlaylistPlugin.cxx \
	src/playlist/plugins/ExtM3uPlaylistPlugin.hxx \
	src/playlist/plugins/M3uPlaylistPlugin.cxx \
	src/playlist/plugins/M3uPlaylistPlugin.hxx \
	src/playlist/plugins/CuePlaylistPlugin.cxx \
	src/playlist/plugins/CuePlaylistPlugin.hxx \
	src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx \
	src/playlist/plugins/EmbeddedCuePlaylistPlugin.hxx \
	src/playlist/PlaylistRegistry.cxx src/playlist/PlaylistRegistry.hxx
1395
libplaylist_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1396
	$(EXPAT_CFLAGS) \
1397
	$(YAJL_CFLAGS) \
1398
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS))
1399 1400 1401

PLAYLIST_LIBS = \
	libplaylist_plugins.a \
1402
	$(EXPAT_LIBS) \
1403
	$(FLAC_LIBS)
1404

1405
if ENABLE_DESPOTIFY
1406
libplaylist_plugins_a_SOURCES += \
1407 1408 1409 1410
	src/lib/despotify/DespotifyUtils.cxx \
	src/lib/despotify/DespotifyUtils.hxx \
       src/playlist/plugins/DespotifyPlaylistPlugin.cxx \
       src/playlist/plugins/DespotifyPlaylistPlugin.hxx
1411 1412
endif

1413 1414
if ENABLE_SOUNDCLOUD
libplaylist_plugins_a_SOURCES += \
1415 1416
	src/playlist/plugins/SoundCloudPlaylistPlugin.cxx \
	src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
1417
PLAYLIST_LIBS += $(YAJL_LIBS)
1418
endif
1419

1420
if HAVE_EXPAT
1421
libplaylist_plugins_a_SOURCES += \
1422
	src/lib/expat/ExpatParser.cxx src/lib/expat/ExpatParser.hxx \
1423 1424 1425 1426 1427 1428
	src/playlist/plugins/XspfPlaylistPlugin.cxx \
	src/playlist/plugins/XspfPlaylistPlugin.hxx \
	src/playlist/plugins/AsxPlaylistPlugin.cxx \
	src/playlist/plugins/AsxPlaylistPlugin.hxx \
	src/playlist/plugins/RssPlaylistPlugin.cxx \
	src/playlist/plugins/RssPlaylistPlugin.hxx
1429 1430
endif

1431 1432
if HAVE_GLIB
libplaylist_plugins_a_SOURCES += \
1433 1434
	src/playlist/plugins/PlsPlaylistPlugin.cxx \
	src/playlist/plugins/PlsPlaylistPlugin.hxx
1435 1436
endif

1437 1438 1439 1440
#
# Filter plugins
#

1441
libfilter_plugins_a_SOURCES = \
1442 1443 1444
	src/AudioCompress/config.h \
	src/AudioCompress/compress.h \
	src/AudioCompress/compress.c \
1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457
	src/filter/plugins/NullFilterPlugin.cxx \
	src/filter/plugins/ChainFilterPlugin.cxx \
	src/filter/plugins/ChainFilterPlugin.hxx \
	src/filter/plugins/AutoConvertFilterPlugin.cxx \
	src/filter/plugins/AutoConvertFilterPlugin.hxx \
	src/filter/plugins/ConvertFilterPlugin.cxx \
	src/filter/plugins/ConvertFilterPlugin.hxx \
	src/filter/plugins/RouteFilterPlugin.cxx \
	src/filter/plugins/NormalizeFilterPlugin.cxx \
	src/filter/plugins/ReplayGainFilterPlugin.cxx \
	src/filter/plugins/ReplayGainFilterPlugin.hxx \
	src/filter/plugins/VolumeFilterPlugin.cxx \
	src/filter/plugins/VolumeFilterPlugin.hxx
1458

1459 1460 1461 1462
FILTER_LIBS = \
	libfilter_plugins.a \
	$(PCM_LIBS)

1463

1464 1465 1466 1467 1468 1469
#
# systemd unit
#

if HAVE_SYSTEMD
systemdsystemunit_DATA = \
1470
	systemd/mpd.socket \
1471
	systemd/mpd.service
1472 1473
endif

1474 1475 1476 1477 1478 1479 1480

#
# Test programs
#

if ENABLE_TEST

1481
C_TESTS = \
1482
	test/test_util \
1483
	test/test_byte_reverse \
1484
	test/test_rewind \
1485
	test/test_mixramp \
1486
	test/test_pcm \
1487
	test/test_protocol \
1488
	test/test_queue_priority
1489

1490 1491 1492 1493
if ENABLE_CURL
C_TESTS += test/test_icy_parser
endif

1494 1495 1496 1497
if ENABLE_DATABASE
C_TESTS += test/test_translate_song
endif

1498 1499 1500 1501
if ENABLE_ARCHIVE
C_TESTS += test/test_archive
endif

1502
TESTS = $(C_TESTS)
1503

1504
noinst_PROGRAMS = \
1505
	$(C_TESTS) \
1506
	test/read_conf \
1507
	test/run_resolver \
1508
	test/run_input \
1509
	test/dump_text_file \
1510
	test/dump_playlist \
1511
	test/run_decoder \
1512
	test/read_tags \
1513
	test/run_filter \
1514
	test/run_output \
1515
	test/run_convert \
1516
	test/run_normalize \
1517 1518
	test/software_volume

1519 1520
if ENABLE_DATABASE
noinst_PROGRAMS += test/DumpDatabase
1521
noinst_PROGRAMS += test/run_storage
1522 1523
endif

1524 1525 1526 1527
if ENABLE_NEIGHBOR_PLUGINS
noinst_PROGRAMS += test/run_neighbor_explorer
endif

1528 1529 1530 1531
if HAVE_AVAHI
noinst_PROGRAMS += test/run_avahi
endif

1532 1533 1534 1535
if ENABLE_ARCHIVE
noinst_PROGRAMS += test/visit_archive
endif

1536 1537 1538 1539
if HAVE_ID3TAG
noinst_PROGRAMS += test/dump_rva2
endif

1540 1541 1542 1543 1544
if HAVE_ALSA
# this debug program is still ALSA specific
noinst_PROGRAMS += test/read_mixer
endif

1545
test_read_conf_LDADD = \
1546
	libconf.a \
1547
	$(FS_LIBS) \
1548
	libsystem.a \
1549
	libutil.a \
1550
	$(GLIB_LIBS)
1551
test_read_conf_SOURCES = \
1552
	src/Log.cxx src/LogBackend.cxx \
1553
	test/read_conf.cxx
1554

1555
test_run_resolver_LDADD = \
1556
	libsystem.a \
1557
	libutil.a \
1558
	$(GLIB_LIBS)
1559
test_run_resolver_SOURCES = \
1560
	src/Log.cxx src/LogBackend.cxx \
1561
	test/run_resolver.cxx
1562

1563 1564
if ENABLE_DATABASE

1565
test_DumpDatabase_LDADD = \
1566
	$(DB_LIBS) \
1567
	$(TAG_LIBS) \
1568
	libconf.a \
1569
	libutil.a \
1570
	libevent.a \
1571
	$(FS_LIBS) \
1572
	libsystem.a \
1573
	$(ICU_LDADD) \
1574 1575
	$(GLIB_LIBS)
test_DumpDatabase_SOURCES = test/DumpDatabase.cxx \
1576
	src/protocol/Ack.cxx \
1577
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1578 1579 1580
	src/db/DatabaseError.cxx \
	src/db/Registry.cxx \
	src/db/Selection.cxx \
1581 1582
	src/db/PlaylistVector.cxx \
	src/db/DatabaseLock.cxx \
1583
	src/SongSave.cxx \
1584
	src/DetachedSong.cxx \
1585
	src/TagSave.cxx \
1586
	src/SongFilter.cxx
1587

1588
if HAVE_LIBUPNP
1589
test_DumpDatabase_SOURCES += src/lib/expat/ExpatParser.cxx
1590 1591
endif

1592 1593 1594
test_run_storage_LDADD = \
	$(STORAGE_LIBS) \
	$(FS_LIBS) \
1595 1596
	libevent.a \
	libthread.a \
1597 1598 1599 1600 1601
	libsystem.a \
	libutil.a \
	$(GLIB_LIBS)
test_run_storage_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
1602 1603
	src/IOThread.cxx \
	test/ScopeIOThread.hxx \
1604 1605
	test/run_storage.cxx

1606 1607
endif

1608
test_run_input_LDADD = \
1609
	$(INPUT_LIBS) \
1610
	$(ARCHIVE_LIBS) \
1611
	$(TAG_LIBS) \
1612
	libconf.a \
Max Kellermann's avatar
Max Kellermann committed
1613
	libutil.a \
1614
	libevent.a \
1615
	libthread.a \
1616
	$(FS_LIBS) \
1617
	libsystem.a \
1618
	$(GLIB_LIBS)
1619
test_run_input_SOURCES = test/run_input.cxx \
1620
	test/ScopeIOThread.hxx \
1621
	test/stdbin.h \
1622
	src/Log.cxx src/LogBackend.cxx \
1623
	src/IOThread.cxx \
1624
	src/TagSave.cxx
1625

1626 1627 1628 1629
if ENABLE_NEIGHBOR_PLUGINS

test_run_neighbor_explorer_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
1630
	src/IOThread.cxx \
1631
	test/run_neighbor_explorer.cxx
1632
test_run_neighbor_explorer_LDADD = $(AM_LDADD) \
1633 1634
	$(GLIB_LIBS) \
	$(NEIGHBOR_LIBS) \
1635 1636 1637
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
	libtag.a \
1638 1639
	libconf.a \
	libevent.a \
1640
	$(FS_LIBS) \
1641 1642 1643 1644
	libsystem.a \
	libthread.a \
	libutil.a

1645 1646 1647 1648 1649 1650 1651 1652 1653 1654
if HAVE_LIBUPNP
test_run_neighbor_explorer_SOURCES += src/lib/expat/ExpatParser.cxx
endif

if ENABLE_DESPOTIFY
test_run_neighbor_explorer_SOURCES += \
	src/lib/despotify/DespotifyUtils.cxx \
	src/lib/despotify/DespotifyUtils.hxx
endif

1655 1656
endif

1657 1658 1659 1660 1661
if ENABLE_ARCHIVE

test_visit_archive_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1662
	$(TAG_LIBS) \
1663
	libconf.a \
Max Kellermann's avatar
Max Kellermann committed
1664
	libutil.a \
1665
	libevent.a \
1666
	libthread.a \
1667
	$(FS_LIBS) \
1668
	libsystem.a \
1669 1670
	$(GLIB_LIBS)
test_visit_archive_SOURCES = test/visit_archive.cxx \
1671
	test/ScopeIOThread.hxx \
1672
	src/Log.cxx src/LogBackend.cxx \
1673
	src/IOThread.cxx \
1674
	src/input/Open.cxx
1675 1676 1677

endif

1678 1679
if HAVE_ZLIB

1680 1681
noinst_PROGRAMS += test/run_gzip test/run_gunzip

1682 1683 1684 1685 1686
test_run_gzip_LDADD = \
	libutil.a \
	$(FS_LIBS)
test_run_gzip_SOURCES = test/run_gzip.cxx

1687 1688 1689 1690 1691 1692 1693 1694
test_run_gunzip_SOURCES = test/run_gunzip.cxx \
	src/Log.cxx src/LogBackend.cxx
test_run_gunzip_LDADD = \
	$(GLIB_LIBS) \
	libutil.a \
	$(FS_LIBS) \
	libsystem.a

1695 1696
endif

1697 1698 1699
test_dump_text_file_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1700
	$(TAG_LIBS) \
1701
	libconf.a \
1702
	libevent.a \
1703
	$(FS_LIBS) \
1704
	libsystem.a \
1705
	libthread.a \
1706
	libutil.a \
1707
	$(GLIB_LIBS)
1708
test_dump_text_file_SOURCES = test/dump_text_file.cxx \
1709
	test/ScopeIOThread.hxx \
1710
	test/stdbin.h \
1711
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1712
	src/IOThread.cxx
1713

1714
test_dump_playlist_LDADD = \
1715
	$(PLAYLIST_LIBS) \
1716
	$(FLAC_LIBS) \
1717
	$(INPUT_LIBS) \
1718
	$(ARCHIVE_LIBS) \
1719 1720
	$(DECODER_LIBS) \
	$(TAG_LIBS) \
1721
	libconf.a \
1722
	libevent.a \
1723
	libthread.a \
1724
	$(FS_LIBS) \
1725
	libsystem.a \
1726
	libutil.a \
Max Kellermann's avatar
Max Kellermann committed
1727
	libpcm.a \
1728
	$(GLIB_LIBS)
1729
test_dump_playlist_SOURCES = test/dump_playlist.cxx \
1730
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1731
	test/ScopeIOThread.hxx \
1732
	$(DECODER_SRC) \
1733
	src/Log.cxx src/LogBackend.cxx \
1734
	src/IOThread.cxx \
1735
	src/TagSave.cxx \
1736
	src/TagFile.cxx \
1737
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1738
	src/DetachedSong.cxx
1739

1740
if HAVE_FLAC
1741
test_dump_playlist_SOURCES += \
1742
	src/ReplayGainInfo.cxx \
1743
	src/decoder/plugins/FlacMetadata.cxx
1744 1745
endif

1746
test_run_decoder_LDADD = \
1747
	$(DECODER_LIBS) \
1748
	libpcm.a \
1749
	$(INPUT_LIBS) \
1750
	$(ARCHIVE_LIBS) \
1751
	$(TAG_LIBS) \
1752
	libconf.a \
1753
	libevent.a \
1754
	libthread.a \
1755
	$(FS_LIBS) \
1756
	libsystem.a \
1757
	libutil.a \
1758
	$(GLIB_LIBS)
1759
test_run_decoder_SOURCES = test/run_decoder.cxx \
1760
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1761
	test/ScopeIOThread.hxx \
1762
	test/stdbin.h \
1763
	src/Log.cxx src/LogBackend.cxx \
1764
	src/IOThread.cxx \
1765
	src/ReplayGainInfo.cxx \
1766
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1767 1768
	$(ARCHIVE_SRC) \
	$(INPUT_SRC) \
1769
	$(TAG_SRC) \
1770 1771
	$(DECODER_SRC)

1772
test_read_tags_LDADD = \
1773
	$(DECODER_LIBS) \
1774
	libpcm.a \
1775
	$(INPUT_LIBS) \
1776
	$(ARCHIVE_LIBS) \
1777
	$(TAG_LIBS) \
1778
	libconf.a \
1779
	libevent.a \
1780
	libthread.a \
1781
	$(FS_LIBS) \
1782
	libsystem.a \
1783
	libutil.a \
1784
	$(GLIB_LIBS)
1785
test_read_tags_SOURCES = test/read_tags.cxx \
1786
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1787
	test/ScopeIOThread.hxx \
1788
	src/Log.cxx src/LogBackend.cxx \
1789
	src/IOThread.cxx \
1790
	src/ReplayGainInfo.cxx \
1791
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1792
	$(DECODER_SRC)
1793

1794 1795
if HAVE_ID3TAG
test_dump_rva2_LDADD = \
1796
	$(TAG_LIBS) \
1797
	libutil.a \
1798
	$(GLIB_LIBS)
1799
test_dump_rva2_SOURCES = \
1800
	src/Log.cxx src/LogBackend.cxx \
1801
	test/dump_rva2.cxx
1802 1803
endif

1804
test_run_filter_LDADD = \
1805
	$(FILTER_LIBS) \
1806
	libconf.a \
1807
	$(FS_LIBS) \
1808
	libsystem.a \
1809
	libutil.a \
1810
	$(GLIB_LIBS)
1811
test_run_filter_SOURCES = test/run_filter.cxx \
1812
	test/FakeReplayGainConfig.cxx \
1813
	test/stdbin.h \
1814
	src/Log.cxx src/LogBackend.cxx \
1815
	src/filter/FilterPlugin.cxx src/filter/FilterRegistry.cxx \
1816
	src/CheckAudioFormat.cxx \
1817
	src/AudioFormat.cxx \
1818
	src/AudioParser.cxx \
1819
	src/ReplayGainInfo.cxx
1820

1821 1822
if ENABLE_ENCODER
noinst_PROGRAMS += test/run_encoder
1823
test_run_encoder_SOURCES = test/run_encoder.cxx \
1824
	test/stdbin.h \
1825
	src/Log.cxx src/LogBackend.cxx \
1826
	src/CheckAudioFormat.cxx \
1827
	src/AudioFormat.cxx \
1828
	src/AudioParser.cxx
1829
test_run_encoder_LDADD = \
1830
	$(ENCODER_LIBS) \
1831 1832
	$(TAG_LIBS) \
	libconf.a \
1833
	libpcm.a \
1834
	libthread.a \
1835
	$(FS_LIBS) \
1836
	libsystem.a \
1837
	libutil.a \
1838
	$(GLIB_LIBS)
1839
endif
1840

1841 1842
if ENABLE_VORBIS_ENCODER
noinst_PROGRAMS += test/test_vorbis_encoder
1843
test_test_vorbis_encoder_SOURCES = test/test_vorbis_encoder.cxx \
1844
	test/stdbin.h \
1845
	src/Log.cxx src/LogBackend.cxx \
1846
	src/CheckAudioFormat.cxx \
1847
	src/AudioFormat.cxx \
1848
	src/AudioParser.cxx \
1849 1850 1851 1852 1853
	$(ENCODER_SRC)
test_test_vorbis_encoder_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ENCODER_CFLAGS)
test_test_vorbis_encoder_LDADD = $(MPD_LIBS) \
	$(ENCODER_LIBS) \
Max Kellermann's avatar
Max Kellermann committed
1854
	$(PCM_LIBS) \
1855
	$(TAG_LIBS) \
1856
	libconf.a \
1857
	$(FS_LIBS) \
1858
	libsystem.a \
1859
	libutil.a \
1860 1861 1862
	$(GLIB_LIBS)
endif

1863
test_software_volume_SOURCES = test/software_volume.cxx \
1864
	test/stdbin.h \
1865
	src/Log.cxx src/LogBackend.cxx \
1866
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1867
	src/AudioParser.cxx
1868
test_software_volume_LDADD = \
1869
	$(PCM_LIBS) \
1870
	libutil.a \
1871
	$(GLIB_LIBS)
1872

1873
test_run_avahi_SOURCES = \
1874
	src/Log.cxx src/LogBackend.cxx \
1875
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/AvahiPoll.cxx \
1876 1877 1878 1879 1880 1881 1882
	test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
	test/run_avahi.cxx
test_run_avahi_CPPFLAGS = $(AM_CPPFLAGS) \
	$(AVAHI_CFLAGS)
test_run_avahi_LDADD = \
	libevent.a \
	libsystem.a \
1883
	libutil.a \
1884
	$(GLIB_LIBS) \
1885 1886
	$(AVAHI_LIBS)

1887
test_run_normalize_SOURCES = test/run_normalize.cxx \
1888
	test/stdbin.h \
1889
	src/CheckAudioFormat.cxx \
1890
	src/AudioCompress/compress.c \
1891
	src/AudioParser.cxx
1892
test_run_normalize_LDADD = \
1893
	libutil.a \
1894 1895
	$(GLIB_LIBS)

1896
test_run_convert_SOURCES = test/run_convert.cxx \
1897
	src/Log.cxx src/LogBackend.cxx \
1898
	src/AudioFormat.cxx \
1899
	src/CheckAudioFormat.cxx \
1900
	src/AudioParser.cxx
1901
test_run_convert_LDADD = \
1902
	$(PCM_LIBS) \
1903
	libutil.a \
1904 1905
	$(GLIB_LIBS)

1906
test_run_output_LDADD = $(MPD_LIBS) \
1907
	$(PCM_LIBS) \
1908
	$(OUTPUT_LIBS) \
1909 1910 1911
	$(ENCODER_LIBS) \
	libmixer_plugins.a \
	$(FILTER_LIBS) \
1912
	$(TAG_LIBS) \
1913
	libconf.a \
1914
	libevent.a \
1915
	$(FS_LIBS) \
1916
	libsystem.a \
1917
	libthread.a \
1918
	libutil.a \
1919
	$(GLIB_LIBS)
1920
test_run_output_SOURCES = test/run_output.cxx \
1921
	test/FakeReplayGainConfig.cxx \
1922
	test/ScopeIOThread.hxx \
1923
	test/stdbin.h \
1924
	src/Log.cxx src/LogBackend.cxx \
1925
	src/IOThread.cxx \
1926
	src/CheckAudioFormat.cxx \
1927
	src/AudioFormat.cxx \
1928
	src/AudioParser.cxx \
1929 1930
	src/output/Domain.cxx \
	src/output/Init.cxx src/output/Finish.cxx src/output/Registry.cxx \
1931
	src/output/OutputPlugin.cxx \
Max Kellermann's avatar
Max Kellermann committed
1932 1933
	src/mixer/MixerControl.cxx \
	src/mixer/MixerType.cxx \
1934 1935
	src/filter/FilterPlugin.cxx \
	src/filter/FilterConfig.cxx \
1936
	src/ReplayGainInfo.cxx
1937

1938
test_read_mixer_LDADD = \
1939
	libpcm.a \
1940
	libmixer_plugins.a \
1941
	$(OUTPUT_LIBS) \
1942
	libconf.a \
1943
	libevent.a \
1944
	$(FS_LIBS) \
1945
	libsystem.a \
1946
	libutil.a \
1947
	$(GLIB_LIBS)
1948
test_read_mixer_SOURCES = test/read_mixer.cxx \
1949
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1950
	src/mixer/MixerControl.cxx \
1951
	src/filter/FilterPlugin.cxx \
1952
	src/AudioFormat.cxx \
1953
	src/filter/plugins/VolumeFilterPlugin.cxx
1954

1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966
if ENABLE_BZIP2_TEST
TESTS += test/test_archive_bzip2.sh
endif

if ENABLE_ZZIP_TEST
TESTS += test/test_archive_zzip.sh
endif

if ENABLE_ISO9660_TEST
TESTS += test/test_archive_iso9660.sh
endif

1967
if ENABLE_INOTIFY
1968 1969
noinst_PROGRAMS += test/run_inotify
test_run_inotify_SOURCES = test/run_inotify.cxx \
1970
	test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
1971
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1972 1973
	src/db/update/InotifyDomain.cxx \
	src/db/update/InotifySource.cxx
1974
test_run_inotify_LDADD = \
1975
	libevent.a \
1976
	libsystem.a \
1977 1978
	libutil.a \
	$(GLIB_LIBS)
1979 1980
endif

1981
test_test_util_SOURCES = \
1982
	test/TestCircularBuffer.hxx \
1983 1984 1985 1986 1987 1988 1989
	test/test_util.cxx
test_test_util_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_util_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
test_test_util_LDADD = \
	libutil.a \
	$(CPPUNIT_LIBS)

1990
test_test_byte_reverse_SOURCES = \
1991
	test/test_byte_reverse.cxx
1992 1993
test_test_byte_reverse_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_byte_reverse_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
1994 1995
test_test_byte_reverse_LDADD = \
	libutil.a \
1996
	$(CPPUNIT_LIBS)
1997

1998 1999 2000 2001 2002 2003
test_test_rewind_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
	test/test_rewind.cxx
test_test_rewind_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_rewind_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
test_test_rewind_LDADD = \
2004
	$(GLIB_LIBS) \
2005 2006 2007 2008 2009 2010
	$(INPUT_LIBS) \
	libthread.a \
	libtag.a \
	libutil.a \
	$(CPPUNIT_LIBS)

2011
test_test_mixramp_SOURCES = \
2012
	src/Log.cxx src/LogBackend.cxx \
2013 2014 2015 2016
	test/test_mixramp.cxx
test_test_mixramp_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_mixramp_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
test_test_mixramp_LDADD = \
2017
	libutil.a \
2018 2019
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)
2020

2021
if ENABLE_CURL
2022
test_test_icy_parser_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
2023
	src/Log.cxx src/LogBackend.cxx \
2024 2025 2026 2027 2028
	test/test_icy_parser.cxx
test_test_icy_parser_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_icy_parser_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
test_test_icy_parser_LDADD = \
	libtag.a \
Max Kellermann's avatar
Max Kellermann committed
2029
	libutil.a \
2030 2031
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)
2032
endif
2033

2034
test_test_pcm_SOURCES = \
2035
	src/AudioFormat.cxx \
2036
	test/test_pcm_util.hxx \
2037 2038 2039
	test/test_pcm_dither.cxx \
	test/test_pcm_pack.cxx \
	test/test_pcm_channels.cxx \
2040
	test/test_pcm_format.cxx \
2041
	test/test_pcm_volume.cxx \
2042
	test/test_pcm_mix.cxx \
2043
	test/test_pcm_export.cxx \
2044 2045
	test/test_pcm_all.hxx \
	test/test_pcm_main.cxx
2046 2047
test_test_pcm_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_pcm_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2048 2049
test_test_pcm_LDADD = \
	$(PCM_LIBS) \
2050
	libutil.a \
2051
	$(CPPUNIT_LIBS) \
2052 2053
	$(GLIB_LIBS)

2054
test_test_archive_SOURCES = \
2055
	src/Log.cxx src/LogBackend.cxx \
2056 2057 2058 2059 2060
	test/test_archive.cxx
test_test_archive_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_archive_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
test_test_archive_LDADD = \
	libarchive.a \
2061
	libutil.a \
2062 2063 2064
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)

2065 2066
if ENABLE_DATABASE

2067
test_test_translate_song_SOURCES = \
2068
	src/playlist/PlaylistSong.cxx \
2069
	src/PlaylistError.cxx \
2070
	src/DetachedSong.cxx \
2071
	src/SongLoader.cxx \
2072 2073 2074 2075 2076
	src/Log.cxx \
	test/test_translate_song.cxx
test_test_translate_song_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_translate_song_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
test_test_translate_song_LDADD = \
2077
	$(STORAGE_LIBS) \
2078
	libtag.a \
2079
	$(FS_LIBS) \
2080 2081 2082 2083 2084
	libsystem.a \
	libutil.a \
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)

2085 2086
endif

2087 2088 2089 2090 2091 2092 2093 2094 2095 2096
test_test_protocol_SOURCES = \
	src/protocol/ArgParser.cxx \
	test/test_protocol.cxx
test_test_protocol_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_protocol_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
test_test_protocol_LDADD = \
	libsystem.a \
	libutil.a \
	$(CPPUNIT_LIBS)

2097
test_test_queue_priority_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
2098
	src/queue/Queue.cxx \
2099
	src/DetachedSong.cxx \
2100
	test/test_queue_priority.cxx
2101 2102
test_test_queue_priority_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_queue_priority_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2103
test_test_queue_priority_LDADD = \
2104
	libsystem.a \
2105
	libutil.a \
2106
	$(CPPUNIT_LIBS)
2107

2108 2109
if ENABLE_DSD

Max Kellermann's avatar
Max Kellermann committed
2110
noinst_PROGRAMS += src/pcm/dsd2pcm/dsd2pcm
2111

Max Kellermann's avatar
Max Kellermann committed
2112 2113
src_pcm_dsd2pcm_dsd2pcm_SOURCES = \
	src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h \
2114
	src/pcm/dsd2pcm/dsd2pcm.hpp \
Max Kellermann's avatar
Max Kellermann committed
2115
	src/pcm/dsd2pcm/noiseshape.c src/pcm/dsd2pcm/noiseshape.h \
2116
	src/pcm/dsd2pcm/noiseshape.hpp \
Max Kellermann's avatar
Max Kellermann committed
2117 2118
	src/pcm/dsd2pcm/main.cpp
src_pcm_dsd2pcm_dsd2pcm_LDADD = libutil.a
2119

2120 2121
endif

2122 2123
endif

2124 2125 2126 2127 2128 2129

#
# Documentation
#

man_MANS = doc/mpd.1 doc/mpd.conf.5
2130
doc_DATA = AUTHORS COPYING NEWS README doc/mpdconf.example
2131

2132
DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
2133

2134 2135 2136 2137
if ENABLE_DOCUMENTATION
protocoldir = $(docdir)/protocol
protocol_DATA = $(wildcard doc/protocol/*.html)

2138 2139 2140
userdir = $(docdir)/user
user_DATA = $(wildcard doc/user/*.html)

2141 2142 2143
developerdir = $(docdir)/developer
developer_DATA = $(wildcard doc/developer/*.html)

2144 2145
DOCBOOK_HTML = $(patsubst %.xml,%/index.html,$(DOCBOOK_FILES))

2146
$(DOCBOOK_HTML): %/index.html: %.xml
2147
	$(XMLTO) -o $(@D) --stringparam chunker.output.encoding=utf-8 html --stringparam use.id.as.filename=1 $<
2148

2149
doc/api/html/index.html: doc/doxygen.conf
2150
	@$(MKDIR_P) $(@D)
2151
	$(DOXYGEN) $<
2152

2153 2154 2155 2156 2157 2158 2159 2160
all-local: $(DOCBOOK_HTML) doc/api/html/index.html

clean-local:
	rm -rf $(patsubst %.xml,%,$(DOCBOOK_FILES))
	rm -rf doc/api

install-data-local: doc/api/html/index.html
	$(mkinstalldirs) $(DESTDIR)$(docdir)/api/html
2161
	$(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
2162
		$(DESTDIR)$(docdir)/api/html
2163

2164 2165 2166
uninstall-local:
	rm -f $(DESTDIR)$(docdir)/api/html/*.*

2167
upload: $(DOCBOOK_HTML) doc/api/html/index.html
2168
	rsync -vpruz --delete doc/ www.musicpd.org:/var/www/doc/ \
2169 2170 2171
		--chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
		--include=protocol --include=protocol/** \
		--include=user --include=user/** \
2172
		--include=developer --include=developer/** \
2173 2174 2175
		--include=api --include=api/** \
		--exclude=*

2176 2177 2178
endif


2179 2180 2181
#
# Distribution
#
Eric Wong's avatar
Eric Wong committed
2182

2183
EXTRA_DIST = $(doc_DATA) autogen.sh \
2184 2185 2186
	test/test_archive_bzip2.sh  \
	test/test_archive_iso9660.sh \
	test/test_archive_zzip.sh \
2187
	$(wildcard scripts/*.sh) \
2188
	$(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
2189
	systemd/mpd.socket \
2190
	src/win32/mpd_win32_rc.rc.in src/win32/mpd.ico