Makefile.am 57.3 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 \
368
	src/util/CharUtil.hxx \
369
	src/util/NumberParser.hxx \
370
	src/util/StringUtil.cxx src/util/StringUtil.hxx \
371
	src/util/SplitString.cxx src/util/SplitString.hxx \
372
	src/util/FormatString.cxx src/util/FormatString.hxx \
373
	src/util/Tokenizer.cxx src/util/Tokenizer.hxx \
Max Kellermann's avatar
Max Kellermann committed
374
	src/util/UriUtil.cxx src/util/UriUtil.hxx \
375
	src/util/Manual.hxx \
376
	src/util/RefCount.hxx \
377
	src/util/FifoBuffer.hxx \
378
	src/util/ForeignFifoBuffer.hxx \
379
	src/util/DynamicFifoBuffer.hxx \
380
	src/util/ConstBuffer.hxx \
381
	src/util/WritableBuffer.hxx \
382
	src/util/CircularBuffer.hxx \
383
	src/util/LazyRandomEngine.cxx src/util/LazyRandomEngine.hxx \
384
	src/util/SliceBuffer.hxx \
385
	src/util/HugeAllocator.cxx src/util/HugeAllocator.hxx \
386
	src/util/PeakBuffer.cxx src/util/PeakBuffer.hxx \
387
	src/util/OptionParser.cxx src/util/OptionParser.hxx \
388
	src/util/OptionDef.hxx \
389
	src/util/ByteReverse.cxx src/util/ByteReverse.hxx \
390 391
	src/util/bit_reverse.c src/util/bit_reverse.h

392 393 394
# Multi-threading library

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

406 407 408
# System library

libsystem_a_SOURCES = \
409
	src/system/ByteOrder.hxx \
410 411 412
	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 \
413
	src/system/SocketError.cxx src/system/SocketError.hxx \
414
	src/system/Resolver.cxx src/system/Resolver.hxx \
415 416
	src/system/EventPipe.cxx src/system/EventPipe.hxx \
	src/system/EventFD.cxx src/system/EventFD.hxx \
417
	src/system/SignalFD.cxx src/system/SignalFD.hxx \
418
	src/system/EPollFD.cxx src/system/EPollFD.hxx \
419
	src/system/PeriodClock.hxx \
420
	src/system/Clock.cxx src/system/Clock.hxx
421

422 423 424
# Event loop library

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

443 444 445 446 447 448
# 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

449 450 451 452 453
if HAVE_ICU
libicu_a_SOURCES += \
	src/lib/icu/Init.cxx src/lib/icu/Init.hxx
endif

nanotech's avatar
nanotech committed
454 455 456
libicu_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ICU_CFLAGS)

457 458
ICU_LDADD = libicu.a $(ICU_LIBS)

459 460 461
# PCM library

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

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

496
if HAVE_LIBSAMPLERATE
497 498
libpcm_a_SOURCES += \
	src/pcm/LibsamplerateResampler.cxx src/pcm/LibsamplerateResampler.hxx
499 500
endif

501 502 503 504 505
if HAVE_SOXR
libpcm_a_SOURCES += \
	src/pcm/SoxrResampler.cxx src/pcm/SoxrResampler.hxx
endif

506 507
# File system library

508 509
FS_LIBS = libfs.a

510
libfs_a_SOURCES = \
511
	src/fs/io/Reader.hxx \
512
	src/fs/io/PeekReader.cxx src/fs/io/PeekReader.hxx \
513
	src/fs/io/FileReader.cxx src/fs/io/FileReader.hxx \
514
	src/fs/io/BufferedReader.cxx src/fs/io/BufferedReader.hxx \
515 516 517 518 519
	src/fs/io/TextFile.cxx src/fs/io/TextFile.hxx \
	src/fs/io/OutputStream.hxx \
	src/fs/io/StdoutOutputStream.hxx \
	src/fs/io/FileOutputStream.cxx src/fs/io/FileOutputStream.hxx \
	src/fs/io/BufferedOutputStream.cxx src/fs/io/BufferedOutputStream.hxx \
520
	src/fs/Domain.cxx src/fs/Domain.hxx \
521
	src/fs/Limits.hxx \
Max Kellermann's avatar
Max Kellermann committed
522
	src/fs/Traits.cxx src/fs/Traits.hxx \
523 524
	src/fs/Config.cxx src/fs/Config.hxx \
	src/fs/Charset.cxx src/fs/Charset.hxx \
525
	src/fs/Path.cxx src/fs/Path.hxx \
526
	src/fs/AllocatedPath.cxx src/fs/AllocatedPath.hxx \
527
	src/fs/FileSystem.cxx src/fs/FileSystem.hxx \
528
	src/fs/StandardDirectory.cxx src/fs/StandardDirectory.hxx \
529
	src/fs/CheckFile.cxx src/fs/CheckFile.hxx \
530
	src/fs/DirectoryReader.hxx
531 532 533 534
libfs_a_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS)

if HAVE_ZLIB
libfs_a_SOURCES += \
535
	src/lib/zlib/Domain.cxx src/lib/zlib/Domain.hxx \
536
	src/fs/io/GunzipReader.cxx src/fs/io/GunzipReader.hxx \
537
	src/fs/io/AutoGunzipReader.cxx src/fs/io/AutoGunzipReader.hxx \
538
	src/fs/io/GzipOutputStream.cxx src/fs/io/GzipOutputStream.hxx
539 540
FS_LIBS += $(ZLIB_LIBS)
endif
541

542 543
# Storage library

544
SMBCLIENT_SOURCES = \
545
	src/lib/smbclient/Domain.cxx src/lib/smbclient/Domain.hxx \
546
	src/lib/smbclient/Mutex.cxx src/lib/smbclient/Mutex.hxx \
547 548
	src/lib/smbclient/Init.cxx src/lib/smbclient/Init.hxx

549
NFS_SOURCES = \
550 551 552 553 554 555
	src/lib/nfs/Callback.hxx \
	src/lib/nfs/Cancellable.hxx \
	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 \
	src/lib/nfs/FileReader.cxx src/lib/nfs/FileReader.hxx \
556 557
	src/lib/nfs/Domain.cxx src/lib/nfs/Domain.hxx

558 559 560 561 562
if ENABLE_DATABASE

noinst_LIBRARIES += libstorage.a

libstorage_a_SOURCES = \
563 564
	src/storage/StoragePlugin.hxx \
	src/storage/Registry.cxx src/storage/Registry.hxx \
565
	src/storage/StorageInterface.cxx src/storage/StorageInterface.hxx \
566
	src/storage/CompositeStorage.cxx src/storage/CompositeStorage.hxx \
567
	src/storage/Configured.cxx src/storage/Configured.hxx \
568
	src/storage/plugins/LocalStorage.cxx src/storage/plugins/LocalStorage.hxx \
569 570
	src/storage/FileInfo.hxx

571
libstorage_a_CPPFLAGS = $(AM_CPPFLAGS) \
572
	$(NFS_CFLAGS) \
573 574
	$(SMBCLIENT_CFLAGS)

575 576
STORAGE_LIBS = libstorage.a

577 578
if ENABLE_SMBCLIENT
libstorage_a_SOURCES += \
579
	$(SMBCLIENT_SOURCES) \
580 581 582
	src/storage/plugins/SmbclientStorage.cxx src/neighbor/plugins/SmbclientStorage.hxx
endif

583 584
if ENABLE_NFS
libstorage_a_SOURCES += \
585
	$(NFS_SOURCES) \
586 587 588
	src/storage/plugins/NfsStorage.cxx src/neighbor/plugins/NfsStorage.hxx
endif

589 590
endif

591 592 593 594
# neighbor plugins

if ENABLE_NEIGHBOR_PLUGINS

595
libmpd_a_SOURCES += \
596 597 598
	src/command/NeighborCommands.cxx \
	src/command/NeighborCommands.hxx

599 600
noinst_LIBRARIES += libneighbor.a

601 602 603 604 605 606 607 608 609 610 611 612 613
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 += \
614
	$(SMBCLIENT_SOURCES) \
