Makefile.am 54.9 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
	libfs.a \
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 155
	src/db/PlaylistVector.cxx src/db/PlaylistVector.hxx \
	src/db/PlaylistInfo.hxx \
Max Kellermann's avatar
Max Kellermann committed
156 157 158 159
	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 \
160 161 162 163 164
	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 \
165 166
	src/ReplayGainConfig.cxx src/ReplayGainConfig.hxx \
	src/ReplayGainInfo.cxx src/ReplayGainInfo.hxx \
167
	src/DetachedSong.cxx src/DetachedSong.hxx \
168
	src/SongUpdate.cxx \
169
	src/SongLoader.cxx src/SongLoader.hxx \
Max Kellermann's avatar
Max Kellermann committed
170
	src/SongPrint.cxx src/SongPrint.hxx \
171 172
	src/SongSave.cxx src/SongSave.hxx \
	src/StateFile.cxx src/StateFile.hxx \
173
	src/Stats.cxx src/Stats.hxx \
Max Kellermann's avatar
Max Kellermann committed
174
	src/TagPrint.cxx src/TagPrint.hxx \
175
	src/TagSave.cxx src/TagSave.hxx \
176
	src/TagFile.cxx src/TagFile.hxx \
177
	src/TagStream.cxx src/TagStream.hxx \
178
	src/TimePrint.cxx src/TimePrint.hxx \
Max Kellermann's avatar
Max Kellermann committed
179
	src/mixer/Volume.cxx src/mixer/Volume.hxx \
180
	src/SongFilter.cxx src/SongFilter.hxx \
Max Kellermann's avatar
Max Kellermann committed
181
	src/PlaylistFile.cxx src/PlaylistFile.hxx
182

183 184 185 186 187 188 189 190 191
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

192
if ENABLE_DATABASE
193
libmpd_a_SOURCES += \
194
	src/queue/PlaylistUpdate.cxx \
195
	src/command/StorageCommands.cxx src/command/StorageCommands.hxx \
196
	src/command/DatabaseCommands.cxx src/command/DatabaseCommands.hxx \
197
	src/db/Count.cxx src/db/Count.hxx \
198 199 200 201 202 203 204 205 206 207 208 209 210 211
	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 \
212
	src/db/Configured.cxx src/db/Configured.hxx \
213 214 215 216 217 218 219
	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 \
220 221
	src/db/Interface.hxx \
	src/db/Stats.hxx \
222 223 224 225 226
	src/db/DatabaseListener.hxx \
	src/db/Visitor.hxx \
	src/db/Selection.cxx src/db/Selection.hxx
endif

227
UPNP_SOURCES = \
228
	src/lib/upnp/Init.cxx src/lib/upnp/Init.hxx \
229
	src/lib/upnp/ClientInit.cxx src/lib/upnp/ClientInit.hxx \
230 231 232 233 234
	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 \
235
	src/lib/upnp/Callback.hxx \
236 237 238 239
	src/lib/upnp/Util.cxx src/lib/upnp/Util.hxx \
	src/lib/upnp/WorkQueue.hxx \
	src/lib/upnp/Action.hxx

240 241 242 243 244
#
# Android native library
#

if ANDROID
Max Kellermann's avatar
Max Kellermann committed
245

246 247 248 249 250 251 252 253 254 255
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

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

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

267
src_mpd_LDADD += libandroid.a libjava.a
268

Max Kellermann's avatar
Max Kellermann committed
269 270 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
	mkdir -p android/build/include
	ln -s $(srcdir)/android/AndroidManifest.xml $(srcdir)/android/custom_rules.xml $(srcdir)/android/src $(srcdir)/android/res android/build
280
	$(ANDROID_SDK)/tools/android update project --path android/build --target android-17
Max Kellermann's avatar
Max Kellermann committed
281 282 283 284 285 286 287 288 289 290 291 292

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 $@
293
	$(STRIP) -o $@ $<
Max Kellermann's avatar
Max Kellermann committed
294 295 296 297 298 299 300 301 302 303 304 305 306

android/build/bin/Main-debug.apk: android/build/build.xml android/build/libs/armeabi-v7a/libmpd.so
	cd android/build && ant nodeps debug

android/build/bin/Main-release-unsigned.apk: android/build/build.xml android/build/libs/armeabi-v7a/libmpd.so
	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)

android/build/bin/Main.apk: android/build/bin/Main-release-unaligned.apk
	$(ANDROID_SDK)/tools/zipalign -f 4 $< $@

307 308
endif

309 310 311 312
#
# Windows resource file
#

313
src/win32/mpd_win32_rc.$(OBJEXT): src/win32/mpd_win32_rc.rc
314 315 316
	$(WINDRES) -i $< -o $@

if HAVE_WINDOWS
317
noinst_DATA = src/win32/mpd_win32_rc.rc
318

319 320
src_mpd_DEPENDENCIES = src/win32/mpd_win32_rc.$(OBJEXT)
src_mpd_LDFLAGS = -Wl,src/win32/mpd_win32_rc.$(OBJEXT)
321 322
endif

323
if ENABLE_DATABASE
324
if ENABLE_INOTIFY
325
libmpd_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
326 327 328 329
	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
330
endif
331
endif
332

333
if ENABLE_SQLITE
334
libmpd_a_SOURCES += \
335
	src/command/StickerCommands.cxx src/command/StickerCommands.hxx \
336 337 338
	src/sticker/StickerDatabase.cxx src/sticker/StickerDatabase.hxx \
	src/sticker/StickerPrint.cxx src/sticker/StickerPrint.hxx \
	src/sticker/SongSticker.cxx src/sticker/SongSticker.hxx
339 340
endif

341 342 343
# Generic utility library

libutil_a_SOURCES = \
344
	src/util/Macros.hxx \
345
	src/util/Cast.hxx \
346
	src/util/Clamp.hxx \
347
	src/util/Alloc.cxx src/util/Alloc.hxx \
348
	src/util/VarSize.hxx \
349
	src/util/Error.cxx src/util/Error.hxx \
350
	src/util/Domain.hxx \
351
	src/util/ReusableArray.hxx \
352
	src/util/ASCII.hxx \
353
	src/util/CharUtil.hxx \
354
	src/util/NumberParser.hxx \
355
	src/util/StringUtil.cxx src/util/StringUtil.hxx \
356
	src/util/SplitString.cxx src/util/SplitString.hxx \
357
	src/util/FormatString.cxx src/util/FormatString.hxx \
358
	src/util/Tokenizer.cxx src/util/Tokenizer.hxx \
Max Kellermann's avatar
Max Kellermann committed
359
	src/util/UriUtil.cxx src/util/UriUtil.hxx \
360
	src/util/Manual.hxx \
361
	src/util/RefCount.hxx \
362
	src/util/FifoBuffer.hxx \
363
	src/util/DynamicFifoBuffer.hxx \
364
	src/util/ConstBuffer.hxx \
365
	src/util/WritableBuffer.hxx \
366
	src/util/CircularBuffer.hxx \
367
	src/util/LazyRandomEngine.cxx src/util/LazyRandomEngine.hxx \
368
	src/util/SliceBuffer.hxx \
369
	src/util/HugeAllocator.cxx src/util/HugeAllocator.hxx \
370
	src/util/PeakBuffer.cxx src/util/PeakBuffer.hxx \
371
	src/util/OptionParser.cxx src/util/OptionParser.hxx \
372
	src/util/OptionDef.hxx \
373
	src/util/ByteReverse.cxx src/util/ByteReverse.hxx \
374 375
	src/util/bit_reverse.c src/util/bit_reverse.h

376 377 378
# Multi-threading library

libthread_a_SOURCES = \
379
	src/thread/Util.hxx \
380
	src/thread/Name.hxx \
381 382 383 384 385 386 387 388
	src/thread/Mutex.hxx \
	src/thread/PosixMutex.hxx \
	src/thread/CriticalSection.hxx \
	src/thread/GLibMutex.hxx \
	src/thread/Cond.hxx \
	src/thread/PosixCond.hxx \
	src/thread/WindowsCond.hxx \
	src/thread/GLibCond.hxx \
389
	src/thread/Thread.cxx src/thread/Thread.hxx \
390 391
	src/thread/Id.hxx

392 393 394
# System library

libsystem_a_SOURCES = \
395
	src/system/ByteOrder.hxx \
396 397 398
	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 \
399
	src/system/SocketError.cxx src/system/SocketError.hxx \
400
	src/system/Resolver.cxx src/system/Resolver.hxx \
401 402
	src/system/EventPipe.cxx src/system/EventPipe.hxx \
	src/system/EventFD.cxx src/system/EventFD.hxx \
403
	src/system/SignalFD.cxx src/system/SignalFD.hxx \
404
	src/system/EPollFD.cxx src/system/EPollFD.hxx \
405
	src/system/PeriodClock.hxx \
