Makefile.am 60.2 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"'

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

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

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
	$(OUTPUT_LIBS) \
52
	$(TAG_LIBS) \
53
	$(FILTER_LIBS) \
54
	$(ENCODER_LIBS) \
55
	$(MIXER_LIBS) \
56
	libconf.a \
57
	libevent.a \
58
	libthread.a \
59
	libnet.a \
60
	libsystem.a \
61
	libutil.a \
62
	$(FS_LIBS) \
63
	$(ICU_LDADD) \
64
	$(SYSTEMD_DAEMON_LIBS) \
65
	$(GLIB_LIBS)
66 67

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

libmpd_a_SOURCES = \
71 72
	$(OUTPUT_API_SRC) \
	$(MIXER_API_SRC) \
73
	src/check.h \
74
	src/Compiler.h \
75 76
	src/open.h \
	src/poison.h \
Max Kellermann's avatar
Max Kellermann committed
77
	src/notify.cxx src/notify.hxx \
78
	src/AudioConfig.cxx src/AudioConfig.hxx \
79
	src/CheckAudioFormat.cxx src/CheckAudioFormat.hxx \
80
	src/AudioFormat.cxx src/AudioFormat.hxx \
81
	src/AudioParser.cxx src/AudioParser.hxx \
82
	src/protocol/Ack.cxx src/protocol/Ack.hxx \
Max Kellermann's avatar
Max Kellermann committed
83 84
	src/protocol/ArgParser.cxx src/protocol/ArgParser.hxx \
	src/protocol/Result.cxx src/protocol/Result.hxx \
85 86 87 88
	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 \
89
	src/command/TagCommands.cxx src/command/TagCommands.hxx \
90 91
	src/command/PlayerCommands.cxx src/command/PlayerCommands.hxx \
	src/command/PlaylistCommands.cxx src/command/PlaylistCommands.hxx \
92
	src/command/FileCommands.cxx src/command/FileCommands.hxx \
93 94 95 96
	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
97
	src/Idle.cxx src/Idle.hxx \
98
	src/CrossFade.cxx src/CrossFade.hxx \
99 100 101 102 103 104 105 106
	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 \
107 108 109 110
	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 \
111 112 113 114 115 116 117 118 119 120 121 122 123
	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 \
124
	src/client/ClientFile.cxx \
Max Kellermann's avatar
Max Kellermann committed
125
	src/Listen.cxx src/Listen.hxx \
126
	src/LogInit.cxx src/LogInit.hxx \
127
	src/LogBackend.cxx src/LogBackend.hxx \
128
	src/Log.cxx src/Log.hxx src/LogV.hxx \
129
	src/LogLevel.hxx \
130
	src/ls.cxx src/ls.hxx \
131
	src/IOThread.cxx src/IOThread.hxx \
132
	src/Instance.cxx src/Instance.hxx \
133
	src/win32/Win32Main.cxx \
134
	src/GlobalEvents.cxx src/GlobalEvents.hxx \
135
	src/MixRampInfo.hxx \
136 137 138
	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
139
	src/Mapper.cxx src/Mapper.hxx \
140
	src/Partition.cxx src/Partition.hxx \
141
	src/Permission.cxx src/Permission.hxx \
142
	src/PlayerThread.cxx src/PlayerThread.hxx \
143
	src/PlayerControl.cxx src/PlayerControl.hxx \
144
	src/PlayerListener.hxx \
145
	src/PlaylistError.cxx src/PlaylistError.hxx \
146
	src/PlaylistGlobal.cxx src/PlaylistGlobal.hxx \
147
	src/PlaylistPrint.cxx src/PlaylistPrint.hxx \
148
	src/PlaylistSave.cxx src/PlaylistSave.hxx \
149
	src/playlist/PlaylistStream.cxx src/playlist/PlaylistStream.hxx \
150 151 152 153 154
	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 \
155
	src/BulkEdit.hxx \
156 157
	src/db/PlaylistVector.cxx src/db/PlaylistVector.hxx \
	src/db/PlaylistInfo.hxx \
Max Kellermann's avatar
Max Kellermann committed
158 159 160 161
	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 \
162 163 164 165 166
	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 \
167 168
	src/ReplayGainConfig.cxx src/ReplayGainConfig.hxx \
	src/ReplayGainInfo.cxx src/ReplayGainInfo.hxx \
169
	src/DetachedSong.cxx src/DetachedSong.hxx \
170
	src/SongUpdate.cxx \
171
	src/SongLoader.cxx src/SongLoader.hxx \
Max Kellermann's avatar
Max Kellermann committed
172
	src/SongPrint.cxx src/SongPrint.hxx \
173 174
	src/SongSave.cxx src/SongSave.hxx \
	src/StateFile.cxx src/StateFile.hxx \
175
	src/Stats.cxx src/Stats.hxx \
Max Kellermann's avatar
Max Kellermann committed
176
	src/TagPrint.cxx src/TagPrint.hxx \
177
	src/TagSave.cxx src/TagSave.hxx \
178
	src/TagFile.cxx src/TagFile.hxx \
179
	src/TagStream.cxx src/TagStream.hxx \
180
	src/TimePrint.cxx src/TimePrint.hxx \
Max Kellermann's avatar
Max Kellermann committed
181
	src/mixer/Volume.cxx src/mixer/Volume.hxx \
182
	src/Chrono.hxx \
183
	src/SongFilter.cxx src/SongFilter.hxx \
Max Kellermann's avatar
Max Kellermann committed
184
	src/PlaylistFile.cxx src/PlaylistFile.hxx
185

186 187 188 189 190
if ANDROID
else
libmpd_a_SOURCES += \
	src/unix/SignalHandlers.cxx src/unix/SignalHandlers.hxx \
	src/CommandLine.cxx src/CommandLine.hxx
191 192 193 194 195 196 197

if ENABLE_DAEMON
libmpd_a_SOURCES += \
	src/unix/Daemon.cxx src/unix/Daemon.hxx \
	src/unix/PidFile.hxx
endif

198 199
endif

200
if ENABLE_DATABASE
201
libmpd_a_SOURCES += \
202
	src/queue/PlaylistUpdate.cxx \
203
	src/command/StorageCommands.cxx src/command/StorageCommands.hxx \
204
	src/command/DatabaseCommands.cxx src/command/DatabaseCommands.hxx \
205
	src/db/Count.cxx src/db/Count.hxx \
206 207 208 209 210 211 212 213 214 215 216 217 218 219
	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 \
220
	src/db/Configured.cxx src/db/Configured.hxx \
221 222 223 224 225 226 227
	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 \
228 229
	src/db/Interface.hxx \
	src/db/Stats.hxx \
230 231 232 233 234
	src/db/DatabaseListener.hxx \
	src/db/Visitor.hxx \
	src/db/Selection.cxx src/db/Selection.hxx
endif

235
UPNP_SOURCES = \
236
	src/lib/upnp/Init.cxx src/lib/upnp/Init.hxx \
237
	src/lib/upnp/ClientInit.cxx src/lib/upnp/ClientInit.hxx \
238 239 240 241 242
	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 \
243
	src/lib/upnp/Callback.hxx \
244 245 246 247
	src/lib/upnp/Util.cxx src/lib/upnp/Util.hxx \
	src/lib/upnp/WorkQueue.hxx \
	src/lib/upnp/Action.hxx

248 249 250 251 252
#
# Android native library
#

if ANDROID
Max Kellermann's avatar
Max Kellermann committed
253

254 255 256 257 258 259 260 261 262 263
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

264 265
noinst_LIBRARIES += libandroid.a
libandroid_a_SOURCES = \
266
	src/android/Context.cxx src/android/Context.hxx \
267 268 269
	src/android/Environment.cxx src/android/Environment.hxx
libandroid_a_CPPFLAGS = $(AM_CPPFLAGS) -Iandroid/build/include

Max Kellermann's avatar
Max Kellermann committed
270 271 272 273 274
noinst_LIBRARIES += libmain.a
libmain_a_SOURCES = \
	src/Main.cxx src/Main.hxx
libmain_a_CPPFLAGS = $(AM_CPPFLAGS) -Iandroid/build/include

275
src_mpd_LDADD += libandroid.a libjava.a
276

277
all-local: android/build/bin/$(APK_NAME)-debug.apk
Max Kellermann's avatar
Max Kellermann committed
278 279 280 281 282 283 284 285
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
286 287 288
	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
289
	ln -s $(abs_srcdir)/android/res/values $(abs_srcdir)/android/res/layout android/build/res
290
	$(ANDROID_SDK)/tools/android update project --path android/build --target android-17 --name $(APK_NAME)
Max Kellermann's avatar
Max Kellermann committed
291

292
android/build/bin/classes/org/musicpd/Bridge.class: android/src/Bridge.java android/build/build.xml android/build/res/drawable/icon.png
Max Kellermann's avatar
Max Kellermann committed
293 294 295 296 297
	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

298
BUILT_SOURCES = android/build/include/org_musicpd_Bridge.h
Max Kellermann's avatar
Max Kellermann committed
299 300 301 302

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

305 306 307 308
android/build/res/drawable/icon.png: mpd.svg
	mkdir -p $(@D)
	rsvg-convert --width=48 --height=48 $< -o $@

309 310
APK_DEPS = android/build/res/drawable/icon.png \
	android/build/libs/armeabi-v7a/libmpd.so \