615 616 617 618 619 620 621
	src/neighbor/plugins/SmbclientNeighborPlugin.cxx src/neighbor/plugins/SmbclientNeighborPlugin.hxx
endif

NEIGHBOR_LIBS = \
	$(SMBCLIENT_LIBS) \
	libneighbor.a

622 623 624 625 626 627 628 629 630
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

631 632
endif

633 634
# database plugins

635 636 637 638
if ENABLE_DATABASE

noinst_LIBRARIES += libdb_plugins.a

639
libdb_plugins_a_SOURCES = \
640
	src/PlaylistDatabase.cxx src/PlaylistDatabase.hxx \
Max Kellermann's avatar
Max Kellermann committed
641 642
	src/db/Registry.cxx src/db/Registry.hxx \
	src/db/Helpers.cxx src/db/Helpers.hxx \
643
	src/db/UniqueTags.cxx src/db/UniqueTags.hxx \
644 645 646 647
	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
648
	src/db/plugins/LazyDatabase.cxx src/db/plugins/LazyDatabase.hxx \
649 650 651 652 653 654
	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
655 656 657
	src/db/plugins/simple/Mount.cxx \
	src/db/plugins/simple/Mount.hxx \
	src/db/plugins/simple/PrefixedLightSong.hxx \
658 659
	src/db/plugins/simple/SimpleDatabasePlugin.cxx \
	src/db/plugins/simple/SimpleDatabasePlugin.hxx
660

661 662
if HAVE_LIBMPDCLIENT
libdb_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
663
	src/db/plugins/ProxyDatabasePlugin.cxx src/db/plugins/ProxyDatabasePlugin.hxx
664 665
endif

666
DB_LIBS = \
667 668
	libdb_plugins.a \
	$(LIBMPDCLIENT_LIBS)
669

670 671
if HAVE_LIBUPNP
libdb_plugins_a_SOURCES += \
672
	$(UPNP_SOURCES) \
673
	src/db/plugins/upnp/UpnpDatabasePlugin.cxx src/db/plugins/upnp/UpnpDatabasePlugin.hxx \
Max Kellermann's avatar
Max Kellermann committed
674
	src/db/plugins/upnp/Tags.cxx src/db/plugins/upnp/Tags.hxx \
675
	src/db/plugins/upnp/ContentDirectoryService.cxx \
Max Kellermann's avatar
Max Kellermann committed
676 677
	src/db/plugins/upnp/Directory.cxx src/db/plugins/upnp/Directory.hxx \
	src/db/plugins/upnp/Object.cxx src/db/plugins/upnp/Object.hxx
678 679 680 681 682
DB_LIBS += \
	$(EXPAT_LIBS) \
	$(UPNP_LIBS)
endif

683 684
endif

685 686
# archive plugins

687 688 689 690
if ENABLE_ARCHIVE

noinst_LIBRARIES += libarchive.a

691
libmpd_a_SOURCES +=  \
692
	src/db/update/Archive.cxx
693

694
libarchive_a_SOURCES = \
695 696 697 698 699 700
	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
701
	src/input/plugins/ArchiveInputPlugin.cxx src/input/plugins/ArchiveInputPlugin.hxx
702
libarchive_a_CPPFLAGS = $(AM_CPPFLAGS) \
703
	$(BZ2_CFLAGS) \
704
	$(ISO9660_CFLAGS) \
705 706 707
	$(ZZIP_CFLAGS)

ARCHIVE_LIBS = \
708
	libarchive.a \
709
	$(BZ2_LIBS) \
710
	$(ISO9660_LIBS) \
711 712
	$(ZZIP_LIBS)

713
if HAVE_BZ2
714
libarchive_a_SOURCES += \
715 716
	src/archive/plugins/Bzip2ArchivePlugin.cxx \
	src/archive/plugins/Bzip2ArchivePlugin.hxx
717 718
endif

719
if HAVE_ZZIP
720
libarchive_a_SOURCES += \
721 722
	src/archive/plugins/ZzipArchivePlugin.cxx \
	src/archive/plugins/ZzipArchivePlugin.hxx
723 724
endif

725
if HAVE_ISO9660
726
libarchive_a_SOURCES += \
727 728
	src/archive/plugins/Iso9660ArchivePlugin.cxx \
	src/archive/plugins/Iso9660ArchivePlugin.hxx
729 730
endif

731 732
else
ARCHIVE_LIBS =
733 734
endif

735 736 737
# configuration library

libconf_a_SOURCES = \
738 739 740 741 742 743 744 745 746
	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
747

748 749
# tag plugins

750
libtag_a_CPPFLAGS = $(AM_CPPFLAGS) \
751 752
	$(ID3TAG_CFLAGS)
TAG_LIBS = \
753
	libtag.a \
754 755
	$(ID3TAG_LIBS)

756
libtag_a_SOURCES =\
757 758
	src/tag/TagType.h \
	src/tag/Tag.cxx src/tag/Tag.hxx \
759
	src/tag/TagBuilder.cxx src/tag/TagBuilder.hxx \
760
	src/tag/TagItem.hxx \
761
	src/tag/TagHandler.cxx src/tag/TagHandler.hxx \
762
	src/tag/TagSettings.c src/tag/TagSettings.h \
763
	src/tag/TagConfig.cxx src/tag/TagConfig.hxx \
764
	src/tag/TagNames.c \
765
	src/tag/TagString.cxx src/tag/TagString.hxx \
766 767
	src/tag/TagPool.cxx src/tag/TagPool.hxx \
	src/tag/TagTable.cxx src/tag/TagTable.hxx \
768
	src/tag/Set.cxx src/tag/Set.hxx \
769 770 771
	src/tag/ApeLoader.cxx src/tag/ApeLoader.hxx \
	src/tag/ApeReplayGain.cxx src/tag/ApeReplayGain.hxx \
	src/tag/ApeTag.cxx src/tag/ApeTag.hxx
772 773

if HAVE_ID3TAG
774
libtag_a_SOURCES += \
775 776
	src/tag/TagId3.cxx src/tag/TagId3.hxx \
	src/tag/TagRva2.cxx src/tag/TagRva2.hxx \
777 778
	src/tag/Riff.cxx src/tag/Riff.hxx \
	src/tag/Aiff.cxx src/tag/Aiff.hxx
779 780
endif

781 782 783 784 785
# ffmpeg

if HAVE_FFMPEG
noinst_LIBRARIES += libffmpeg.a
libffmpeg_a_SOURCES = \
786
	src/lib/ffmpeg/Error.cxx src/lib/ffmpeg/Error.hxx \
787 788 789 790
	src/lib/ffmpeg/Domain.cxx src/lib/ffmpeg/Domain.hxx
FFMPEG_LIBS2 = libffmpeg.a $(FFMPEG_LIBS)
endif

791 792
# decoder plugins

793
libdecoder_a_SOURCES = \
794 795 796 797 798 799 800 801 802 803 804
	src/decoder/plugins/PcmDecoderPlugin.cxx \
	src/decoder/plugins/PcmDecoderPlugin.hxx \
	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 \
	src/decoder/DecoderBuffer.cxx src/decoder/DecoderBuffer.hxx \
	src/decoder/DecoderPlugin.cxx \
	src/decoder/DecoderList.cxx src/decoder/DecoderList.hxx
805
libdecoder_a_CPPFLAGS = $(AM_CPPFLAGS) \
806
	$(VORBIS_CFLAGS) $(TREMOR_CFLAGS) \
807
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
808
	$(SNDFILE_CFLAGS) \
809 810
	$(AUDIOFILE_CFLAGS) \
	$(LIBMIKMOD_CFLAGS) \
811
	$(GME_CFLAGS) \
812 813 814
	$(SIDPLAY_CFLAGS) \
	$(FLUIDSYNTH_CFLAGS) \
	$(WILDMIDI_CFLAGS) \
815
	$(WAVPACK_CFLAGS) \
816
	$(MAD_CFLAGS) \
817
	$(MPG123_CFLAGS) \