406
	src/system/Clock.cxx src/system/Clock.hxx
407

408 409 410
# Event loop library

libevent_a_SOURCES = \
411
	src/event/WakeFD.hxx \
412 413
	src/event/PollGroup.hxx \
	src/event/PollGroupEPoll.hxx \
414
	src/event/PollGroupPoll.hxx src/event/PollGroupPoll.cxx \
415 416
	src/event/PollGroupWinSelect.hxx src/event/PollGroupWinSelect.cxx \
	src/event/PollResultGeneric.hxx \
417
	src/event/SignalMonitor.hxx src/event/SignalMonitor.cxx \
418
	src/event/TimeoutMonitor.hxx src/event/TimeoutMonitor.cxx \
419
	src/event/IdleMonitor.hxx src/event/IdleMonitor.cxx \
420
	src/event/DeferredMonitor.hxx src/event/DeferredMonitor.cxx \
421 422
	src/event/SocketMonitor.cxx src/event/SocketMonitor.hxx \
	src/event/BufferedSocket.cxx src/event/BufferedSocket.hxx \
423
	src/event/FullyBufferedSocket.cxx src/event/FullyBufferedSocket.hxx \
424
	src/event/MultiSocketMonitor.cxx src/event/MultiSocketMonitor.hxx \
425
	src/event/ServerSocket.cxx src/event/ServerSocket.hxx \
426
	src/event/Call.hxx src/event/Call.cxx \
427
	src/event/Loop.cxx src/event/Loop.hxx
428

429 430 431 432 433 434
# 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

435 436 437 438 439
if HAVE_ICU
libicu_a_SOURCES += \
	src/lib/icu/Init.cxx src/lib/icu/Init.hxx
endif

nanotech's avatar
nanotech committed
440 441 442
libicu_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ICU_CFLAGS)

443 444
ICU_LDADD = libicu.a $(ICU_LIBS)

445 446 447
# PCM library

libpcm_a_SOURCES = \
448
	src/pcm/Domain.cxx src/pcm/Domain.hxx \
449
	src/pcm/Traits.hxx \
450
	src/pcm/PcmBuffer.cxx src/pcm/PcmBuffer.hxx \
451
	src/pcm/PcmExport.cxx src/pcm/PcmExport.hxx \
Max Kellermann's avatar
Max Kellermann committed
452 453
	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
454 455
	src/pcm/PcmDsd.cxx src/pcm/PcmDsd.hxx \
	src/pcm/PcmDsdUsb.cxx src/pcm/PcmDsdUsb.hxx \
456
	src/pcm/Volume.cxx src/pcm/Volume.hxx \
Max Kellermann's avatar
Max Kellermann committed
457 458
	src/pcm/PcmMix.cxx src/pcm/PcmMix.hxx \
	src/pcm/PcmChannels.cxx src/pcm/PcmChannels.hxx \
459
	src/pcm/PcmPack.cxx src/pcm/PcmPack.hxx \
Max Kellermann's avatar
Max Kellermann committed
460
	src/pcm/PcmFormat.cxx src/pcm/PcmFormat.hxx \
461 462
	src/pcm/FloatConvert.hxx \
	src/pcm/ShiftConvert.hxx \
463
	src/pcm/Neon.hxx \
464
	src/pcm/FormatConverter.cxx src/pcm/FormatConverter.hxx \
465
	src/pcm/ChannelsConverter.cxx src/pcm/ChannelsConverter.hxx \
466
	src/pcm/Resampler.hxx \
467
	src/pcm/GlueResampler.cxx src/pcm/GlueResampler.hxx \
468 469
	src/pcm/FallbackResampler.cxx src/pcm/FallbackResampler.hxx \
	src/pcm/ConfiguredResampler.cxx src/pcm/ConfiguredResampler.hxx \
Max Kellermann's avatar
Max Kellermann committed
470 471 472
	src/pcm/PcmDither.cxx src/pcm/PcmDither.hxx \
	src/pcm/PcmPrng.hxx \
	src/pcm/PcmUtils.hxx
473
libpcm_a_CPPFLAGS = $(AM_CPPFLAGS) \
474
	$(SOXR_CFLAGS) \
475
	$(SAMPLERATE_CFLAGS)
476 477 478

PCM_LIBS = \
	libpcm.a \
479
	$(SOXR_LIBS) \
480 481
	$(SAMPLERATE_LIBS)

482
if HAVE_LIBSAMPLERATE
483 484
libpcm_a_SOURCES += \
	src/pcm/LibsamplerateResampler.cxx src/pcm/LibsamplerateResampler.hxx
485 486
endif

487 488 489 490 491
if HAVE_SOXR
libpcm_a_SOURCES += \
	src/pcm/SoxrResampler.cxx src/pcm/SoxrResampler.hxx
endif

492 493 494
# File system library

libfs_a_SOURCES = \
495
	src/fs/Domain.cxx src/fs/Domain.hxx \
496
	src/fs/Limits.hxx \
Max Kellermann's avatar
Max Kellermann committed
497
	src/fs/Traits.cxx src/fs/Traits.hxx \
498 499
	src/fs/Config.cxx src/fs/Config.hxx \
	src/fs/Charset.cxx src/fs/Charset.hxx \
500
	src/fs/Path.cxx src/fs/Path.hxx \
501
	src/fs/AllocatedPath.cxx src/fs/AllocatedPath.hxx \
502
	src/fs/TextFile.cxx src/fs/TextFile.hxx \
503
	src/fs/FileSystem.cxx src/fs/FileSystem.hxx \
504
	src/fs/StandardDirectory.cxx src/fs/StandardDirectory.hxx \
505
	src/fs/CheckFile.cxx src/fs/CheckFile.hxx \
506 507
	src/fs/DirectoryReader.hxx

508 509
# Storage library

510
SMBCLIENT_SOURCES = \
511
	src/lib/smbclient/Domain.cxx src/lib/smbclient/Domain.hxx \
512
	src/lib/smbclient/Mutex.cxx src/lib/smbclient/Mutex.hxx \
513 514
	src/lib/smbclient/Init.cxx src/lib/smbclient/Init.hxx

515
NFS_SOURCES = \
516 517 518 519 520 521
	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 \
522 523
	src/lib/nfs/Domain.cxx src/lib/nfs/Domain.hxx

524 525 526 527 528
if ENABLE_DATABASE

noinst_LIBRARIES += libstorage.a

libstorage_a_SOURCES = \
529 530
	src/storage/StoragePlugin.hxx \
	src/storage/Registry.cxx src/storage/Registry.hxx \
531
	src/storage/StorageInterface.cxx src/storage/StorageInterface.hxx \
532
	src/storage/CompositeStorage.cxx src/storage/CompositeStorage.hxx \
533
	src/storage/Configured.cxx src/storage/Configured.hxx \
534
	src/storage/plugins/LocalStorage.cxx src/storage/plugins/LocalStorage.hxx \
535 536
	src/storage/FileInfo.hxx

537
libstorage_a_CPPFLAGS = $(AM_CPPFLAGS) \
538
	$(NFS_CFLAGS) \
539 540
	$(SMBCLIENT_CFLAGS)

541 542
STORAGE_LIBS = libstorage.a

543 544
if ENABLE_SMBCLIENT
libstorage_a_SOURCES += \
545
	$(SMBCLIENT_SOURCES) \
546 547 548
	src/storage/plugins/SmbclientStorage.cxx src/neighbor/plugins/SmbclientStorage.hxx
endif

549 550
if ENABLE_NFS
libstorage_a_SOURCES += \
551
	$(NFS_SOURCES) \
552 553 554
	src/storage/plugins/NfsStorage.cxx src/neighbor/plugins/NfsStorage.hxx
endif

555 556
endif

557 558 559 560
# neighbor plugins

if ENABLE_NEIGHBOR_PLUGINS

561
libmpd_a_SOURCES += \
562 563 564
	src/command/NeighborCommands.cxx \
	src/command/NeighborCommands.hxx

565 566
noinst_LIBRARIES += libneighbor.a

567 568 569 570 571 572 573 574 575 576 577 578 579
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 += \
580
	$(SMBCLIENT_SOURCES) \
581 582 583 584 585 586 587
	src/neighbor/plugins/SmbclientNeighborPlugin.cxx src/neighbor/plugins/SmbclientNeighborPlugin.hxx
endif

NEIGHBOR_LIBS = \
	$(SMBCLIENT_LIBS) \
	libneighbor.a

588 589 590 591 592 593 594 595 596
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

597 598
endif

599 600
# database plugins

601 602 603 604
if ENABLE_DATABASE

noinst_LIBRARIES += libdb_plugins.a

605
libdb_plugins_a_SOURCES = \
606
	src/PlaylistDatabase.cxx src/PlaylistDatabase.hxx \
Max Kellermann's avatar
Max Kellermann committed
607 608
	src/db/Registry.cxx src/db/Registry.hxx \
	src/db/Helpers.cxx src/db/Helpers.hxx \
