Makefile.am 65.6 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 $(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
	libbasic.a \
24
	libconf.a \
25 26
	libtag.a \
	libinput.a \
27
	libfs.a \
28
	libplaylist_plugins.a \
29
	libdecoder.a \
30 31 32
	libfilter_plugins.a \
	libmixer_plugins.a \
	liboutput_plugins.a
33

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

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

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

libmpd_a_SOURCES = \
72 73
	$(OUTPUT_API_SRC) \
	$(MIXER_API_SRC) \
74
	src/check.h \
75
	src/Compiler.h \
76 77
	src/open.h \
	src/poison.h \
Max Kellermann's avatar
Max Kellermann committed
78
	src/notify.cxx src/notify.hxx \
79
	src/protocol/Ack.cxx src/protocol/Ack.hxx \
Max Kellermann's avatar
Max Kellermann committed
80 81
	src/protocol/ArgParser.cxx src/protocol/ArgParser.hxx \
	src/protocol/Result.cxx src/protocol/Result.hxx \
82
	src/command/Request.hxx \
83 84 85 86
	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 \
87
	src/command/TagCommands.cxx src/command/TagCommands.hxx \
88 89
	src/command/PlayerCommands.cxx src/command/PlayerCommands.hxx \
	src/command/PlaylistCommands.cxx src/command/PlaylistCommands.hxx \
90
	src/command/FileCommands.cxx src/command/FileCommands.hxx \
91 92 93 94
	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
95
	src/Idle.cxx src/Idle.hxx \
96
	src/IdleFlags.cxx src/IdleFlags.hxx \
97 98 99 100
	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 \
101
	src/decoder/Client.hxx \
102
	src/decoder/DecoderPlugin.hxx \
103
	src/decoder/Bridge.cxx src/decoder/Bridge.hxx \
104
	src/decoder/DecoderPrint.cxx src/decoder/DecoderPrint.hxx \
105 106 107 108
	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 \
109
	src/filter/Observer.cxx src/filter/Observer.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 \
124
	src/client/Response.cxx src/client/Response.hxx \
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/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 142 143 144
	src/player/CrossFade.cxx src/player/CrossFade.hxx \
	src/player/Thread.cxx src/player/Thread.hxx \
	src/player/Control.cxx src/player/Control.hxx \
	src/player/Listener.hxx \
145
	src/PlaylistError.cxx src/PlaylistError.hxx \
146
	src/PlaylistPrint.cxx src/PlaylistPrint.hxx \
147
	src/PlaylistSave.cxx src/PlaylistSave.hxx \
148
	src/playlist/PlaylistStream.cxx src/playlist/PlaylistStream.hxx \
149 150 151 152 153
	src/playlist/PlaylistMapper.cxx src/playlist/PlaylistMapper.hxx \
	src/playlist/PlaylistAny.cxx src/playlist/PlaylistAny.hxx \
	src/playlist/PlaylistSong.cxx src/playlist/PlaylistSong.hxx \
	src/playlist/PlaylistQueue.cxx src/playlist/PlaylistQueue.hxx \
	src/playlist/Print.cxx src/playlist/Print.hxx \
154
	src/BulkEdit.hxx \
155 156
	src/db/PlaylistVector.cxx src/db/PlaylistVector.hxx \
	src/db/PlaylistInfo.hxx \
Max Kellermann's avatar
Max Kellermann committed
157 158 159 160
	src/queue/IdTable.hxx \
	src/queue/Queue.cxx src/queue/Queue.hxx \
	src/queue/QueuePrint.cxx src/queue/QueuePrint.hxx \
	src/queue/QueueSave.cxx src/queue/QueueSave.hxx \
161 162 163 164 165
	src/queue/Playlist.cxx src/queue/Playlist.hxx \
	src/queue/PlaylistControl.cxx \
	src/queue/PlaylistEdit.cxx \
	src/queue/PlaylistTag.cxx \
	src/queue/PlaylistState.cxx src/queue/PlaylistState.hxx \
166
	src/queue/Listener.hxx \
167
	src/PluginUnavailable.hxx \
168
	src/ReplayGainGlobal.cxx src/ReplayGainGlobal.hxx \
169
	src/DetachedSong.cxx src/DetachedSong.hxx \
170
	src/LocateUri.cxx src/LocateUri.hxx \
171
	src/SongUpdate.cxx \
172
	src/SongLoader.cxx src/SongLoader.hxx \
Max Kellermann's avatar
Max Kellermann committed
173
	src/SongPrint.cxx src/SongPrint.hxx \
174 175
	src/SongSave.cxx src/SongSave.hxx \
	src/StateFile.cxx src/StateFile.hxx \
176
	src/Stats.cxx src/Stats.hxx \
Max Kellermann's avatar
Max Kellermann committed
177
	src/TagPrint.cxx src/TagPrint.hxx \
178
	src/TagSave.cxx src/TagSave.hxx \
179
	src/TagFile.cxx src/TagFile.hxx \
180
	src/TagStream.cxx src/TagStream.hxx \
181
	src/TimePrint.cxx src/TimePrint.hxx \
Max Kellermann's avatar
Max Kellermann committed
182
	src/mixer/Volume.cxx src/mixer/Volume.hxx \
183
	src/Chrono.hxx \
184
	src/SongFilter.cxx src/SongFilter.hxx \
Max Kellermann's avatar
Max Kellermann committed
185
	src/PlaylistFile.cxx src/PlaylistFile.hxx
186

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

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

199 200
endif

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

236 237 238 239 240 241 242 243 244
CURL_SOURCES = \
	src/lib/curl/Version.cxx src/lib/curl/Version.hxx \
	src/lib/curl/Global.cxx src/lib/curl/Global.hxx \
	src/lib/curl/Request.cxx src/lib/curl/Request.hxx \
	src/lib/curl/Handler.hxx \
	src/lib/curl/Easy.hxx \
	src/lib/curl/Multi.hxx \
	src/lib/curl/Slist.hxx

245
UPNP_SOURCES = \
246
	src/lib/upnp/Compat.hxx \
247
	src/lib/upnp/Init.cxx src/lib/upnp/Init.hxx \
248
	src/lib/upnp/ClientInit.cxx src/lib/upnp/ClientInit.hxx \
249 250 251 252
	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/ixmlwrap.cxx src/lib/upnp/ixmlwrap.hxx \
253
	src/lib/upnp/Callback.hxx \
254
	src/lib/upnp/Util.cxx src/lib/upnp/Util.hxx \
255
	src/lib/upnp/UniqueIxml.hxx \
256 257 258
	src/lib/upnp/WorkQueue.hxx \
	src/lib/upnp/Action.hxx

259 260 261 262 263
#
# Android native library
#

if ANDROID
Max Kellermann's avatar
Max Kellermann committed
264

265 266 267 268 269 270 271 272 273 274
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

275 276
noinst_LIBRARIES += libandroid.a
libandroid_a_SOURCES = \
277
	src/android/Context.cxx src/android/Context.hxx \
278 279 280
	src/android/Environment.cxx src/android/Environment.hxx
libandroid_a_CPPFLAGS = $(AM_CPPFLAGS) -Iandroid/build/include

Max Kellermann's avatar
Max Kellermann committed
281 282 283 284 285
noinst_LIBRARIES += libmain.a
libmain_a_SOURCES = \
	src/Main.cxx src/Main.hxx
libmain_a_CPPFLAGS = $(AM_CPPFLAGS) -Iandroid/build/include

286
src_mpd_LDADD += libandroid.a libjava.a
287

288
all-local: android/build/$(APK_NAME)-debug.apk
Max Kellermann's avatar
Max Kellermann committed
289 290 291 292 293 294
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)

295
ANDROID_SDK_BUILD_TOOLS_VERSION = 20.0.0
296
ANDROID_SDK_PLATFORM = android-17
297 298

ANDROID_BUILD_TOOLS_DIR = $(ANDROID_SDK)/build-tools/$(ANDROID_SDK_BUILD_TOOLS_VERSION)
299 300
ANDROID_SDK_PLATFORM_DIR = $(ANDROID_SDK)/platforms/$(ANDROID_SDK_PLATFORM)

301 302 303
JAVAC = javac
AAPT = $(ANDROID_BUILD_TOOLS_DIR)/aapt
DX = $(ANDROID_BUILD_TOOLS_DIR)/dx
304 305
ZIPALIGN = $(ANDROID_BUILD_TOOLS_DIR)/zipalign