818
	$(MP4V2_CFLAGS) \
819
	$(OPUS_CFLAGS) \
820
	$(FFMPEG_CFLAGS) \
821
	$(MPCDEC_CFLAGS) \
822
	$(ADPLUG_CFLAGS) \
823
	$(FAAD_CFLAGS)
824 825

DECODER_LIBS = \
826
	libdecoder.a \
827
	$(VORBIS_LIBS) $(TREMOR_LIBS) \
828
	$(FLAC_LIBS) \
829
	$(SNDFILE_LIBS) \
830
	$(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
831
	$(GME_LIBS) \
832 833 834
	$(SIDPLAY_LIBS) \
	$(FLUIDSYNTH_LIBS) \
	$(WILDMIDI_LIBS) \
835
	$(WAVPACK_LIBS) \
836
	$(MAD_LIBS) \
837
	$(MPG123_LIBS) \
838
	$(MP4V2_LIBS) \
839
	$(OPUS_LIBS) \
840
	$(FFMPEG_LIBS2) \
841
	$(MPCDEC_LIBS) \
842
	$(ADPLUG_LIBS) \
843
	$(FAAD_LIBS)
844

845
if HAVE_MAD
846
libdecoder_a_SOURCES += \
847 848
	src/decoder/plugins/MadDecoderPlugin.cxx \
	src/decoder/plugins/MadDecoderPlugin.hxx
849 850
endif

851
if HAVE_MPG123
852
libdecoder_a_SOURCES += \
853 854
	src/decoder/plugins/Mpg123DecoderPlugin.cxx \
	src/decoder/plugins/Mpg123DecoderPlugin.hxx
855 856
endif

857
if HAVE_MPCDEC
858
libdecoder_a_SOURCES += \
859 860
	src/decoder/plugins/MpcdecDecoderPlugin.cxx \
	src/decoder/plugins/MpcdecDecoderPlugin.hxx
861 862
endif

863
if HAVE_OPUS
864
libdecoder_a_SOURCES += \
865 866 867 868 869 870 871 872 873 874 875 876
	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
877 878
endif

879
if HAVE_WAVPACK
880
libdecoder_a_SOURCES += \
881 882
	src/decoder/plugins/WavpackDecoderPlugin.cxx \
	src/decoder/plugins/WavpackDecoderPlugin.hxx
883 884
endif

885
if HAVE_ADPLUG
886
libdecoder_a_SOURCES += \
887 888
	src/decoder/plugins/AdPlugDecoderPlugin.cxx \
	src/decoder/plugins/AdPlugDecoderPlugin.h
889 890
endif

891
if HAVE_FAAD
892
libdecoder_a_SOURCES += \
893
	src/decoder/plugins/FaadDecoderPlugin.cxx src/decoder/plugins/FaadDecoderPlugin.hxx
894 895
endif

896
if HAVE_XIPH
897
libdecoder_a_SOURCES += \
898 899
	src/decoder/plugins/XiphTags.cxx src/decoder/plugins/XiphTags.hxx \
	src/decoder/plugins/OggCodec.cxx src/decoder/plugins/OggCodec.hxx
900 901
endif

902
if ENABLE_VORBIS_DECODER
903
libdecoder_a_SOURCES += \
904 905 906
	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
907 908 909
endif

if HAVE_FLAC
910
libdecoder_a_SOURCES += \
911 912 913 914 915 916 917 918
	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
919 920 921
endif

if HAVE_AUDIOFILE
922
libdecoder_a_SOURCES += \
923 924
	src/decoder/plugins/AudiofileDecoderPlugin.cxx \
	src/decoder/plugins/AudiofileDecoderPlugin.hxx
925 926
endif

927
if ENABLE_MIKMOD_DECODER
928
libdecoder_a_SOURCES += \
929 930
	src/decoder/plugins/MikmodDecoderPlugin.cxx \
	src/decoder/plugins/MikmodDecoderPlugin.hxx
931 932 933
endif

if HAVE_MODPLUG
934
libmodplug_decoder_plugin_a_SOURCES = \
935 936
	src/decoder/plugins/ModplugDecoderPlugin.cxx \
	src/decoder/plugins/ModplugDecoderPlugin.hxx
937
libmodplug_decoder_plugin_a_CXXFLAGS = $(AM_CXXFLAGS) $(MODPLUG_CFLAGS)
938
libmodplug_decoder_plugin_a_CPPFLAGS = $(AM_CPPFLAGS)
939 940
noinst_LIBRARIES += libmodplug_decoder_plugin.a
DECODER_LIBS += libmodplug_decoder_plugin.a $(MODPLUG_LIBS)
941 942
endif

943 944 945 946 947 948
if HAVE_MP4V2
libdecoder_a_SOURCES += \
	src/decoder/plugins/Mp4v2DecoderPlugin.cxx \
	src/decoder/plugins/Mp4v2DecoderPlugin.hxx
endif

949
if ENABLE_SIDPLAY
950
libdecoder_a_SOURCES += \
951 952
	src/decoder/plugins/SidplayDecoderPlugin.cxx \
	src/decoder/plugins/SidplayDecoderPlugin.hxx
953 954 955
endif

if ENABLE_FLUIDSYNTH
956
libdecoder_a_SOURCES += \
957 958
	src/decoder/plugins/FluidsynthDecoderPlugin.cxx \
	src/decoder/plugins/FluidsynthDecoderPlugin.hxx
959 960 961
endif

if ENABLE_WILDMIDI
962
libdecoder_a_SOURCES += \
963 964
	src/decoder/plugins/WildmidiDecoderPlugin.cxx \
	src/decoder/plugins/WildmidiDecoderPlugin.hxx
965 966 967
endif

if HAVE_FFMPEG
968
libdecoder_a_SOURCES += \
969 970 971 972
	src/decoder/plugins/FfmpegMetaData.cxx \
	src/decoder/plugins/FfmpegMetaData.hxx \
	src/decoder/plugins/FfmpegDecoderPlugin.cxx \
	src/decoder/plugins/FfmpegDecoderPlugin.hxx
973 974
endif

975
if ENABLE_SNDFILE
976
libdecoder_a_SOURCES += \
977 978
	src/decoder/plugins/SndfileDecoderPlugin.cxx \
	src/decoder/plugins/SndfileDecoderPlugin.hxx
979 980
endif

981
if HAVE_GME
982
libdecoder_a_SOURCES += \
983
	src/decoder/plugins/GmeDecoderPlugin.cxx src/decoder/plugins/GmeDecoderPlugin.hxx
984 985
endif

986 987
# encoder plugins

988 989 990 991 992
if ENABLE_ENCODER

noinst_LIBRARIES += libencoder_plugins.a

libencoder_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
993
	$(LAME_CFLAGS) \
994
	$(TWOLAME_CFLAGS) \
995
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
996
	$(OPUS_CFLAGS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
997
	$(SHINE_CFLAGS) \
998 999 1000
	$(VORBISENC_CFLAGS)

ENCODER_LIBS = \
1001
	libencoder_plugins.a \
1002
	$(LAME_LIBS) \
1003
	$(TWOLAME_LIBS) \
1004
	$(FLAC_LIBS) \
1005
	$(OPUS_LIBS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
1006
	$(SHINE_LIBS) \
1007 1008
	$(VORBISENC_LIBS)

1009
libencoder_plugins_a_SOURCES = \
1010 1011
	src/encoder/EncoderAPI.hxx \
	src/encoder/EncoderPlugin.hxx \
1012 1013 1014 1015
	src/encoder/plugins/OggStream.hxx \
	src/encoder/plugins/NullEncoderPlugin.cxx \
	src/encoder/plugins/NullEncoderPlugin.hxx \
	src/encoder/EncoderList.cxx src/encoder/EncoderList.hxx
1016

1017 1018
if HAVE_OGG_ENCODER
libencoder_plugins_a_SOURCES += \
1019 1020 1021
	src/encoder/plugins/OggSerial.cxx \
	src/encoder/plugins/OggSerial.hxx \
	src/encoder/plugins/OggStream.hxx
1022 1023
endif

1024
if ENABLE_WAVE_ENCODER
1025
libencoder_plugins_a_SOURCES += \
1026 1027
	src/encoder/plugins/WaveEncoderPlugin.cxx \
	src/encoder/plugins/WaveEncoderPlugin.hxx
1028 1029
endif

1030
if ENABLE_VORBIS_ENCODER
1031
libencoder_plugins_a_SOURCES += \
1032 1033
	src/encoder/plugins/VorbisEncoderPlugin.cxx \
	src/encoder/plugins/VorbisEncoderPlugin.hxx
1034 1035
endif

1036 1037
if HAVE_OPUS
libencoder_plugins_a_SOURCES += \
1038 1039
	src/encoder/plugins/OpusEncoderPlugin.cxx \
	src/encoder/plugins/OpusEncoderPlugin.hxx
1040 1041
endif

1042
if ENABLE_LAME_ENCODER
1043
libencoder_plugins_a_SOURCES += \
1044 1045
	src/encoder/plugins/LameEncoderPlugin.cxx \
	src/encoder/plugins/LameEncoderPlugin.hxx
1046
endif
1047 1048

if ENABLE_TWOLAME_ENCODER
1049
libencoder_plugins_a_SOURCES += \
1050 1051
	src/encoder/plugins/TwolameEncoderPlugin.cxx \
	src/encoder/plugins/TwolameEncoderPlugin.hxx
1052
endif
1053 1054

if ENABLE_FLAC_ENCODER
1055
libencoder_plugins_a_SOURCES += \
1056 1057
	src/encoder/plugins/FlacEncoderPlugin.cxx \
	src/encoder/plugins/FlacEncoderPlugin.hxx
1058
endif
1059

Andrée Ekroth's avatar
Andrée Ekroth committed
1060 1061
if ENABLE_SHINE_ENCODER
libencoder_plugins_a_SOURCES += \
1062 1063
	src/encoder/plugins/ShineEncoderPlugin.cxx \
	src/encoder/plugins/ShineEncoderPlugin.hxx
Andrée Ekroth's avatar
Andrée Ekroth committed
1064 1065
endif

1066 1067
else
ENCODER_LIBS =
1068 1069 1070 1071
endif


if HAVE_ZEROCONF
1072
libmpd_a_SOURCES += \
1073 1074
	src/zeroconf/ZeroconfInternal.hxx \
	src/zeroconf/ZeroconfGlue.cxx src/zeroconf/ZeroconfGlue.hxx
1075 1076

if HAVE_AVAHI
1077
libmpd_a_SOURCES += \
1078 1079
	src/zeroconf/AvahiPoll.cxx src/zeroconf/AvahiPoll.hxx \
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/ZeroconfAvahi.hxx
1080 1081 1082
endif

if HAVE_BONJOUR
1083
libmpd_a_SOURCES += src/zeroconf/ZeroconfBonjour.cxx src/zeroconf/ZeroconfBonjour.hxx
1084 1085 1086
endif
endif

1087 1088 1089 1090
#
# input plugins
#

1091
libinput_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1092 1093
	src/input/Init.cxx src/input/Init.hxx \
	src/input/Registry.cxx src/input/Registry.hxx \
1094
	src/input/Open.cxx \
1095
	src/input/Offset.hxx \
Max Kellermann's avatar
Max Kellermann committed
1096 1097 1098
	src/input/InputStream.cxx src/input/InputStream.hxx \
	src/input/InputPlugin.hxx \
	src/input/TextInputStream.cxx src/input/TextInputStream.hxx \
1099
	src/input/ThreadInputStream.cxx src/input/ThreadInputStream.hxx \
1100
	src/input/AsyncInputStream.cxx src/input/AsyncInputStream.hxx \
1101
	src/input/ProxyInputStream.cxx src/input/ProxyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1102 1103
	src/input/plugins/RewindInputPlugin.cxx src/input/plugins/RewindInputPlugin.hxx \
	src/input/plugins/FileInputPlugin.cxx src/input/plugins/FileInputPlugin.hxx
1104 1105

libinput_a_CPPFLAGS = $(AM_CPPFLAGS) \
1106
	$(CURL_CFLAGS) \
1107
	$(SMBCLIENT_CFLAGS) \
1108
	$(NFS_CFLAGS) \
1109
	$(CDIO_PARANOIA_CFLAGS) \
1110
	$(FFMPEG_CFLAGS) \
1111
	$(DESPOTIFY_CFLAGS) \
1112 1113 1114
	$(MMS_CFLAGS)

INPUT_LIBS = \
1115
	libinput.a \
1116
	$(CURL_LIBS) \
1117
	$(SMBCLIENT_LIBS) \
1118
	$(NFS_LIBS) \
1119
	$(CDIO_PARANOIA_LIBS) \
1120
	$(FFMPEG_LIBS2) \
1121
	$(DESPOTIFY_LIBS) \
1122 1123
	$(MMS_LIBS)

1124 1125
if HAVE_ALSA
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1126 1127
	src/input/plugins/AlsaInputPlugin.cxx \
	src/input/plugins/AlsaInputPlugin.hxx
1128 1129 1130 1131
INPUT_LIBS += $(ALSA_LIBS)
endif


1132
if ENABLE_CURL
1133
libinput_a_SOURCES += \
1134
	src/input/IcyInputStream.cxx src/input/IcyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1135
	src/input/plugins/CurlInputPlugin.cxx src/input/plugins/CurlInputPlugin.hxx \
1136
	src/IcyMetaDataParser.cxx src/IcyMetaDataParser.hxx
1137
endif
1138

1139 1140
if ENABLE_SMBCLIENT
libinput_a_SOURCES += \
1141
	$(SMBCLIENT_SOURCES) \
Max Kellermann's avatar
Max Kellermann committed
1142
	src/input/plugins/SmbclientInputPlugin.cxx src/input/plugins/SmbclientInputPlugin.hxx
1143 1144
endif

1145 1146
if ENABLE_NFS
libinput_a_SOURCES += \
1147
	$(NFS_SOURCES) \
1148 1149 1150
	src/input/plugins/NfsInputPlugin.cxx src/input/plugins/NfsInputPlugin.hxx
endif

1151
if ENABLE_CDIO_PARANOIA
1152
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1153 1154
	src/input/plugins/CdioParanoiaInputPlugin.cxx \
	src/input/plugins/CdioParanoiaInputPlugin.hxx
1155 1156
endif

1157
if HAVE_FFMPEG
1158
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1159
	src/input/plugins/FfmpegInputPlugin.cxx src/input/plugins/FfmpegInputPlugin.hxx
1160 1161
endif

1162
if ENABLE_MMS
1163
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1164
	src/input/plugins/MmsInputPlugin.cxx src/input/plugins/MmsInputPlugin.hxx
1165 1166
endif

1167
if ENABLE_DESPOTIFY
1168
libinput_a_SOURCES += \
1169 1170
	src/lib/despotify/DespotifyUtils.cxx \
	src/lib/despotify/DespotifyUtils.hxx \
Max Kellermann's avatar
Max Kellermann committed
1171 1172
	src/input/plugins/DespotifyInputPlugin.cxx \
	src/input/plugins/DespotifyInputPlugin.hxx
1173 1174
endif

1175

1176
liboutput_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1177 1178
	$(AO_CFLAGS) \
	$(ALSA_CFLAGS) \
1179
	$(JACK_CFLAGS) \
1180
	$(OPENAL_CFLAGS) \
1181
	$(OPENSSL_CFLAGS) \
1182
	$(PULSE_CFLAGS) \
1183 1184 1185
	$(SHOUT_CFLAGS)

OUTPUT_LIBS = \
1186
	liboutput_plugins.a \
1187
	$(LIBWRAP_LDFLAGS) \
1188 1189
	$(AO_LIBS) \
	$(ALSA_LIBS) \
1190
	$(ROAR_LIBS) \
1191
	$(JACK_LIBS) \
1192
	$(OPENAL_LIBS) \
1193
	$(PULSE_LIBS) \
1194 1195
	$(SHOUT_LIBS)

1196
OUTPUT_API_SRC = \
1197
	src/output/OutputAPI.hxx \
1198 1199
	src/output/Internal.hxx \
	src/output/Registry.cxx src/output/Registry.hxx \
1200
	src/output/MultipleOutputs.cxx src/output/MultipleOutputs.hxx \
1201
	src/output/OutputThread.cxx \
1202
	src/output/Domain.cxx src/output/Domain.hxx \
1203
	src/output/OutputControl.cxx \
1204 1205 1206 1207
	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 \
1208 1209
	src/output/Finish.cxx \
	src/output/Init.cxx
1210

1211
liboutput_plugins_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1212
	src/output/Timer.cxx src/output/Timer.hxx \
1213 1214
	src/output/plugins/NullOutputPlugin.cxx \
	src/output/plugins/NullOutputPlugin.hxx
1215

1216 1217 1218 1219
MIXER_LIBS = \
	libmixer_plugins.a \
	$(PULSE_LIBS)

1220
MIXER_API_SRC = \
1221
	src/mixer/Listener.hxx \
Max Kellermann's avatar
Max Kellermann committed
1222 1223 1224 1225
	src/mixer/MixerPlugin.hxx \
	src/mixer/MixerList.hxx \
	src/mixer/MixerControl.cxx src/mixer/MixerControl.hxx \
	src/mixer/MixerType.cxx src/mixer/MixerType.hxx \
1226
	src/mixer/MixerAll.cxx \
Max Kellermann's avatar
Max Kellermann committed
1227
	src/mixer/MixerInternal.hxx
1228

1229
libmixer_plugins_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1230 1231
	src/mixer/plugins/SoftwareMixerPlugin.cxx \
	src/mixer/plugins/SoftwareMixerPlugin.hxx
1232 1233 1234
libmixer_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ALSA_CFLAGS) \
	$(PULSE_CFLAGS)
1235

1236
if HAVE_ALSA
1237
liboutput_plugins_a_SOURCES += \
1238 1239
	src/output/plugins/AlsaOutputPlugin.cxx \
	src/output/plugins/AlsaOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1240
libmixer_plugins_a_SOURCES += src/mixer/plugins/AlsaMixerPlugin.cxx
1241 1242
endif

1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253
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

1254
if HAVE_ROAR
1255
liboutput_plugins_a_SOURCES += \
1256 1257
	src/output/plugins/RoarOutputPlugin.cxx \
	src/output/plugins/RoarOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1258
libmixer_plugins_a_SOURCES += src/mixer/plugins/RoarMixerPlugin.cxx
1259 1260
endif

1261
if HAVE_AO
1262
liboutput_plugins_a_SOURCES += \
1263 1264
	src/output/plugins/AoOutputPlugin.cxx \
	src/output/plugins/AoOutputPlugin.hxx
1265 1266 1267
endif

if HAVE_FIFO
1268
liboutput_plugins_a_SOURCES += \
1269 1270
	src/output/plugins/FifoOutputPlugin.cxx \
	src/output/plugins/FifoOutputPlugin.hxx
1271 1272
endif

1273
if ENABLE_PIPE_OUTPUT
1274
liboutput_plugins_a_SOURCES += \
1275 1276
	src/output/plugins/PipeOutputPlugin.cxx \
	src/output/plugins/PipeOutputPlugin.hxx
1277 1278
endif

1279
if HAVE_JACK
1280
liboutput_plugins_a_SOURCES += \
1281 1282
	src/output/plugins/JackOutputPlugin.cxx \
	src/output/plugins/JackOutputPlugin.hxx
1283 1284 1285
endif

if HAVE_OSS
1286
liboutput_plugins_a_SOURCES += \
1287 1288
	src/output/plugins/OssOutputPlugin.cxx \
	src/output/plugins/OssOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1289
libmixer_plugins_a_SOURCES += src/mixer/plugins/OssMixerPlugin.cxx
1290 1291
endif

Serge Ziryukin's avatar
Serge Ziryukin committed
1292
if HAVE_OPENAL
1293
liboutput_plugins_a_SOURCES += \
1294 1295
	src/output/plugins/OpenALOutputPlugin.cxx \
	src/output/plugins/OpenALOutputPlugin.hxx
Serge Ziryukin's avatar
Serge Ziryukin committed
1296 1297
endif

1298
if HAVE_OSX
1299
liboutput_plugins_a_SOURCES += \
1300 1301
	src/output/plugins/OSXOutputPlugin.cxx \
	src/output/plugins/OSXOutputPlugin.hxx
1302 1303 1304
endif

if HAVE_PULSE
1305
liboutput_plugins_a_SOURCES += \
1306 1307
	src/output/plugins/PulseOutputPlugin.cxx \
	src/output/plugins/PulseOutputPlugin.hxx
1308
libmixer_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1309
	src/mixer/plugins/PulseMixerPlugin.cxx src/mixer/plugins/PulseMixerPlugin.hxx
1310 1311 1312
endif

if HAVE_SHOUT
1313
liboutput_plugins_a_SOURCES += \
1314 1315
	src/output/plugins/ShoutOutputPlugin.cxx \
	src/output/plugins/ShoutOutputPlugin.hxx
1316 1317
endif

1318
if ENABLE_RECORDER_OUTPUT
1319
liboutput_plugins_a_SOURCES += \
1320 1321
	src/output/plugins/RecorderOutputPlugin.cxx \
	src/output/plugins/RecorderOutputPlugin.hxx
1322 1323
endif

1324
if ENABLE_HTTPD_OUTPUT
1325
liboutput_plugins_a_SOURCES += \
1326 1327 1328 1329 1330 1331 1332 1333
	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
1334 1335
endif

1336
if ENABLE_SOLARIS_OUTPUT
1337
liboutput_plugins_a_SOURCES += \
1338
	src/output/plugins/SolarisOutputPlugin.cxx src/output/plugins/SolarisOutputPlugin.hxx
1339 1340
endif

1341
if ENABLE_WINMM_OUTPUT
1342
liboutput_plugins_a_SOURCES += \
1343 1344
	src/output/plugins/WinmmOutputPlugin.cxx \
	src/output/plugins/WinmmOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1345
libmixer_plugins_a_SOURCES += src/mixer/plugins/WinmmMixerPlugin.cxx
1346 1347
endif

1348

1349 1350 1351 1352
#
# Playlist plugins
#

1353
libplaylist_plugins_a_SOURCES = \
1354 1355
	src/playlist/PlaylistPlugin.hxx \
	src/playlist/SongEnumerator.hxx \
1356 1357
	src/playlist/CloseSongEnumerator.cxx \
	src/playlist/CloseSongEnumerator.hxx \
1358 1359
	src/playlist/MemorySongEnumerator.cxx \
	src/playlist/MemorySongEnumerator.hxx \
1360
	src/playlist/cue/CueParser.cxx src/playlist/cue/CueParser.hxx \
1361 1362 1363 1364 1365 1366 1367 1368 1369
	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
1370
libplaylist_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1371
	$(EXPAT_CFLAGS) \
1372
	$(YAJL_CFLAGS) \
1373
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS))
1374 1375 1376