609
	src/db/UniqueTags.cxx src/db/UniqueTags.hxx \
610 611 612 613
	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
614
	src/db/plugins/LazyDatabase.cxx src/db/plugins/LazyDatabase.hxx \
615 616 617 618 619 620
	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
621 622 623
	src/db/plugins/simple/Mount.cxx \
	src/db/plugins/simple/Mount.hxx \
	src/db/plugins/simple/PrefixedLightSong.hxx \
624 625
	src/db/plugins/simple/SimpleDatabasePlugin.cxx \
	src/db/plugins/simple/SimpleDatabasePlugin.hxx
626

627 628
if HAVE_LIBMPDCLIENT
libdb_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
629
	src/db/plugins/ProxyDatabasePlugin.cxx src/db/plugins/ProxyDatabasePlugin.hxx
630 631
endif

632
DB_LIBS = \
633 634
	libdb_plugins.a \
	$(LIBMPDCLIENT_LIBS)
635

636 637
if HAVE_LIBUPNP
libdb_plugins_a_SOURCES += \
638
	$(UPNP_SOURCES) \
639
	src/db/plugins/upnp/UpnpDatabasePlugin.cxx src/db/plugins/upnp/UpnpDatabasePlugin.hxx \
Max Kellermann's avatar
Max Kellermann committed
640
	src/db/plugins/upnp/Tags.cxx src/db/plugins/upnp/Tags.hxx \
641
	src/db/plugins/upnp/ContentDirectoryService.cxx \
Max Kellermann's avatar
Max Kellermann committed
642 643
	src/db/plugins/upnp/Directory.cxx src/db/plugins/upnp/Directory.hxx \
	src/db/plugins/upnp/Object.cxx src/db/plugins/upnp/Object.hxx
644 645 646 647 648
DB_LIBS += \
	$(EXPAT_LIBS) \
	$(UPNP_LIBS)
endif

649 650
endif

651 652
# archive plugins

653 654 655 656
if ENABLE_ARCHIVE

noinst_LIBRARIES += libarchive.a

657
libmpd_a_SOURCES +=  \
658
	src/db/update/Archive.cxx
659

660
libarchive_a_SOURCES = \
661 662 663 664 665 666
	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
667
	src/input/plugins/ArchiveInputPlugin.cxx src/input/plugins/ArchiveInputPlugin.hxx
668
libarchive_a_CPPFLAGS = $(AM_CPPFLAGS) \
669
	$(BZ2_CFLAGS) \
670
	$(ISO9660_CFLAGS) \
671 672 673
	$(ZZIP_CFLAGS)

ARCHIVE_LIBS = \
674
	libarchive.a \
675
	$(BZ2_LIBS) \
676
	$(ISO9660_LIBS) \
677 678
	$(ZZIP_LIBS)

679
if HAVE_BZ2
680
libarchive_a_SOURCES += \
681 682
	src/archive/plugins/Bzip2ArchivePlugin.cxx \
	src/archive/plugins/Bzip2ArchivePlugin.hxx
683 684
endif

685
if HAVE_ZZIP
686
libarchive_a_SOURCES += \
687 688
	src/archive/plugins/ZzipArchivePlugin.cxx \
	src/archive/plugins/ZzipArchivePlugin.hxx
689 690
endif

691
if HAVE_ISO9660
692
libarchive_a_SOURCES += \
693 694
	src/archive/plugins/Iso9660ArchivePlugin.cxx \
	src/archive/plugins/Iso9660ArchivePlugin.hxx
695 696
endif

697 698
else
ARCHIVE_LIBS =
699 700
endif

701 702 703
# configuration library

libconf_a_SOURCES = \
704 705 706 707 708 709 710 711 712
	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
713

714 715
# tag plugins

716
libtag_a_CPPFLAGS = $(AM_CPPFLAGS) \
717 718
	$(ID3TAG_CFLAGS)
TAG_LIBS = \
719
	libtag.a \
720 721
	$(ID3TAG_LIBS)

722
libtag_a_SOURCES =\
723 724
	src/tag/TagType.h \
	src/tag/Tag.cxx src/tag/Tag.hxx \
725
	src/tag/TagBuilder.cxx src/tag/TagBuilder.hxx \
726
	src/tag/TagItem.hxx \
727
	src/tag/TagHandler.cxx src/tag/TagHandler.hxx \
728
	src/tag/TagSettings.c src/tag/TagSettings.h \
729
	src/tag/TagConfig.cxx src/tag/TagConfig.hxx \
730
	src/tag/TagNames.c \
731
	src/tag/TagString.cxx src/tag/TagString.hxx \
732 733
	src/tag/TagPool.cxx src/tag/TagPool.hxx \
	src/tag/TagTable.cxx src/tag/TagTable.hxx \
734
	src/tag/Set.cxx src/tag/Set.hxx \
735 736 737
	src/tag/ApeLoader.cxx src/tag/ApeLoader.hxx \
	src/tag/ApeReplayGain.cxx src/tag/ApeReplayGain.hxx \
	src/tag/ApeTag.cxx src/tag/ApeTag.hxx
738 739

if HAVE_ID3TAG
740
libtag_a_SOURCES += \
741 742
	src/tag/TagId3.cxx src/tag/TagId3.hxx \
	src/tag/TagRva2.cxx src/tag/TagRva2.hxx \
743 744
	src/tag/Riff.cxx src/tag/Riff.hxx \
	src/tag/Aiff.cxx src/tag/Aiff.hxx
745 746
endif

747 748
# decoder plugins

749
libdecoder_a_SOURCES = \
750 751 752 753 754 755 756 757 758 759 760
	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
761
libdecoder_a_CPPFLAGS = $(AM_CPPFLAGS) \
762
	$(VORBIS_CFLAGS) $(TREMOR_CFLAGS) \
763
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
764
	$(SNDFILE_CFLAGS) \
765 766
	$(AUDIOFILE_CFLAGS) \
	$(LIBMIKMOD_CFLAGS) \
767
	$(GME_CFLAGS) \
768 769 770
	$(SIDPLAY_CFLAGS) \
	$(FLUIDSYNTH_CFLAGS) \
	$(WILDMIDI_CFLAGS) \
771
	$(WAVPACK_CFLAGS) \
772
	$(MAD_CFLAGS) \
773
	$(MPG123_CFLAGS) \
774
	$(OPUS_CFLAGS) \
775
	$(FFMPEG_CFLAGS) \
776
	$(MPCDEC_CFLAGS) \
777
	$(ADPLUG_CFLAGS) \
778
	$(FAAD_CFLAGS)
779 780

DECODER_LIBS = \
781
	libdecoder.a \
782
	$(VORBIS_LIBS) $(TREMOR_LIBS) \
783
	$(FLAC_LIBS) \
784
	$(SNDFILE_LIBS) \