311
	$(wildcard $(srcdir)/android/src/*.java) \
312 313
	android/build/build.xml

314
android/build/bin/$(APK_NAME)-debug.apk: $(APK_DEPS)
Max Kellermann's avatar
Max Kellermann committed
315 316
	cd android/build && ant nodeps debug

317
android/build/bin/$(APK_NAME)-release-unsigned.apk: $(APK_DEPS)
Max Kellermann's avatar
Max Kellermann committed
318 319
	cd android/build && ant nodeps release

320
android/build/bin/$(APK_NAME)-release-unaligned.apk: android/build/bin/$(APK_NAME)-release-unsigned.apk
Max Kellermann's avatar
Max Kellermann committed
321 322
	jarsigner -digestalg SHA1 -sigalg MD5withRSA -storepass:env ANDROID_KEYSTORE_PASS -keystore $(ANDROID_KEYSTORE) -signedjar $@ $< $(ANDROID_KEY_ALIAS)

323 324
ANDROID_SDK_BUILD_TOOLS_VERSION = 20.0.0

325
android/build/bin/$(APK_NAME).apk: android/build/bin/$(APK_NAME)-release-unaligned.apk
326
	$(ANDROID_SDK)/build-tools/$(ANDROID_SDK_BUILD_TOOLS_VERSION)/zipalign -f 4 $< $@
Max Kellermann's avatar
Max Kellermann committed
327

328 329
endif

330 331 332 333
#
# Windows resource file
#

334
win32/res/mpd.$(OBJEXT): %.$(OBJEXT): %.rc
335 336 337
	$(WINDRES) -i $< -o $@

if HAVE_WINDOWS
338
noinst_DATA = win32/res/mpd.rc
339

340 341
EXTRA_src_mpd_DEPENDENCIES = win32/res/mpd.$(OBJEXT)
src_mpd_LDFLAGS = -Wl,win32/res/mpd.$(OBJEXT)
342 343
endif

344
if ENABLE_DATABASE
345
if ENABLE_INOTIFY
346
libmpd_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
347 348 349 350
	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
351
endif
352
endif
353

354
if ENABLE_SQLITE
355
libmpd_a_SOURCES += \
356
	src/command/StickerCommands.cxx src/command/StickerCommands.hxx \
357
	src/lib/sqlite/Domain.cxx src/lib/sqlite/Domain.hxx \
358
	src/lib/sqlite/Util.hxx \
359
	src/sticker/Match.hxx \
360 361 362
	src/sticker/StickerDatabase.cxx src/sticker/StickerDatabase.hxx \
	src/sticker/StickerPrint.cxx src/sticker/StickerPrint.hxx \
	src/sticker/SongSticker.cxx src/sticker/SongSticker.hxx
363 364
endif

365 366 367
# Generic utility library

libutil_a_SOURCES = \
368
	src/util/Macros.hxx \
369
	src/util/Cast.hxx \
370
	src/util/Clamp.hxx \
371
	src/util/Alloc.cxx src/util/Alloc.hxx \
372
	src/util/VarSize.hxx \
373
	src/util/Error.cxx src/util/Error.hxx \
374
	src/util/Domain.hxx \
375
	src/util/ReusableArray.hxx \
376
	src/util/ASCII.hxx \
Max Kellermann's avatar
Max Kellermann committed
377
	src/util/UTF8.cxx src/util/UTF8.hxx \
378
	src/util/CharUtil.hxx \
379
	src/util/NumberParser.hxx \
380
	src/util/StringUtil.cxx src/util/StringUtil.hxx \
381
	src/util/DivideString.cxx src/util/DivideString.hxx \
382
	src/util/SplitString.cxx src/util/SplitString.hxx \
383
	src/util/FormatString.cxx src/util/FormatString.hxx \
384
	src/util/Tokenizer.cxx src/util/Tokenizer.hxx \
385
	src/util/TextFile.hxx \
Max Kellermann's avatar
Max Kellermann committed
386
	src/util/UriUtil.cxx src/util/UriUtil.hxx \
387
	src/util/Manual.hxx \
388
	src/util/RefCount.hxx \
389
	src/util/StaticFifoBuffer.hxx \
390
	src/util/ForeignFifoBuffer.hxx \
391
	src/util/DynamicFifoBuffer.hxx \
392
	src/util/ConstBuffer.hxx \
393
	src/util/WritableBuffer.hxx \
394
	src/util/CircularBuffer.hxx \
395
	src/util/LazyRandomEngine.cxx src/util/LazyRandomEngine.hxx \
396
	src/util/SliceBuffer.hxx \
397
	src/util/HugeAllocator.cxx src/util/HugeAllocator.hxx \
398
	src/util/PeakBuffer.cxx src/util/PeakBuffer.hxx \
399
	src/util/OptionParser.cxx src/util/OptionParser.hxx \
400
	src/util/OptionDef.hxx \
401
	src/util/ByteReverse.cxx src/util/ByteReverse.hxx \
402
	src/util/format.c src/util/format.h \
403 404
	src/util/bit_reverse.c src/util/bit_reverse.h

405 406 407
# Multi-threading library

libthread_a_SOURCES = \
408
	src/thread/Util.hxx \
409
	src/thread/Name.hxx \
410
	src/thread/Slack.hxx \
411 412 413 414 415 416
	src/thread/Mutex.hxx \
	src/thread/PosixMutex.hxx \
	src/thread/CriticalSection.hxx \
	src/thread/Cond.hxx \
	src/thread/PosixCond.hxx \
	src/thread/WindowsCond.hxx \
417
	src/thread/Thread.cxx src/thread/Thread.hxx \
418 419
	src/thread/Id.hxx

420 421 422 423
# Networking library

libnet_a_SOURCES = \
	src/net/Resolver.cxx src/net/Resolver.hxx \
424
	src/net/SocketAddress.cxx src/net/SocketAddress.hxx \
425 426 427
	src/net/SocketUtil.cxx src/net/SocketUtil.hxx \
	src/net/SocketError.cxx src/net/SocketError.hxx

428 429 430
# System library

libsystem_a_SOURCES = \
431
	src/system/ByteOrder.hxx \
432 433
	src/system/FatalError.cxx src/system/FatalError.hxx \
	src/system/fd_util.c src/system/fd_util.h \
434 435
	src/system/EventPipe.cxx src/system/EventPipe.hxx \
	src/system/EventFD.cxx src/system/EventFD.hxx \
436
	src/system/SignalFD.cxx src/system/SignalFD.hxx \
437
	src/system/EPollFD.cxx src/system/EPollFD.hxx \
438
	src/system/PeriodClock.hxx \
439
	src/system/Clock.cxx src/system/Clock.hxx
440

441 442 443
# Event loop library

libevent_a_SOURCES = \
444
	src/event/WakeFD.hxx \
445 446
	src/event/PollGroup.hxx \
	src/event/PollGroupEPoll.hxx \
447
	src/event/PollGroupPoll.hxx src/event/PollGroupPoll.cxx \
448 449
	src/event/PollGroupWinSelect.hxx src/event/PollGroupWinSelect.cxx \
	src/event/PollResultGeneric.hxx \
450
	src/event/SignalMonitor.hxx src/event/SignalMonitor.cxx \
451
	src/event/TimeoutMonitor.hxx src/event/TimeoutMonitor.cxx \
452
	src/event/IdleMonitor.hxx src/event/IdleMonitor.cxx \
453
	src/event/DeferredMonitor.hxx src/event/DeferredMonitor.cxx \
454 455
	src/event/SocketMonitor.cxx src/event/SocketMonitor.hxx \
	src/event/BufferedSocket.cxx src/event/BufferedSocket.hxx \
456
	src/event/FullyBufferedSocket.cxx src/event/FullyBufferedSocket.hxx \
457
	src/event/MultiSocketMonitor.cxx src/event/MultiSocketMonitor.hxx \
458
	src/event/ServerSocket.cxx src/event/ServerSocket.hxx \
459
	src/event/Call.hxx src/event/Call.cxx \
460
	src/event/Loop.cxx src/event/Loop.hxx
461

462 463 464 465
# UTF-8 library

libicu_a_SOURCES = \
	src/lib/icu/Collate.cxx src/lib/icu/Collate.hxx \
466
	src/lib/icu/Converter.cxx src/lib/icu/Converter.hxx \
467 468
	src/lib/icu/Error.cxx src/lib/icu/Error.hxx

469 470
if HAVE_ICU
libicu_a_SOURCES += \
471
	src/lib/icu/Util.cxx src/lib/icu/Util.hxx \
472 473 474
	src/lib/icu/Init.cxx src/lib/icu/Init.hxx
endif

nanotech's avatar
nanotech committed
475 476 477
libicu_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ICU_CFLAGS)

478
ICU_LDADD = libicu.a $(ICU_LIBS)
479 480 481

if HAVE_ICU
else
482
ICU_LDADD += $(GLIB_LIBS)
483
endif
484

485 486 487
# PCM library

libpcm_a_SOURCES = \
488
	src/pcm/Domain.cxx src/pcm/Domain.hxx \
489
	src/pcm/Traits.hxx \
490
	src/pcm/PcmBuffer.cxx src/pcm/PcmBuffer.hxx \
491
	src/pcm/PcmExport.cxx src/pcm/PcmExport.hxx \
Max Kellermann's avatar
Max Kellermann committed
492
	src/pcm/PcmConvert.cxx src/pcm/PcmConvert.hxx \
493
	src/pcm/PcmDop.cxx src/pcm/PcmDop.hxx \
494
	src/pcm/Volume.cxx src/pcm/Volume.hxx \
Max Kellermann's avatar
Max Kellermann committed
495 496
	src/pcm/PcmMix.cxx src/pcm/PcmMix.hxx \
	src/pcm/PcmChannels.cxx src/pcm/PcmChannels.hxx \
497
	src/pcm/PcmPack.cxx src/pcm/PcmPack.hxx \
Max Kellermann's avatar
Max Kellermann committed
498
	src/pcm/PcmFormat.cxx src/pcm/PcmFormat.hxx \
499 500
	src/pcm/FloatConvert.hxx \
	src/pcm/ShiftConvert.hxx \
501
	src/pcm/Neon.hxx \
502
	src/pcm/FormatConverter.cxx src/pcm/FormatConverter.hxx \
503
	src/pcm/ChannelsConverter.cxx src/pcm/ChannelsConverter.hxx \
504
	src/pcm/Resampler.hxx \
505
	src/pcm/GlueResampler.cxx src/pcm/GlueResampler.hxx \
506 507
	src/pcm/FallbackResampler.cxx src/pcm/FallbackResampler.hxx \
	src/pcm/ConfiguredResampler.cxx src/pcm/ConfiguredResampler.hxx \
Max Kellermann's avatar
Max Kellermann committed
508 509 510
	src/pcm/PcmDither.cxx src/pcm/PcmDither.hxx \
	src/pcm/PcmPrng.hxx \
	src/pcm/PcmUtils.hxx
511
libpcm_a_CPPFLAGS = $(AM_CPPFLAGS) \
512
	$(SOXR_CFLAGS) \
513
	$(LIBSAMPLERATE_CFLAGS)
514 515 516

PCM_LIBS = \
	libpcm.a \
517
	$(SOXR_LIBS) \
518
	$(LIBSAMPLERATE_LIBS)
519

520 521 522 523 524 525
if ENABLE_DSD
libpcm_a_SOURCES += \
	src/pcm/PcmDsd.cxx src/pcm/PcmDsd.hxx \
	src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h
endif

526
if ENABLE_LIBSAMPLERATE
527 528
libpcm_a_SOURCES += \
	src/pcm/LibsamplerateResampler.cxx src/pcm/LibsamplerateResampler.hxx
529 530
endif

531
if ENABLE_SOXR
532 533 534 535
libpcm_a_SOURCES += \
	src/pcm/SoxrResampler.cxx src/pcm/SoxrResampler.hxx
endif

536 537
# File system library

538 539
FS_LIBS = libfs.a

540
libfs_a_SOURCES = \
541
	src/fs/io/Reader.hxx \
542
	src/fs/io/PeekReader.cxx src/fs/io/PeekReader.hxx \
543
	src/fs/io/FileReader.cxx src/fs/io/FileReader.hxx \
544
	src/fs/io/BufferedReader.cxx src/fs/io/BufferedReader.hxx \
545 546
	src/fs/io/TextFile.cxx src/fs/io/TextFile.hxx \
	src/fs/io/OutputStream.hxx \
547
	src/fs/io/StdioOutputStream.hxx \
548 549
	src/fs/io/FileOutputStream.cxx src/fs/io/FileOutputStream.hxx \
	src/fs/io/BufferedOutputStream.cxx src/fs/io/BufferedOutputStream.hxx \
550
	src/fs/Domain.cxx src/fs/Domain.hxx \
551
	src/fs/Limits.hxx \
Max Kellermann's avatar
Max Kellermann committed
552
	src/fs/Traits.cxx src/fs/Traits.hxx \
553 554
	src/fs/Config.cxx src/fs/Config.hxx \
	src/fs/Charset.cxx src/fs/Charset.hxx \
555
	src/fs/Path.cxx src/fs/Path2.cxx src/fs/Path.hxx \
556
	src/fs/AllocatedPath.cxx src/fs/AllocatedPath.hxx \
557
	src/fs/FileSystem.cxx src/fs/FileSystem.hxx \
558
	src/fs/StandardDirectory.cxx src/fs/StandardDirectory.hxx \
559
	src/fs/CheckFile.cxx src/fs/CheckFile.hxx \
560
	src/fs/DirectoryReader.hxx
561 562
libfs_a_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS)

563
if ENABLE_ZLIB
564
libfs_a_SOURCES += \
565
	src/lib/zlib/Domain.cxx src/lib/zlib/Domain.hxx \
566
	src/fs/io/GunzipReader.cxx src/fs/io/GunzipReader.hxx \
567
	src/fs/io/AutoGunzipReader.cxx src/fs/io/AutoGunzipReader.hxx \
568
	src/fs/io/GzipOutputStream.cxx src/fs/io/GzipOutputStream.hxx
569 570
FS_LIBS += $(ZLIB_LIBS)
endif
571

572 573
# Storage library

574
SMBCLIENT_SOURCES = \
575
	src/lib/smbclient/Domain.cxx src/lib/smbclient/Domain.hxx \
576
	src/lib/smbclient/Mutex.cxx src/lib/smbclient/Mutex.hxx \
577 578
	src/lib/smbclient/Init.cxx src/lib/smbclient/Init.hxx

579
NFS_SOURCES = \
580 581
	src/lib/nfs/Callback.hxx \
	src/lib/nfs/Cancellable.hxx \
582
	src/lib/nfs/Lease.hxx \
583 584 585
	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 \
586
	src/lib/nfs/Base.cxx src/lib/nfs/Base.hxx \
587
	src/lib/nfs/FileReader.cxx src/lib/nfs/FileReader.hxx \
588
	src/lib/nfs/Blocking.cxx src/lib/nfs/Blocking.hxx \
589 590
	src/lib/nfs/Domain.cxx src/lib/nfs/Domain.hxx

591 592 593 594 595
if ENABLE_DATABASE

noinst_LIBRARIES += libstorage.a

libstorage_a_SOURCES = \
596 597
	src/storage/StoragePlugin.hxx \
	src/storage/Registry.cxx src/storage/Registry.hxx \
598
	src/storage/StorageInterface.cxx src/storage/StorageInterface.hxx \
599
	src/storage/CompositeStorage.cxx src/storage/CompositeStorage.hxx \
600
	src/storage/MemoryDirectoryReader.cxx src/storage/MemoryDirectoryReader.hxx \
601
	src/storage/Configured.cxx src/storage/Configured.hxx \
602
	src/storage/plugins/LocalStorage.cxx src/storage/plugins/LocalStorage.hxx \
603 604
	src/storage/FileInfo.hxx

605
libstorage_a_CPPFLAGS = $(AM_CPPFLAGS) \
606
	$(NFS_CFLAGS) \
607 608
	$(SMBCLIENT_CFLAGS)

609
STORAGE_LIBS = \
610
	libstorage.a \
611
	$(NFS_LIBS) \
612
	$(SMBCLIENT_LIBS)
613

614 615
if ENABLE_SMBCLIENT
libstorage_a_SOURCES += \
616
	$(SMBCLIENT_SOURCES) \
617
	src/storage/plugins/SmbclientStorage.cxx src/storage/plugins/SmbclientStorage.hxx
618 619
endif

620 621
if ENABLE_NFS
libstorage_a_SOURCES += \
622
	$(NFS_SOURCES) \
623
	src/storage/plugins/NfsStorage.cxx src/storage/plugins/NfsStorage.hxx
624 625
endif

626 627
endif

628 629 630 631
# neighbor plugins

if ENABLE_NEIGHBOR_PLUGINS

632
libmpd_a_SOURCES += \
633 634 635
	src/command/NeighborCommands.cxx \
	src/command/NeighborCommands.hxx

636 637
noinst_LIBRARIES += libneighbor.a

638 639 640 641 642 643 644 645 646 647 648 649 650
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 += \
651
	$(SMBCLIENT_SOURCES) \
652 653 654 655 656 657 658
	src/neighbor/plugins/SmbclientNeighborPlugin.cxx src/neighbor/plugins/SmbclientNeighborPlugin.hxx
endif

NEIGHBOR_LIBS = \
	$(SMBCLIENT_LIBS) \
	libneighbor.a

659
if ENABLE_UPNP
660 661 662 663 664 665 666 667
libneighbor_a_SOURCES += \
	$(UPNP_SOURCES) \
	src/neighbor/plugins/UpnpNeighborPlugin.cxx src/neighbor/plugins/UpnpNeighborPlugin.hxx
NEIGHBOR_LIBS += \
	$(EXPAT_LIBS) \
	$(UPNP_LIBS)
endif

668 669
endif

670 671
# database plugins

672 673 674 675
if ENABLE_DATABASE

noinst_LIBRARIES += libdb_plugins.a

676
libdb_plugins_a_SOURCES = \
677
	src/PlaylistDatabase.cxx src/PlaylistDatabase.hxx \
Max Kellermann's avatar
Max Kellermann committed
678 679
	src/db/Registry.cxx src/db/Registry.hxx \
	src/db/Helpers.cxx src/db/Helpers.hxx \
680
	src/db/UniqueTags.cxx src/db/UniqueTags.hxx \
681 682 683 684
	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
685
	src/db/plugins/LazyDatabase.cxx src/db/plugins/LazyDatabase.hxx \
686 687 688 689 690 691
	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
692 693 694
	src/db/plugins/simple/Mount.cxx \
	src/db/plugins/simple/Mount.hxx \
	src/db/plugins/simple/PrefixedLightSong.hxx \
695 696
	src/db/plugins/simple/SimpleDatabasePlugin.cxx \
	src/db/plugins/simple/SimpleDatabasePlugin.hxx
697

698
if ENABLE_LIBMPDCLIENT
699
libdb_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
700
	src/db/plugins/ProxyDatabasePlugin.cxx src/db/plugins/ProxyDatabasePlugin.hxx
701 702
endif

703
DB_LIBS = \
704 705
	libdb_plugins.a \
	$(LIBMPDCLIENT_LIBS)
706

707
if ENABLE_UPNP
708
libdb_plugins_a_SOURCES += \
709
	$(UPNP_SOURCES) \
710
	src/db/plugins/upnp/UpnpDatabasePlugin.cxx src/db/plugins/upnp/UpnpDatabasePlugin.hxx \
Max Kellermann's avatar
Max Kellermann committed
711
	src/db/plugins/upnp/Tags.cxx src/db/plugins/upnp/Tags.hxx \
712
	src/db/plugins/upnp/ContentDirectoryService.cxx \
Max Kellermann's avatar
Max Kellermann committed
713 714
	src/db/plugins/upnp/Directory.cxx src/db/plugins/upnp/Directory.hxx \
	src/db/plugins/upnp/Object.cxx src/db/plugins/upnp/Object.hxx
715 716 717 718 719
DB_LIBS += \
	$(EXPAT_LIBS) \
	$(UPNP_LIBS)
endif

720 721
endif

722 723
# archive plugins

724 725 726 727
if ENABLE_ARCHIVE

noinst_LIBRARIES += libarchive.a

728
libmpd_a_SOURCES +=  \
729
	src/db/update/Archive.cxx
730

731
libarchive_a_SOURCES = \
732 733 734 735 736 737
	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
738
	src/input/plugins/ArchiveInputPlugin.cxx src/input/plugins/ArchiveInputPlugin.hxx
739
libarchive_a_CPPFLAGS = $(AM_CPPFLAGS) \
740
	$(BZ2_CFLAGS) \
741
	$(ISO9660_CFLAGS) \
742 743 744
	$(ZZIP_CFLAGS)

ARCHIVE_LIBS = \
745
	libarchive.a \
746
	$(BZ2_LIBS) \
747
	$(ISO9660_LIBS) \
748 749
	$(ZZIP_LIBS)

750
if ENABLE_BZ2
751
libarchive_a_SOURCES += \
752 753
	src/archive/plugins/Bzip2ArchivePlugin.cxx \
	src/archive/plugins/Bzip2ArchivePlugin.hxx
754 755
endif

756
if ENABLE_ZZIP
757
libarchive_a_SOURCES += \
758 759
	src/archive/plugins/ZzipArchivePlugin.cxx \
	src/archive/plugins/ZzipArchivePlugin.hxx
760 761
endif

762
if ENABLE_ISO9660
763
libarchive_a_SOURCES += \
764 765
	src/archive/plugins/Iso9660ArchivePlugin.cxx \
	src/archive/plugins/Iso9660ArchivePlugin.hxx
766 767
endif

768 769
else
ARCHIVE_LIBS =
770 771
endif

772 773 774
# configuration library

libconf_a_SOURCES = \
775 776
	src/config/ConfigDefaults.hxx \
	src/config/ConfigPath.cxx src/config/ConfigPath.hxx \
777
	src/config/Data.cxx src/config/Data.hxx \
778
	src/config/Block.cxx src/config/Block.hxx \
779
	src/config/Param.cxx src/config/Param.hxx \
780 781 782 783 784 785
	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
786

787 788
# tag plugins

789
libtag_a_CPPFLAGS = $(AM_CPPFLAGS) \
790 791
	$(ID3TAG_CFLAGS)
TAG_LIBS = \
792
	libtag.a \
793 794
	$(ID3TAG_LIBS)

795
libtag_a_SOURCES =\
796 797
	src/tag/TagType.h \
	src/tag/Tag.cxx src/tag/Tag.hxx \
798
	src/tag/TagBuilder.cxx src/tag/TagBuilder.hxx \
799
	src/tag/TagItem.hxx \
800
	src/tag/TagHandler.cxx src/tag/TagHandler.hxx \
801
	src/tag/TagSettings.c src/tag/TagSettings.h \
802
	src/tag/TagConfig.cxx src/tag/TagConfig.hxx \
803
	src/tag/TagNames.c \
804
	src/tag/TagString.cxx src/tag/TagString.hxx \
805 806
	src/tag/TagPool.cxx src/tag/TagPool.hxx \
	src/tag/TagTable.cxx src/tag/TagTable.hxx \
807
	src/tag/Set.cxx src/tag/Set.hxx \
808
	src/tag/Format.cxx src/tag/Format.hxx \
809
	src/tag/VorbisComment.cxx src/tag/VorbisComment.hxx \
810
	src/tag/ReplayGain.cxx src/tag/ReplayGain.hxx \
811
	src/tag/MixRamp.cxx src/tag/MixRamp.hxx \
812 813 814
	src/tag/ApeLoader.cxx src/tag/ApeLoader.hxx \
	src/tag/ApeReplayGain.cxx src/tag/ApeReplayGain.hxx \
	src/tag/ApeTag.cxx src/tag/ApeTag.hxx
815

816
if ENABLE_ID3TAG
817
libtag_a_SOURCES += \
818 819
	src/tag/TagId3.cxx src/tag/TagId3.hxx \
	src/tag/TagRva2.cxx src/tag/TagRva2.hxx \
820 821
	src/tag/Riff.cxx src/tag/Riff.hxx \
	src/tag/Aiff.cxx src/tag/Aiff.hxx
822 823
endif

824 825
# ffmpeg

826
if ENABLE_FFMPEG
827 828
noinst_LIBRARIES += libffmpeg.a
libffmpeg_a_SOURCES = \
829
	src/lib/ffmpeg/Init.cxx src/lib/ffmpeg/Init.hxx \
830
	src/lib/ffmpeg/Time.hxx \
831
	src/lib/ffmpeg/Buffer.hxx \
832
	src/lib/ffmpeg/LogError.cxx src/lib/ffmpeg/LogError.hxx \
833
	src/lib/ffmpeg/LogCallback.cxx src/lib/ffmpeg/LogCallback.hxx \
834
	src/lib/ffmpeg/Error.cxx src/lib/ffmpeg/Error.hxx \
835
	src/lib/ffmpeg/Domain.cxx src/lib/ffmpeg/Domain.hxx
836 837
libffmpeg_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(FFMPEG_CFLAGS)
838 839 840
FFMPEG_LIBS2 = libffmpeg.a $(FFMPEG_LIBS)
endif

841 842
# decoder plugins

843
libdecoder_a_SOURCES = \
844 845 846 847 848
	src/decoder/plugins/PcmDecoderPlugin.cxx \
	src/decoder/plugins/PcmDecoderPlugin.hxx \
	src/decoder/DecoderBuffer.cxx src/decoder/DecoderBuffer.hxx \
	src/decoder/DecoderPlugin.cxx \
	src/decoder/DecoderList.cxx src/decoder/DecoderList.hxx
849
libdecoder_a_CPPFLAGS = $(AM_CPPFLAGS) \
850
	$(VORBIS_CFLAGS) $(TREMOR_CFLAGS) \
851
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
852
	$(SNDFILE_CFLAGS) \
853 854
	$(AUDIOFILE_CFLAGS) \
	$(LIBMIKMOD_CFLAGS) \
855
	$(GME_CFLAGS) \
856 857 858
	$(SIDPLAY_CFLAGS) \
	$(FLUIDSYNTH_CFLAGS) \
	$(WILDMIDI_CFLAGS) \
859
	$(WAVPACK_CFLAGS) \
860
	$(MAD_CFLAGS) \
861
	$(MPG123_CFLAGS) \
862
	$(OPUS_CFLAGS) \
863
	$(FFMPEG_CFLAGS) \
864
	$(MPCDEC_CFLAGS) \
865
	$(ADPLUG_CFLAGS) \
866
	$(FAAD_CFLAGS)
867 868

DECODER_LIBS = \
869
	libdecoder.a \
870
	$(VORBIS_LIBS) $(TREMOR_LIBS) \
871
	$(FLAC_LIBS) \
872
	$(SNDFILE_LIBS) \
873
	$(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
874
	$(GME_LIBS) \
875 876 877
	$(SIDPLAY_LIBS) \
	$(FLUIDSYNTH_LIBS) \
	$(WILDMIDI_LIBS) \
878
	$(WAVPACK_LIBS) \
879
	$(MAD_LIBS) \
880
	$(MPG123_LIBS) \
881
	$(OPUS_LIBS) \
882
	$(FFMPEG_LIBS2) \
883
	$(MPCDEC_LIBS) \
884
	$(ADPLUG_LIBS) \
885
	$(FAAD_LIBS)
886

887
if ENABLE_DSD
Max Kellermann's avatar
Max Kellermann committed
888 889 890 891 892 893 894
libdecoder_a_SOURCES += \
	src/decoder/plugins/DsdiffDecoderPlugin.cxx \
	src/decoder/plugins/DsdiffDecoderPlugin.hxx \
	src/decoder/plugins/DsfDecoderPlugin.cxx \
	src/decoder/plugins/DsfDecoderPlugin.hxx \
	src/decoder/plugins/DsdLib.cxx \
	src/decoder/plugins/DsdLib.hxx
895 896
endif

897
if ENABLE_MAD
898
libdecoder_a_SOURCES += \
899 900
	src/decoder/plugins/MadDecoderPlugin.cxx \
	src/decoder/plugins/MadDecoderPlugin.hxx
901 902
endif

903
if ENABLE_MPG123
904
libdecoder_a_SOURCES += \
905 906
	src/decoder/plugins/Mpg123DecoderPlugin.cxx \
	src/decoder/plugins/Mpg123DecoderPlugin.hxx
907 908
endif

909
if ENABLE_MPCDEC
910
libdecoder_a_SOURCES += \
911 912
	src/decoder/plugins/MpcdecDecoderPlugin.cxx \
	src/decoder/plugins/MpcdecDecoderPlugin.hxx
913 914
endif

915
if ENABLE_OPUS
916
libdecoder_a_SOURCES += \
917 918 919 920 921 922 923 924 925 926 927 928
	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
929 930
endif

931
if ENABLE_WAVPACK
932
libdecoder_a_SOURCES += \
933 934
	src/decoder/plugins/WavpackDecoderPlugin.cxx \
	src/decoder/plugins/WavpackDecoderPlugin.hxx
935 936
endif

937
if ENABLE_ADPLUG
938
libdecoder_a_SOURCES += \
939 940
	src/decoder/plugins/AdPlugDecoderPlugin.cxx \
	src/decoder/plugins/AdPlugDecoderPlugin.h
941 942
endif

943
if ENABLE_FAAD
944
libdecoder_a_SOURCES += \
945
	src/decoder/plugins/FaadDecoderPlugin.cxx src/decoder/plugins/FaadDecoderPlugin.hxx
946 947
endif

948
if HAVE_XIPH
949
libdecoder_a_SOURCES += \
950 951
	src/decoder/plugins/XiphTags.cxx src/decoder/plugins/XiphTags.hxx \
	src/decoder/plugins/OggCodec.cxx src/decoder/plugins/OggCodec.hxx
952 953
endif

954
if ENABLE_VORBIS_DECODER
955
libdecoder_a_SOURCES += \
956 957 958
	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
959 960
endif

961
if ENABLE_FLAC
962
libdecoder_a_SOURCES += \
963 964 965 966 967 968 969 970
	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
971 972
endif

973
if ENABLE_AUDIOFILE
974
libdecoder_a_SOURCES += \
975 976
	src/decoder/plugins/AudiofileDecoderPlugin.cxx \
	src/decoder/plugins/AudiofileDecoderPlugin.hxx
977 978
endif

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

985
if ENABLE_MODPLUG
986
libmodplug_decoder_plugin_a_SOURCES = \
987 988
	src/decoder/plugins/ModplugDecoderPlugin.cxx \
	src/decoder/plugins/ModplugDecoderPlugin.hxx
989
libmodplug_decoder_plugin_a_CXXFLAGS = $(AM_CXXFLAGS) $(MODPLUG_CFLAGS)
990
libmodplug_decoder_plugin_a_CPPFLAGS = $(AM_CPPFLAGS)
991 992
noinst_LIBRARIES += libmodplug_decoder_plugin.a
DECODER_LIBS += libmodplug_decoder_plugin.a $(MODPLUG_LIBS)
993 994 995
endif

if ENABLE_SIDPLAY
996
libdecoder_a_SOURCES += \
997 998
	src/decoder/plugins/SidplayDecoderPlugin.cxx \
	src/decoder/plugins/SidplayDecoderPlugin.hxx
999 1000 1001
endif

if ENABLE_FLUIDSYNTH
1002
libdecoder_a_SOURCES += \
1003 1004
	src/decoder/plugins/FluidsynthDecoderPlugin.cxx \
	src/decoder/plugins/FluidsynthDecoderPlugin.hxx
1005 1006 1007
endif

if ENABLE_WILDMIDI
1008
libdecoder_a_SOURCES += \
1009 1010
	src/decoder/plugins/WildmidiDecoderPlugin.cxx \
	src/decoder/plugins/WildmidiDecoderPlugin.hxx
1011 1012
endif

1013
if ENABLE_FFMPEG
1014
libdecoder_a_SOURCES += \
1015 1016
	src/decoder/plugins/FfmpegIo.cxx \
	src/decoder/plugins/FfmpegIo.hxx \
1017 1018 1019 1020
	src/decoder/plugins/FfmpegMetaData.cxx \
	src/decoder/plugins/FfmpegMetaData.hxx \
	src/decoder/plugins/FfmpegDecoderPlugin.cxx \
	src/decoder/plugins/FfmpegDecoderPlugin.hxx
1021 1022
endif

1023
if ENABLE_SNDFILE
1024
libdecoder_a_SOURCES += \
1025 1026
	src/decoder/plugins/SndfileDecoderPlugin.cxx \
	src/decoder/plugins/SndfileDecoderPlugin.hxx
1027 1028
endif

1029
if ENABLE_GME
1030
libdecoder_a_SOURCES += \
1031
	src/decoder/plugins/GmeDecoderPlugin.cxx src/decoder/plugins/GmeDecoderPlugin.hxx
1032 1033
endif

1034 1035
# encoder plugins

1036 1037 1038 1039 1040
if ENABLE_ENCODER

noinst_LIBRARIES += libencoder_plugins.a

libencoder_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1041
	$(LAME_CFLAGS) \
1042
	$(TWOLAME_CFLAGS) \
1043
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
1044
	$(OPUS_CFLAGS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
1045
	$(SHINE_CFLAGS) \
1046 1047 1048
	$(VORBISENC_CFLAGS)

ENCODER_LIBS = \
1049
	libencoder_plugins.a \
1050
	$(LAME_LIBS) \
1051
	$(TWOLAME_LIBS) \
1052
	$(FLAC_LIBS) \
1053
	$(OPUS_LIBS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
1054
	$(SHINE_LIBS) \
1055 1056
	$(VORBISENC_LIBS)

1057
libencoder_plugins_a_SOURCES = \
1058
	src/encoder/EncoderAPI.hxx \
1059
	src/encoder/EncoderInterface.hxx \
1060
	src/encoder/EncoderPlugin.hxx \
1061
	src/encoder/ToOutputStream.cxx src/encoder/ToOutputStream.hxx \
1062 1063 1064 1065
	src/encoder/plugins/OggStream.hxx \
	src/encoder/plugins/NullEncoderPlugin.cxx \
	src/encoder/plugins/NullEncoderPlugin.hxx \
	src/encoder/EncoderList.cxx src/encoder/EncoderList.hxx
1066

1067 1068
if HAVE_OGG_ENCODER
libencoder_plugins_a_SOURCES += \
1069 1070 1071
	src/encoder/plugins/OggSerial.cxx \
	src/encoder/plugins/OggSerial.hxx \
	src/encoder/plugins/OggStream.hxx
1072 1073
endif

1074
if ENABLE_WAVE_ENCODER
1075
libencoder_plugins_a_SOURCES += \
1076 1077
	src/encoder/plugins/WaveEncoderPlugin.cxx \
	src/encoder/plugins/WaveEncoderPlugin.hxx
1078 1079
endif

1080
if ENABLE_VORBISENC
1081
libencoder_plugins_a_SOURCES += \
1082 1083
	src/encoder/plugins/VorbisEncoderPlugin.cxx \
	src/encoder/plugins/VorbisEncoderPlugin.hxx
1084 1085
endif

1086
if ENABLE_OPUS
1087
libencoder_plugins_a_SOURCES += \
1088 1089
	src/encoder/plugins/OpusEncoderPlugin.cxx \
	src/encoder/plugins/OpusEncoderPlugin.hxx
1090 1091
endif

1092
if ENABLE_LAME
1093
libencoder_plugins_a_SOURCES += \
1094 1095
	src/encoder/plugins/LameEncoderPlugin.cxx \
	src/encoder/plugins/LameEncoderPlugin.hxx
1096
endif
1097

1098
if ENABLE_TWOLAME
1099
libencoder_plugins_a_SOURCES += \
1100 1101
	src/encoder/plugins/TwolameEncoderPlugin.cxx \
	src/encoder/plugins/TwolameEncoderPlugin.hxx
1102
endif
1103 1104

if ENABLE_FLAC_ENCODER
1105
libencoder_plugins_a_SOURCES += \
1106 1107
	src/encoder/plugins/FlacEncoderPlugin.cxx \
	src/encoder/plugins/FlacEncoderPlugin.hxx
1108
endif
1109

1110
if ENABLE_SHINE
Andrée Ekroth's avatar
Andrée Ekroth committed
1111
libencoder_plugins_a_SOURCES += \
1112 1113
	src/encoder/plugins/ShineEncoderPlugin.cxx \
	src/encoder/plugins/ShineEncoderPlugin.hxx
Andrée Ekroth's avatar
Andrée Ekroth committed
1114 1115
endif

1116 1117
else
ENCODER_LIBS =
1118 1119 1120 1121
endif


if HAVE_ZEROCONF
1122
libmpd_a_SOURCES += \
1123 1124
	src/zeroconf/ZeroconfInternal.hxx \
	src/zeroconf/ZeroconfGlue.cxx src/zeroconf/ZeroconfGlue.hxx
1125 1126

if HAVE_AVAHI
1127
libmpd_a_SOURCES += \
1128 1129
	src/zeroconf/AvahiPoll.cxx src/zeroconf/AvahiPoll.hxx \
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/ZeroconfAvahi.hxx
1130 1131 1132
endif

if HAVE_BONJOUR
1133
libmpd_a_SOURCES += src/zeroconf/ZeroconfBonjour.cxx src/zeroconf/ZeroconfBonjour.hxx
1134 1135 1136
endif
endif

1137 1138 1139 1140
#
# input plugins
#

1141
libinput_a_SOURCES = \
1142
	src/input/Domain.cxx src/input/Domain.hxx \
Max Kellermann's avatar
Max Kellermann committed
1143 1144
	src/input/Init.cxx src/input/Init.hxx \
	src/input/Registry.cxx src/input/Registry.hxx \
1145
	src/input/Open.cxx \
1146
	src/input/LocalOpen.cxx src/input/LocalOpen.hxx \
1147
	src/input/Offset.hxx \
Max Kellermann's avatar
Max Kellermann committed
1148 1149 1150
	src/input/InputStream.cxx src/input/InputStream.hxx \
	src/input/InputPlugin.hxx \
	src/input/TextInputStream.cxx src/input/TextInputStream.hxx \
1151
	src/input/ThreadInputStream.cxx src/input/ThreadInputStream.hxx \
1152
	src/input/AsyncInputStream.cxx src/input/AsyncInputStream.hxx \
1153
	src/input/ProxyInputStream.cxx src/input/ProxyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1154 1155
	src/input/plugins/RewindInputPlugin.cxx src/input/plugins/RewindInputPlugin.hxx \
	src/input/plugins/FileInputPlugin.cxx src/input/plugins/FileInputPlugin.hxx
1156 1157

libinput_a_CPPFLAGS = $(AM_CPPFLAGS) \
1158
	$(CURL_CFLAGS) \
1159
	$(SMBCLIENT_CFLAGS) \
1160
	$(NFS_CFLAGS) \
1161
	$(CDIO_PARANOIA_CFLAGS) \
1162
	$(FFMPEG_CFLAGS) \
1163 1164 1165
	$(MMS_CFLAGS)

INPUT_LIBS = \
1166
	libinput.a \
1167
	$(CURL_LIBS) \
1168
	$(SMBCLIENT_LIBS) \
1169
	$(NFS_LIBS) \
1170
	$(CDIO_PARANOIA_LIBS) \
1171
	$(FFMPEG_LIBS2) \
1172 1173
	$(MMS_LIBS)

1174
if ENABLE_ALSA
1175
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1176 1177
	src/input/plugins/AlsaInputPlugin.cxx \
	src/input/plugins/AlsaInputPlugin.hxx
1178 1179 1180 1181
INPUT_LIBS += $(ALSA_LIBS)
endif


1182
if ENABLE_CURL
1183
libinput_a_SOURCES += \
1184
	src/input/IcyInputStream.cxx src/input/IcyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1185
	src/input/plugins/CurlInputPlugin.cxx src/input/plugins/CurlInputPlugin.hxx \
1186
	src/IcyMetaDataParser.cxx src/IcyMetaDataParser.hxx
1187
endif
1188

1189 1190
if ENABLE_SMBCLIENT
libinput_a_SOURCES += \
1191
	$(SMBCLIENT_SOURCES) \
Max Kellermann's avatar
Max Kellermann committed
1192
	src/input/plugins/SmbclientInputPlugin.cxx src/input/plugins/SmbclientInputPlugin.hxx
1193 1194
endif

1195 1196
if ENABLE_NFS
libinput_a_SOURCES += \
1197
	$(NFS_SOURCES) \
1198 1199 1200
	src/input/plugins/NfsInputPlugin.cxx src/input/plugins/NfsInputPlugin.hxx
endif

1201
if ENABLE_CDIO_PARANOIA
1202
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1203 1204
	src/input/plugins/CdioParanoiaInputPlugin.cxx \
	src/input/plugins/CdioParanoiaInputPlugin.hxx
1205 1206
endif

1207
if ENABLE_FFMPEG
1208
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1209
	src/input/plugins/FfmpegInputPlugin.cxx src/input/plugins/FfmpegInputPlugin.hxx
1210 1211
endif

1212
if ENABLE_MMS
1213
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1214
	src/input/plugins/MmsInputPlugin.cxx src/input/plugins/MmsInputPlugin.hxx
1215 1216
endif

1217
liboutput_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1218 1219
	$(AO_CFLAGS) \
	$(ALSA_CFLAGS) \
1220
	$(JACK_CFLAGS) \
1221
	$(OPENAL_CFLAGS) \
1222
	$(OPENSSL_CFLAGS) \
1223
	$(PULSE_CFLAGS) \
1224 1225 1226
	$(SHOUT_CFLAGS)

OUTPUT_LIBS = \
1227
	liboutput_plugins.a \
1228
	$(LIBWRAP_LDFLAGS) \
1229 1230
	$(AO_LIBS) \
	$(ALSA_LIBS) \
1231
	$(ROAR_LIBS) \
1232
	$(JACK_LIBS) \
1233
	$(OPENAL_LIBS) \
1234 1235
	$(SHOUT_LIBS)

1236
OUTPUT_API_SRC = \
1237
	src/output/OutputAPI.hxx \
1238
	src/output/Internal.hxx \
1239
	src/output/Wrapper.hxx \
1240
	src/output/Registry.cxx src/output/Registry.hxx \
1241
	src/output/MultipleOutputs.cxx src/output/MultipleOutputs.hxx \
1242
	src/output/OutputThread.cxx \
1243
	src/output/Domain.cxx src/output/Domain.hxx \
1244
	src/output/OutputControl.cxx \
1245 1246 1247 1248
	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 \
1249 1250
	src/output/Finish.cxx \
	src/output/Init.cxx
1251

1252
liboutput_plugins_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1253
	src/output/Timer.cxx src/output/Timer.hxx \
1254 1255
	src/output/plugins/NullOutputPlugin.cxx \
	src/output/plugins/NullOutputPlugin.hxx
1256

1257 1258
MIXER_LIBS = \
	libmixer_plugins.a \
1259
	$(PULSE_LIBS2)
1260

1261
MIXER_API_SRC = \
1262
	src/mixer/Listener.hxx \
Max Kellermann's avatar
Max Kellermann committed
1263 1264 1265 1266
	src/mixer/MixerPlugin.hxx \
	src/mixer/MixerList.hxx \
	src/mixer/MixerControl.cxx src/mixer/MixerControl.hxx \
	src/mixer/MixerType.cxx src/mixer/MixerType.hxx \
1267
	src/mixer/MixerAll.cxx \
Max Kellermann's avatar
Max Kellermann committed
1268
	src/mixer/MixerInternal.hxx
1269

1270
libmixer_plugins_a_SOURCES = \
1271
	src/mixer/plugins/NullMixerPlugin.cxx \
Max Kellermann's avatar
Max Kellermann committed
1272 1273
	src/mixer/plugins/SoftwareMixerPlugin.cxx \
	src/mixer/plugins/SoftwareMixerPlugin.hxx
1274 1275 1276
libmixer_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ALSA_CFLAGS) \
	$(PULSE_CFLAGS)
1277

1278
if ENABLE_ALSA
1279
liboutput_plugins_a_SOURCES += \
1280 1281
	src/output/plugins/AlsaOutputPlugin.cxx \
	src/output/plugins/AlsaOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1282
libmixer_plugins_a_SOURCES += src/mixer/plugins/AlsaMixerPlugin.cxx
1283 1284
endif

1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295
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

1296
if ENABLE_ROAR
1297
liboutput_plugins_a_SOURCES += \
1298 1299
	src/output/plugins/RoarOutputPlugin.cxx \
	src/output/plugins/RoarOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1300
libmixer_plugins_a_SOURCES += src/mixer/plugins/RoarMixerPlugin.cxx
1301 1302
endif

1303
if ENABLE_AO
1304
liboutput_plugins_a_SOURCES += \
1305 1306
	src/output/plugins/AoOutputPlugin.cxx \
	src/output/plugins/AoOutputPlugin.hxx
1307 1308 1309
endif

if HAVE_FIFO
1310
liboutput_plugins_a_SOURCES += \
1311 1312
	src/output/plugins/FifoOutputPlugin.cxx \
	src/output/plugins/FifoOutputPlugin.hxx
1313 1314
endif

1315
if ENABLE_PIPE_OUTPUT
1316
liboutput_plugins_a_SOURCES += \
1317 1318
	src/output/plugins/PipeOutputPlugin.cxx \
	src/output/plugins/PipeOutputPlugin.hxx
1319 1320
endif

1321
if ENABLE_JACK
1322
liboutput_plugins_a_SOURCES += \
1323 1324
	src/output/plugins/JackOutputPlugin.cxx \
	src/output/plugins/JackOutputPlugin.hxx
1325 1326 1327
endif

if HAVE_OSS
1328
liboutput_plugins_a_SOURCES += \
1329 1330
	src/output/plugins/OssOutputPlugin.cxx \
	src/output/plugins/OssOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1331
libmixer_plugins_a_SOURCES += src/mixer/plugins/OssMixerPlugin.cxx
1332 1333
endif

Serge Ziryukin's avatar
Serge Ziryukin committed
1334
if HAVE_OPENAL
1335
liboutput_plugins_a_SOURCES += \
1336 1337
	src/output/plugins/OpenALOutputPlugin.cxx \
	src/output/plugins/OpenALOutputPlugin.hxx
Serge Ziryukin's avatar
Serge Ziryukin committed
1338 1339
endif

1340
if HAVE_OSX
1341
liboutput_plugins_a_SOURCES += \
1342 1343
	src/output/plugins/OSXOutputPlugin.cxx \
	src/output/plugins/OSXOutputPlugin.hxx
1344 1345
endif

1346
if ENABLE_PULSE
1347
liboutput_plugins_a_SOURCES += \
1348 1349
	src/output/plugins/PulseOutputPlugin.cxx \
	src/output/plugins/PulseOutputPlugin.hxx
1350
libmixer_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1351
	src/mixer/plugins/PulseMixerPlugin.cxx src/mixer/plugins/PulseMixerPlugin.hxx
1352 1353 1354

noinst_LIBRARIES += libpulse.a
libpulse_a_SOURCES = \
1355
	src/lib/pulse/LogError.cxx src/lib/pulse/LogError.hxx \
1356
	src/lib/pulse/Error.cxx src/lib/pulse/Error.hxx \
1357 1358 1359 1360
	src/lib/pulse/Domain.cxx src/lib/pulse/Domain.hxx
libpulse_a_CPPFLAGS = $(AM_CPPFLAGS) $(PULSE_CFLAGS)
PULSE_LIBS2 = libpulse.a $(PULSE_LIBS)
OUTPUT_LIBS += $(PULSE_LIBS2)
1361 1362 1363
endif

if HAVE_SHOUT
1364
liboutput_plugins_a_SOURCES += \
1365 1366
	src/output/plugins/ShoutOutputPlugin.cxx \
	src/output/plugins/ShoutOutputPlugin.hxx
1367 1368
endif

1369
if ENABLE_RECORDER_OUTPUT
1370
liboutput_plugins_a_SOURCES += \
1371 1372
	src/output/plugins/RecorderOutputPlugin.cxx \
	src/output/plugins/RecorderOutputPlugin.hxx
1373 1374
endif

1375
if ENABLE_HTTPD_OUTPUT
1376
liboutput_plugins_a_SOURCES += \
1377 1378 1379 1380 1381 1382 1383 1384
	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
1385 1386
endif

1387
if ENABLE_SOLARIS_OUTPUT
1388
liboutput_plugins_a_SOURCES += \
1389
	src/output/plugins/SolarisOutputPlugin.cxx src/output/plugins/SolarisOutputPlugin.hxx
1390 1391
endif

1392
if ENABLE_WINMM_OUTPUT
1393
liboutput_plugins_a_SOURCES += \
1394 1395
	src/output/plugins/WinmmOutputPlugin.cxx \
	src/output/plugins/WinmmOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1396
libmixer_plugins_a_SOURCES += src/mixer/plugins/WinmmMixerPlugin.cxx
1397 1398
endif

1399

1400 1401 1402 1403
#
# Playlist plugins
#

1404
libplaylist_plugins_a_SOURCES = \
1405 1406
	src/playlist/PlaylistPlugin.hxx \
	src/playlist/SongEnumerator.hxx \
1407 1408
	src/playlist/CloseSongEnumerator.cxx \
	src/playlist/CloseSongEnumerator.hxx \
1409 1410 1411 1412 1413 1414
	src/playlist/MemorySongEnumerator.cxx \
	src/playlist/MemorySongEnumerator.hxx \
	src/playlist/plugins/ExtM3uPlaylistPlugin.cxx \
	src/playlist/plugins/ExtM3uPlaylistPlugin.hxx \
	src/playlist/plugins/M3uPlaylistPlugin.cxx \
	src/playlist/plugins/M3uPlaylistPlugin.hxx \
1415 1416
	src/playlist/plugins/PlsPlaylistPlugin.cxx \
	src/playlist/plugins/PlsPlaylistPlugin.hxx \
1417
	src/playlist/PlaylistRegistry.cxx src/playlist/PlaylistRegistry.hxx
1418
libplaylist_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1419
	$(EXPAT_CFLAGS) \
1420
	$(YAJL_CFLAGS) \
1421
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS))
1422 1423 1424

PLAYLIST_LIBS = \
	libplaylist_plugins.a \
1425
	$(EXPAT_LIBS) \
1426
	$(FLAC_LIBS)
1427

1428 1429 1430 1431 1432 1433 1434 1435 1436
if ENABLE_CUE
libplaylist_plugins_a_SOURCES += \
	src/playlist/cue/CueParser.cxx src/playlist/cue/CueParser.hxx \
	src/playlist/plugins/CuePlaylistPlugin.cxx \
	src/playlist/plugins/CuePlaylistPlugin.hxx \
	src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx \
	src/playlist/plugins/EmbeddedCuePlaylistPlugin.hxx
endif

1437 1438
if ENABLE_SOUNDCLOUD
libplaylist_plugins_a_SOURCES += \
1439 1440
	src/playlist/plugins/SoundCloudPlaylistPlugin.cxx \
	src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
1441
PLAYLIST_LIBS += $(YAJL_LIBS)
1442
endif
1443

1444
if ENABLE_EXPAT
1445
libplaylist_plugins_a_SOURCES += \
1446
	src/lib/expat/ExpatParser.cxx src/lib/expat/ExpatParser.hxx \
1447 1448 1449 1450 1451 1452
	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
1453 1454
endif

1455 1456 1457 1458
#
# Filter plugins
#

1459
libfilter_plugins_a_SOURCES = \
1460 1461 1462
	src/AudioCompress/config.h \
	src/AudioCompress/compress.h \
	src/AudioCompress/compress.c \
1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475
	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
1476

1477 1478 1479 1480
FILTER_LIBS = \
	libfilter_plugins.a \
	$(PCM_LIBS)

1481

1482 1483 1484 1485 1486 1487
#
# systemd unit
#

if HAVE_SYSTEMD
systemdsystemunit_DATA = \
1488
	systemd/mpd.socket \
1489
	systemd/mpd.service
1490 1491
endif

1492 1493 1494 1495 1496 1497 1498

#
# Test programs
#

if ENABLE_TEST

1499
C_TESTS = \
1500
	test/test_util \
1501
	test/test_byte_reverse \
1502
	test/test_rewind \
1503
	test/test_mixramp \
1504
	test/test_pcm \
1505
	test/test_protocol \
1506 1507
	test/test_queue_priority \
	test/TestIcu
1508

1509 1510 1511 1512
if ENABLE_CURL
C_TESTS += test/test_icy_parser
endif

1513 1514 1515 1516
if ENABLE_DATABASE
C_TESTS += test/test_translate_song
endif

1517 1518 1519 1520
if ENABLE_ARCHIVE
C_TESTS += test/test_archive
endif

1521
TESTS = $(C_TESTS)
1522

1523
noinst_PROGRAMS = \
1524
	$(C_TESTS) \
1525
	test/read_conf \
1526
	test/run_resolver \
1527
	test/run_input \
1528
	test/WriteFile \
1529
	test/dump_text_file \
1530
	test/dump_playlist \
1531
	test/run_decoder \
1532
	test/read_tags \
1533
	test/run_filter \
1534
	test/run_output \
1535
	test/run_convert \
1536
	test/run_normalize \
1537 1538
	test/software_volume

1539 1540
if ENABLE_DATABASE
noinst_PROGRAMS += test/DumpDatabase
1541
noinst_PROGRAMS += test/run_storage
1542 1543
endif

1544 1545 1546 1547
if ENABLE_NEIGHBOR_PLUGINS
noinst_PROGRAMS += test/run_neighbor_explorer
endif

1548 1549 1550 1551
if HAVE_AVAHI
noinst_PROGRAMS += test/run_avahi
endif

1552 1553 1554 1555
if ENABLE_ARCHIVE
noinst_PROGRAMS += test/visit_archive
endif

1556
if ENABLE_ID3TAG
1557 1558 1559
noinst_PROGRAMS += test/dump_rva2
endif

1560
if ENABLE_ALSA
1561 1562 1563 1564
# this debug program is still ALSA specific
noinst_PROGRAMS += test/read_mixer
endif

1565
test_read_conf_LDADD = \
1566
	libconf.a \
1567
	$(FS_LIBS) \
1568
	$(ICU_LDADD) \
1569
	libsystem.a \
1570
	libutil.a \
1571
	$(GLIB_LIBS)
1572
test_read_conf_SOURCES = \
1573
	src/Log.cxx src/LogBackend.cxx \
1574
	test/read_conf.cxx
1575

1576
test_run_resolver_LDADD = \
1577
	libnet.a \
1578
	libutil.a \
1579
	$(GLIB_LIBS)
1580
test_run_resolver_SOURCES = \
1581
	src/Log.cxx src/LogBackend.cxx \
1582
	test/run_resolver.cxx
1583

1584 1585
if ENABLE_DATABASE

1586
test_DumpDatabase_LDADD = \
1587
	$(DB_LIBS) \
1588
	$(TAG_LIBS) \
1589
	libconf.a \
1590
	libutil.a \
1591
	libevent.a \
1592
	$(FS_LIBS) \
1593
	libsystem.a \
1594
	$(ICU_LDADD) \
1595 1596
	$(GLIB_LIBS)
test_DumpDatabase_SOURCES = test/DumpDatabase.cxx \
1597
	src/protocol/Ack.cxx \
1598
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1599 1600 1601
	src/db/DatabaseError.cxx \
	src/db/Registry.cxx \
	src/db/Selection.cxx \
1602 1603
	src/db/PlaylistVector.cxx \
	src/db/DatabaseLock.cxx \
1604
	src/SongSave.cxx \
1605
	src/DetachedSong.cxx \
1606
	src/TagSave.cxx \
1607
	src/SongFilter.cxx
1608

1609
if ENABLE_UPNP
1610
test_DumpDatabase_SOURCES += src/lib/expat/ExpatParser.cxx
1611 1612
endif

1613 1614 1615
test_run_storage_LDADD = \
	$(STORAGE_LIBS) \
	$(FS_LIBS) \
1616
	$(ICU_LDADD) \
1617 1618
	libevent.a \
	libthread.a \
1619 1620 1621 1622 1623
	libsystem.a \
	libutil.a \
	$(GLIB_LIBS)
test_run_storage_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
1624 1625
	src/IOThread.cxx \
	test/ScopeIOThread.hxx \
1626 1627
	test/run_storage.cxx

1628 1629
endif

1630
test_run_input_LDADD = \
1631
	$(INPUT_LIBS) \
1632
	$(ARCHIVE_LIBS) \
1633
	$(TAG_LIBS) \
1634
	libconf.a \
Max Kellermann's avatar
Max Kellermann committed
1635
	libutil.a \
1636
	libevent.a \
1637
	libthread.a \
1638
	$(FS_LIBS) \
1639
	$(ICU_LDADD) \
1640
	libsystem.a \
1641
	$(GLIB_LIBS)
1642
test_run_input_SOURCES = test/run_input.cxx \
1643
	test/ScopeIOThread.hxx \
1644
	test/stdbin.h \
1645
	src/Log.cxx src/LogBackend.cxx \
1646
	src/IOThread.cxx \
1647
	src/TagSave.cxx
1648

1649 1650 1651 1652
if ENABLE_NEIGHBOR_PLUGINS

test_run_neighbor_explorer_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
1653
	src/IOThread.cxx \
1654
	test/run_neighbor_explorer.cxx
1655
test_run_neighbor_explorer_LDADD = $(AM_LDADD) \
1656 1657
	$(GLIB_LIBS) \
	$(NEIGHBOR_LIBS) \
1658 1659 1660
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
	libtag.a \
1661 1662
	libconf.a \
	libevent.a \
1663
	$(FS_LIBS) \
1664
	$(ICU_LDADD) \
1665 1666 1667 1668
	libsystem.a \
	libthread.a \
	libutil.a

1669
if ENABLE_UPNP
1670 1671 1672
test_run_neighbor_explorer_SOURCES += src/lib/expat/ExpatParser.cxx
endif

1673 1674
endif

1675 1676 1677 1678 1679
if ENABLE_ARCHIVE

test_visit_archive_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1680
	$(TAG_LIBS) \
1681
	libconf.a \
Max Kellermann's avatar
Max Kellermann committed
1682
	libutil.a \
1683
	libevent.a \
1684
	libthread.a \
1685
	$(FS_LIBS) \
1686
	$(ICU_LDADD) \
1687
	libsystem.a \
1688 1689
	$(GLIB_LIBS)
test_visit_archive_SOURCES = test/visit_archive.cxx \
1690
	test/ScopeIOThread.hxx \
1691
	src/Log.cxx src/LogBackend.cxx \
1692
	src/IOThread.cxx \
1693
	src/input/Open.cxx
1694 1695 1696

endif

1697
if ENABLE_ZLIB
1698

1699 1700
noinst_PROGRAMS += test/run_gzip test/run_gunzip

1701 1702 1703 1704 1705
test_run_gzip_LDADD = \
	libutil.a \
	$(FS_LIBS)
test_run_gzip_SOURCES = test/run_gzip.cxx

1706 1707 1708 1709 1710 1711
test_run_gunzip_SOURCES = test/run_gunzip.cxx \
	src/Log.cxx src/LogBackend.cxx
test_run_gunzip_LDADD = \
	$(GLIB_LIBS) \
	libutil.a \
	$(FS_LIBS) \
1712
	$(ICU_LDADD) \
1713 1714
	libsystem.a

1715 1716
endif

1717 1718 1719 1720 1721 1722 1723 1724 1725 1726
test_WriteFile_LDADD = \
	$(FS_LIBS) \
	$(ICU_LDADD) \
	libsystem.a \
	libutil.a \
	$(GLIB_LIBS)
test_WriteFile_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
	test/WriteFile.cxx

1727 1728 1729
test_dump_text_file_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1730
	$(TAG_LIBS) \
1731
	libconf.a \
1732
	libevent.a \
1733
	$(FS_LIBS) \
1734
	$(ICU_LDADD) \
1735
	libsystem.a \
1736
	libthread.a \
1737
	libutil.a \
1738
	$(GLIB_LIBS)
1739
test_dump_text_file_SOURCES = test/dump_text_file.cxx \
1740
	test/ScopeIOThread.hxx \
1741
	test/stdbin.h \
1742
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1743
	src/IOThread.cxx
1744

1745
test_dump_playlist_LDADD = \
1746
	$(PLAYLIST_LIBS) \
1747
	$(FLAC_LIBS) \
1748
	$(INPUT_LIBS) \
1749
	$(ARCHIVE_LIBS) \
1750 1751
	$(DECODER_LIBS) \
	$(TAG_LIBS) \
1752
	libconf.a \
1753
	libevent.a \
1754
	libthread.a \
1755
	$(FS_LIBS) \
1756
	$(ICU_LDADD) \
1757
	libsystem.a \
1758
	libutil.a \
Max Kellermann's avatar
Max Kellermann committed
1759
	libpcm.a \
1760
	$(GLIB_LIBS)
1761
test_dump_playlist_SOURCES = test/dump_playlist.cxx \
1762
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1763
	test/ScopeIOThread.hxx \
1764
	$(DECODER_SRC) \
1765
	src/Log.cxx src/LogBackend.cxx \
1766
	src/IOThread.cxx \
1767
	src/TagSave.cxx \
1768
	src/TagFile.cxx \
1769
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1770
	src/DetachedSong.cxx
1771

1772
if ENABLE_FLAC
1773
test_dump_playlist_SOURCES += \
1774
	src/ReplayGainInfo.cxx \
1775
	src/decoder/plugins/FlacMetadata.cxx
1776 1777
endif

1778
test_run_decoder_LDADD = \
1779
	$(DECODER_LIBS) \
1780
	libpcm.a \
1781
	$(INPUT_LIBS) \
1782
	$(ARCHIVE_LIBS) \
1783
	$(TAG_LIBS) \
1784
	libconf.a \
1785
	libevent.a \
1786
	libthread.a \
1787
	$(FS_LIBS) \
1788
	$(ICU_LDADD) \
1789
	libsystem.a \
1790
	libutil.a \
1791
	$(GLIB_LIBS)
1792
test_run_decoder_SOURCES = test/run_decoder.cxx \
1793
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1794
	test/ScopeIOThread.hxx \
1795
	test/stdbin.h \
1796
	src/Log.cxx src/LogBackend.cxx \
1797
	src/IOThread.cxx \
1798
	src/ReplayGainInfo.cxx \
1799
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1800 1801
	$(ARCHIVE_SRC) \
	$(INPUT_SRC) \
1802
	$(TAG_SRC) \
1803 1804
	$(DECODER_SRC)

1805
test_read_tags_LDADD = \
1806
	$(DECODER_LIBS) \
1807
	libpcm.a \
1808
	$(INPUT_LIBS) \
1809
	$(ARCHIVE_LIBS) \
1810
	$(TAG_LIBS) \
1811
	libconf.a \
1812
	libevent.a \
1813
	libthread.a \
1814
	$(FS_LIBS) \
1815
	$(ICU_LDADD) \
1816
	libsystem.a \
1817
	libutil.a \
1818
	$(GLIB_LIBS)
1819
test_read_tags_SOURCES = test/read_tags.cxx \
1820
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1821
	test/ScopeIOThread.hxx \
1822
	src/Log.cxx src/LogBackend.cxx \
1823
	src/IOThread.cxx \
1824
	src/ReplayGainInfo.cxx \
1825
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1826
	$(DECODER_SRC)
1827

1828
if ENABLE_ID3TAG
1829
test_dump_rva2_LDADD = \
1830
	$(TAG_LIBS) \
1831
	libutil.a \
1832
	$(GLIB_LIBS)
1833
test_dump_rva2_SOURCES = \
1834
	src/Log.cxx src/LogBackend.cxx \
1835
	test/dump_rva2.cxx
1836 1837
endif

1838
test_run_filter_LDADD = \
1839
	$(FILTER_LIBS) \
1840
	libconf.a \
1841
	$(FS_LIBS) \
1842
	$(ICU_LDADD) \
1843
	libsystem.a \
1844
	libutil.a \
1845
	$(GLIB_LIBS)
1846
test_run_filter_SOURCES = test/run_filter.cxx \
1847
	test/FakeReplayGainConfig.cxx \
1848
	test/stdbin.h \
1849
	src/Log.cxx src/LogBackend.cxx \
1850
	src/filter/FilterPlugin.cxx src/filter/FilterRegistry.cxx \
1851
	src/CheckAudioFormat.cxx \
1852
	src/AudioFormat.cxx \
1853
	src/AudioParser.cxx \
1854
	src/ReplayGainInfo.cxx
1855

1856 1857
if ENABLE_ENCODER
noinst_PROGRAMS += test/run_encoder
1858
test_run_encoder_SOURCES = test/run_encoder.cxx \
1859
	test/stdbin.h \
1860
	src/Log.cxx src/LogBackend.cxx \
1861
	src/CheckAudioFormat.cxx \
1862
	src/AudioFormat.cxx \
1863
	src/AudioParser.cxx
1864
test_run_encoder_LDADD = \
1865
	$(ENCODER_LIBS) \
1866 1867
	$(TAG_LIBS) \
	libconf.a \
1868
	libpcm.a \
1869
	libthread.a \
1870
	$(FS_LIBS) \
1871
	$(ICU_LDADD) \
1872
	libsystem.a \
1873
	libutil.a \
1874
	$(GLIB_LIBS)
1875
endif
1876

1877
if ENABLE_VORBISENC
1878
noinst_PROGRAMS += test/test_vorbis_encoder
1879
test_test_vorbis_encoder_SOURCES = test/test_vorbis_encoder.cxx \
1880
	test/stdbin.h \
1881
	src/Log.cxx src/LogBackend.cxx \
1882
	src/CheckAudioFormat.cxx \
1883
	src/AudioFormat.cxx \
1884
	src/AudioParser.cxx \
1885 1886 1887 1888 1889
	$(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
1890
	$(PCM_LIBS) \
1891
	$(TAG_LIBS) \
1892
	libconf.a \
1893
	$(FS_LIBS) \
1894
	$(ICU_LDADD) \
1895
	libsystem.a \
1896
	libutil.a \
1897 1898 1899
	$(GLIB_LIBS)
endif

1900
test_software_volume_SOURCES = test/software_volume.cxx \
1901
	test/stdbin.h \
1902
	src/Log.cxx src/LogBackend.cxx \
1903
	src/AudioFormat.cxx src/CheckAudioFormat.cxx \
1904
	src/AudioParser.cxx
1905
test_software_volume_LDADD = \
1906
	$(PCM_LIBS) \
1907
	libutil.a \
1908
	$(GLIB_LIBS)
1909

1910
test_run_avahi_SOURCES = \
1911
	src/Log.cxx src/LogBackend.cxx \
1912
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/AvahiPoll.cxx \
1913 1914 1915 1916 1917 1918 1919
	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 \
1920
	libutil.a \
1921
	$(GLIB_LIBS) \
1922 1923
	$(AVAHI_LIBS)

1924
test_run_normalize_SOURCES = test/run_normalize.cxx \
1925
	test/stdbin.h \
1926
	src/CheckAudioFormat.cxx \
1927
	src/AudioCompress/compress.c \
1928
	src/AudioParser.cxx
1929
test_run_normalize_LDADD = \
1930
	libutil.a \
1931 1932
	$(GLIB_LIBS)

1933
test_run_convert_SOURCES = test/run_convert.cxx \
1934
	src/Log.cxx src/LogBackend.cxx \
1935
	src/AudioFormat.cxx \
1936
	src/CheckAudioFormat.cxx \
1937
	src/AudioParser.cxx
1938
test_run_convert_LDADD = \
1939
	$(PCM_LIBS) \
1940 1941 1942
	libconf.a \
	$(FS_LIBS) \
	libsystem.a \
1943
	libutil.a \
1944
	$(ICU_LDADD) \
1945 1946
	$(GLIB_LIBS)

1947
test_run_output_LDADD = $(MPD_LIBS) \
1948
	$(PCM_LIBS) \
1949
	$(OUTPUT_LIBS) \
1950 1951 1952
	$(ENCODER_LIBS) \
	libmixer_plugins.a \
	$(FILTER_LIBS) \
1953
	$(TAG_LIBS) \
1954
	libconf.a \
1955
	libevent.a \
1956
	$(FS_LIBS) \
1957
	$(ICU_LDADD) \
1958
	libnet.a \
1959
	libsystem.a \
1960
	libthread.a \
1961
	libutil.a \
1962
	$(GLIB_LIBS)
1963
test_run_output_SOURCES = test/run_output.cxx \
1964
	test/FakeReplayGainConfig.cxx \
1965
	test/ScopeIOThread.hxx \
1966
	test/stdbin.h \
1967
	src/Log.cxx src/LogBackend.cxx \
1968
	src/IOThread.cxx \
1969
	src/CheckAudioFormat.cxx \
1970
	src/AudioFormat.cxx \
1971
	src/AudioParser.cxx \
1972 1973
	src/output/Domain.cxx \
	src/output/Init.cxx src/output/Finish.cxx src/output/Registry.cxx \
1974
	src/output/OutputPlugin.cxx \
Max Kellermann's avatar
Max Kellermann committed
1975 1976
	src/mixer/MixerControl.cxx \
	src/mixer/MixerType.cxx \
1977 1978
	src/filter/FilterPlugin.cxx \
	src/filter/FilterConfig.cxx \
1979
	src/ReplayGainInfo.cxx
1980

1981
test_read_mixer_LDADD = \
1982
	libpcm.a \
1983
	libmixer_plugins.a \
1984
	$(OUTPUT_LIBS) \
1985
	libconf.a \
1986
	libevent.a \
1987
	$(FS_LIBS) \
1988
	$(ICU_LDADD) \
1989
	libsystem.a \
1990
	libutil.a \
1991
	$(GLIB_LIBS)
1992
test_read_mixer_SOURCES = test/read_mixer.cxx \
1993
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1994
	src/mixer/MixerControl.cxx \
1995
	src/filter/FilterPlugin.cxx \
1996
	src/AudioFormat.cxx \
1997
	src/filter/plugins/VolumeFilterPlugin.cxx
1998

1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
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

2011
if ENABLE_INOTIFY
2012 2013
noinst_PROGRAMS += test/run_inotify
test_run_inotify_SOURCES = test/run_inotify.cxx \
2014
	test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
2015
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
2016 2017
	src/db/update/InotifyDomain.cxx \
	src/db/update/InotifySource.cxx
2018
test_run_inotify_LDADD = \
2019
	libevent.a \
2020
	libsystem.a \
2021 2022
	libutil.a \
	$(GLIB_LIBS)
2023 2024
endif

2025
test_test_util_SOURCES = \
2026
	test/DivideStringTest.hxx \
2027
	test/SplitStringTest.hxx \
2028
	test/UriUtilTest.hxx \
2029
	test/TestCircularBuffer.hxx \
2030 2031 2032 2033 2034 2035 2036
	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)

2037
test_test_byte_reverse_SOURCES = \
2038
	test/test_byte_reverse.cxx
2039 2040
test_test_byte_reverse_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_byte_reverse_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2041 2042
test_test_byte_reverse_LDADD = \
	libutil.a \
2043
	$(CPPUNIT_LIBS)
2044

2045 2046 2047 2048 2049 2050
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 = \
2051
	$(GLIB_LIBS) \
2052 2053 2054 2055 2056 2057
	$(INPUT_LIBS) \
	libthread.a \
	libtag.a \
	libutil.a \
	$(CPPUNIT_LIBS)

2058
test_test_mixramp_SOURCES = \
2059
	src/Log.cxx src/LogBackend.cxx \
2060 2061 2062 2063
	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 = \
2064
	libutil.a \
2065 2066
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)
2067

2068
if ENABLE_CURL
2069
test_test_icy_parser_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
2070
	src/Log.cxx src/LogBackend.cxx \
2071 2072 2073 2074 2075
	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
2076
	libutil.a \
2077 2078
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)
2079
endif
2080

2081
test_test_pcm_SOURCES = \
2082
	src/AudioFormat.cxx \
2083
	test/test_pcm_util.hxx \
2084 2085 2086
	test/test_pcm_dither.cxx \
	test/test_pcm_pack.cxx \
	test/test_pcm_channels.cxx \
2087
	test/test_pcm_format.cxx \
2088
	test/test_pcm_volume.cxx \
2089
	test/test_pcm_mix.cxx \
2090
	test/test_pcm_export.cxx \
2091 2092
	test/test_pcm_all.hxx \
	test/test_pcm_main.cxx
2093 2094
test_test_pcm_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_pcm_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2095 2096
test_test_pcm_LDADD = \
	$(PCM_LIBS) \
2097
	libutil.a \
2098
	$(CPPUNIT_LIBS) \
2099 2100
	$(GLIB_LIBS)

2101
test_test_archive_SOURCES = \
2102
	src/Log.cxx src/LogBackend.cxx \
2103 2104 2105 2106 2107
	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 \
2108
	libutil.a \
2109 2110 2111
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)

2112 2113
if ENABLE_DATABASE

2114
test_test_translate_song_SOURCES = \
2115
	src/playlist/PlaylistSong.cxx \
2116
	src/PlaylistError.cxx \
2117
	src/DetachedSong.cxx \
2118
	src/SongLoader.cxx \
2119 2120 2121 2122 2123
	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 = \
2124
	$(STORAGE_LIBS) \
2125
	libtag.a \
2126
	$(FS_LIBS) \
2127
	$(ICU_LDADD) \
2128 2129 2130 2131 2132
	libsystem.a \
	libutil.a \
	$(GLIB_LIBS) \
	$(CPPUNIT_LIBS)

2133 2134
endif

2135 2136 2137 2138 2139 2140 2141 2142 2143 2144
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)

2145
test_test_queue_priority_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
2146
	src/queue/Queue.cxx \
2147
	src/DetachedSong.cxx \
2148
	test/test_queue_priority.cxx
2149 2150
test_test_queue_priority_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_queue_priority_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2151
test_test_queue_priority_LDADD = \
2152
	libsystem.a \
2153
	libutil.a \
2154
	$(CPPUNIT_LIBS)
2155

2156 2157 2158 2159 2160 2161 2162 2163 2164
test_TestIcu_SOURCES = \
	test/TestIcu.cxx
test_TestIcu_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_TestIcu_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
test_TestIcu_LDADD = \
	$(ICU_LDADD) \
	libutil.a \
	$(CPPUNIT_LIBS)

2165 2166
if ENABLE_DSD

Max Kellermann's avatar
Max Kellermann committed
2167
noinst_PROGRAMS += src/pcm/dsd2pcm/dsd2pcm
2168

Max Kellermann's avatar
Max Kellermann committed
2169 2170
src_pcm_dsd2pcm_dsd2pcm_SOURCES = \
	src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h \
2171
	src/pcm/dsd2pcm/dsd2pcm.hpp \
Max Kellermann's avatar
Max Kellermann committed
2172
	src/pcm/dsd2pcm/noiseshape.c src/pcm/dsd2pcm/noiseshape.h \
2173
	src/pcm/dsd2pcm/noiseshape.hpp \
Max Kellermann's avatar
Max Kellermann committed
2174 2175
	src/pcm/dsd2pcm/main.cpp
src_pcm_dsd2pcm_dsd2pcm_LDADD = libutil.a
2176

2177 2178
endif

2179 2180
endif

2181 2182 2183 2184 2185 2186

#
# Documentation
#

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

2189
DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
2190

2191 2192 2193 2194
if ENABLE_DOCUMENTATION
protocoldir = $(docdir)/protocol
protocol_DATA = $(wildcard doc/protocol/*.html)

2195 2196 2197
userdir = $(docdir)/user
user_DATA = $(wildcard doc/user/*.html)

2198 2199 2200
developerdir = $(docdir)/developer
developer_DATA = $(wildcard doc/developer/*.html)

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

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

2206
doc/api/html/index.html: doc/doxygen.conf
2207
	@$(MKDIR_P) $(@D)
2208
	$(DOXYGEN) $<
2209

2210 2211 2212 2213 2214 2215 2216 2217
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
2218
	$(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
2219
		$(DESTDIR)$(docdir)/api/html
2220

2221 2222 2223
uninstall-local:
	rm -f $(DESTDIR)$(docdir)/api/html/*.*

2224
upload: $(DOCBOOK_HTML) doc/api/html/index.html
2225
	rsync -vpruz --delete doc/ www.musicpd.org:/var/www/doc/ \
2226 2227 2228
		--chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
		--include=protocol --include=protocol/** \
		--include=user --include=user/** \
2229
		--include=developer --include=developer/** \
2230 2231 2232
		--include=api --include=api/** \
		--exclude=*

2233 2234 2235
endif


2236 2237 2238
#
# Distribution
#
Eric Wong's avatar
Eric Wong committed
2239

2240
EXTRA_DIST = $(doc_DATA) autogen.sh \
2241 2242 2243
	test/test_archive_bzip2.sh  \
	test/test_archive_iso9660.sh \
	test/test_archive_zzip.sh \
2244
	$(wildcard scripts/*.sh) \
2245
	$(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
2246
	systemd/mpd.socket \
2247 2248 2249 2250 2251 2252 2253
	android/AndroidManifest.xml \
	android/build.py \
	android/custom_rules.xml \
	android/res/values/strings.xml \
	android/src/Bridge.java \
	android/src/Loader.java \
	android/src/Main.java \
2254
	win32/res/mpd.rc.in win32/res/mpd.ico