PLAYLIST_LIBS = \
	libplaylist_plugins.a \
1377
	$(EXPAT_LIBS) \
1378
	$(FLAC_LIBS)
1379

1380
if ENABLE_DESPOTIFY
1381
libplaylist_plugins_a_SOURCES += \
1382 1383 1384 1385
	src/lib/despotify/DespotifyUtils.cxx \
	src/lib/despotify/DespotifyUtils.hxx \
       src/playlist/plugins/DespotifyPlaylistPlugin.cxx \
       src/playlist/plugins/DespotifyPlaylistPlugin.hxx
1386 1387
endif

1388 1389
if ENABLE_SOUNDCLOUD
libplaylist_plugins_a_SOURCES += \
1390 1391
	src/playlist/plugins/SoundCloudPlaylistPlugin.cxx \
	src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
1392
PLAYLIST_LIBS += $(YAJL_LIBS)
1393
endif
1394

1395
if HAVE_EXPAT
1396
libplaylist_plugins_a_SOURCES += \
1397
	src/lib/expat/ExpatParser.cxx src/lib/expat/ExpatParser.hxx \
1398 1399 1400 1401 1402 1403
	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
1404 1405
endif

1406 1407
if HAVE_GLIB
libplaylist_plugins_a_SOURCES += \
1408 1409
	src/playlist/plugins/PlsPlaylistPlugin.cxx \
	src/playlist/plugins/PlsPlaylistPlugin.hxx