785
	$(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
786
	$(GME_LIBS) \
787 788 789
	$(SIDPLAY_LIBS) \
	$(FLUIDSYNTH_LIBS) \
	$(WILDMIDI_LIBS) \
790
	$(WAVPACK_LIBS) \
791
	$(MAD_LIBS) \
792
	$(MPG123_LIBS) \
793
	$(OPUS_LIBS) \
794
	$(FFMPEG_LIBS) \
795
	$(MPCDEC_LIBS) \
796
	$(ADPLUG_LIBS) \
797
	$(FAAD_LIBS)
798

799
if HAVE_MAD
800
libdecoder_a_SOURCES += \
801 802
	src/decoder/plugins/MadDecoderPlugin.cxx \
	src/decoder/plugins/MadDecoderPlugin.hxx
803 804
endif

805
if HAVE_MPG123
806
libdecoder_a_SOURCES += \
807 808
	src/decoder/plugins/Mpg123DecoderPlugin.cxx \
	src/decoder/plugins/Mpg123DecoderPlugin.hxx
809 810
endif

811
if HAVE_MPCDEC
812
libdecoder_a_SOURCES += \
813 814
	src/decoder/plugins/MpcdecDecoderPlugin.cxx \
	src/decoder/plugins/MpcdecDecoderPlugin.hxx
815 816
endif

817
if HAVE_OPUS
818
libdecoder_a_SOURCES += \
819 820 821 822 823 824 825 826 827 828 829 830
	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
831 832
endif

833
if HAVE_WAVPACK
834
libdecoder_a_SOURCES += \
835 836
	src/decoder/plugins/WavpackDecoderPlugin.cxx \
	src/decoder/plugins/WavpackDecoderPlugin.hxx
837 838
endif

839
if HAVE_ADPLUG
840
libdecoder_a_SOURCES += \
841 842
	src/decoder/plugins/AdPlugDecoderPlugin.cxx \
	src/decoder/plugins/AdPlugDecoderPlugin.h
843 844
endif

845
if HAVE_FAAD
846
libdecoder_a_SOURCES += \
847
	src/decoder/plugins/FaadDecoderPlugin.cxx src/decoder/plugins/FaadDecoderPlugin.hxx
848 849
endif

850
if HAVE_XIPH
851
libdecoder_a_SOURCES += \
852 853
	src/decoder/plugins/XiphTags.cxx src/decoder/plugins/XiphTags.hxx \
	src/decoder/plugins/OggCodec.cxx src/decoder/plugins/OggCodec.hxx
854 855
endif

856
if ENABLE_VORBIS_DECODER
857
libdecoder_a_SOURCES += \
858 859 860
	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
861 862 863
endif

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

if HAVE_AUDIOFILE
876
libdecoder_a_SOURCES += \
877 878
	src/decoder/plugins/AudiofileDecoderPlugin.cxx \
	src/decoder/plugins/AudiofileDecoderPlugin.hxx
879 880
endif

881
if ENABLE_MIKMOD_DECODER
882
libdecoder_a_SOURCES += \
883 884
	src/decoder/plugins/MikmodDecoderPlugin.cxx \
	src/decoder/plugins/MikmodDecoderPlugin.hxx
885 886 887
endif

if HAVE_MODPLUG
888
libmodplug_decoder_plugin_a_SOURCES = \
889 890
	src/decoder/plugins/ModplugDecoderPlugin.cxx \
	src/decoder/plugins/ModplugDecoderPlugin.hxx
891
libmodplug_decoder_plugin_a_CXXFLAGS = $(AM_CXXFLAGS) $(MODPLUG_CFLAGS)
892
libmodplug_decoder_plugin_a_CPPFLAGS = $(AM_CPPFLAGS)
893 894
noinst_LIBRARIES += libmodplug_decoder_plugin.a
DECODER_LIBS += libmodplug_decoder_plugin.a $(MODPLUG_LIBS)
895 896 897
endif

if ENABLE_SIDPLAY
898
libdecoder_a_SOURCES += \
899 900
	src/decoder/plugins/SidplayDecoderPlugin.cxx \
	src/decoder/plugins/SidplayDecoderPlugin.hxx
901 902 903
endif

if ENABLE_FLUIDSYNTH
904
libdecoder_a_SOURCES += \
905 906
	src/decoder/plugins/FluidsynthDecoderPlugin.cxx \
	src/decoder/plugins/FluidsynthDecoderPlugin.hxx
907 908 909
endif

if ENABLE_WILDMIDI
910
libdecoder_a_SOURCES += \
911 912
	src/decoder/plugins/WildmidiDecoderPlugin.cxx \
	src/decoder/plugins/WildmidiDecoderPlugin.hxx
913 914 915
endif

if HAVE_FFMPEG
916
libdecoder_a_SOURCES += \
917 918 919 920
	src/decoder/plugins/FfmpegMetaData.cxx \
	src/decoder/plugins/FfmpegMetaData.hxx \
	src/decoder/plugins/FfmpegDecoderPlugin.cxx \
	src/decoder/plugins/FfmpegDecoderPlugin.hxx
921 922
endif

923
if ENABLE_SNDFILE
924
libdecoder_a_SOURCES += \
925 926
	src/decoder/plugins/SndfileDecoderPlugin.cxx \
	src/decoder/plugins/SndfileDecoderPlugin.hxx
927 928
endif

929
if HAVE_GME
930
libdecoder_a_SOURCES += \
931
	src/decoder/plugins/GmeDecoderPlugin.cxx src/decoder/plugins/GmeDecoderPlugin.hxx
932 933
endif

934 935
# encoder plugins

936 937 938 939 940
if ENABLE_ENCODER

noinst_LIBRARIES += libencoder_plugins.a

libencoder_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
941
	$(LAME_CFLAGS) \
942
	$(TWOLAME_CFLAGS) \
943
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
944
	$(OPUS_CFLAGS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
945
	$(SHINE_CFLAGS) \
946 947 948
	$(VORBISENC_CFLAGS)

ENCODER_LIBS = \
949
	libencoder_plugins.a \
950
	$(LAME_LIBS) \
951
	$(TWOLAME_LIBS) \
952
	$(FLAC_LIBS) \
953
	$(OPUS_LIBS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
954
	$(SHINE_LIBS) \
955 956
	$(VORBISENC_LIBS)

957
libencoder_plugins_a_SOURCES = \
958 959
	src/encoder/EncoderAPI.hxx \
	src/encoder/EncoderPlugin.hxx \
960 961 962 963
	src/encoder/plugins/OggStream.hxx \
	src/encoder/plugins/NullEncoderPlugin.cxx \
	src/encoder/plugins/NullEncoderPlugin.hxx \
	src/encoder/EncoderList.cxx src/encoder/EncoderList.hxx
964

965 966
if HAVE_OGG_ENCODER
libencoder_plugins_a_SOURCES += \
967 968 969
	src/encoder/plugins/OggSerial.cxx \
	src/encoder/plugins/OggSerial.hxx \
	src/encoder/plugins/OggStream.hxx
970 971
endif

972
if ENABLE_WAVE_ENCODER
973
libencoder_plugins_a_SOURCES += \
974 975
	src/encoder/plugins/WaveEncoderPlugin.cxx \
	src/encoder/plugins/WaveEncoderPlugin.hxx
976 977
endif

978
if ENABLE_VORBIS_ENCODER
979
libencoder_plugins_a_SOURCES += \
980 981
	src/encoder/plugins/VorbisEncoderPlugin.cxx \
	src/encoder/plugins/VorbisEncoderPlugin.hxx
982 983
endif

984 985
if HAVE_OPUS
libencoder_plugins_a_SOURCES += \
986 987
	src/encoder/plugins/OpusEncoderPlugin.cxx \
	src/encoder/plugins/OpusEncoderPlugin.hxx
988 989
endif

990
if ENABLE_LAME_ENCODER
991
libencoder_plugins_a_SOURCES += \
992 993
	src/encoder/plugins/LameEncoderPlugin.cxx \
	src/encoder/plugins/LameEncoderPlugin.hxx
994
endif
995 996

if ENABLE_TWOLAME_ENCODER
997
libencoder_plugins_a_SOURCES += \
998 999
	src/encoder/plugins/TwolameEncoderPlugin.cxx \
	src/encoder/plugins/TwolameEncoderPlugin.hxx
1000
endif
1001 1002

if ENABLE_FLAC_ENCODER
1003
libencoder_plugins_a_SOURCES += \
1004 1005
	src/encoder/plugins/FlacEncoderPlugin.cxx \
	src/encoder/plugins/FlacEncoderPlugin.hxx
1006
endif
1007

Andrée Ekroth's avatar
Andrée Ekroth committed
1008 1009
if ENABLE_SHINE_ENCODER
libencoder_plugins_a_SOURCES += \
1010 1011
	src/encoder/plugins/ShineEncoderPlugin.cxx \
	src/encoder/plugins/ShineEncoderPlugin.hxx
Andrée Ekroth's avatar
Andrée Ekroth committed
1012 1013
endif

1014 1015
else
ENCODER_LIBS =
1016 1017 1018 1019
endif


if HAVE_ZEROCONF
1020
libmpd_a_SOURCES += \
1021 1022
	src/zeroconf/ZeroconfInternal.hxx \
	src/zeroconf/ZeroconfGlue.cxx src/zeroconf/ZeroconfGlue.hxx
1023 1024

if HAVE_AVAHI
1025
libmpd_a_SOURCES += \
1026 1027
	src/zeroconf/AvahiPoll.cxx src/zeroconf/AvahiPoll.hxx \
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/ZeroconfAvahi.hxx
1028 1029 1030
endif

if HAVE_BONJOUR
1031
libmpd_a_SOURCES += src/zeroconf/ZeroconfBonjour.cxx src/zeroconf/ZeroconfBonjour.hxx
1032 1033 1034
endif
endif

1035 1036 1037 1038
#
# input plugins
#

1039
libinput_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1040 1041
	src/input/Init.cxx src/input/Init.hxx \
	src/input/Registry.cxx src/input/Registry.hxx \
1042
	src/input/Open.cxx \
Max Kellermann's avatar
Max Kellermann committed
1043 1044 1045
	src/input/InputStream.cxx src/input/InputStream.hxx \
	src/input/InputPlugin.hxx \
	src/input/TextInputStream.cxx src/input/TextInputStream.hxx \
1046
	src/input/ThreadInputStream.cxx src/input/ThreadInputStream.hxx \
1047
	src/input/AsyncInputStream.cxx src/input/AsyncInputStream.hxx \
1048
	src/input/ProxyInputStream.cxx src/input/ProxyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1049 1050
	src/input/plugins/RewindInputPlugin.cxx src/input/plugins/RewindInputPlugin.hxx \
	src/input/plugins/FileInputPlugin.cxx src/input/plugins/FileInputPlugin.hxx
1051 1052

libinput_a_CPPFLAGS = $(AM_CPPFLAGS) \
1053
	$(CURL_CFLAGS) \
1054
	$(SMBCLIENT_CFLAGS) \
1055
	$(NFS_CFLAGS) \
1056
	$(CDIO_PARANOIA_CFLAGS) \
1057
	$(FFMPEG_CFLAGS) \
1058
	$(DESPOTIFY_CFLAGS) \
1059 1060 1061
	$(MMS_CFLAGS)

INPUT_LIBS = \
1062
	libinput.a \
1063
	$(CURL_LIBS) \
1064
	$(SMBCLIENT_LIBS) \
1065
	$(NFS_LIBS) \
1066
	$(CDIO_PARANOIA_LIBS) \
1067
	$(FFMPEG_LIBS) \
1068
	$(DESPOTIFY_LIBS) \
1069 1070
	$(MMS_LIBS)

1071 1072
if HAVE_ALSA
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1073 1074
	src/input/plugins/AlsaInputPlugin.cxx \
	src/input/plugins/AlsaInputPlugin.hxx
1075 1076 1077 1078
INPUT_LIBS += $(ALSA_LIBS)
endif


1079
if ENABLE_CURL
1080
libinput_a_SOURCES += \
1081
	src/input/IcyInputStream.cxx src/input/IcyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1082
	src/input/plugins/CurlInputPlugin.cxx src/input/plugins/CurlInputPlugin.hxx \
1083
	src/IcyMetaDataParser.cxx src/IcyMetaDataParser.hxx
1084
endif
1085

1086 1087
if ENABLE_SMBCLIENT
libinput_a_SOURCES += \
1088
	$(SMBCLIENT_SOURCES) \
Max Kellermann's avatar
Max Kellermann committed
1089
	src/input/plugins/SmbclientInputPlugin.cxx src/input/plugins/SmbclientInputPlugin.hxx
1090 1091
endif

1092 1093
if ENABLE_NFS
libinput_a_SOURCES += \
1094
	$(NFS_SOURCES) \
1095 1096 1097
	src/input/plugins/NfsInputPlugin.cxx src/input/plugins/NfsInputPlugin.hxx
endif

1098
if ENABLE_CDIO_PARANOIA
1099
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1100 1101
	src/input/plugins/CdioParanoiaInputPlugin.cxx \
	src/input/plugins/CdioParanoiaInputPlugin.hxx
1102 1103
endif

1104
if HAVE_FFMPEG
1105
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1106
	src/input/plugins/FfmpegInputPlugin.cxx src/input/plugins/FfmpegInputPlugin.hxx
1107 1108
endif

1109
if ENABLE_MMS
1110
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1111
	src/input/plugins/MmsInputPlugin.cxx src/input/plugins/MmsInputPlugin.hxx
1112 1113
endif

1114
if ENABLE_DESPOTIFY
1115
libinput_a_SOURCES += \
1116 1117
	src/lib/despotify/DespotifyUtils.cxx \
	src/lib/despotify/DespotifyUtils.hxx \
Max Kellermann's avatar
Max Kellermann committed
1118 1119
	src/input/plugins/DespotifyInputPlugin.cxx \
	src/input/plugins/DespotifyInputPlugin.hxx
1120 1121
endif

1122

1123
liboutput_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1124 1125
	$(AO_CFLAGS) \
	$(ALSA_CFLAGS) \
1126
	$(JACK_CFLAGS) \
1127
	$(OPENAL_CFLAGS) \
1128
	$(OPENSSL_CFLAGS) \
1129
	$(PULSE_CFLAGS) \
1130 1131 1132
	$(SHOUT_CFLAGS)

OUTPUT_LIBS = \
1133
	liboutput_plugins.a \
1134
	$(LIBWRAP_LDFLAGS) \
1135 1136
	$(AO_LIBS) \
	$(ALSA_LIBS) \
1137
	$(ROAR_LIBS) \
1138
	$(JACK_LIBS) \
1139
	$(OPENAL_LIBS) \
1140
	$(PULSE_LIBS) \
1141 1142
	$(SHOUT_LIBS)

1143
OUTPUT_API_SRC = \
1144
	src/output/OutputAPI.hxx \
1145 1146
	src/output/Internal.hxx \
	src/output/Registry.cxx src/output/Registry.hxx \
1147
	src/output/MultipleOutputs.cxx src/output/MultipleOutputs.hxx \
1148
	src/output/OutputThread.cxx \
1149
	src/output/Domain.cxx src/output/Domain.hxx \
1150
	src/output/OutputControl.cxx \
1151 1152 1153 1154
	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 \
1155 1156
	src/output/Finish.cxx \
	src/output/Init.cxx
1157

1158
liboutput_plugins_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1159
	src/output/Timer.cxx src/output/Timer.hxx \
1160 1161
	src/output/plugins/NullOutputPlugin.cxx \
	src/output/plugins/NullOutputPlugin.hxx
1162

1163 1164 1165 1166
MIXER_LIBS = \
	libmixer_plugins.a \
	$(PULSE_LIBS)

1167
MIXER_API_SRC = \
1168
	src/mixer/Listener.hxx \
Max Kellermann's avatar
Max Kellermann committed
1169 1170 1171 1172
	src/mixer/MixerPlugin.hxx \
	src/mixer/MixerList.hxx \
	src/mixer/MixerControl.cxx src/mixer/MixerControl.hxx \
	src/mixer/MixerType.cxx src/mixer/MixerType.hxx \
1173
	src/mixer/MixerAll.cxx \
Max Kellermann's avatar
Max Kellermann committed
1174
	src/mixer/MixerInternal.hxx
1175

1176
libmixer_plugins_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1177 1178
	src/mixer/plugins/SoftwareMixerPlugin.cxx \
	src/mixer/plugins/SoftwareMixerPlugin.hxx
1179 1180 1181
libmixer_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ALSA_CFLAGS) \
	$(PULSE_CFLAGS)
1182

1183
if HAVE_ALSA
1184
liboutput_plugins_a_SOURCES += \
1185 1186
	src/output/plugins/AlsaOutputPlugin.cxx \
	src/output/plugins/AlsaOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1187
libmixer_plugins_a_SOURCES += src/mixer/plugins/AlsaMixerPlugin.cxx
1188 1189
endif

1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200
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

1201
if HAVE_ROAR
1202
liboutput_plugins_a_SOURCES += \
1203 1204
	src/output/plugins/RoarOutputPlugin.cxx \
	src/output/plugins/RoarOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1205
libmixer_plugins_a_SOURCES += src/mixer/plugins/RoarMixerPlugin.cxx
1206 1207
endif

1208
if HAVE_AO
1209
liboutput_plugins_a_SOURCES += \
1210 1211
	src/output/plugins/AoOutputPlugin.cxx \
	src/output/plugins/AoOutputPlugin.hxx
1212 1213 1214
endif

if HAVE_FIFO
1215
liboutput_plugins_a_SOURCES += \
1216 1217
	src/output/plugins/FifoOutputPlugin.cxx \
	src/output/plugins/FifoOutputPlugin.hxx
1218 1219
endif

1220
if ENABLE_PIPE_OUTPUT
1221
liboutput_plugins_a_SOURCES += \
1222 1223
	src/output/plugins/PipeOutputPlugin.cxx \
	src/output/plugins/PipeOutputPlugin.hxx
1224 1225
endif

1226
if HAVE_JACK
1227
liboutput_plugins_a_SOURCES += \
1228 1229
	src/output/plugins/JackOutputPlugin.cxx \
	src/output/plugins/JackOutputPlugin.hxx
1230 1231 1232
endif

if HAVE_OSS
1233
liboutput_plugins_a_SOURCES += \
1234 1235
	src/output/plugins/OssOutputPlugin.cxx \
	src/output/plugins/OssOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1236
libmixer_plugins_a_SOURCES += src/mixer/plugins/OssMixerPlugin.cxx
1237 1238
endif

Serge Ziryukin's avatar
Serge Ziryukin committed
1239
if HAVE_OPENAL
1240
liboutput_plugins_a_SOURCES += \
1241 1242
	src/output/plugins/OpenALOutputPlugin.cxx \
	src/output/plugins/OpenALOutputPlugin.hxx
Serge Ziryukin's avatar
Serge Ziryukin committed
1243 1244
endif

1245
if HAVE_OSX
1246
liboutput_plugins_a_SOURCES += \
1247 1248
	src/output/plugins/OSXOutputPlugin.cxx \
	src/output/plugins/OSXOutputPlugin.hxx
1249 1250 1251
endif

if HAVE_PULSE
1252
liboutput_plugins_a_SOURCES += \
1253 1254
	src/output/plugins/PulseOutputPlugin.cxx \
	src/output/plugins/PulseOutputPlugin.hxx
1255
libmixer_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1256
	src/mixer/plugins/PulseMixerPlugin.cxx src/mixer/plugins/PulseMixerPlugin.hxx
1257 1258 1259
endif

if HAVE_SHOUT
1260
liboutput_plugins_a_SOURCES += \
1261 1262
	src/output/plugins/ShoutOutputPlugin.cxx \
	src/output/plugins/ShoutOutputPlugin.hxx
1263 1264
endif

1265
if ENABLE_RECORDER_OUTPUT
1266
liboutput_plugins_a_SOURCES += \
1267 1268
	src/output/plugins/RecorderOutputPlugin.cxx \
	src/output/plugins/RecorderOutputPlugin.hxx
1269 1270
endif

1271
if ENABLE_HTTPD_OUTPUT
1272
liboutput_plugins_a_SOURCES += \
1273 1274 1275 1276 1277 1278 1279 1280
	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
1281 1282
endif

1283
if ENABLE_SOLARIS_OUTPUT
1284
liboutput_plugins_a_SOURCES += \
1285
	src/output/plugins/SolarisOutputPlugin.cxx src/output/plugins/SolarisOutputPlugin.hxx
1286 1287
endif

1288
if ENABLE_WINMM_OUTPUT
1289
liboutput_plugins_a_SOURCES += \
1290 1291
	src/output/plugins/WinmmOutputPlugin.cxx \
	src/output/plugins/WinmmOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1292
libmixer_plugins_a_SOURCES += src/mixer/plugins/WinmmMixerPlugin.cxx
1293 1294
endif

1295

1296 1297 1298 1299
#
# Playlist plugins
#

1300
libplaylist_plugins_a_SOURCES = \
1301 1302
	src/playlist/PlaylistPlugin.hxx \
	src/playlist/SongEnumerator.hxx \
1303 1304
	src/playlist/CloseSongEnumerator.cxx \
	src/playlist/CloseSongEnumerator.hxx \
1305 1306
	src/playlist/MemorySongEnumerator.cxx \
	src/playlist/MemorySongEnumerator.hxx \
1307
	src/playlist/cue/CueParser.cxx src/playlist/cue/CueParser.hxx \
1308 1309 1310 1311 1312 1313 1314 1315 1316
	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
1317
libplaylist_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1318
	$(EXPAT_CFLAGS) \
1319
	$(YAJL_CFLAGS) \
1320
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS))
1321 1322 1323