306 307 308 309
ANDROID_XML_RES := $(wildcard $(srcdir)/android/res/*/*.xml)
ANDROID_XML_RES_COPIES := $(patsubst $(srcdir)/android/%,android/build/%,$(ANDROID_XML_RES))

JAVA_SOURCE_NAMES = Bridge.java Loader.java Main.java
310
JAVA_SOURCE_PATHS = $(addprefix $(srcdir)/android/src/,$(JAVA_SOURCE_NAMES))
311 312 313 314 315 316

JAVA_CLASSFILES_DIR = android/build/classes

$(ANDROID_XML_RES_COPIES): $(ANDROID_XML_RES)
	@$(MKDIR_P) $(dir $@)
	cp $(patsubst android/build/%,$(srcdir)/android/%,$@) $@
Max Kellermann's avatar
Max Kellermann committed
317

318 319 320 321 322 323 324 325 326
android/build/resources.apk: $(ANDROID_XML_RES_COPIES) android/build/res/drawable/icon.png
	@$(MKDIR_P) android/build/gen
	$(AAPT) package -f -m --auto-add-overlay \
		--custom-package org.musicpd \
		-M $(srcdir)/android/AndroidManifest.xml \
		-S android/build/res \
		-J android/build/gen \
		-I $(ANDROID_SDK_PLATFORM_DIR)/android.jar \
		-F android/build/resources.apk
Max Kellermann's avatar
Max Kellermann committed
327

328 329 330
# R.java is generated by aapt, when resources.apk is generated
android/build/gen/org/musicpd/R.java: android/build/resources.apk

331
android/build/classes.dex: $(JAVA_SOURCE_PATHS) android/build/gen/org/musicpd/R.java
332 333 334 335 336 337 338 339
	@$(MKDIR_P) $(JAVA_CLASSFILES_DIR)
	$(JAVAC) -source 1.5 -target 1.5 -Xlint:-options \
		-cp $(ANDROID_SDK_PLATFORM_DIR)/android.jar:$(JAVA_CLASSFILES_DIR) \
		-d $(JAVA_CLASSFILES_DIR) $^
	$(DX) --dex --output $@ $(JAVA_CLASSFILES_DIR)

android/build/include/org_musicpd_Bridge.h: android/build/classes.dex
	javah -classpath $(ANDROID_SDK_PLATFORM_DIR)/android.jar:$(JAVA_CLASSFILES_DIR) -d $(@D) org.musicpd.Bridge
Max Kellermann's avatar
Max Kellermann committed
340

341
BUILT_SOURCES = android/build/include/org_musicpd_Bridge.h
Max Kellermann's avatar
Max Kellermann committed
342

343
android/build/lib/armeabi-v7a/libmpd.so: libmpd.so
Max Kellermann's avatar
Max Kellermann committed
344 345
	mkdir -p $(@D)
	rm -f $@
346
	$(STRIP) -o $@ $<
Max Kellermann's avatar
Max Kellermann committed
347

348 349 350 351
android/build/res/drawable/icon.png: mpd.svg
	mkdir -p $(@D)
	rsvg-convert --width=48 --height=48 $< -o $@

352 353 354 355
.DELETE_ON_ERROR: android/build/unsigned.apk
android/build/unsigned.apk: android/build/classes.dex android/build/resources.apk android/build/lib/armeabi-v7a/libmpd.so
	cp android/build/resources.apk $@
	cd $(dir $@) && zip -q -r $(notdir $@) classes.dex lib
Max Kellermann's avatar
Max Kellermann committed
356

357 358
android/build/$(APK_NAME)-debug.apk: android/build/unsigned.apk
	jarsigner -keystore $(HOME)/.android/debug.keystore -storepass android -signedjar $@ $< androiddebugkey
Max Kellermann's avatar
Max Kellermann committed
359

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

363
android/build/$(APK_NAME).apk: android/build/$(APK_NAME)-release-unaligned.apk
364
	$(ZIPALIGN) -f 4 $< $@
Max Kellermann's avatar
Max Kellermann committed
365

366 367
endif

368 369 370 371
#
# Windows resource file
#

372
win32/res/mpd.$(OBJEXT): %.$(OBJEXT): %.rc
373 374 375
	$(WINDRES) -i $< -o $@

if HAVE_WINDOWS
376
noinst_DATA = win32/res/mpd.rc
377

378 379
EXTRA_src_mpd_DEPENDENCIES = win32/res/mpd.$(OBJEXT)
src_mpd_LDFLAGS = -Wl,win32/res/mpd.$(OBJEXT)
380 381
endif

382 383 384 385 386 387 388
#
# Haiku resource file
#

src/haiku/mpd.rsrc: src/haiku/mpd.rdef
	$(RC) -o $@ $<

389
if ENABLE_HAIKU
390 391 392 393 394 395 396 397 398 399 400 401 402 403
noinst_DATA = src/haiku/mpd.rdef

EXTRA_src_mpd_DEPENDENCIES = src/haiku/mpd.rsrc

src/mpd.haiku-rsrc-done: src/mpd src/haiku/mpd.rsrc
	$(XRES) -o src/mpd src/haiku/mpd.rsrc
	@touch src/mpd.haiku-rsrc-done

all-local: src/mpd.haiku-rsrc-done

clean-local:
	rm -rf src/haiku/mpd.rsrc src/mpd.haiku-rsrc-done
endif

404
if ENABLE_DATABASE
405
if ENABLE_INOTIFY
406
libmpd_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
407 408 409 410
	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
411
endif
412
endif
413

414
if ENABLE_SQLITE
415
libmpd_a_SOURCES += \
416
	src/command/StickerCommands.cxx src/command/StickerCommands.hxx \
417
	src/lib/sqlite/Error.cxx src/lib/sqlite/Error.hxx \
418
	src/lib/sqlite/Util.hxx \
419
	src/sticker/Match.hxx \
420 421 422
	src/sticker/StickerDatabase.cxx src/sticker/StickerDatabase.hxx \
	src/sticker/StickerPrint.cxx src/sticker/StickerPrint.hxx \
	src/sticker/SongSticker.cxx src/sticker/SongSticker.hxx
423 424
endif

425 426 427
# Generic utility library

libutil_a_SOURCES = \
428
	src/util/Exception.cxx src/util/Exception.hxx \
429
	src/util/RuntimeError.hxx \
430
	src/util/Macros.hxx \
431
	src/util/BindMethod.hxx \
432
	src/util/Cast.hxx \
433
	src/util/Clamp.hxx \
434
	src/util/DeleteDisposer.hxx \
435
	src/util/Alloc.cxx src/util/Alloc.hxx \
436
	src/util/AllocatedArray.hxx \
437
	src/util/VarSize.hxx \
438
	src/util/ScopeExit.hxx \
439
	src/util/Domain.hxx \
440
	src/util/ReusableArray.hxx \
441
	src/util/ASCII.hxx \
Max Kellermann's avatar
Max Kellermann committed
442
	src/util/UTF8.cxx src/util/UTF8.hxx \
443
	src/util/CharUtil.hxx \
444
	src/util/NumberParser.hxx \
445
	src/util/MimeType.cxx src/util/MimeType.hxx \
446
	src/util/StringBuffer.hxx \
447
	src/util/StringPointer.hxx \
448
	src/util/StringView.cxx src/util/StringView.hxx \
449
	src/util/AllocatedString.cxx src/util/AllocatedString.hxx \
450
	src/util/StringUtil.cxx src/util/StringUtil.hxx \
451 452
	src/util/StringCompare.cxx src/util/StringCompare.hxx \
	src/util/WStringCompare.cxx src/util/WStringCompare.hxx \
453
	src/util/StringAPI.hxx \
454
	src/util/WStringAPI.hxx \
455
	src/util/DivideString.cxx src/util/DivideString.hxx \
456
	src/util/SplitString.cxx src/util/SplitString.hxx \
457
	src/util/IterableSplitString.hxx \
458
	src/util/FormatString.cxx src/util/FormatString.hxx \
459
	src/util/Tokenizer.cxx src/util/Tokenizer.hxx \
460
	src/util/TextFile.hxx \
461
	src/util/TimeParser.cxx src/util/TimeParser.hxx \
Max Kellermann's avatar
Max Kellermann committed
462
	src/util/UriUtil.cxx src/util/UriUtil.hxx \
463
	src/util/Manual.hxx \
464
	src/util/RefCount.hxx \
465
	src/util/StaticFifoBuffer.hxx \
466
	src/util/ForeignFifoBuffer.hxx \
467
	src/util/DynamicFifoBuffer.hxx \
468
	src/util/ConstBuffer.hxx \
469
	src/util/WritableBuffer.hxx \
470
	src/util/CircularBuffer.hxx \
471
	src/util/LazyRandomEngine.cxx src/util/LazyRandomEngine.hxx \
472
	src/util/SliceBuffer.hxx \
473
	src/util/HugeAllocator.cxx src/util/HugeAllocator.hxx \
474
	src/util/PeakBuffer.cxx src/util/PeakBuffer.hxx \
475
	src/util/OptionParser.cxx src/util/OptionParser.hxx \
476
	src/util/OptionDef.hxx \
477
	src/util/ByteReverse.cxx src/util/ByteReverse.hxx \
478
	src/util/format.c src/util/format.h \
479 480
	src/util/bit_reverse.c src/util/bit_reverse.h

481 482 483
# Multi-threading library

libthread_a_SOURCES = \
484
	src/thread/Util.cxx src/thread/Util.hxx \
485
	src/thread/Name.hxx \
486
	src/thread/Slack.hxx \
487 488 489 490 491 492
	src/thread/Mutex.hxx \
	src/thread/PosixMutex.hxx \
	src/thread/CriticalSection.hxx \
	src/thread/Cond.hxx \
	src/thread/PosixCond.hxx \
	src/thread/WindowsCond.hxx \
493
	src/thread/Thread.cxx src/thread/Thread.hxx \
494 495
	src/thread/Id.hxx

496 497 498
# Networking library

libnet_a_SOURCES = \
499
	src/net/Features.hxx \
500
	src/net/ToString.cxx src/net/ToString.hxx \
501
	src/net/Resolver.cxx src/net/Resolver.hxx \
502
	src/net/StaticSocketAddress.cxx src/net/StaticSocketAddress.hxx \
503
	src/net/AllocatedSocketAddress.cxx src/net/AllocatedSocketAddress.hxx \
504
	src/net/SocketAddress.cxx src/net/SocketAddress.hxx \
505 506 507
	src/net/SocketUtil.cxx src/net/SocketUtil.hxx \
	src/net/SocketError.cxx src/net/SocketError.hxx

508 509 510
# System library

libsystem_a_SOURCES = \
511
	src/system/ByteOrder.hxx \
512
	src/system/Error.hxx \
513
	src/system/FatalError.cxx src/system/FatalError.hxx \
514
	src/system/FileDescriptor.cxx src/system/FileDescriptor.hxx \
515
	src/system/fd_util.c src/system/fd_util.h \
516 517
	src/system/EventPipe.cxx src/system/EventPipe.hxx \
	src/system/EventFD.cxx src/system/EventFD.hxx \
518
	src/system/SignalFD.cxx src/system/SignalFD.hxx \
519
	src/system/EPollFD.cxx src/system/EPollFD.hxx \
520
	src/system/PeriodClock.hxx \
521
	src/system/Clock.cxx src/system/Clock.hxx
522

523 524 525
# Event loop library

libevent_a_SOURCES = \
526
	src/event/WakeFD.hxx \
527 528
	src/event/PollGroup.hxx \
	src/event/PollGroupEPoll.hxx \
529
	src/event/PollGroupPoll.hxx src/event/PollGroupPoll.cxx \
530 531
	src/event/PollGroupWinSelect.hxx src/event/PollGroupWinSelect.cxx \
	src/event/PollResultGeneric.hxx \
532
	src/event/SignalMonitor.hxx src/event/SignalMonitor.cxx \
533
	src/event/TimeoutMonitor.hxx src/event/TimeoutMonitor.cxx \
534
	src/event/IdleMonitor.hxx src/event/IdleMonitor.cxx \
535
	src/event/DeferredMonitor.hxx src/event/DeferredMonitor.cxx \
536
	src/event/DeferredCall.hxx \
537
	src/event/MaskMonitor.hxx src/event/MaskMonitor.cxx \
538 539
	src/event/SocketMonitor.cxx src/event/SocketMonitor.hxx \
	src/event/BufferedSocket.cxx src/event/BufferedSocket.hxx \
540
	src/event/FullyBufferedSocket.cxx src/event/FullyBufferedSocket.hxx \
541
	src/event/MultiSocketMonitor.cxx src/event/MultiSocketMonitor.hxx \
542
	src/event/ServerSocket.cxx src/event/ServerSocket.hxx \
543
	src/event/Call.hxx src/event/Call.cxx \
544
	src/event/Loop.cxx src/event/Loop.hxx
545

546 547 548
# UTF-8 library

libicu_a_SOURCES = \
549
	src/lib/icu/CaseFold.cxx src/lib/icu/CaseFold.hxx \
550
	src/lib/icu/Compare.cxx src/lib/icu/Compare.hxx \
551
	src/lib/icu/Collate.cxx src/lib/icu/Collate.hxx \
552
	src/lib/icu/Converter.cxx src/lib/icu/Converter.hxx
553

554 555
if HAVE_ICU
libicu_a_SOURCES += \
556
	src/lib/icu/Util.cxx src/lib/icu/Util.hxx \
557 558 559
	src/lib/icu/Init.cxx src/lib/icu/Init.hxx
endif

560 561 562 563 564
if HAVE_WINDOWS
libicu_a_SOURCES += \
	src/lib/icu/Win32.cxx src/lib/icu/Win32.hxx
endif

nanotech's avatar
nanotech committed
565 566 567
libicu_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ICU_CFLAGS)

568
ICU_LDADD = libicu.a $(ICU_LIBS)
569

570 571 572
# PCM library

libpcm_a_SOURCES = \
573 574 575
	src/CheckAudioFormat.cxx src/CheckAudioFormat.hxx \
	src/AudioFormat.cxx src/AudioFormat.hxx \
	src/AudioParser.cxx src/AudioParser.hxx \
576
	src/pcm/SampleFormat.cxx src/pcm/SampleFormat.hxx \
577
	src/pcm/Traits.hxx \
578
	src/pcm/Interleave.cxx src/pcm/Interleave.hxx \
579
	src/pcm/PcmBuffer.cxx src/pcm/PcmBuffer.hxx \
580
	src/pcm/PcmExport.cxx src/pcm/PcmExport.hxx \
Max Kellermann's avatar
Max Kellermann committed
581
	src/pcm/PcmConvert.cxx src/pcm/PcmConvert.hxx \
582
	src/pcm/PcmDop.cxx src/pcm/PcmDop.hxx \
583
	src/pcm/Volume.cxx src/pcm/Volume.hxx \
584
	src/pcm/Silence.cxx src/pcm/Silence.hxx \
Max Kellermann's avatar
Max Kellermann committed
585 586
	src/pcm/PcmMix.cxx src/pcm/PcmMix.hxx \
	src/pcm/PcmChannels.cxx src/pcm/PcmChannels.hxx \
587
	src/pcm/PcmPack.cxx src/pcm/PcmPack.hxx \
Max Kellermann's avatar
Max Kellermann committed
588
	src/pcm/PcmFormat.cxx src/pcm/PcmFormat.hxx \
589 590
	src/pcm/FloatConvert.hxx \
	src/pcm/ShiftConvert.hxx \
591
	src/pcm/Neon.hxx \
592
	src/pcm/FormatConverter.cxx src/pcm/FormatConverter.hxx \
593
	src/pcm/ChannelsConverter.cxx src/pcm/ChannelsConverter.hxx \
594
	src/pcm/Order.cxx src/pcm/Order.hxx \
595
	src/pcm/Resampler.hxx \
596
	src/pcm/GlueResampler.cxx src/pcm/GlueResampler.hxx \
597 598
	src/pcm/FallbackResampler.cxx src/pcm/FallbackResampler.hxx \
	src/pcm/ConfiguredResampler.cxx src/pcm/ConfiguredResampler.hxx \
Max Kellermann's avatar
Max Kellermann committed
599 600 601
	src/pcm/PcmDither.cxx src/pcm/PcmDither.hxx \
	src/pcm/PcmPrng.hxx \
	src/pcm/PcmUtils.hxx
602
libpcm_a_CPPFLAGS = $(AM_CPPFLAGS) \
603
	$(SOXR_CFLAGS) \
604
	$(LIBSAMPLERATE_CFLAGS)
605 606 607

PCM_LIBS = \
	libpcm.a \
608
	$(SOXR_LIBS) \
609
	$(LIBSAMPLERATE_LIBS)
610

611 612
if ENABLE_DSD
libpcm_a_SOURCES += \
613
	src/pcm/Dsd16.cxx src/pcm/Dsd16.hxx \
614
	src/pcm/Dsd32.cxx src/pcm/Dsd32.hxx \
615 616 617 618
	src/pcm/PcmDsd.cxx src/pcm/PcmDsd.hxx \
	src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h
endif

619
if ENABLE_LIBSAMPLERATE
620 621
libpcm_a_SOURCES += \
	src/pcm/LibsamplerateResampler.cxx src/pcm/LibsamplerateResampler.hxx
622 623
endif

624
if ENABLE_SOXR
625 626 627 628
libpcm_a_SOURCES += \
	src/pcm/SoxrResampler.cxx src/pcm/SoxrResampler.hxx
endif

629 630 631 632 633 634 635
# Xiph codec support library

if HAVE_XIPH

noinst_LIBRARIES += libxiph.a

libxiph_a_SOURCES = \
636
	src/lib/xiph/VorbisComment.hxx \
637
	src/lib/xiph/VorbisComments.cxx src/lib/xiph/VorbisComments.hxx \
638
	src/lib/xiph/XiphTags.cxx src/lib/xiph/XiphTags.hxx
639 640
libxiph_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(OGG_CFLAGS)
641

642 643
if HAVE_OGG
libxiph_a_SOURCES += \
644
	src/lib/xiph/OggVisitor.cxx src/lib/xiph/OggVisitor.hxx \
645
	src/lib/xiph/OggSerial.cxx src/lib/xiph/OggSerial.hxx \
646
	src/lib/xiph/OggSyncState.cxx src/lib/xiph/OggSyncState.hxx \
647
	src/lib/xiph/OggFind.cxx src/lib/xiph/OggFind.hxx \
648
	src/lib/xiph/OggPage.hxx \
649
	src/lib/xiph/OggPacket.cxx src/lib/xiph/OggPacket.hxx \
650
	src/lib/xiph/OggStreamState.hxx
651 652
endif

653 654
XIPH_LIBS = libxiph.a \
	$(OGG_LIBS)
655 656 657

endif

658 659
# File system library

660 661
FS_LIBS = libfs.a

662
libfs_a_SOURCES = \
663
	src/fs/io/Reader.hxx \
664
	src/fs/io/PeekReader.cxx src/fs/io/PeekReader.hxx \
665
	src/fs/io/FileReader.cxx src/fs/io/FileReader.hxx \
666
	src/fs/io/BufferedReader.cxx src/fs/io/BufferedReader.hxx \
667 668
	src/fs/io/TextFile.cxx src/fs/io/TextFile.hxx \
	src/fs/io/OutputStream.hxx \
669
	src/fs/io/StdioOutputStream.hxx \
670 671
	src/fs/io/FileOutputStream.cxx src/fs/io/FileOutputStream.hxx \
	src/fs/io/BufferedOutputStream.cxx src/fs/io/BufferedOutputStream.hxx \
672
	src/fs/Domain.cxx src/fs/Domain.hxx \
673
	src/fs/Limits.hxx \
Max Kellermann's avatar
Max Kellermann committed
674
	src/fs/Traits.cxx src/fs/Traits.hxx \
675 676
	src/fs/Config.cxx src/fs/Config.hxx \
	src/fs/Charset.cxx src/fs/Charset.hxx \
677
	src/fs/Path.cxx src/fs/Path2.cxx src/fs/Path.hxx \
678
	src/fs/AllocatedPath.cxx src/fs/AllocatedPath.hxx \
679
	src/fs/NarrowPath.hxx \
680
	src/fs/FileSystem.cxx src/fs/FileSystem.hxx \
681
	src/fs/FileInfo.hxx \
682
	src/fs/Glob.hxx \
683
	src/fs/StandardDirectory.cxx src/fs/StandardDirectory.hxx \
684
	src/fs/CheckFile.cxx src/fs/CheckFile.hxx \
685
	src/fs/DirectoryReader.cxx src/fs/DirectoryReader.hxx
686 687
libfs_a_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS)

688
if ENABLE_ZLIB
689
libfs_a_SOURCES += \
690
	src/lib/zlib/Error.cxx src/lib/zlib/Error.hxx \
691
	src/fs/io/GunzipReader.cxx src/fs/io/GunzipReader.hxx \
692
	src/fs/io/AutoGunzipReader.cxx src/fs/io/AutoGunzipReader.hxx \
693
	src/fs/io/GzipOutputStream.cxx src/fs/io/GzipOutputStream.hxx
694 695
FS_LIBS += $(ZLIB_LIBS)
endif
696

697 698 699 700 701
if HAVE_WINDOWS
# for PathMatchSpec()
FS_LIBS += -lshlwapi
endif

702 703
# Storage library

704
SMBCLIENT_SOURCES = \
705
	src/lib/smbclient/Domain.cxx src/lib/smbclient/Domain.hxx \
706
	src/lib/smbclient/Mutex.cxx src/lib/smbclient/Mutex.hxx \
707 708
	src/lib/smbclient/Init.cxx src/lib/smbclient/Init.hxx

709
NFS_SOURCES = \
710 711
	src/lib/nfs/Callback.hxx \
	src/lib/nfs/Cancellable.hxx \
712
	src/lib/nfs/Lease.hxx \
713 714 715
	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 \
716
	src/lib/nfs/Base.cxx src/lib/nfs/Base.hxx \
717
	src/lib/nfs/FileReader.cxx src/lib/nfs/FileReader.hxx \
718
	src/lib/nfs/Blocking.cxx src/lib/nfs/Blocking.hxx
719

720 721 722 723 724
if ENABLE_DATABASE

noinst_LIBRARIES += libstorage.a

libstorage_a_SOURCES = \
725 726
	src/storage/StoragePlugin.hxx \
	src/storage/Registry.cxx src/storage/Registry.hxx \
727
	src/storage/StorageInterface.cxx src/storage/StorageInterface.hxx \
728
	src/storage/CompositeStorage.cxx src/storage/CompositeStorage.hxx \
729
	src/storage/MemoryDirectoryReader.cxx src/storage/MemoryDirectoryReader.hxx \
730
	src/storage/Configured.cxx src/storage/Configured.hxx \
731
	src/storage/plugins/LocalStorage.cxx src/storage/plugins/LocalStorage.hxx \
732
	src/storage/StorageState.cxx src/storage/StorageState.hxx \
733 734
	src/storage/FileInfo.hxx

735
libstorage_a_CPPFLAGS = $(AM_CPPFLAGS) \
736
	$(NFS_CFLAGS) \
737 738
	$(SMBCLIENT_CFLAGS)

739
STORAGE_LIBS = \
740
	libstorage.a \
741 742
	$(CURL_LIBS) \
	$(EXPAT_LIBS) \
743
	$(NFS_LIBS) \
744
	$(SMBCLIENT_LIBS)
745

746 747
if ENABLE_SMBCLIENT
libstorage_a_SOURCES += \
748
	$(SMBCLIENT_SOURCES) \
749
	src/storage/plugins/SmbclientStorage.cxx src/storage/plugins/SmbclientStorage.hxx
750 751
endif

752 753
if ENABLE_NFS
libstorage_a_SOURCES += \
754
	$(NFS_SOURCES) \
755
	src/storage/plugins/NfsStorage.cxx src/storage/plugins/NfsStorage.hxx
756 757
endif

758 759 760 761 762 763
if ENABLE_WEBDAV
libstorage_a_SOURCES += \
	src/lib/expat/ExpatParser.cxx \
	src/storage/plugins/CurlStorage.cxx src/storage/plugins/CurlStorage.hxx
endif

764 765
endif

766 767 768 769
# neighbor plugins

if ENABLE_NEIGHBOR_PLUGINS

770
libmpd_a_SOURCES += \
771 772 773
	src/command/NeighborCommands.cxx \
	src/command/NeighborCommands.hxx

774 775
noinst_LIBRARIES += libneighbor.a

776 777 778 779 780 781 782 783 784
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) \
785
	$(UPNP_CFLAGS) \
786 787 788 789
	$(SMBCLIENT_CFLAGS)

if ENABLE_SMBCLIENT
libneighbor_a_SOURCES += \
790
	$(SMBCLIENT_SOURCES) \
791 792 793 794 795 796 797
	src/neighbor/plugins/SmbclientNeighborPlugin.cxx src/neighbor/plugins/SmbclientNeighborPlugin.hxx
endif

NEIGHBOR_LIBS = \
	$(SMBCLIENT_LIBS) \
	libneighbor.a

798
if ENABLE_UPNP
799 800 801 802 803 804 805 806
libneighbor_a_SOURCES += \
	$(UPNP_SOURCES) \
	src/neighbor/plugins/UpnpNeighborPlugin.cxx src/neighbor/plugins/UpnpNeighborPlugin.hxx
NEIGHBOR_LIBS += \
	$(EXPAT_LIBS) \
	$(UPNP_LIBS)
endif

807 808
endif

809 810
# database plugins

811 812 813 814
if ENABLE_DATABASE

noinst_LIBRARIES += libdb_plugins.a

815
libdb_plugins_a_SOURCES = \
816
	src/PlaylistDatabase.cxx src/PlaylistDatabase.hxx \
Max Kellermann's avatar
Max Kellermann committed
817 818
	src/db/Registry.cxx src/db/Registry.hxx \
	src/db/Helpers.cxx src/db/Helpers.hxx \
819
	src/db/UniqueTags.cxx src/db/UniqueTags.hxx \
820 821 822 823 824 825 826 827 828 829
	src/db/plugins/simple/DatabaseSave.cxx \
	src/db/plugins/simple/DatabaseSave.hxx \
	src/db/plugins/simple/DirectorySave.cxx \
	src/db/plugins/simple/DirectorySave.hxx \
	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
830 831 832
	src/db/plugins/simple/Mount.cxx \
	src/db/plugins/simple/Mount.hxx \
	src/db/plugins/simple/PrefixedLightSong.hxx \
833 834
	src/db/plugins/simple/SimpleDatabasePlugin.cxx \
	src/db/plugins/simple/SimpleDatabasePlugin.hxx
835 836
libdb_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(UPNP_CFLAGS)
837

838
if ENABLE_LIBMPDCLIENT
839
libdb_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
840
	src/db/plugins/ProxyDatabasePlugin.cxx src/db/plugins/ProxyDatabasePlugin.hxx
841 842
endif

843
DB_LIBS = \
844 845
	libdb_plugins.a \
	$(LIBMPDCLIENT_LIBS)
846

847
if ENABLE_UPNP
848
libdb_plugins_a_SOURCES += \
849
	$(UPNP_SOURCES) \
850
	src/db/plugins/upnp/UpnpDatabasePlugin.cxx src/db/plugins/upnp/UpnpDatabasePlugin.hxx \
Max Kellermann's avatar
Max Kellermann committed
851
	src/db/plugins/upnp/Tags.cxx src/db/plugins/upnp/Tags.hxx \
852
	src/db/plugins/upnp/ContentDirectoryService.cxx \
Max Kellermann's avatar
Max Kellermann committed
853 854
	src/db/plugins/upnp/Directory.cxx src/db/plugins/upnp/Directory.hxx \
	src/db/plugins/upnp/Object.cxx src/db/plugins/upnp/Object.hxx
855 856 857 858 859
DB_LIBS += \
	$(EXPAT_LIBS) \
	$(UPNP_LIBS)
endif

860 861
endif

862 863
# archive plugins

864 865 866 867
if ENABLE_ARCHIVE

noinst_LIBRARIES += libarchive.a

868
libmpd_a_SOURCES +=  \
869
	src/TagArchive.cxx src/TagArchive.hxx \
870
	src/db/update/Archive.cxx
871

872
libarchive_a_SOURCES = \
873 874 875 876 877 878
	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
879
	src/input/plugins/ArchiveInputPlugin.cxx src/input/plugins/ArchiveInputPlugin.hxx
880
libarchive_a_CPPFLAGS = $(AM_CPPFLAGS) \
881
	$(BZ2_CFLAGS) \
882
	$(ISO9660_CFLAGS) \
883 884 885
	$(ZZIP_CFLAGS)

ARCHIVE_LIBS = \
886
	libarchive.a \
887
	$(BZ2_LIBS) \
888
	$(ISO9660_LIBS) \
889 890
	$(ZZIP_LIBS)

891
if ENABLE_BZ2
892
libarchive_a_SOURCES += \
893 894
	src/archive/plugins/Bzip2ArchivePlugin.cxx \
	src/archive/plugins/Bzip2ArchivePlugin.hxx
895 896
endif

897
if ENABLE_ZZIP
898
libarchive_a_SOURCES += \
899 900
	src/archive/plugins/ZzipArchivePlugin.cxx \
	src/archive/plugins/ZzipArchivePlugin.hxx
901 902
endif

903
if ENABLE_ISO9660
904
libarchive_a_SOURCES += \
905 906
	src/archive/plugins/Iso9660ArchivePlugin.cxx \
	src/archive/plugins/Iso9660ArchivePlugin.hxx
907 908
endif

909 910
else
ARCHIVE_LIBS =
911 912
endif

913
libbasic_a_SOURCES = \
914
	src/ReplayGainConfig.hxx \
915
	src/ReplayGainMode.cxx src/ReplayGainMode.hxx \
916 917
	src/ReplayGainInfo.cxx src/ReplayGainInfo.hxx

918 919 920
# configuration library

libconf_a_SOURCES = \
921 922
	src/config/ConfigDefaults.hxx \
	src/config/ConfigPath.cxx src/config/ConfigPath.hxx \
923
	src/config/Data.cxx src/config/Data.hxx \
924
	src/config/Block.cxx src/config/Block.hxx \
925
	src/config/Param.cxx src/config/Param.hxx \
926 927 928 929 930 931
	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
932

933 934
# tag plugins

935
libtag_a_CPPFLAGS = $(AM_CPPFLAGS) \
936 937
	$(ID3TAG_CFLAGS)
TAG_LIBS = \
938
	libtag.a \
939 940
	$(ID3TAG_LIBS)

941
libtag_a_SOURCES =\
942 943
	src/tag/TagType.h \
	src/tag/Tag.cxx src/tag/Tag.hxx \
944
	src/tag/TagBuilder.cxx src/tag/TagBuilder.hxx \
945
	src/tag/TagItem.hxx \
946
	src/tag/TagHandler.cxx src/tag/TagHandler.hxx \
947
	src/tag/Mask.hxx \
948
	src/tag/Settings.cxx src/tag/Settings.hxx \
949
	src/tag/TagConfig.cxx src/tag/TagConfig.hxx \
950
	src/tag/TagNames.c \
951
	src/tag/TagString.cxx src/tag/TagString.hxx \
952 953
	src/tag/TagPool.cxx src/tag/TagPool.hxx \
	src/tag/TagTable.cxx src/tag/TagTable.hxx \
954
	src/tag/Set.cxx src/tag/Set.hxx \
955
	src/tag/Format.cxx src/tag/Format.hxx \
956
	src/tag/VorbisComment.cxx src/tag/VorbisComment.hxx \
957
	src/tag/ReplayGain.cxx src/tag/ReplayGain.hxx \
958
	src/tag/MixRamp.cxx src/tag/MixRamp.hxx \
959
	src/tag/Generic.cxx src/tag/Generic.hxx \
960
	src/tag/Id3MusicBrainz.cxx src/tag/Id3MusicBrainz.hxx \
961 962 963
	src/tag/ApeLoader.cxx src/tag/ApeLoader.hxx \
	src/tag/ApeReplayGain.cxx src/tag/ApeReplayGain.hxx \
	src/tag/ApeTag.cxx src/tag/ApeTag.hxx
964

965
if ENABLE_ID3TAG
966
libtag_a_SOURCES += \
967
	src/tag/Id3Load.cxx src/tag/Id3Load.hxx \
968
	src/tag/Id3Unique.hxx \
969 970
	src/tag/TagId3.cxx src/tag/TagId3.hxx \
	src/tag/TagRva2.cxx src/tag/TagRva2.hxx \
971 972
	src/tag/Riff.cxx src/tag/Riff.hxx \
	src/tag/Aiff.cxx src/tag/Aiff.hxx
973 974
endif

975 976
# ffmpeg

977
if ENABLE_FFMPEG
978 979
noinst_LIBRARIES += libffmpeg.a
libffmpeg_a_SOURCES = \
980
	src/lib/ffmpeg/Init.cxx src/lib/ffmpeg/Init.hxx \
981
	src/lib/ffmpeg/Time.hxx \
982
	src/lib/ffmpeg/Buffer.hxx \
983
	src/lib/ffmpeg/LogError.cxx src/lib/ffmpeg/LogError.hxx \
984
	src/lib/ffmpeg/LogCallback.cxx src/lib/ffmpeg/LogCallback.hxx \
985
	src/lib/ffmpeg/Error.cxx src/lib/ffmpeg/Error.hxx \
986
	src/lib/ffmpeg/Domain.cxx src/lib/ffmpeg/Domain.hxx
987 988
libffmpeg_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(FFMPEG_CFLAGS)
989 990 991
FFMPEG_LIBS2 = libffmpeg.a $(FFMPEG_LIBS)
endif

992 993
# decoder plugins

994
libdecoder_a_SOURCES = \
995 996
	src/decoder/plugins/PcmDecoderPlugin.cxx \
	src/decoder/plugins/PcmDecoderPlugin.hxx \
997
	src/decoder/DecoderAPI.cxx src/decoder/DecoderAPI.hxx \
998
	src/decoder/Reader.cxx src/decoder/Reader.hxx \
999 1000 1001
	src/decoder/DecoderBuffer.cxx src/decoder/DecoderBuffer.hxx \
	src/decoder/DecoderPlugin.cxx \
	src/decoder/DecoderList.cxx src/decoder/DecoderList.hxx
1002
libdecoder_a_CPPFLAGS = $(AM_CPPFLAGS) \
1003
	$(VORBIS_CFLAGS) $(TREMOR_CFLAGS) \
1004
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
1005
	$(SNDFILE_CFLAGS) \
1006 1007
	$(AUDIOFILE_CFLAGS) \
	$(LIBMIKMOD_CFLAGS) \
1008
	$(GME_CFLAGS) \
1009 1010 1011
	$(SIDPLAY_CFLAGS) \
	$(FLUIDSYNTH_CFLAGS) \
	$(WILDMIDI_CFLAGS) \
1012
	$(WAVPACK_CFLAGS) \
1013
	$(MAD_CFLAGS) \
1014
	$(MPG123_CFLAGS) \
1015
	$(OPUS_CFLAGS) \
1016
	$(FFMPEG_CFLAGS) \
1017
	$(MPCDEC_CFLAGS) \
1018
	$(ADPLUG_CFLAGS) \
1019
	$(FAAD_CFLAGS)
1020 1021

DECODER_LIBS = \
1022
	libdecoder.a \
1023
	$(XIPH_LIBS) \
1024
	$(VORBIS_LIBS) $(TREMOR_LIBS) \
1025
	$(FLAC_LIBS) \
1026
	$(SNDFILE_LIBS) \
1027
	$(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
1028
	$(GME_LIBS) \
1029 1030 1031
	$(SIDPLAY_LIBS) \
	$(FLUIDSYNTH_LIBS) \
	$(WILDMIDI_LIBS) \
1032
	$(WAVPACK_LIBS) \
1033
	$(MAD_LIBS) \
1034
	$(MPG123_LIBS) \
1035
	$(OPUS_LIBS) \
1036
	$(FFMPEG_LIBS2) \
1037
	$(MPCDEC_LIBS) \
1038
	$(ADPLUG_LIBS) \
1039
	$(FAAD_LIBS)
1040

1041
if ENABLE_DSD
Max Kellermann's avatar
Max Kellermann committed
1042 1043 1044 1045 1046 1047 1048
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
1049 1050
endif

1051
if ENABLE_MAD
1052
libdecoder_a_SOURCES += \
1053 1054
	src/decoder/plugins/MadDecoderPlugin.cxx \
	src/decoder/plugins/MadDecoderPlugin.hxx
1055 1056
endif

1057
if ENABLE_MPG123
1058
libdecoder_a_SOURCES += \
1059 1060
	src/decoder/plugins/Mpg123DecoderPlugin.cxx \
	src/decoder/plugins/Mpg123DecoderPlugin.hxx
1061 1062
endif

1063
if ENABLE_MPCDEC
1064
libdecoder_a_SOURCES += \
1065 1066
	src/decoder/plugins/MpcdecDecoderPlugin.cxx \
	src/decoder/plugins/MpcdecDecoderPlugin.hxx
1067 1068
endif

1069
if ENABLE_OPUS
1070
libdecoder_a_SOURCES += \
1071 1072 1073 1074 1075 1076 1077 1078
	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
1079 1080
endif

1081
if ENABLE_WAVPACK
1082
libdecoder_a_SOURCES += \
1083 1084
	src/decoder/plugins/WavpackDecoderPlugin.cxx \
	src/decoder/plugins/WavpackDecoderPlugin.hxx
1085 1086
endif

1087
if ENABLE_ADPLUG
1088
libdecoder_a_SOURCES += \
1089 1090
	src/decoder/plugins/AdPlugDecoderPlugin.cxx \
	src/decoder/plugins/AdPlugDecoderPlugin.h
1091 1092
endif

1093
if ENABLE_FAAD
1094
libdecoder_a_SOURCES += \
1095
	src/decoder/plugins/FaadDecoderPlugin.cxx src/decoder/plugins/FaadDecoderPlugin.hxx
1096 1097
endif

1098 1099 1100 1101 1102
if HAVE_OGG
libdecoder_a_SOURCES += \
	src/decoder/plugins/OggDecoder.cxx src/decoder/plugins/OggDecoder.hxx
endif

1103
if HAVE_XIPH
1104
libdecoder_a_SOURCES += \
1105
	src/decoder/plugins/OggCodec.cxx src/decoder/plugins/OggCodec.hxx
1106 1107
endif

1108
if ENABLE_VORBIS_DECODER
1109
libdecoder_a_SOURCES += \
1110 1111
	src/decoder/plugins/VorbisDomain.cxx src/decoder/plugins/VorbisDomain.hxx \
	src/decoder/plugins/VorbisDecoderPlugin.cxx src/decoder/plugins/VorbisDecoderPlugin.h
1112 1113
endif

1114
if ENABLE_FLAC
1115
libdecoder_a_SOURCES += \
1116 1117 1118 1119 1120 1121
	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 \
1122
	src/decoder/plugins/FlacStreamDecoder.hxx \
1123 1124
	src/decoder/plugins/FlacDecoderPlugin.cxx \
	src/decoder/plugins/FlacDecoderPlugin.h
1125 1126
endif

1127
if ENABLE_AUDIOFILE
1128
libdecoder_a_SOURCES += \
1129 1130
	src/decoder/plugins/AudiofileDecoderPlugin.cxx \
	src/decoder/plugins/AudiofileDecoderPlugin.hxx
1131 1132
endif

1133
if ENABLE_MIKMOD_DECODER
1134
libdecoder_a_SOURCES += \
1135 1136
	src/decoder/plugins/MikmodDecoderPlugin.cxx \
	src/decoder/plugins/MikmodDecoderPlugin.hxx
1137 1138
endif

1139
if ENABLE_MODPLUG
1140
libmodplug_decoder_plugin_a_SOURCES = \
1141 1142
	src/decoder/plugins/ModplugDecoderPlugin.cxx \
	src/decoder/plugins/ModplugDecoderPlugin.hxx
1143
libmodplug_decoder_plugin_a_CXXFLAGS = $(AM_CXXFLAGS) $(MODPLUG_CFLAGS)
1144
libmodplug_decoder_plugin_a_CPPFLAGS = $(AM_CPPFLAGS)
1145 1146
noinst_LIBRARIES += libmodplug_decoder_plugin.a
DECODER_LIBS += libmodplug_decoder_plugin.a $(MODPLUG_LIBS)
1147 1148 1149
endif

if ENABLE_SIDPLAY
1150
libdecoder_a_SOURCES += \
1151 1152
	src/decoder/plugins/SidplayDecoderPlugin.cxx \
	src/decoder/plugins/SidplayDecoderPlugin.hxx
1153 1154 1155
endif

if ENABLE_FLUIDSYNTH
1156
libdecoder_a_SOURCES += \
1157 1158
	src/decoder/plugins/FluidsynthDecoderPlugin.cxx \
	src/decoder/plugins/FluidsynthDecoderPlugin.hxx
1159 1160 1161
endif

if ENABLE_WILDMIDI
1162
libdecoder_a_SOURCES += \
1163 1164
	src/decoder/plugins/WildmidiDecoderPlugin.cxx \
	src/decoder/plugins/WildmidiDecoderPlugin.hxx
1165 1166
endif

1167
if ENABLE_FFMPEG
1168
libdecoder_a_SOURCES += \
1169 1170
	src/decoder/plugins/FfmpegIo.cxx \
	src/decoder/plugins/FfmpegIo.hxx \
1171 1172 1173 1174
	src/decoder/plugins/FfmpegMetaData.cxx \
	src/decoder/plugins/FfmpegMetaData.hxx \
	src/decoder/plugins/FfmpegDecoderPlugin.cxx \
	src/decoder/plugins/FfmpegDecoderPlugin.hxx
1175 1176
endif

1177
if ENABLE_SNDFILE
1178
libdecoder_a_SOURCES += \
1179 1180
	src/decoder/plugins/SndfileDecoderPlugin.cxx \
	src/decoder/plugins/SndfileDecoderPlugin.hxx
1181 1182
endif

1183
if ENABLE_GME
1184
libdecoder_a_SOURCES += \
1185
	src/decoder/plugins/GmeDecoderPlugin.cxx src/decoder/plugins/GmeDecoderPlugin.hxx
1186 1187
endif

1188 1189
# encoder plugins

1190 1191 1192 1193 1194
if ENABLE_ENCODER

noinst_LIBRARIES += libencoder_plugins.a

libencoder_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1195
	$(LAME_CFLAGS) \
1196
	$(TWOLAME_CFLAGS) \
1197
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS)) \
1198
	$(OPUS_CFLAGS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
1199
	$(SHINE_CFLAGS) \
1200 1201 1202
	$(VORBISENC_CFLAGS)

ENCODER_LIBS = \
1203
	libencoder_plugins.a \
1204
	$(XIPH_LIBS) \
1205
	$(LAME_LIBS) \
1206
	$(TWOLAME_LIBS) \
1207
	$(FLAC_LIBS) \
1208
	$(OPUS_LIBS) \
Andrée Ekroth's avatar
Andrée Ekroth committed
1209
	$(SHINE_LIBS) \
1210 1211
	$(VORBISENC_LIBS)

1212
libencoder_plugins_a_SOURCES = \
1213
	src/encoder/EncoderAPI.hxx \
1214
	src/encoder/EncoderInterface.hxx \
1215
	src/encoder/EncoderPlugin.hxx \
1216
	src/encoder/ToOutputStream.cxx src/encoder/ToOutputStream.hxx \
1217 1218 1219
	src/encoder/plugins/NullEncoderPlugin.cxx \
	src/encoder/plugins/NullEncoderPlugin.hxx \
	src/encoder/EncoderList.cxx src/encoder/EncoderList.hxx
1220

1221
if ENABLE_WAVE_ENCODER
1222
libencoder_plugins_a_SOURCES += \
1223 1224
	src/encoder/plugins/WaveEncoderPlugin.cxx \
	src/encoder/plugins/WaveEncoderPlugin.hxx
1225 1226
endif

1227 1228 1229 1230 1231
if HAVE_OGG
libencoder_plugins_a_SOURCES += \
	src/encoder/plugins/OggEncoder.hxx
endif

1232
if ENABLE_VORBISENC
1233
libencoder_plugins_a_SOURCES += \
1234 1235
	src/encoder/plugins/VorbisEncoderPlugin.cxx \
	src/encoder/plugins/VorbisEncoderPlugin.hxx
1236 1237
endif

1238
if ENABLE_OPUS
1239
libencoder_plugins_a_SOURCES += \
1240 1241
	src/encoder/plugins/OpusEncoderPlugin.cxx \
	src/encoder/plugins/OpusEncoderPlugin.hxx
1242 1243
endif

1244
if ENABLE_LAME
1245
libencoder_plugins_a_SOURCES += \
1246 1247
	src/encoder/plugins/LameEncoderPlugin.cxx \
	src/encoder/plugins/LameEncoderPlugin.hxx
1248
endif
1249

1250
if ENABLE_TWOLAME
1251
libencoder_plugins_a_SOURCES += \
1252 1253
	src/encoder/plugins/TwolameEncoderPlugin.cxx \
	src/encoder/plugins/TwolameEncoderPlugin.hxx
1254
endif
1255 1256

if ENABLE_FLAC_ENCODER
1257
libencoder_plugins_a_SOURCES += \
1258 1259
	src/encoder/plugins/FlacEncoderPlugin.cxx \
	src/encoder/plugins/FlacEncoderPlugin.hxx
1260
endif
1261

1262
if ENABLE_SHINE
Andrée Ekroth's avatar
Andrée Ekroth committed
1263
libencoder_plugins_a_SOURCES += \
1264 1265
	src/encoder/plugins/ShineEncoderPlugin.cxx \
	src/encoder/plugins/ShineEncoderPlugin.hxx
Andrée Ekroth's avatar
Andrée Ekroth committed
1266 1267
endif

1268 1269
else
ENCODER_LIBS =
1270 1271 1272 1273
endif


if HAVE_ZEROCONF
1274
libmpd_a_SOURCES += \
1275 1276
	src/zeroconf/ZeroconfInternal.hxx \
	src/zeroconf/ZeroconfGlue.cxx src/zeroconf/ZeroconfGlue.hxx
1277 1278

if HAVE_AVAHI
1279
libmpd_a_SOURCES += \
1280 1281
	src/zeroconf/AvahiPoll.cxx src/zeroconf/AvahiPoll.hxx \
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/ZeroconfAvahi.hxx
1282 1283 1284
endif

if HAVE_BONJOUR
1285
libmpd_a_SOURCES += src/zeroconf/ZeroconfBonjour.cxx src/zeroconf/ZeroconfBonjour.hxx
1286 1287 1288
endif
endif

1289 1290 1291 1292
#
# input plugins
#

1293
libinput_a_SOURCES = \
1294
	src/input/Domain.cxx src/input/Domain.hxx \
Max Kellermann's avatar
Max Kellermann committed
1295 1296
	src/input/Init.cxx src/input/Init.hxx \
	src/input/Registry.cxx src/input/Registry.hxx \
1297
	src/input/Open.cxx \
1298
	src/input/LocalOpen.cxx src/input/LocalOpen.hxx \
1299
	src/input/Offset.hxx \
Max Kellermann's avatar
Max Kellermann committed
1300
	src/input/InputStream.cxx src/input/InputStream.hxx \
1301
	src/input/Ptr.hxx \
Max Kellermann's avatar
Max Kellermann committed
1302
	src/input/InputPlugin.hxx \
1303
	src/input/Reader.cxx src/input/Reader.hxx \
Max Kellermann's avatar
Max Kellermann committed
1304
	src/input/TextInputStream.cxx src/input/TextInputStream.hxx \
1305
	src/input/ThreadInputStream.cxx src/input/ThreadInputStream.hxx \
1306
	src/input/AsyncInputStream.cxx src/input/AsyncInputStream.hxx \
1307
	src/input/ProxyInputStream.cxx src/input/ProxyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1308 1309
	src/input/plugins/RewindInputPlugin.cxx src/input/plugins/RewindInputPlugin.hxx \
	src/input/plugins/FileInputPlugin.cxx src/input/plugins/FileInputPlugin.hxx
1310 1311

libinput_a_CPPFLAGS = $(AM_CPPFLAGS) \
1312
	$(CURL_CFLAGS) \
1313
	$(SMBCLIENT_CFLAGS) \
1314
	$(NFS_CFLAGS) \
1315
	$(CDIO_PARANOIA_CFLAGS) \
1316
	$(FFMPEG_CFLAGS) \
1317 1318 1319
	$(MMS_CFLAGS)

INPUT_LIBS = \
1320
	libinput.a \
1321
	$(CURL_LIBS) \
1322
	$(SMBCLIENT_LIBS) \
1323
	$(NFS_LIBS) \
1324
	$(CDIO_PARANOIA_LIBS) \
1325
	$(FFMPEG_LIBS2) \
1326 1327
	$(MMS_LIBS)

1328
if ENABLE_ALSA
1329
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1330 1331
	src/input/plugins/AlsaInputPlugin.cxx \
	src/input/plugins/AlsaInputPlugin.hxx
1332 1333 1334 1335
INPUT_LIBS += $(ALSA_LIBS)
endif


1336
if ENABLE_CURL
1337
libinput_a_SOURCES += \
1338
	src/input/IcyInputStream.cxx src/input/IcyInputStream.hxx \
Max Kellermann's avatar
Max Kellermann committed
1339
	src/input/plugins/CurlInputPlugin.cxx src/input/plugins/CurlInputPlugin.hxx \
1340
	$(CURL_SOURCES) \
1341
	src/IcyMetaDataParser.cxx src/IcyMetaDataParser.hxx
1342
endif
1343

1344 1345
if ENABLE_SMBCLIENT
libinput_a_SOURCES += \
1346
	$(SMBCLIENT_SOURCES) \
Max Kellermann's avatar
Max Kellermann committed
1347
	src/input/plugins/SmbclientInputPlugin.cxx src/input/plugins/SmbclientInputPlugin.hxx
1348 1349
endif

1350 1351
if ENABLE_NFS
libinput_a_SOURCES += \
1352
	$(NFS_SOURCES) \
1353 1354 1355
	src/input/plugins/NfsInputPlugin.cxx src/input/plugins/NfsInputPlugin.hxx
endif

1356
if ENABLE_CDIO_PARANOIA
1357
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1358 1359
	src/input/plugins/CdioParanoiaInputPlugin.cxx \
	src/input/plugins/CdioParanoiaInputPlugin.hxx
1360 1361
endif

1362
if ENABLE_FFMPEG
1363
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1364
	src/input/plugins/FfmpegInputPlugin.cxx src/input/plugins/FfmpegInputPlugin.hxx
1365 1366
endif

1367
if ENABLE_MMS
1368
libinput_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1369
	src/input/plugins/MmsInputPlugin.cxx src/input/plugins/MmsInputPlugin.hxx
1370 1371
endif

1372
liboutput_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1373 1374
	$(AO_CFLAGS) \
	$(ALSA_CFLAGS) \
1375
	$(JACK_CFLAGS) \
1376
	$(HAIKU_CFLAGS) \
1377
	$(OPENAL_CFLAGS) \
1378
	$(OPENSSL_CFLAGS) \
1379
	$(PULSE_CFLAGS) \
1380
	$(SNDIO_CFLAGS) \
1381 1382 1383
	$(SHOUT_CFLAGS)

OUTPUT_LIBS = \
1384
	liboutput_plugins.a \
1385
	$(LIBWRAP_LDFLAGS) \
1386 1387
	$(AO_LIBS) \
	$(ALSA_LIBS) \
1388
	$(ROAR_LIBS) \
1389
	$(JACK_LIBS) \
1390
	$(HAIKU_LIBS) \
1391
	$(OPENAL_LIBS) \
1392
	$(SNDIO_LIBS) \
1393 1394
	$(SHOUT_LIBS)

1395
OUTPUT_API_SRC = \
1396
	src/output/Client.hxx \
1397
	src/output/OutputAPI.hxx \
1398
	src/output/Internal.cxx \
1399
	src/output/Internal.hxx \
1400
	src/output/Wrapper.hxx \
1401
	src/output/Registry.cxx src/output/Registry.hxx \
1402
	src/output/MultipleOutputs.cxx src/output/MultipleOutputs.hxx \
1403
	src/output/SharedPipeConsumer.cxx src/output/SharedPipeConsumer.hxx \
1404
	src/output/Source.cxx src/output/Source.hxx \
1405
	src/output/OutputThread.cxx \
1406
	src/output/Domain.cxx src/output/Domain.hxx \
1407
	src/output/OutputControl.cxx \
1408 1409 1410 1411
	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 \
1412 1413
	src/output/Finish.cxx \
	src/output/Init.cxx
1414

1415
liboutput_plugins_a_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
1416
	src/output/Timer.cxx src/output/Timer.hxx \
1417 1418
	src/output/plugins/NullOutputPlugin.cxx \
	src/output/plugins/NullOutputPlugin.hxx
1419

1420 1421
MIXER_LIBS = \
	libmixer_plugins.a \
1422
	$(ALSA_LIBS) \
1423
	$(PULSE_LIBS2)
1424

1425
MIXER_API_SRC = \
1426
	src/mixer/Listener.hxx \
Max Kellermann's avatar
Max Kellermann committed
1427 1428 1429 1430
	src/mixer/MixerPlugin.hxx \
	src/mixer/MixerList.hxx \
	src/mixer/MixerControl.cxx src/mixer/MixerControl.hxx \
	src/mixer/MixerType.cxx src/mixer/MixerType.hxx \
1431
	src/mixer/MixerAll.cxx \
Max Kellermann's avatar
Max Kellermann committed
1432
	src/mixer/MixerInternal.hxx
1433

1434
libmixer_plugins_a_SOURCES = \
1435
	src/mixer/plugins/NullMixerPlugin.cxx \
Max Kellermann's avatar
Max Kellermann committed
1436 1437
	src/mixer/plugins/SoftwareMixerPlugin.cxx \
	src/mixer/plugins/SoftwareMixerPlugin.hxx
1438

1439 1440 1441
libmixer_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
	$(ALSA_CFLAGS) \
	$(PULSE_CFLAGS)
1442

1443
if ENABLE_ALSA
1444
liboutput_plugins_a_SOURCES += \
1445 1446
	src/output/plugins/AlsaOutputPlugin.cxx \
	src/output/plugins/AlsaOutputPlugin.hxx
1447 1448 1449 1450
libmixer_plugins_a_SOURCES += \
	src/mixer/plugins/volume_mapping.h \
	src/mixer/plugins/volume_mapping.c \
	src/mixer/plugins/AlsaMixerPlugin.cxx
1451 1452
endif

1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463
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

1464
if ENABLE_ROAR
1465
liboutput_plugins_a_SOURCES += \
1466 1467
	src/output/plugins/RoarOutputPlugin.cxx \
	src/output/plugins/RoarOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1468
libmixer_plugins_a_SOURCES += src/mixer/plugins/RoarMixerPlugin.cxx
1469 1470
endif

1471
if ENABLE_AO
1472
liboutput_plugins_a_SOURCES += \
1473 1474
	src/output/plugins/AoOutputPlugin.cxx \
	src/output/plugins/AoOutputPlugin.hxx
1475 1476 1477
endif

if HAVE_FIFO
1478
liboutput_plugins_a_SOURCES += \
1479 1480
	src/output/plugins/FifoOutputPlugin.cxx \
	src/output/plugins/FifoOutputPlugin.hxx
1481 1482
endif

1483
if ENABLE_SNDIO
1484 1485 1486 1487 1488
liboutput_plugins_a_SOURCES += \
	src/output/plugins/SndioOutputPlugin.cxx \
	src/output/plugins/SndioOutputPlugin.hxx
endif

1489
if ENABLE_HAIKU
1490 1491 1492 1493
liboutput_plugins_a_SOURCES += \
	src/output/plugins/HaikuOutputPlugin.cxx \
	src/output/plugins/HaikuOutputPlugin.hxx
libmixer_plugins_a_SOURCES += \
1494
	src/mixer/plugins/HaikuMixerPlugin.cxx
1495 1496
endif

1497
if ENABLE_PIPE_OUTPUT
1498
liboutput_plugins_a_SOURCES += \
1499 1500
	src/output/plugins/PipeOutputPlugin.cxx \
	src/output/plugins/PipeOutputPlugin.hxx
1501 1502
endif

1503
if ENABLE_JACK
1504
liboutput_plugins_a_SOURCES += \
1505 1506
	src/output/plugins/JackOutputPlugin.cxx \
	src/output/plugins/JackOutputPlugin.hxx
1507 1508 1509
endif

if HAVE_OSS
1510
liboutput_plugins_a_SOURCES += \
1511 1512
	src/output/plugins/OssOutputPlugin.cxx \
	src/output/plugins/OssOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1513
libmixer_plugins_a_SOURCES += src/mixer/plugins/OssMixerPlugin.cxx
1514 1515
endif

Serge Ziryukin's avatar
Serge Ziryukin committed
1516
if HAVE_OPENAL
1517
liboutput_plugins_a_SOURCES += \
1518 1519
	src/output/plugins/OpenALOutputPlugin.cxx \
	src/output/plugins/OpenALOutputPlugin.hxx
Serge Ziryukin's avatar
Serge Ziryukin committed
1520 1521
endif

1522
if HAVE_OSX
1523
liboutput_plugins_a_SOURCES += \
1524 1525
	src/output/plugins/OSXOutputPlugin.cxx \
	src/output/plugins/OSXOutputPlugin.hxx
1526
endif
Matthew Leon's avatar
Matthew Leon committed
1527 1528
libmixer_plugins_a_SOURCES += \
	src/mixer/plugins/OSXMixerPlugin.cxx
1529

1530
if ENABLE_PULSE
1531
liboutput_plugins_a_SOURCES += \
1532 1533
	src/output/plugins/PulseOutputPlugin.cxx \
	src/output/plugins/PulseOutputPlugin.hxx
1534
libmixer_plugins_a_SOURCES += \
Max Kellermann's avatar
Max Kellermann committed
1535
	src/mixer/plugins/PulseMixerPlugin.cxx src/mixer/plugins/PulseMixerPlugin.hxx
1536 1537 1538

noinst_LIBRARIES += libpulse.a
libpulse_a_SOURCES = \
1539
	src/lib/pulse/LockGuard.hxx \
1540
	src/lib/pulse/LogError.cxx src/lib/pulse/LogError.hxx \
1541
	src/lib/pulse/Error.cxx src/lib/pulse/Error.hxx \
1542 1543 1544 1545
	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)
1546 1547 1548
endif

if HAVE_SHOUT
1549
liboutput_plugins_a_SOURCES += \
1550 1551
	src/output/plugins/ShoutOutputPlugin.cxx \
	src/output/plugins/ShoutOutputPlugin.hxx
1552 1553
endif

1554
if ENABLE_RECORDER_OUTPUT
1555
liboutput_plugins_a_SOURCES += \
1556 1557
	src/output/plugins/RecorderOutputPlugin.cxx \
	src/output/plugins/RecorderOutputPlugin.hxx
1558 1559
endif

1560
if ENABLE_HTTPD_OUTPUT
1561
liboutput_plugins_a_SOURCES += \
1562 1563 1564 1565 1566 1567 1568 1569
	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
1570 1571
endif

1572
if ENABLE_SOLARIS_OUTPUT
1573
liboutput_plugins_a_SOURCES += \
1574
	src/output/plugins/SolarisOutputPlugin.cxx src/output/plugins/SolarisOutputPlugin.hxx
1575 1576
endif

1577
if ENABLE_WINMM_OUTPUT
1578
liboutput_plugins_a_SOURCES += \
1579 1580
	src/output/plugins/WinmmOutputPlugin.cxx \
	src/output/plugins/WinmmOutputPlugin.hxx
Max Kellermann's avatar
Max Kellermann committed
1581
libmixer_plugins_a_SOURCES += src/mixer/plugins/WinmmMixerPlugin.cxx
1582 1583
endif

1584

1585 1586 1587 1588
#
# Playlist plugins
#

1589
libplaylist_plugins_a_SOURCES = \
1590 1591 1592 1593 1594 1595 1596 1597
	src/playlist/PlaylistPlugin.hxx \
	src/playlist/SongEnumerator.hxx \
	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 \
1598 1599
	src/playlist/plugins/PlsPlaylistPlugin.cxx \
	src/playlist/plugins/PlsPlaylistPlugin.hxx \
1600
	src/playlist/PlaylistRegistry.cxx src/playlist/PlaylistRegistry.hxx
1601
libplaylist_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
1602
	$(EXPAT_CFLAGS) \
1603
	$(YAJL_CFLAGS) \
1604
	$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS))
1605 1606 1607

PLAYLIST_LIBS = \
	libplaylist_plugins.a \
1608
	$(EXPAT_LIBS) \
1609
	$(FLAC_LIBS)
1610

1611 1612 1613 1614 1615 1616
if ENABLE_FLAC
libplaylist_plugins_a_SOURCES += \
	src/playlist/plugins/FlacPlaylistPlugin.cxx \
	src/playlist/plugins/FlacPlaylistPlugin.hxx
endif

1617 1618 1619 1620 1621 1622 1623 1624 1625
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

1626 1627
if ENABLE_SOUNDCLOUD
libplaylist_plugins_a_SOURCES += \
1628 1629
	src/playlist/plugins/SoundCloudPlaylistPlugin.cxx \
	src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
1630
PLAYLIST_LIBS += $(YAJL_LIBS)
1631
endif
1632

1633
if ENABLE_EXPAT
1634
libplaylist_plugins_a_SOURCES += \
1635
	src/lib/expat/StreamExpatParser.cxx \
1636
	src/lib/expat/ExpatParser.cxx src/lib/expat/ExpatParser.hxx \
1637 1638 1639 1640 1641 1642
	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
1643 1644
endif

1645 1646 1647 1648
#
# Filter plugins
#

1649
libfilter_plugins_a_SOURCES = \
1650 1651 1652
	src/AudioCompress/config.h \
	src/AudioCompress/compress.h \
	src/AudioCompress/compress.c \
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665
	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
1666

1667 1668 1669 1670
FILTER_LIBS = \
	libfilter_plugins.a \
	$(PCM_LIBS)

1671

1672 1673 1674 1675 1676 1677
#
# systemd unit
#

if HAVE_SYSTEMD
systemdsystemunit_DATA = \
1678 1679
	systemd/system/mpd.socket \
	systemd/system/mpd.service
1680 1681
endif

1682 1683 1684
if HAVE_SYSTEMD_USER
systemduserunit_DATA = \
	systemd/user/mpd.service
1685 1686
endif

1687 1688 1689 1690 1691 1692 1693

#
# Test programs
#

if ENABLE_TEST

1694
C_TESTS = \
1695
	test/test_util \
1696
	test/test_byte_reverse \
1697
	test/test_rewind \
1698
	test/test_mixramp \
1699
	test/test_pcm \
1700
	test/test_protocol \
1701
	test/test_queue_priority \
1702
	test/TestFs \
1703
	test/TestIcu
1704

1705 1706 1707 1708
if ENABLE_CURL
C_TESTS += test/test_icy_parser
endif

1709 1710 1711 1712
if ENABLE_DATABASE
C_TESTS += test/test_translate_song
endif

1713 1714 1715 1716
if ENABLE_ARCHIVE
C_TESTS += test/test_archive
endif

1717
TESTS = $(C_TESTS)
1718

1719
noinst_PROGRAMS = \
1720
	$(C_TESTS) \
1721
	test/read_conf \
1722
	test/run_resolver \
1723
	test/run_input \
1724
	test/WriteFile \
1725
	test/dump_text_file \
1726
	test/dump_playlist \
1727
	test/run_decoder \
1728
	test/read_tags \
1729
	test/ReadApeTags \
1730
	test/ContainerScan \
1731
	test/run_filter \
1732
	test/run_output \
1733
	test/run_convert \
1734
	test/run_normalize \
1735 1736
	test/software_volume

1737 1738
if ENABLE_DATABASE
noinst_PROGRAMS += test/DumpDatabase
1739
noinst_PROGRAMS += test/run_storage
1740 1741
endif

1742 1743 1744 1745
if ENABLE_NEIGHBOR_PLUGINS
noinst_PROGRAMS += test/run_neighbor_explorer
endif

1746 1747 1748 1749
if HAVE_AVAHI
noinst_PROGRAMS += test/run_avahi
endif

1750 1751 1752 1753
if ENABLE_ARCHIVE
noinst_PROGRAMS += test/visit_archive
endif

1754
if ENABLE_ID3TAG
1755 1756 1757
noinst_PROGRAMS += test/dump_rva2
endif

1758
if ENABLE_ALSA
1759 1760 1761 1762
# this debug program is still ALSA specific
noinst_PROGRAMS += test/read_mixer
endif

1763
test_read_conf_LDADD = \
1764
	libconf.a \
1765
	$(FS_LIBS) \
1766
	$(ICU_LDADD) \
1767
	libsystem.a \
1768
	libutil.a
1769
test_read_conf_SOURCES = \
1770
	src/Log.cxx src/LogBackend.cxx \
1771
	test/read_conf.cxx
1772

1773
test_run_resolver_LDADD = \
1774
	libnet.a \
1775
	libutil.a
1776
test_run_resolver_SOURCES = \
1777
	src/Log.cxx src/LogBackend.cxx \
1778
	test/run_resolver.cxx
1779

1780 1781
if ENABLE_DATABASE

1782
test_DumpDatabase_LDADD = \
1783
	$(DB_LIBS) \
1784
	$(TAG_LIBS) \
1785
	libconf.a \
1786
	libevent.a \
1787
	$(FS_LIBS) \
1788
	libsystem.a \
1789 1790
	$(ICU_LDADD) \
	libutil.a
1791
test_DumpDatabase_SOURCES = test/DumpDatabase.cxx \
1792
	src/protocol/Ack.cxx \
1793
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1794 1795
	src/db/Registry.cxx \
	src/db/Selection.cxx \
1796 1797
	src/db/PlaylistVector.cxx \
	src/db/DatabaseLock.cxx \
1798
	src/SongSave.cxx \
1799
	src/DetachedSong.cxx \
1800
	src/TagSave.cxx \
1801
	src/SongFilter.cxx
1802

1803
if ENABLE_UPNP
1804
test_DumpDatabase_SOURCES += src/lib/expat/ExpatParser.cxx
1805 1806
endif

1807 1808 1809
test_run_storage_LDADD = \
	$(STORAGE_LIBS) \
	$(FS_LIBS) \
1810
	$(ICU_LDADD) \
1811 1812
	libevent.a \
	libthread.a \
1813
	libsystem.a \
1814
	libutil.a
1815 1816
test_run_storage_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
1817 1818
	src/IOThread.cxx \
	test/ScopeIOThread.hxx \
1819 1820
	test/run_storage.cxx

1821 1822 1823 1824
if ENABLE_WEBDAV
test_run_storage_SOURCES += $(CURL_SOURCES)
endif

1825 1826
endif

1827
test_run_input_LDADD = \
1828
	$(INPUT_LIBS) \
1829
	$(ARCHIVE_LIBS) \
1830
	$(TAG_LIBS) \
1831
	libconf.a \
1832
	libevent.a \
1833
	libthread.a \
1834
	$(FS_LIBS) \
1835
	$(ICU_LDADD) \
1836
	libsystem.a \
1837
	libutil.a
1838
test_run_input_SOURCES = test/run_input.cxx \
1839
	test/ScopeIOThread.hxx \
1840
	src/Log.cxx src/LogBackend.cxx \
1841
	src/IOThread.cxx \
1842
	src/TagSave.cxx
1843

1844 1845 1846 1847
if ENABLE_NEIGHBOR_PLUGINS

test_run_neighbor_explorer_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
1848
	src/IOThread.cxx \
1849
	test/run_neighbor_explorer.cxx
1850
test_run_neighbor_explorer_LDADD = $(AM_LDADD) \
1851
	$(NEIGHBOR_LIBS) \
1852 1853 1854
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
	libtag.a \
1855 1856
	libconf.a \
	libevent.a \
1857
	$(FS_LIBS) \
1858
	$(ICU_LDADD) \
1859 1860 1861 1862
	libsystem.a \
	libthread.a \
	libutil.a

1863
if ENABLE_UPNP
1864 1865 1866
test_run_neighbor_explorer_SOURCES += src/lib/expat/ExpatParser.cxx
endif

1867 1868
endif

1869 1870 1871 1872 1873
if ENABLE_ARCHIVE

test_visit_archive_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1874
	$(TAG_LIBS) \
1875
	libconf.a \
1876
	libevent.a \
1877
	libthread.a \
1878
	$(FS_LIBS) \
1879
	$(ICU_LDADD) \
1880
	libsystem.a \
1881
	libutil.a
1882
test_visit_archive_SOURCES = test/visit_archive.cxx \
1883
	test/ScopeIOThread.hxx \
1884
	src/Log.cxx src/LogBackend.cxx \
1885
	src/IOThread.cxx \
1886
	src/input/Open.cxx
1887 1888 1889

endif

1890
if ENABLE_ZLIB
1891

1892 1893
noinst_PROGRAMS += test/run_gzip test/run_gunzip

1894 1895 1896
test_run_gzip_LDADD = \
	libutil.a \
	$(FS_LIBS)
1897 1898
test_run_gzip_SOURCES = test/run_gzip.cxx \
	src/Log.cxx src/LogBackend.cxx
1899

1900 1901 1902 1903
test_run_gunzip_SOURCES = test/run_gunzip.cxx \
	src/Log.cxx src/LogBackend.cxx
test_run_gunzip_LDADD = \
	$(FS_LIBS) \
1904
	$(ICU_LDADD) \
1905 1906
	libsystem.a \
	libutil.a
1907

1908 1909
endif

1910 1911 1912 1913
test_WriteFile_LDADD = \
	$(FS_LIBS) \
	$(ICU_LDADD) \
	libsystem.a \
1914
	libutil.a
1915 1916 1917 1918
test_WriteFile_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
	test/WriteFile.cxx

1919 1920 1921
test_dump_text_file_LDADD = \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1922
	$(TAG_LIBS) \
1923
	libconf.a \
1924
	libevent.a \
1925
	$(FS_LIBS) \
1926
	$(ICU_LDADD) \
1927
	libsystem.a \
1928
	libthread.a \
1929
	libutil.a
1930
test_dump_text_file_SOURCES = test/dump_text_file.cxx \
1931
	test/ScopeIOThread.hxx \
1932
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
1933
	src/IOThread.cxx
1934

1935
test_dump_playlist_LDADD = \
1936
	$(PLAYLIST_LIBS) \
1937
	$(FLAC_LIBS) \
1938 1939
	$(DECODER_LIBS) \
	$(TAG_LIBS) \
1940
	$(XIPH_LIBS) \
1941 1942
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
1943
	libconf.a \
1944
	libbasic.a \
1945
	libevent.a \
1946
	libthread.a \
1947
	$(FS_LIBS) \
1948
	$(ICU_LDADD) \
1949
	libsystem.a \
1950
	libutil.a \
1951
	libpcm.a
1952
test_dump_playlist_SOURCES = test/dump_playlist.cxx \
1953
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1954
	test/ScopeIOThread.hxx \
1955
	src/Log.cxx src/LogBackend.cxx \
1956
	src/IOThread.cxx \
1957
	src/TagSave.cxx \
1958
	src/TagFile.cxx \
1959
	src/DetachedSong.cxx
1960

1961
if ENABLE_FLAC
1962
test_dump_playlist_SOURCES += \
1963
	src/ReplayGainInfo.cxx \
1964
	src/decoder/plugins/FlacMetadata.cxx
1965 1966
endif

1967
test_run_decoder_LDADD = \
1968
	$(DECODER_LIBS) \
1969
	libpcm.a \
1970
	$(INPUT_LIBS) \
1971
	$(ARCHIVE_LIBS) \
1972
	$(TAG_LIBS) \
1973
	libconf.a \
1974
	libbasic.a \
1975
	libevent.a \
1976
	libthread.a \
1977
	$(FS_LIBS) \
1978
	$(ICU_LDADD) \
1979
	libsystem.a \
1980
	libutil.a
1981
test_run_decoder_SOURCES = test/run_decoder.cxx \
1982
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
1983
	test/ScopeIOThread.hxx \
1984
	src/DetachedSong.cxx \
1985
	src/Log.cxx src/LogBackend.cxx \
1986
	src/IOThread.cxx \
1987
	src/ReplayGainInfo.cxx
1988

1989
test_read_tags_LDADD = \
1990
	$(DECODER_LIBS) \
1991
	libpcm.a \
1992
	$(INPUT_LIBS) \
1993
	$(ARCHIVE_LIBS) \
1994
	$(TAG_LIBS) \
1995
	libconf.a \
1996
	libbasic.a \
1997
	libevent.a \
1998
	libthread.a \
1999
	$(FS_LIBS) \
2000
	$(ICU_LDADD) \
2001
	libsystem.a \
2002
	libutil.a
2003
test_read_tags_SOURCES = test/read_tags.cxx \
2004
	test/FakeDecoderAPI.cxx test/FakeDecoderAPI.hxx \
2005
	test/ScopeIOThread.hxx \
2006
	src/DetachedSong.cxx \
2007
	src/Log.cxx src/LogBackend.cxx \
2008
	src/IOThread.cxx \
2009
	src/ReplayGainInfo.cxx
2010

2011 2012
test_ReadApeTags_LDADD = \
	$(TAG_LIBS) \
2013 2014
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
2015 2016
	$(FS_LIBS) \
	$(ICU_LDADD) \
2017
	libsystem.a \
2018
	libutil.a
2019 2020 2021
test_ReadApeTags_SOURCES = \
	src/Log.cxx src/LogBackend.cxx \
	test/ReadApeTags.cxx
2022

2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037
test_ContainerScan_LDADD = \
	$(DECODER_LIBS) \
	libpcm.a \
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
	$(TAG_LIBS) \
	libconf.a \
	libbasic.a \
	libevent.a \
	libthread.a \
	$(FS_LIBS) \
	$(ICU_LDADD) \
	libsystem.a \
	libutil.a
test_ContainerScan_SOURCES = test/ContainerScan.cxx \
2038 2039
	src/DetachedSong.cxx \
	src/SongSave.cxx src/TagSave.cxx \
2040 2041 2042 2043
	src/Log.cxx src/LogBackend.cxx \
	src/ReplayGainInfo.cxx \
	$(DECODER_SRC)

2044
if ENABLE_ID3TAG
2045
test_dump_rva2_LDADD = \
2046
	$(TAG_LIBS) \
2047 2048 2049 2050 2051
	$(INPUT_LIBS) \
	$(ARCHIVE_LIBS) \
	$(FS_LIBS) \
	$(ICU_LDADD) \
	libsystem.a \
2052
	libutil.a
2053
test_dump_rva2_SOURCES = \
2054
	src/Log.cxx src/LogBackend.cxx \
2055
	test/dump_rva2.cxx
2056 2057
endif

2058
test_run_filter_LDADD = \
2059
	$(FILTER_LIBS) \
2060
	libconf.a \
2061
	libbasic.a \
2062
	$(FS_LIBS) \
2063
	$(ICU_LDADD) \
2064
	libsystem.a \
2065
	libutil.a
2066
test_run_filter_SOURCES = test/run_filter.cxx \
2067
	src/Log.cxx src/LogBackend.cxx \
2068
	src/filter/FilterPlugin.cxx src/filter/FilterRegistry.cxx
2069

2070 2071
if ENABLE_ENCODER
noinst_PROGRAMS += test/run_encoder
2072
test_run_encoder_SOURCES = test/run_encoder.cxx \
2073
	src/Log.cxx src/LogBackend.cxx
2074
test_run_encoder_LDADD = \
2075
	$(ENCODER_LIBS) \
2076 2077
	$(TAG_LIBS) \
	libconf.a \
2078
	libbasic.a \
2079
	libpcm.a \
2080
	libthread.a \
2081
	$(FS_LIBS) \
2082
	$(ICU_LDADD) \
2083
	libsystem.a \
2084
	libutil.a
2085
endif
2086

2087
if ENABLE_VORBISENC
2088
noinst_PROGRAMS += test/test_vorbis_encoder
2089
test_test_vorbis_encoder_SOURCES = test/test_vorbis_encoder.cxx \
2090
	src/Log.cxx src/LogBackend.cxx
2091 2092 2093 2094
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
2095
	$(PCM_LIBS) \
2096
	$(TAG_LIBS) \
2097
	libconf.a \
2098
	libbasic.a \
2099
	$(FS_LIBS) \
2100
	$(ICU_LDADD) \
2101
	libsystem.a \
2102
	libutil.a
2103 2104
endif

2105
test_software_volume_SOURCES = test/software_volume.cxx \
2106
	src/Log.cxx src/LogBackend.cxx
2107
test_software_volume_LDADD = \
2108
	$(PCM_LIBS) \
2109
	libbasic.a \
2110
	libutil.a
2111

2112
test_run_avahi_SOURCES = \
2113
	src/Log.cxx src/LogBackend.cxx \
2114
	src/zeroconf/ZeroconfAvahi.cxx src/zeroconf/AvahiPoll.cxx \
2115 2116 2117 2118 2119 2120 2121
	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 \
2122
	libutil.a \
2123 2124
	$(AVAHI_LIBS)

2125
test_run_normalize_SOURCES = test/run_normalize.cxx \
2126
	src/Log.cxx src/LogBackend.cxx \
2127
	src/CheckAudioFormat.cxx \
2128
	src/AudioCompress/compress.c \
2129
	src/AudioParser.cxx
2130
test_run_normalize_LDADD = \
2131
	libutil.a
2132

2133
test_run_convert_SOURCES = test/run_convert.cxx \
2134
	src/Log.cxx src/LogBackend.cxx
2135
test_run_convert_LDADD = \
2136
	$(PCM_LIBS) \
2137
	libconf.a \
2138
	libbasic.a \
2139 2140
	$(FS_LIBS) \
	libsystem.a \
2141 2142
	$(ICU_LDADD) \
	libutil.a
2143

2144
test_run_output_LDADD = $(MPD_LIBS) \
2145
	$(PCM_LIBS) \
2146
	$(OUTPUT_LIBS) \
2147 2148 2149
	$(ENCODER_LIBS) \
	libmixer_plugins.a \
	$(FILTER_LIBS) \
2150
	$(TAG_LIBS) \
2151
	libconf.a \
2152
	libbasic.a \
2153
	libevent.a \
2154
	$(FS_LIBS) \
2155
	$(ICU_LDADD) \
2156
	libnet.a \
2157
	libsystem.a \
2158
	libthread.a \
2159
	libutil.a
2160
test_run_output_SOURCES = test/run_output.cxx \
2161
	test/ScopeIOThread.hxx \
2162
	src/Log.cxx src/LogBackend.cxx \
2163
	src/IOThread.cxx \
2164 2165
	src/output/Domain.cxx \
	src/output/Init.cxx src/output/Finish.cxx src/output/Registry.cxx \
2166
	src/output/OutputPlugin.cxx \
Max Kellermann's avatar
Max Kellermann committed
2167 2168
	src/mixer/MixerControl.cxx \
	src/mixer/MixerType.cxx \
2169 2170
	src/filter/FilterPlugin.cxx \
	src/filter/FilterConfig.cxx \
2171
	src/filter/Observer.cxx
2172

2173
test_read_mixer_LDADD = \
2174
	libpcm.a \
2175
	libmixer_plugins.a \
2176
	$(OUTPUT_LIBS) \
2177
	libconf.a \
2178
	libbasic.a \
2179
	libevent.a \
2180
	$(FS_LIBS) \
2181
	$(ICU_LDADD) \
2182
	libsystem.a \
2183
	libutil.a
2184
test_read_mixer_SOURCES = test/read_mixer.cxx \
2185
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
2186
	src/mixer/MixerControl.cxx \
2187 2188
	src/filter/FilterPlugin.cxx \
	src/filter/plugins/VolumeFilterPlugin.cxx
2189

2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201
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

2202
if ENABLE_INOTIFY
2203 2204
noinst_PROGRAMS += test/run_inotify
test_run_inotify_SOURCES = test/run_inotify.cxx \
2205
	test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
2206
	src/Log.cxx src/LogBackend.cxx \
Max Kellermann's avatar
Max Kellermann committed
2207 2208
	src/db/update/InotifyDomain.cxx \
	src/db/update/InotifySource.cxx
2209
test_run_inotify_LDADD = \
2210
	libevent.a \
2211
	libsystem.a \
2212
	libutil.a
2213 2214
endif

2215
test_test_util_SOURCES = \
2216
	test/DivideStringTest.hxx \
2217
	test/SplitStringTest.hxx \
2218
	test/UriUtilTest.hxx \
2219
	test/MimeTypeTest.hxx \
2220
	test/TestCircularBuffer.hxx \
2221 2222 2223 2224 2225 2226 2227
	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)

2228
test_test_byte_reverse_SOURCES = \
2229
	test/test_byte_reverse.cxx
2230 2231
test_test_byte_reverse_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_byte_reverse_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2232 2233
test_test_byte_reverse_LDADD = \
	libutil.a \
2234
	$(CPPUNIT_LIBS)
2235

2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247
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 = \
	$(INPUT_LIBS) \
	libthread.a \
	libtag.a \
	libutil.a \
	$(CPPUNIT_LIBS)

2248
test_test_mixramp_SOURCES = \
2249
	src/Log.cxx src/LogBackend.cxx \
2250 2251 2252 2253
	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 = \
2254
	libutil.a \
2255
	$(CPPUNIT_LIBS)
2256

2257
if ENABLE_CURL
2258
test_test_icy_parser_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
2259
	src/Log.cxx src/LogBackend.cxx \
2260 2261 2262 2263 2264
	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
2265
	libutil.a \
2266
	$(CPPUNIT_LIBS)
2267
endif
2268

2269
test_test_pcm_SOURCES = \
2270
	test/TestAudioFormat.cxx test/TestAudioFormat.hxx \
2271
	test/test_pcm_util.hxx \
2272 2273 2274
	test/test_pcm_dither.cxx \
	test/test_pcm_pack.cxx \
	test/test_pcm_channels.cxx \
2275
	test/test_pcm_format.cxx \
2276
	test/test_pcm_volume.cxx \
2277
	test/test_pcm_mix.cxx \
2278
	test/test_pcm_interleave.cxx \
2279
	test/test_pcm_export.cxx \
2280 2281
	test/test_pcm_all.hxx \
	test/test_pcm_main.cxx
2282 2283
test_test_pcm_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_pcm_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2284 2285
test_test_pcm_LDADD = \
	$(PCM_LIBS) \
2286
	libbasic.a \
2287
	libutil.a \
2288
	$(CPPUNIT_LIBS)
2289

2290
test_test_archive_SOURCES = \
2291
	src/Log.cxx src/LogBackend.cxx \
2292 2293 2294 2295 2296
	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 \
2297
	libutil.a \
2298 2299
	$(CPPUNIT_LIBS)

2300 2301
if ENABLE_DATABASE

2302
test_test_translate_song_SOURCES = \
2303
	src/playlist/PlaylistSong.cxx \
2304
	src/PlaylistError.cxx \
2305
	src/DetachedSong.cxx \
2306
	src/SongLoader.cxx \
2307
	src/LocateUri.cxx \
2308 2309 2310 2311 2312
	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 = \
2313
	$(STORAGE_LIBS) \
2314
	libtag.a \
2315
	$(FS_LIBS) \
2316
	$(ICU_LDADD) \
2317 2318 2319 2320
	libsystem.a \
	libutil.a \
	$(CPPUNIT_LIBS)

2321 2322
endif

2323 2324 2325 2326 2327 2328 2329 2330 2331 2332
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)

2333
test_test_queue_priority_SOURCES = \
Max Kellermann's avatar
Max Kellermann committed
2334
	src/queue/Queue.cxx \
2335
	src/DetachedSong.cxx \
2336
	test/test_queue_priority.cxx
2337 2338
test_test_queue_priority_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_test_queue_priority_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
2339
test_test_queue_priority_LDADD = \
2340
	libsystem.a \
2341
	libutil.a \
2342
	$(CPPUNIT_LIBS)
2343

2344 2345 2346 2347 2348 2349 2350 2351
test_TestFs_SOURCES = \
	test/TestFs.cxx
test_TestFs_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUNIT_CFLAGS) -DCPPUNIT_HAVE_RTTI=0
test_TestFs_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=deprecated-declarations
test_TestFs_LDADD = \
	$(FS_LIBS) \
	$(CPPUNIT_LIBS)

2352 2353 2354 2355 2356 2357 2358 2359 2360
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)

2361 2362
if ENABLE_DSD

Max Kellermann's avatar
Max Kellermann committed
2363
noinst_PROGRAMS += src/pcm/dsd2pcm/dsd2pcm
2364

Max Kellermann's avatar
Max Kellermann committed
2365 2366
src_pcm_dsd2pcm_dsd2pcm_SOURCES = \
	src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h \
2367
	src/pcm/dsd2pcm/dsd2pcm.hpp \
Max Kellermann's avatar
Max Kellermann committed
2368
	src/pcm/dsd2pcm/noiseshape.c src/pcm/dsd2pcm/noiseshape.h \
2369
	src/pcm/dsd2pcm/noiseshape.hpp \
Max Kellermann's avatar
Max Kellermann committed
2370 2371
	src/pcm/dsd2pcm/main.cpp
src_pcm_dsd2pcm_dsd2pcm_LDADD = libutil.a
2372

2373 2374
endif

2375 2376
endif

2377 2378 2379 2380 2381 2382

#
# Documentation
#

man_MANS = doc/mpd.1 doc/mpd.conf.5
2383
doc_DATA = AUTHORS COPYING NEWS README.md doc/mpdconf.example
2384

2385
DOCBOOK_FILES = doc/protocol.xml doc/user.xml doc/developer.xml
2386

2387 2388 2389 2390
if ENABLE_DOCUMENTATION
protocoldir = $(docdir)/protocol
protocol_DATA = $(wildcard doc/protocol/*.html)

2391 2392 2393
userdir = $(docdir)/user
user_DATA = $(wildcard doc/user/*.html)

2394 2395 2396
developerdir = $(docdir)/developer
developer_DATA = $(wildcard doc/developer/*.html)

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

2399 2400 2401
DOCBOOK_INCLUDES = $(wildcard $(srcdir)/doc/include/*.xml)

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

2404
doc/api/html/index.html: doc/doxygen.conf
2405
	@$(MKDIR_P) $(@D)
2406
	$(DOXYGEN) $<
2407

2408 2409 2410 2411 2412 2413 2414 2415
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
2416
	$(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
2417
		$(DESTDIR)$(docdir)/api/html
2418

2419 2420 2421
uninstall-local:
	rm -f $(DESTDIR)$(docdir)/api/html/*.*

2422
upload: $(DOCBOOK_HTML) doc/api/html/index.html
2423
	rsync -vpruz --delete doc/ www.musicpd.org:/var/www/mpd/doc/ \
2424 2425 2426
		--chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r \
		--include=protocol --include=protocol/** \
		--include=user --include=user/** \
2427
		--include=developer --include=developer/** \
2428 2429 2430
		--include=api --include=api/** \
		--exclude=*

2431 2432 2433
endif


2434 2435 2436
#
# Distribution
#
Eric Wong's avatar
Eric Wong committed
2437

2438
EXTRA_DIST = $(doc_DATA) autogen.sh \
2439 2440 2441
	test/test_archive_bzip2.sh  \
	test/test_archive_iso9660.sh \
	test/test_archive_zzip.sh \
2442
	$(wildcard $(srcdir)/scripts/*.rb) \
2443
	$(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
2444
	$(wildcard $(srcdir)/doc/include/*.xml) \
2445
	systemd/system/mpd.socket \
2446
	$(wildcard $(srcdir)/python/build/*.py) \
2447 2448 2449 2450 2451 2452 2453
	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 \
2454
	win32/build.py \
2455 2456
	win32/res/mpd.rc.in win32/res/mpd.ico \
	src/haiku/App_MusicPD