1410 1411
endif

1412 1413 1414 1415
#
# Filter plugins
#

1416
libfilter_plugins_a_SOURCES = \
1417 1418 1419
	src/AudioCompress/config.h \
	src/AudioCompress/compress.h \
	src/AudioCompress/compress.c \
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432
	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
1433

1434 1435 1436 1437
FILTER_LIBS = \
	libfilter_plugins.a \
	$(PCM_LIBS)

1438

1439 1440 1441 1442 1443 1444
#
# systemd unit
#

if HAVE_SYSTEMD
systemdsystemunit_DATA = \
1445
	systemd/mpd.socket \
1446
	systemd/mpd.service
1447 1448
endif

1449 1450 1451 1452 1453 1454 1455

#
# Test programs
#

if ENABLE_TEST

1456
C_TESTS = \
1457
	test/test_util \
1458
	test/test_byte_reverse \
1459
	test/test_rewind \
1460
	test/test_mixramp \
1461
	test/test_pcm \
1462
	test/test_protocol \
1463
	test/test_queue_priority
1464

1465 1466 1467 1468
if ENABLE_CURL
C_TESTS += test/test_icy_parser
endif

1469 1470 1471 1472
if ENABLE_DATABASE
C_TESTS += test/test_translate_song
endif

1473 1474 1475 1476
if ENABLE_ARCHIVE
C_TESTS += test/test_archive
endif