PLAYLIST_LIBS = \
	libplaylist_plugins.a \
1324
	$(EXPAT_LIBS) \
1325
	$(FLAC_LIBS)
1326

1327
if ENABLE_DESPOTIFY
1328
libplaylist_plugins_a_SOURCES += \
1329 1330 1331 1332
	src/lib/despotify/DespotifyUtils.cxx \
	src/lib/despotify/DespotifyUtils.hxx \
       src/playlist/plugins/DespotifyPlaylistPlugin.cxx \
       src/playlist/plugins/DespotifyPlaylistPlugin.hxx
1333 1334
endif

1335 1336
if ENABLE_SOUNDCLOUD
libplaylist_plugins_a_SOURCES += \
1337 1338
	src/playlist/plugins/SoundCloudPlaylistPlugin.cxx \
	src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
1339
PLAYLIST_LIBS += $(YAJL_LIBS)
1340
endif
1341

1342
if HAVE_EXPAT
1343
libplaylist_plugins_a_SOURCES += \
1344
	src/lib/expat/ExpatParser.cxx src/lib/expat/ExpatParser.hxx \
1345 1346 1347 1348 1349 1350
	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
1351 1352
endif

1353 1354
if HAVE_GLIB
libplaylist_plugins_a_SOURCES += \
1355 1356
	src/playlist/plugins/PlsPlaylistPlugin.cxx \
	src/playlist/plugins/PlsPlaylistPlugin.hxx
