chiark / gitweb /
Don't keep audio files open except when they are actually being read
[disorder] / server / Makefile.am
1 #
2 # This file is part of DisOrder.
3 # Copyright (C) 2004-2009 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 sbin_PROGRAMS=disorderd disorder-deadlock disorder-rescan disorder-dump \
20               disorder-speaker disorder-decode disorder-normalize \
21               disorder-stats disorder-dbupgrade disorder-choose
22 noinst_PROGRAMS=trackname endian
23
24 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
25
26 disorderd_SOURCES=disorderd.c api.c api-server.c daemonize.c play.c     \
27         server.c server-queue.c queue-ops.c state.c plugin.c            \
28         schedule.c dbparams.c background.c mount.c \
29         exports.c ../lib/memgc.c disorder-server.h
30 disorderd_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
31         $(LIBPCRE) $(LIBDB) $(LIBAO) $(LIBGC) $(LIBGCRYPT) $(LIBICONV) \
32         $(LIBASOUND) $(COREAUDIO)
33 disorderd_LDFLAGS=-export-dynamic
34 disorderd_DEPENDENCIES=../lib/libdisorder.a
35
36 disorder_deadlock_SOURCES=deadlock.c disorder-server.h
37 disorder_deadlock_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
38         $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
39 disorder_deadlock_DEPENDENCIES=../lib/libdisorder.a
40
41 disorder_speaker_SOURCES=speaker.c
42 disorder_speaker_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
43         $(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO) \
44         $(LIBPTHREAD)
45 disorder_speaker_DEPENDENCIES=../lib/libdisorder.a
46
47 disorder_decode_SOURCES=decode.c disorder-server.h
48 disorder_decode_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
49         $(LIBMAD) $(LIBVORBISFILE) $(LIBFLAC)
50 disorder_decode_DEPENDENCIES=../lib/libdisorder.a
51
52 disorder_normalize_SOURCES=normalize.c disorder-server.h
53 disorder_normalize_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
54         $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(LIBSAMPLERATE)
55 disorder_normalize_DEPENDENCIES=../lib/libdisorder.a
56
57 disorder_rescan_SOURCES=rescan.c plugin.c api.c api-server.c exports.c  \
58         ../lib/memgc.c disorder-server.h
59 disorder_rescan_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
60         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
61 disorder_rescan_LDFLAGS=-export-dynamic
62 disorder_rescan_DEPENDENCIES=../lib/libdisorder.a
63
64 disorder_choose_SOURCES=choose.c server-queue.c ../lib/memgc.c  \
65                         disorder-server.h
66 disorder_choose_LDADD=$(LIBOBJS) ../lib/libdisorder.a   \
67         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
68 disorder_choose_LDFLAGS=-export-dynamic
69 disorder_choose_DEPENDENCIES=../lib/libdisorder.a
70
71 disorder_stats_SOURCES=stats.c disorder-server.h
72 disorder_stats_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
73         $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
74 disorder_stats_DEPENDENCIES=../lib/libdisorder.a
75
76 disorder_dump_SOURCES=dump.c disorder-server.h ../lib/memgc.c
77 disorder_dump_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
78         $(LIBPCRE) $(LIBDB) $(LIBICONV) $(LIBGC) $(LIBGCRYPT)
79 disorder_dump_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
80
81 disorder_dbupgrade_SOURCES=dbupgrade.c ../lib/memgc.c disorder-server.h
82 disorder_dbupgrade_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
83         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
84 disorder_dbupgrade_DEPENDENCIES=../lib/libdisorder.a
85
86 trackname_SOURCES=trackname.c disorder-server.h
87 trackname_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
88 trackname_DEPENDENCIES=../lib/libdisorder.a
89
90 install-exec-hook:
91         $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
92
93 check: check-help check-decode
94
95 # check everything has working --help and --version
96 check-help: all
97         ./disorderd --help > /dev/null
98         ./disorderd --version > /dev/null
99         ./disorder-dump --help > /dev/null
100         ./disorder-dump --version > /dev/null
101         ./disorder-deadlock --help > /dev/null
102         ./disorder-deadlock --version > /dev/null
103         ./trackname --help > /dev/null
104         ./trackname --version > /dev/null
105         ./disorder-speaker --help > /dev/null
106         ./disorder-speaker --version > /dev/null
107         ./disorder-decode --help > /dev/null
108         ./disorder-decode --version > /dev/null
109         ./disorder-normalize --help > /dev/null
110         ./disorder-normalize --version > /dev/null
111         ./disorder-stats --help > /dev/null
112         ./disorder-stats --version > /dev/null
113         ./disorder-dbupgrade --help > /dev/null
114         ./disorder-dbupgrade --version > /dev/null
115         ./disorder-rescan --help > /dev/null
116         ./disorder-rescan --version > /dev/null
117         ./disorder-choose --help > /dev/null
118         ./disorder-choose --version > /dev/null
119
120 check-decode: check-wav check-flac check-mp3
121
122 check-mp3: disorder-decode disorder-normalize
123         ./disorder-decode ${top_srcdir}/sounds/scratch.mp3 | \
124           ./disorder-normalize --config ${srcdir}/test-config > mp3ed.raw
125         cmp mp3ed.raw ${top_srcdir}/sounds/scratch-mp3.raw
126         rm -f mp3ed.raw
127
128 # TODO ogg decoding comes out OK but different depending on platform, version
129 # or something.  Makes it tricky to test!
130 check-ogg: disorder-decode disorder-normalize
131         ./disorder-decode ${top_srcdir}/sounds/scratch.ogg | \
132           ./disorder-normalize --config ${srcdir}/test-config > ogged.raw
133         cmp ogged.raw ${top_srcdir}/sounds/scratch.raw
134         rm -f ogged.raw
135
136 check-wav: disorder-decode disorder-normalize
137         ./disorder-decode ${top_srcdir}/sounds/scratch.wav | \
138           ./disorder-normalize --config ${srcdir}/test-config > waved.raw
139         cmp waved.raw ${top_srcdir}/sounds/scratch.raw
140         rm -rf waved.raw
141
142 check-flac: disorder-decode disorder-normalize
143         ./disorder-decode ${top_srcdir}/sounds/scratch.flac | \
144           ./disorder-normalize --config ${srcdir}/test-config > flacced.raw
145         cmp flacced.raw ${top_srcdir}/sounds/scratch.raw
146         rm -f flacced.raw
147
148 EXTRA_DIST=README.dbversions test-config
149
150 CLEANFILES=*.gcda *.gcov *.gcno *.c.html index.html