1477
TESTS = $(C_TESTS)
1478

1479
noinst_PROGRAMS = \
1480
	$(C_TESTS) \
1481
	test/read_conf \
1482
	test/run_resolver \
1483
	test/run_input \
1484
	test/dump_text_file \
1485
	test/dump_playlist \
1486
	test/run_decoder \
1487
	test/read_tags \
1488
	test/run_filter \
1489
	test/run_output \
1490
	test/run_convert \
1491
	test/run_normalize \
1492 1493
	test/software_volume

1494 1495 1496 1497
if ENABLE_DATABASE
noinst_PROGRAMS += test/DumpDatabase
endif

1498 1499 1500 1501
if ENABLE_NEIGHBOR_PLUGINS
noinst_PROGRAMS += test/run_neighbor_explorer
endif

1502 1503 1504 1505
if HAVE_AVAHI
noinst_PROGRAMS += test/run_avahi
endif

1506 1507 1508 1509
if ENABLE_ARCHIVE
noinst_PROGRAMS += test/visit_archive
endif

1510 1511 1512 1513
if HAVE_ID3TAG
noinst_PROGRAMS += test/dump_rva2
endif

1514 1515 1516 1517 1518
if HAVE_ALSA
# this debug program is still ALSA specific
noinst_PROGRAMS += test/read_mixer
endif

1519
test_read_conf_LDADD = \
1520
	libconf.a \
1521
	$(FS_LIBS) \
1522
	libsystem.a \
1523
	libutil.a \
1524
	$(GLIB_LIBS)
1525
test_read_conf_SOURCES = \
1526
	src/Log.cxx src/LogBackend.cxx \
1527
	test/read_conf.cxx
1528

1529
test_run_resolver_LDADD = \
1530
	libsystem.a \
1531
	libutil.a \
1532
	$(GLIB_LIBS)
1533
test_run_resolver_SOURCES = \
1534
	src/Log.cxx src/LogBackend.cxx \
1535
	test/run_resolver.cxx
1536

1537 1538
if ENABLE_DATABASE

1539
test_DumpDatabase_LDADD = \
1540
	$(DB_LIBS) \
1541
	$(TAG_LIBS) \
1542
	libconf.a \
1543
	libutil.a \
1544
	libevent.a \
1545
	$(FS_LIBS) \
1546
	libsystem.a \
1547
	$(ICU_LDADD) \
1548 1549
	$(GLIB_LIBS)
test_DumpDatabase_SOURCES = test/DumpDatabase.cxx \
1550
	src/protocol/Ack.cxx \
1551
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1552 1553 1554
	src/db/DatabaseError.cxx \
	src/db/Registry.cxx \
	src/db/Selection.cxx \
1555 1556
	src/db/PlaylistVector.cxx \
	src/db/DatabaseLock.cxx \
1557
	src/SongSave.cxx \
1558
	src/DetachedSong.cxx \
1559
	src/TagSave.cxx \
1560
	src/SongFilter.cxx
1561

1562
if HAVE_LIBUPNP
1563
test_DumpDatabase_SOURCES += src/lib/expat/ExpatParser.cxx
1564 1565
endif

1566 1567
endif

1568
test_run_input_LDADD = \
1569
	$(INPUT_LIBS) \
1570
	$(ARCHIVE_LIBS) \
1571
	$(TAG_LIBS) \
1572
	libconf.a \
Max Kellermann's avatar
Max Kellermann committed
1573
	libutil.a \
1574
	libevent.a \
1575
	libthread.a \
1576
	$(FS_LIBS) \
1577
	libsystem.a \
1578
	$(GLIB_LIBS)
1579
test_run_input_SOURCES = test/run_input.cxx \
1580
	test/stdbin.h \
1581
	src/Log.cxx src/LogBackend.cxx \
1582
	src/IOThread.cxx \
1583
	src/TagSave.cxx
1584

1585 1586 1587 1588
if ENABLE_NEIGHBOR_PLUGINS

test_run_neighbor_explorer_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
1589
	src/IOThread.cxx \
1590
	test/run_neighbor_explorer.cxx
1591
test_run_neighbor_explorer_LDADD = $(AM_LDADD) \
1592 1593
	$(GLIB_LIBS) \
	$(NEIGHBOR_LIBS) \
1594 1595 1596
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
	libtag.a \
1597 1598
	libconf.a \
	libevent.a \
1599
	$(FS_LIBS) \
1600 1601 1602 1603
	libsystem.a \
	libthread.a \
	libutil.a

1604 1605 1606 1607 1608 1609 1610 1611 1612 1613
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

1614 1615
endif

1616 1617 1618 1619 1620
if ENABLE_ARCHIVE

test_visit_archive_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1621
	$(TAG_LIBS) \
1622
	libconf.a \
Max Kellermann's avatar
Max Kellermann committed
1623
	libutil.a \
1624
	libevent.a \
1625
	libthread.a \
1626
	$(FS_LIBS) \
1627
	libsystem.a \
1628 1629
	$(GLIB_LIBS)
test_visit_archive_SOURCES = test/visit_archive.cxx \
1630
	src/Log.cxx src/LogBackend.cxx \
1631
	src/IOThread.cxx \
1632
	src/input/Open.cxx
1633 1634 1635

endif

1636 1637
if HAVE_ZLIB

1638 1639
noinst_PROGRAMS += test/run_gzip test/run_gunzip

1640 1641 1642 1643 1644
test_run_gzip_LDADD = \
	libutil.a \
	$(FS_LIBS)
test_run_gzip_SOURCES = test/run_gzip.cxx

1645 1646 1647 1648 1649 1650 1651 1652
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

1653 1654
endif

1655 1656 1657
test_dump_text_file_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1658
	$(TAG_LIBS) \
1659
	libconf.a \
1660
	libevent.a \
1661
	$(FS_LIBS) \
1662
	libsystem.a \
1663
	libthread.a \
1664
	libutil.a \
1665
	$(GLIB_LIBS)
1666
test_dump_text_file_SOURCES = test/dump_text_file.cxx \
1667
	test/stdbin.h \
1668
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1669
	src/IOThread.cxx