1357 1358
endif

1359 1360 1361 1362
#
# Filter plugins
#

1363
libfilter_plugins_a_SOURCES = \
1364 1365 1366
	src/AudioCompress/config.h \
	src/AudioCompress/compress.h \
	src/AudioCompress/compress.c \
1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379
	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
1380

1381 1382 1383 1384
FILTER_LIBS = \
	libfilter_plugins.a \
	$(PCM_LIBS)

1385

1386 1387 1388 1389 1390 1391
#
# systemd unit
#

if HAVE_SYSTEMD
systemdsystemunit_DATA = \
1392
	systemd/mpd.socket \
1393
	systemd/mpd.service
1394 1395
endif

1396 1397 1398 1399 1400 1401 1402

#
# Test programs
#

if ENABLE_TEST

1403
C_TESTS = \
1404
	test/test_util \
1405
	test/test_byte_reverse \
1406
	test/test_rewind \
1407
	test/test_mixramp \
1408
	test/test_pcm \
1409
	test/test_queue_priority
1410

1411 1412 1413 1414
if ENABLE_CURL
C_TESTS += test/test_icy_parser
endif

1415 1416 1417 1418
if ENABLE_DATABASE
C_TESTS += test/test_translate_song
endif

1419 1420 1421 1422
if ENABLE_ARCHIVE
C_TESTS += test/test_archive
endif

1423
TESTS = $(C_TESTS)
1424

1425
noinst_PROGRAMS = \
1426
	$(C_TESTS) \
1427
	test/read_conf \
1428
	test/run_resolver \
1429
	test/run_input \
1430
	test/dump_text_file \
1431
	test/dump_playlist \
1432
	test/run_decoder \
1433
	test/read_tags \
1434
	test/run_filter \
1435
	test/run_output \
1436
	test/run_convert \
1437
	test/run_normalize \
1438 1439
	test/software_volume

1440 1441 1442 1443
if ENABLE_DATABASE
noinst_PROGRAMS += test/DumpDatabase
endif

1444 1445 1446 1447
if ENABLE_NEIGHBOR_PLUGINS
noinst_PROGRAMS += test/run_neighbor_explorer
endif

1448 1449 1450 1451
if HAVE_AVAHI
noinst_PROGRAMS += test/run_avahi
endif

1452 1453 1454 1455
if ENABLE_ARCHIVE
noinst_PROGRAMS += test/visit_archive
endif

1456 1457 1458 1459
if HAVE_ID3TAG
noinst_PROGRAMS += test/dump_rva2
endif

1460 1461 1462 1463 1464
if HAVE_ALSA
# this debug program is still ALSA specific
noinst_PROGRAMS += test/read_mixer
endif

1465
test_read_conf_LDADD = \
1466
	libconf.a \
1467
	libsystem.a \
1468
	libfs.a \
1469
	libutil.a \
1470
	$(GLIB_LIBS)
1471
test_read_conf_SOURCES = \
1472
	src/Log.cxx src/LogBackend.cxx \
1473
	test/read_conf.cxx
1474

1475
test_run_resolver_LDADD = \
1476
	libsystem.a \
1477
	libutil.a \
1478
	$(GLIB_LIBS)
1479
test_run_resolver_SOURCES = \
1480
	src/Log.cxx src/LogBackend.cxx \
1481
	test/run_resolver.cxx
1482

1483 1484
if ENABLE_DATABASE

1485
test_DumpDatabase_LDADD = \
1486
	$(DB_LIBS) \
1487
	$(TAG_LIBS) \
1488
	libconf.a \
1489
	libutil.a \
1490
	libevent.a \
1491
	libsystem.a \
1492
	libfs.a \
1493
	$(ICU_LDADD) \
1494 1495
	$(GLIB_LIBS)
test_DumpDatabase_SOURCES = test/DumpDatabase.cxx \
1496
	src/protocol/Ack.cxx \
1497
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1498 1499 1500
	src/db/DatabaseError.cxx \
	src/db/Registry.cxx \
	src/db/Selection.cxx \
1501 1502
	src/db/PlaylistVector.cxx \
	src/db/DatabaseLock.cxx \
1503
	src/SongSave.cxx \
1504
	src/DetachedSong.cxx \
1505
	src/TagSave.cxx \
1506
	src/SongFilter.cxx
1507

1508
if HAVE_LIBUPNP
1509
test_DumpDatabase_SOURCES += src/lib/expat/ExpatParser.cxx
1510 1511
endif

1512 1513
endif

1514
test_run_input_LDADD = \
1515
	$(INPUT_LIBS) \
1516
	$(ARCHIVE_LIBS) \
1517
	$(TAG_LIBS) \
1518
	libconf.a \
Max Kellermann's avatar
Max Kellermann committed
1519
	libutil.a \
1520
	libevent.a \
1521
	libthread.a \
1522
	libsystem.a \
1523
	libfs.a \
1524
	$(GLIB_LIBS)
1525
test_run_input_SOURCES = test/run_input.cxx \
1526
	test/stdbin.h \
1527
	src/Log.cxx src/LogBackend.cxx \
1528
	src/IOThread.cxx \
