chiark / gitweb /
examples/disorder.init.in: Read settings from `/etc/default/disorder'.
[disorder] / server / Makefile.am
1 #
2 # This file is part of DisOrder.
3 # Copyright (C) 2004-2011, 2013 Richard Kettlewell
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 #
18
19 VPATH+=${top_srcdir}/common
20
21 sbin_PROGRAMS=disorderd disorder-deadlock disorder-rescan disorder-dump \
22               disorder-speaker disorder-decode disorder-normalize \
23               disorder-stats disorder-dbupgrade disorder-choose
24 noinst_PROGRAMS=trackname endian
25
26 AUTOMAKE_OPTIONS=subdir-objects
27 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
28 AM_CFLAGS=
29
30 disorderd_SOURCES=disorderd.c api.c api-server.c daemonize.c play.c     \
31         server.c server-queue.c queue-ops.c state.c plugin.c            \
32         schedule.c dbparams.c background.c mount.c \
33         exports.c disorder-server.h
34 nodist_disorderd_SOURCES=memgc.c
35 disorderd_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
36         $(LIBPCRE) $(LIBDB) $(LIBGC) $(LIBGCRYPT) $(LIBICONV) \
37         $(LIBASOUND) $(COREAUDIO) $(LIBPTHREAD) $(LIBDL) \
38         $(PULSEAUDIO_SIMPLE_LIBS) $(PULSEAUDIO_LIBS)
39 disorderd_LDFLAGS=-export-dynamic
40 disorderd_DEPENDENCIES=../lib/libdisorder.a
41
42 disorder_deadlock_SOURCES=deadlock.c disorder-server.h
43 disorder_deadlock_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
44         $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
45 disorder_deadlock_DEPENDENCIES=../lib/libdisorder.a
46
47 disorder_speaker_SOURCES=speaker.c
48 disorder_speaker_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
49         $(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO) \
50         $(LIBPTHREAD) \
51         $(PULSEAUDIO_SIMPLE_LIBS) $(PULSEAUDIO_LIBS)
52 disorder_speaker_DEPENDENCIES=../lib/libdisorder.a
53
54 disorder_decode_SOURCES=decode.c decode.h disorder-server.h     \
55 decode-mp3.c decode-ogg.c decode-wav.c decode-flac.c
56 disorder_decode_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
57         $(LIBMAD) $(LIBVORBISFILE) $(LIBFLAC)
58 disorder_decode_DEPENDENCIES=../lib/libdisorder.a
59
60 if GSTDECODE
61 AM_CFLAGS+=$(GSTREAMER_CFLAGS)
62 sbin_PROGRAMS+=disorder-gstdecode
63 disorder_gstdecode_SOURCES=gstdecode.c disorder-server.h
64 disorder_gstdecode_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
65         $(GSTREAMER_PLUGINS_BASE_LIBS) \
66         $(GSTREAMER_LIBS) $(LIBGCRYPT) $(LIBPCRE)
67 disorder_gstdecode_DEPENDENCIES=../lib/libdisorder.a
68 endif
69
70 disorder_normalize_SOURCES=normalize.c disorder-server.h
71 disorder_normalize_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
72         $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(LIBSAMPLERATE)
73 disorder_normalize_DEPENDENCIES=../lib/libdisorder.a
74
75 disorder_rescan_SOURCES=rescan.c plugin.c api.c api-server.c exports.c  \
76         disorder-server.h
77 nodist_disorder_rescan_SOURCES=memgc.c
78 disorder_rescan_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
79         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(LIBDL)
80 disorder_rescan_LDFLAGS=-export-dynamic
81 disorder_rescan_DEPENDENCIES=../lib/libdisorder.a
82
83 disorder_choose_SOURCES=choose.c server-queue.c \
84                         disorder-server.h
85 nodist_disorder_choose_SOURCES=memgc.c
86 disorder_choose_LDADD=$(LIBOBJS) ../lib/libdisorder.a   \
87         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
88 disorder_choose_LDFLAGS=-export-dynamic
89 disorder_choose_DEPENDENCIES=../lib/libdisorder.a
90
91 disorder_stats_SOURCES=stats.c disorder-server.h
92 disorder_stats_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
93         $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
94 disorder_stats_DEPENDENCIES=../lib/libdisorder.a
95
96 disorder_dump_SOURCES=dump.c disorder-server.h
97 nodist_disorder_dump_SOURCES=memgc.c
98 disorder_dump_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
99         $(LIBPCRE) $(LIBDB) $(LIBICONV) $(LIBGC) $(LIBGCRYPT)
100 disorder_dump_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
101
102 disorder_dbupgrade_SOURCES=dbupgrade.c disorder-server.h
103 nodist_disorder_dbupgrade_SOURCES=memgc.c
104 disorder_dbupgrade_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
105         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
106 disorder_dbupgrade_DEPENDENCIES=../lib/libdisorder.a
107
108 trackname_SOURCES=trackname.c disorder-server.h
109 trackname_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
110 trackname_DEPENDENCIES=../lib/libdisorder.a
111
112 check: check-help check-decode
113
114 # check everything has working --help and --version
115 check-help: all
116         ./disorderd --help > /dev/null
117         ./disorderd --version > /dev/null
118         ./disorder-dump --help > /dev/null
119         ./disorder-dump --version > /dev/null
120         ./disorder-deadlock --help > /dev/null
121         ./disorder-deadlock --version > /dev/null
122         ./trackname --help > /dev/null
123         ./trackname --version > /dev/null
124         ./disorder-speaker --help > /dev/null
125         ./disorder-speaker --version > /dev/null
126         ./disorder-decode --help > /dev/null
127         ./disorder-decode --version > /dev/null
128         ./disorder-normalize --help > /dev/null
129         ./disorder-normalize --version > /dev/null
130         ./disorder-stats --help > /dev/null
131         ./disorder-stats --version > /dev/null
132         ./disorder-dbupgrade --help > /dev/null
133         ./disorder-dbupgrade --version > /dev/null
134         ./disorder-rescan --help > /dev/null
135         ./disorder-rescan --version > /dev/null
136         ./disorder-choose --help > /dev/null
137         ./disorder-choose --version > /dev/null
138
139 check-decode: check-wav check-flac check-mp3
140
141 check-mp3: disorder-decode disorder-normalize
142         ./disorder-decode ${top_srcdir}/sounds/scratch.mp3 | \
143           ./disorder-normalize --config ${srcdir}/test-config > mp3ed.raw
144         cmp mp3ed.raw ${top_srcdir}/sounds/scratch-mp3.raw
145         rm -f mp3ed.raw
146
147 # TODO ogg decoding comes out OK but different depending on platform, version
148 # or something.  Makes it tricky to test!
149 check-ogg: disorder-decode disorder-normalize
150         ./disorder-decode ${top_srcdir}/sounds/scratch.ogg | \
151           ./disorder-normalize --config ${srcdir}/test-config > ogged.raw
152         cmp ogged.raw ${top_srcdir}/sounds/scratch.raw
153         rm -f ogged.raw
154
155 check-wav: disorder-decode disorder-normalize
156         ./disorder-decode ${top_srcdir}/sounds/scratch.wav | \
157           ./disorder-normalize --config ${srcdir}/test-config > waved.raw
158         cmp waved.raw ${top_srcdir}/sounds/scratch.raw
159         rm -rf waved.raw
160
161 check-flac: disorder-decode disorder-normalize
162         ./disorder-decode ${top_srcdir}/sounds/scratch.flac | \
163           ./disorder-normalize --config ${srcdir}/test-config > flacced.raw
164         cmp flacced.raw ${top_srcdir}/sounds/scratch.raw
165         rm -f flacced.raw
166
167 EXTRA_DIST=README.dbversions test-config
168
169 CLEANFILES=*.gcda *.gcov *.gcno *.c.html index.html