1670

1671
test_dump_playlist_LDADD = \
1672
	$(PLAYLIST_LIBS) \
1673
	$(FLAC_LIBS) \
1674
	$(INPUT_LIBS) \
1675
	$(ARCHIVE_LIBS) \
1676 1677
	$(DECODER_LIBS) \
	$(TAG_LIBS) \
1678
	libconf.a \
1679
	libevent.a \
1680
	libthread.a \
1681
	$(FS_LIBS) \
1682
	libsystem.a \
1683
	libutil.a \
Max Kellermann's avatar
Max Kellermann committed
1684
	libpcm.a \
1685
	$(GLIB_LIBS)
1686
test_dump_playlist_SOURCES = test/dump_playlist.cxx \
1687
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1688
	$(DECODER_SRC) \
1689
	src/Log.cxx src/LogBackend.cxx \
1690
	src/IOThread.cxx \
1691
	src/TagSave.cxx \
1692
	src/TagFile.cxx \
1693
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1694
	src/DetachedSong.cxx
1695

1696
if HAVE_FLAC
1697
test_dump_playlist_SOURCES += \
1698
	src/ReplayGainInfo.cxx \
1699
	src/decoder/plugins/FlacMetadata.cxx
1700 1701
endif

1702
test_run_decoder_LDADD = \
1703
	$(DECODER_LIBS) \
1704
	libpcm.a \
1705
	$(INPUT_LIBS) \
1706
	$(ARCHIVE_LIBS) \
1707
	$(TAG_LIBS) \
1708
	libconf.a \
1709
	libevent.a \
1710
	libthread.a \
1711
	$(FS_LIBS) \
1712
	libsystem.a \
1713
	libutil.a \
1714
	$(GLIB_LIBS)
1715
test_run_decoder_SOURCES = test/run_decoder.cxx \
1716
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1717
	test/stdbin.h \
1718
	src/Log.cxx src/LogBackend.cxx \
1719
	src/IOThread.cxx \
1720
	src/ReplayGainInfo.cxx \
1721
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1722 1723
	$(ARCHIVE_SRC) \
	$(INPUT_SRC) \
1724
	$(TAG_SRC) \
1725 1726
	$(DECODER_SRC)

1727
test_read_tags_LDADD = \
1728
	$(DECODER_LIBS) \
1729
	libpcm.a \
1730
	$(INPUT_LIBS) \
1731
	$(ARCHIVE_LIBS) \
1732
	$(TAG_LIBS) \
1733
	libconf.a \
1734
	libevent.a \
1735
	libthread.a \
1736
	$(FS_LIBS) \
1737
	libsystem.a \
1738
	libutil.a \
1739
	$(GLIB_LIBS)
1740
test_read_tags_SOURCES = test/read_tags.cxx \
1741
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1742
	src/Log.cxx src/LogBackend.cxx \
1743
	src/IOThread.cxx \
1744
	src/ReplayGainInfo.cxx \
1745
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1746
	$(DECODER_SRC)
1747

1748 1749
if HAVE_ID3TAG
test_dump_rva2_LDADD = \
1750
	$(TAG_LIBS) \
1751
	libutil.a \
1752
	$(GLIB_LIBS)
1753
test_dump_rva2_SOURCES = \
1754
	src/Log.cxx src/LogBackend.cxx \
1755
	test/dump_rva2.cxx
1756 1757
endif

1758
test_run_filter_LDADD = \
1759
	$(FILTER_LIBS) \
1760
	libconf.a \
1761
	$(FS_LIBS) \
1762
	libsystem.a \
1763
	libutil.a \
1764
	$(GLIB_LIBS)
1765
test_run_filter_SOURCES = test/run_filter.cxx \
1766
	test/FakeReplayGainConfig.cxx \
1767
	test/stdbin.h \
1768
	src/Log.cxx src/LogBackend.cxx \
1769
	src/filter/FilterPlugin.cxx src/filter/FilterRegistry.cxx \
1770
	src/CheckAudioFormat.cxx \
1771
	src/AudioFormat.cxx \
1772
	src/AudioParser.cxx \
1773
	src/ReplayGainInfo.cxx
1774

1775 1776
if ENABLE_ENCODER
noinst_PROGRAMS += test/run_encoder
1777
test_run_encoder_SOURCES = test/run_encoder.cxx \
1778
	test/stdbin.h \
1779
	src/Log.cxx src/LogBackend.cxx \
1780
	src/CheckAudioFormat.cxx \
1781
	src/AudioFormat.cxx \
1782
	src/AudioParser.cxx
1783
test_run_encoder_LDADD = \
1784
	$(ENCODER_LIBS) \
1785 1786
	$(TAG_LIBS) \
	libconf.a \
1787
	libpcm.a \
1788
	libthread.a \
1789
	$(FS_LIBS) \
1790
	libsystem.a \
1791
	libutil.a \
1792
	$(GLIB_LIBS)
1793
endif
1794

1795 1796
if ENABLE_VORBIS_ENCODER
noinst_PROGRAMS += test/test_vorbis_encoder
1797
test_test_vorbis_encoder_SOURCES = test/test_vorbis_encoder.cxx \
1798
	test/stdbin.h \
1799
	src/Log.cxx src/LogBackend.cxx \
1800
	src/CheckAudioFormat.cxx \
1801
	src/AudioFormat.cxx \
1802
	src/AudioParser.cxx \
1803 1804 1805 1806 1807
	$(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
1808
	$(PCM_LIBS) \
1809
	$(TAG_LIBS) \
1810
	libconf.a \
1811
	$(FS_LIBS) \
1812
	libsystem.a \
1813
	libutil.a \
1814 1815 1816
	$(GLIB_LIBS)
endif

1817
test_software_volume_SOURCES = test/software_volume.cxx \
1818
	test/stdbin.h \
1819
	src/Log.cxx src/LogBackend.cxx \
1820
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1821
	src/AudioParser.cxx
1822
test_software_volume_LDADD = \
1823
	$(PCM_LIBS) \
1824
	libutil.a \
1825
	$(GLIB_LIBS)
1826

1827
test_run_avahi_SOURCES = \
1828
	src/Log.cxx src/LogBackend.cxx \
1829
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/AvahiPoll.cxx \
1830 1831 1832 1833 1834 1835 1836
	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 \
1837
	libutil.a \
1838
	$(GLIB_LIBS) \
1839 1840
	$(AVAHI_LIBS)

1841
test_run_normalize_SOURCES = test/run_normalize.cxx \
1842
	test/stdbin.h \
1843
	src/CheckAudioFormat.cxx \
1844
	src/AudioCompress/compress.c \
1845
	src/AudioParser.cxx
1846
test_run_normalize_LDADD = \
1847
	libutil.a \
1848 1849
	$(GLIB_LIBS)

1850
test_run_convert_SOURCES = test/run_convert.cxx \
1851
	src/Log.cxx src/LogBackend.cxx \
1852
	src/AudioFormat.cxx \
1853
	src/CheckAudioFormat.cxx \
1854
	src/AudioParser.cxx
1855
test_run_convert_LDADD = \
1856
	$(PCM_LIBS) \
1857
	libutil.a \
1858 1859
	$(GLIB_LIBS)

1860
test_run_output_LDADD = $(MPD_LIBS) \
1861
	$(PCM_LIBS) \
1862
	$(OUTPUT_LIBS) \
1863 1864 1865
	$(ENCODER_LIBS) \
	libmixer_plugins.a \
	$(FILTER_LIBS) \
1866
	$(TAG_LIBS) \
1867
	libconf.a \
1868
	libevent.a \
1869
	$(FS_LIBS) \
1870
	libsystem.a \
1871
	libthread.a \
1872
	libutil.a \
1873
	$(GLIB_LIBS)
1874
test_run_output_SOURCES = test/run_output.cxx \
1875
	test/FakeReplayGainConfig.cxx \
1876
	test/stdbin.h \
1877
	src/Log.cxx src/LogBackend.cxx \
1878
	src/IOThread.cxx \
1879
	src/CheckAudioFormat.cxx \
1880
	src/AudioFormat.cxx \
1881
	src/AudioParser.cxx \
1882 1883
	src/output/Domain.cxx \
	src/output/Init.cxx src/output/Finish.cxx src/output/Registry.cxx \
1884
	src/output/OutputPlugin.cxx \
Max Kellermann's avatar
Max Kellermann committed
1885 1886
	src/mixer/MixerControl.cxx \
	src/mixer/MixerType.cxx \
1887 1888
	src/filter/FilterPlugin.cxx \
	src/filter/FilterConfig.cxx \
1889
	src/ReplayGainInfo.cxx
1890

1891
test_read_mixer_LDADD = \
1892
	libpcm.a \
1893
	libmixer_plugins.a \
1894
	$(OUTPUT_LIBS) \
1895
	libconf.a \
1896
	libevent.a \
1897
	$(FS_LIBS) \
1898
	libsystem.a \
1899
	libutil.a \
1900
	$(GLIB_LIBS)
1901
test_read_mixer_SOURCES = test/read_mixer.cxx \
1902
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1903
	src/mixer/MixerControl.cxx \
1904
	src/filter/FilterPlugin.cxx \
1905
	src/AudioFormat.cxx \
1906
	src/filter/plugins/VolumeFilterPlugin.cxx
1907

1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919
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

1920
if ENABLE_INOTIFY
1921 1922
noinst_PROGRAMS += test/run_inotify
test_run_inotify_SOURCES = test/run_inotify.cxx \
1923
	test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
1924
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1925 1926
	src/db/update/InotifyDomain.cxx \
	src/db/update/InotifySource.cxx
1927
test_run_inotify_LDADD = \
1928
	libevent.a \
1929
	libsystem.a \
1930 1931
	libutil.a \
	$(GLIB_LIBS)
1932 1933
endif

1934
test_test_util_SOURCES = \
1935
	test/TestCircularBuffer.hxx \
1936 1937 1938 1939 1940 1941 1942
	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)