1529
	src/TagSave.cxx
1530

1531 1532 1533 1534
if ENABLE_NEIGHBOR_PLUGINS

test_run_neighbor_explorer_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
1535
	src/IOThread.cxx \
1536
	test/run_neighbor_explorer.cxx
1537
test_run_neighbor_explorer_LDADD = $(AM_LDADD) \
1538 1539
	$(GLIB_LIBS) \
	$(NEIGHBOR_LIBS) \
1540 1541 1542
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
	libtag.a \
1543 1544 1545 1546 1547 1548 1549
	libconf.a \
	libevent.a \
	libfs.a \
	libsystem.a \
	libthread.a \
	libutil.a

1550 1551 1552 1553 1554 1555 1556 1557 1558 1559
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

1560 1561
endif

1562 1563 1564 1565 1566
if ENABLE_ARCHIVE

test_visit_archive_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1567
	$(TAG_LIBS) \
1568
	libconf.a \
Max Kellermann's avatar
Max Kellermann committed
1569
	libutil.a \
1570
	libevent.a \
1571
	libthread.a \
1572
	libsystem.a \
1573 1574 1575
	libfs.a \
	$(GLIB_LIBS)
test_visit_archive_SOURCES = test/visit_archive.cxx \
1576
	src/Log.cxx src/LogBackend.cxx \
1577
	src/IOThread.cxx \
1578
	src/input/Open.cxx
1579 1580 1581

endif

1582 1583 1584
test_dump_text_file_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1585
	$(TAG_LIBS) \
1586
	libconf.a \
1587
	libevent.a \
1588
	libfs.a \
1589
	libsystem.a \
1590
	libthread.a \
1591
	libutil.a \
1592
	$(GLIB_LIBS)
1593
test_dump_text_file_SOURCES = test/dump_text_file.cxx \
1594
	test/stdbin.h \
1595
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1596
	src/IOThread.cxx
1597

1598
test_dump_playlist_LDADD = \
1599
	$(PLAYLIST_LIBS) \
1600
	$(FLAC_LIBS) \
1601
	$(INPUT_LIBS) \
1602
	$(ARCHIVE_LIBS) \
1603 1604
	$(DECODER_LIBS) \
	$(TAG_LIBS) \
1605
	libconf.a \
1606
	libevent.a \
1607
	libthread.a \
1608
	libsystem.a \
1609
	libfs.a \
1610
	libutil.a \
Max Kellermann's avatar
Max Kellermann committed
1611
	libpcm.a \
1612
	$(GLIB_LIBS)
1613
test_dump_playlist_SOURCES = test/dump_playlist.cxx \
1614
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1615
	$(DECODER_SRC) \
1616
	src/Log.cxx src/LogBackend.cxx \
1617
	src/IOThread.cxx \
1618
	src/TagSave.cxx \
1619
	src/TagFile.cxx \
1620
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1621
	src/DetachedSong.cxx
1622

1623
if HAVE_FLAC
1624
test_dump_playlist_SOURCES += \
1625
	src/ReplayGainInfo.cxx \
1626
	src/decoder/plugins/FlacMetadata.cxx
1627 1628
endif

1629
test_run_decoder_LDADD = \
1630
	$(DECODER_LIBS) \
1631
	libpcm.a \
1632
	$(INPUT_LIBS) \
1633
	$(ARCHIVE_LIBS) \
1634
	$(TAG_LIBS) \
1635
	libconf.a \
1636
	libevent.a \
1637
	libthread.a \
1638
	libsystem.a \
1639
	libfs.a \
1640
	libutil.a \
1641
	$(GLIB_LIBS)
1642
test_run_decoder_SOURCES = test/run_decoder.cxx \
1643
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1644
	test/stdbin.h \
1645
	src/Log.cxx src/LogBackend.cxx \
1646
	src/IOThread.cxx \
1647
	src/ReplayGainInfo.cxx \
1648
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1649 1650
	$(ARCHIVE_SRC) \
	$(INPUT_SRC) \
1651
	$(TAG_SRC) \
1652 1653
	$(DECODER_SRC)

1654
test_read_tags_LDADD = \
1655
	$(DECODER_LIBS) \
1656
	libpcm.a \
1657
	$(INPUT_LIBS) \
1658
	$(ARCHIVE_LIBS) \
1659
	$(TAG_LIBS) \
1660
	libconf.a \
1661
	libevent.a \
1662
	libthread.a \
1663
	libsystem.a \
1664
	libfs.a \
1665
	libutil.a \
1666
	$(GLIB_LIBS)
1667
test_read_tags_SOURCES = test/read_tags.cxx \
1668
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1669
	src/Log.cxx src/LogBackend.cxx \
1670
	src/IOThread.cxx \
1671
	src/ReplayGainInfo.cxx \
1672
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1673
	$(DECODER_SRC)
1674

1675 1676
if HAVE_ID3TAG
test_dump_rva2_LDADD = \
1677
	$(TAG_LIBS) \
1678
	libutil.a \
1679
	$(GLIB_LIBS)
1680
test_dump_rva2_SOURCES = \
1681
	src/Log.cxx src/LogBackend.cxx \
1682
	test/dump_rva2.cxx
1683 1684
endif

1685
test_run_filter_LDADD = \
1686
	$(FILTER_LIBS) \
1687
	libconf.a \
1688
	libsystem.a \
1689
	libfs.a \
1690
	libutil.a \
1691
	$(GLIB_LIBS)
1692
test_run_filter_SOURCES = test/run_filter.cxx \
1693
	test/FakeReplayGainConfig.cxx \
1694
	test/stdbin.h \
1695
	src/Log.cxx src/LogBackend.cxx \
1696
	src/filter/FilterPlugin.cxx src/filter/FilterRegistry.cxx \
1697
	src/CheckAudioFormat.cxx \
1698
	src/AudioFormat.cxx \
1699
	src/AudioParser.cxx \
1700
	src/ReplayGainInfo.cxx
1701

1702 1703
if ENABLE_ENCODER
noinst_PROGRAMS += test/run_encoder
1704
test_run_encoder_SOURCES = test/run_encoder.cxx \
1705
	test/stdbin.h \
1706
	src/Log.cxx src/LogBackend.cxx \
1707
	src/CheckAudioFormat.cxx \
1708
	src/AudioFormat.cxx \
1709
	src/AudioParser.cxx
1710
test_run_encoder_LDADD = \
1711
	$(ENCODER_LIBS) \
1712 1713
	$(TAG_LIBS) \
	libconf.a \
1714
	libpcm.a \
1715
	libthread.a \
1716
	libsystem.a \
1717
	libfs.a \
1718
	libutil.a \
1719
	$(GLIB_LIBS)
1720
endif
1721

1722 1723
if ENABLE_VORBIS_ENCODER
noinst_PROGRAMS += test/test_vorbis_encoder
1724
test_test_vorbis_encoder_SOURCES = test/test_vorbis_encoder.cxx \
1725
	test/stdbin.h \
1726
	src/Log.cxx src/LogBackend.cxx \
1727
	src/CheckAudioFormat.cxx \
1728
	src/AudioFormat.cxx \
1729
	src/AudioParser.cxx \