1943
test_test_byte_reverse_SOURCES = \
1944
	test/test_byte_reverse.cxx
1945 1946
test_test_byte_reverse_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_byte_reverse_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
1947 1948
test_test_byte_reverse_LDADD = \
	libutil.a \
1949
	$(CPPUNIT_LIBS)
1950

1951 1952 1953 1954 1955 1956
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 = \
1957
	$(GLIB_LIBS) \
1958 1959 1960 1961 1962 1963
	$(INPUT_LIBS) \
	libthread.a \
	libtag.a \
	libutil.a \
	$(CPPUNIT_LIBS)

1964
test_test_mixramp_SOURCES = \
1965
	src/Log.cxx src/LogBackend.cxx \
1966 1967 1968 1969
	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 = \
1970
	libutil.a \
1971 1972
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)
1973

1974
if ENABLE_CURL
1975
test_test_icy_parser_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1976
	src/Log.cxx src/LogBackend.cxx \
1977 1978 1979 1980 1981
	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
1982
	libutil.a \
1983 1984
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)
1985
endif
1986

1987
test_test_pcm_SOURCES = \
1988
	src/AudioFormat.cxx \
1989
	test/test_pcm_util.hxx \
1990 1991 1992
	test/test_pcm_dither.cxx \
	test/test_pcm_pack.cxx \
	test/test_pcm_channels.cxx \
1993
	test/test_pcm_format.cxx \
1994
	test/test_pcm_volume.cxx \
1995
	test/test_pcm_mix.cxx \
1996
	test/test_pcm_export.cxx \
1997 1998
	test/test_pcm_all.hxx \
	test/test_pcm_main.cxx
1999 2000
test_test_pcm_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_pcm_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2001 2002
test_test_pcm_LDADD = \
	$(PCM_LIBS) \
2003
	libutil.a \
2004
	$(CPPUNIT_LIBS) \
2005 2006
	$(GLIB_LIBS)

2007
test_test_archive_SOURCES = \
2008
	src/Log.cxx src/LogBackend.cxx \
2009 2010 2011 2012 2013
	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 \
2014
	libutil.a \
2015 2016 2017
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)

2018 2019
if ENABLE_DATABASE

2020
test_test_translate_song_SOURCES = \
2021
	src/playlist/PlaylistSong.cxx \
2022
	src/PlaylistError.cxx \
2023
	src/DetachedSong.cxx \
2024
	src/SongLoader.cxx \
2025 2026 2027 2028 2029
	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 = \
2030
	$(STORAGE_LIBS) \
2031
	libtag.a \
2032
	$(FS_LIBS) \
2033 2034 2035 2036 2037
	libsystem.a \
	libutil.a \
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)

2038 2039
endif

2040 2041 2042 2043 2044 2045 2046 2047 2048 2049
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)

2050
test_test_queue_priority_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
2051
	src/queue/Queue.cxx \
2052
	src/DetachedSong.cxx \
2053
	test/test_queue_priority.cxx
2054 2055
test_test_queue_priority_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_queue_priority_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2056
test_test_queue_priority_LDADD = \
2057
	libsystem.a \
2058
	libutil.a \
2059
	$(CPPUNIT_LIBS)
2060

Max Kellermann's avatar
Max Kellermann committed
2061
noinst_PROGRAMS += src/pcm/dsd2pcm/dsd2pcm
2062

Max Kellermann's avatar
Max Kellermann committed
2063 2064
src_pcm_dsd2pcm_dsd2pcm_SOURCES = \
	src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h \
2065
	src/pcm/dsd2pcm/dsd2pcm.hpp \
Max Kellermann's avatar
Max Kellermann committed
2066
	src/pcm/dsd2pcm/noiseshape.c src/pcm/dsd2pcm/noiseshape.h \
2067
	src/pcm/dsd2pcm/noiseshape.hpp \
Max Kellermann's avatar
Max Kellermann committed
2068 2069
	src/pcm/dsd2pcm/main.cpp
src_pcm_dsd2pcm_dsd2pcm_LDADD = libutil.a
2070

2071 2072 2073 2074 2075 2076 2077 2078
endif


#
# Documentation
#

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

2081
DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
2082

2083 2084 2085 2086
if ENABLE_DOCUMENTATION
protocoldir = $(docdir)/protocol
protocol_DATA = $(wildcard doc/protocol/*.html)

2087 2088 2089
userdir = $(docdir)/user
user_DATA = $(wildcard doc/user/*.html)

2090 2091 2092
developerdir = $(docdir)/developer
developer_DATA = $(wildcard doc/developer/*.html)

2093 2094 2095 2096
if HAVE_XMLTO

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

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

2100 2101 2102 2103 2104 2105
else

DOCBOOK_HTML =

endif

2106
doc/api/html/index.html: doc/doxygen.conf
2107
	@$(MKDIR_P) $(@D)
2108
	$(DOXYGEN) $<
2109

2110 2111 2112 2113 2114 2115 2116 2117
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
2118
	$(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
2119
		$(DESTDIR)$(docdir)/api/html
2120

2121 2122 2123
uninstall-local:
	rm -f $(DESTDIR)$(docdir)/api/html/*.*

2124
upload: $(DOCBOOK_HTML) doc/api/html/index.html
2125
	rsync -vpruz --delete doc/ www.musicpd.org:/var/www/doc/ \
2126 2127 2128
		--chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
		--include=protocol --include=protocol/** \
		--include=user --include=user/** \
2129
		--include=developer --include=developer/** \
2130 2131 2132
		--include=api --include=api/** \
		--exclude=*

2133 2134 2135
endif


2136 2137 2138
#
# Distribution
#
Eric Wong's avatar
Eric Wong committed
2139

2140
EXTRA_DIST = $(doc_DATA) autogen.sh \
2141 2142 2143
	test/test_archive_bzip2.sh  \
	test/test_archive_iso9660.sh \
	test/test_archive_zzip.sh \
2144
	$(wildcard scripts/*.sh) \
2145
	$(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
2146
	src/win32/mpd_win32_rc.rc.in src/win32/mpd.ico