1730 1731 1732 1733 1734
	$(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
1735
	$(PCM_LIBS) \
1736
	$(TAG_LIBS) \
1737
	libconf.a \
1738
	libsystem.a \
1739
	libfs.a \
1740
	libutil.a \
1741 1742 1743
	$(GLIB_LIBS)
endif

1744
test_software_volume_SOURCES = test/software_volume.cxx \
1745
	test/stdbin.h \
1746
	src/Log.cxx src/LogBackend.cxx \
1747
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1748
	src/AudioParser.cxx
1749
test_software_volume_LDADD = \
1750
	$(PCM_LIBS) \
1751
	libutil.a \
1752
	$(GLIB_LIBS)
1753

1754
test_run_avahi_SOURCES = \
1755
	src/Log.cxx src/LogBackend.cxx \
1756
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/AvahiPoll.cxx \
1757 1758 1759 1760 1761 1762 1763
	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 \
1764
	$(GLIB_LIBS) \
1765 1766
	$(AVAHI_LIBS)

1767
test_run_normalize_SOURCES = test/run_normalize.cxx \
1768
	test/stdbin.h \
1769
	src/CheckAudioFormat.cxx \
1770
	src/AudioCompress/compress.c \
1771
	src/AudioParser.cxx
1772
test_run_normalize_LDADD = \
1773
	libutil.a \
1774 1775
	$(GLIB_LIBS)

1776
test_run_convert_SOURCES = test/run_convert.cxx \
1777
	src/Log.cxx src/LogBackend.cxx \
1778
	src/AudioFormat.cxx \
1779
	src/CheckAudioFormat.cxx \
1780
	src/AudioParser.cxx
1781
test_run_convert_LDADD = \
1782
	$(PCM_LIBS) \
1783
	libutil.a \
1784 1785
	$(GLIB_LIBS)

1786
test_run_output_LDADD = $(MPD_LIBS) \
1787
	$(PCM_LIBS) \
1788
	$(OUTPUT_LIBS) \
1789 1790 1791
	$(ENCODER_LIBS) \
	libmixer_plugins.a \
	$(FILTER_LIBS) \
1792
	$(TAG_LIBS) \
1793
	libconf.a \
1794
	libevent.a \
1795
	libfs.a \
1796
	libsystem.a \
1797
	libthread.a \
1798
	libutil.a \
1799
	$(GLIB_LIBS)
1800
test_run_output_SOURCES = test/run_output.cxx \
1801
	test/FakeReplayGainConfig.cxx \
1802
	test/stdbin.h \
1803
	src/Log.cxx src/LogBackend.cxx \
1804
	src/IOThread.cxx \
1805
	src/CheckAudioFormat.cxx \
1806
	src/AudioFormat.cxx \
1807
	src/AudioParser.cxx \
1808 1809
	src/output/Domain.cxx \
	src/output/Init.cxx src/output/Finish.cxx src/output/Registry.cxx \
1810
	src/output/OutputPlugin.cxx \
Max Kellermann's avatar
Max Kellermann committed
1811 1812
	src/mixer/MixerControl.cxx \
	src/mixer/MixerType.cxx \
1813 1814
	src/filter/FilterPlugin.cxx \
	src/filter/FilterConfig.cxx \
1815
	src/ReplayGainInfo.cxx
1816

1817
test_read_mixer_LDADD = \
1818
	libpcm.a \
1819
	libmixer_plugins.a \
1820
	$(OUTPUT_LIBS) \
1821
	libconf.a \
1822
	libevent.a \
1823
	libsystem.a \
1824
	libfs.a \
1825
	libutil.a \
1826
	$(GLIB_LIBS)
1827
test_read_mixer_SOURCES = test/read_mixer.cxx \
1828
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1829
	src/mixer/MixerControl.cxx \
1830
	src/filter/FilterPlugin.cxx \
1831
	src/AudioFormat.cxx \
1832
	src/filter/plugins/VolumeFilterPlugin.cxx
1833

1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845
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

1846
if ENABLE_INOTIFY
1847 1848
noinst_PROGRAMS += test/run_inotify
test_run_inotify_SOURCES = test/run_inotify.cxx \
1849
	test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
1850
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1851 1852
	src/db/update/InotifyDomain.cxx \
	src/db/update/InotifySource.cxx
1853
test_run_inotify_LDADD = \
1854
	libevent.a \
1855
	libsystem.a \
1856 1857
	libutil.a \
	$(GLIB_LIBS)
1858 1859
endif

1860
test_test_util_SOURCES = \
1861
	test/TestCircularBuffer.hxx \
1862 1863 1864 1865 1866 1867 1868
	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)

1869
test_test_byte_reverse_SOURCES = \
1870
	test/test_byte_reverse.cxx
1871 1872
test_test_byte_reverse_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_byte_reverse_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
1873 1874
test_test_byte_reverse_LDADD = \
	libutil.a \
1875
	$(CPPUNIT_LIBS)
1876

1877 1878 1879 1880 1881 1882
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 = \
1883
	$(GLIB_LIBS) \
1884 1885 1886 1887 1888 1889
	$(INPUT_LIBS) \
	libthread.a \
	libtag.a \
	libutil.a \
	$(CPPUNIT_LIBS)

1890
test_test_mixramp_SOURCES = \
1891
	src/Log.cxx src/LogBackend.cxx \
1892 1893 1894 1895 1896 1897
	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 = \
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)
1898

1899
if ENABLE_CURL
1900
test_test_icy_parser_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1901
	src/Log.cxx src/LogBackend.cxx \
1902 1903 1904 1905 1906
	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
1907
	libutil.a \
1908 1909
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)
1910
endif
1911

1912
test_test_pcm_SOURCES = \
1913
	src/AudioFormat.cxx \
1914
	test/test_pcm_util.hxx \
1915 1916 1917
	test/test_pcm_dither.cxx \
	test/test_pcm_pack.cxx \
	test/test_pcm_channels.cxx \
1918
	test/test_pcm_format.cxx \
1919
	test/test_pcm_volume.cxx \
1920
	test/test_pcm_mix.cxx \
1921 1922
	test/test_pcm_all.hxx \
	test/test_pcm_main.cxx
1923 1924
test_test_pcm_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_pcm_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
1925 1926
test_test_pcm_LDADD = \
	$(PCM_LIBS) \
1927
	libutil.a \
1928
	$(CPPUNIT_LIBS) \
1929 1930
	$(GLIB_LIBS)

1931
test_test_archive_SOURCES = \
1932
	src/Log.cxx src/LogBackend.cxx \
1933 1934 1935 1936 1937 1938 1939 1940
	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 \
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)

1941 1942
if ENABLE_DATABASE

1943
test_test_translate_song_SOURCES = \
1944
	src/playlist/PlaylistSong.cxx \
1945
	src/PlaylistError.cxx \
1946
	src/DetachedSong.cxx \
1947
	src/SongLoader.cxx \
1948 1949 1950 1951 1952
	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 = \
1953
	$(STORAGE_LIBS) \
1954 1955 1956 1957 1958 1959 1960
	libtag.a \
	libfs.a \
	libsystem.a \
	libutil.a \
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)

1961 1962
endif

1963
test_test_queue_priority_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1964
	src/queue/Queue.cxx \
1965
	src/DetachedSong.cxx \
1966
	test/test_queue_priority.cxx
1967 1968
test_test_queue_priority_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_queue_priority_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
1969
test_test_queue_priority_LDADD = \
1970
	libsystem.a \
1971
	libutil.a \
1972
	$(CPPUNIT_LIBS)
1973

Max Kellermann's avatar
Max Kellermann committed
1974
noinst_PROGRAMS += src/pcm/dsd2pcm/dsd2pcm
1975

Max Kellermann's avatar
Max Kellermann committed
1976 1977
src_pcm_dsd2pcm_dsd2pcm_SOURCES = \
	src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h \
1978
	src/pcm/dsd2pcm/dsd2pcm.hpp \
Max Kellermann's avatar
Max Kellermann committed
1979
	src/pcm/dsd2pcm/noiseshape.c src/pcm/dsd2pcm/noiseshape.h \
1980
	src/pcm/dsd2pcm/noiseshape.hpp \
Max Kellermann's avatar
Max Kellermann committed
1981 1982
	src/pcm/dsd2pcm/main.cpp
src_pcm_dsd2pcm_dsd2pcm_LDADD = libutil.a
1983

1984 1985 1986 1987 1988 1989 1990 1991
endif


#
# Documentation
#

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

1994
DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
1995

1996 1997 1998 1999
if ENABLE_DOCUMENTATION
protocoldir = $(docdir)/protocol
protocol_DATA = $(wildcard doc/protocol/*.html)

2000 2001 2002
userdir = $(docdir)/user
user_DATA = $(wildcard doc/user/*.html)

2003 2004 2005
developerdir = $(docdir)/developer
developer_DATA = $(wildcard doc/developer/*.html)

2006 2007 2008 2009
if HAVE_XMLTO

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

2010
$(DOCBOOK_HTML): %/index.html: %.xml
2011
	$(XMLTO) -o $(@D) --stringparam chunker.output.encoding=utf-8 html $<
2012

2013 2014 2015 2016 2017 2018
else

DOCBOOK_HTML =

endif

2019
doc/api/html/index.html: doc/doxygen.conf
2020
	@$(MKDIR_P) $(@D)
2021
	$(DOXYGEN) $<
2022

2023 2024 2025 2026 2027 2028 2029 2030
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
2031
	$(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
2032
		$(DESTDIR)$(docdir)/api/html
2033

2034 2035 2036
uninstall-local:
	rm -f $(DESTDIR)$(docdir)/api/html/*.*

2037
upload: $(DOCBOOK_HTML) doc/api/html/index.html
2038
	rsync -vpruz --delete doc/ www.musicpd.org:/var/www/doc/ \
2039 2040 2041
		--chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
		--include=protocol --include=protocol/** \
		--include=user --include=user/** \
2042
		--include=developer --include=developer/** \
2043 2044 2045
		--include=api --include=api/** \
		--exclude=*

2046 2047 2048
endif


2049 2050 2051
#
# Distribution
#
Eric Wong's avatar
Eric Wong committed
2052

2053
EXTRA_DIST = $(doc_DATA) autogen.sh \
2054 2055 2056
	test/test_archive_bzip2.sh  \
	test/test_archive_iso9660.sh \
	test/test_archive_zzip.sh \
2057
	$(wildcard scripts/*.sh) \
2058
	$(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
2059
	src/win32/mpd_win32_rc.rc.in src/win32/mpd.ico