chiark / gitweb /
Mildly more vigorous uninstall rules
[disorder] / server / Makefile.am
1 #
2 # This file is part of DisOrder.
3 # Copyright (C) 2004-2008 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 2 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, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # 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, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 # USA
19 #
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
25
26 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
27
28 disorderd_SOURCES=disorderd.c api.c api-server.c daemonize.c play.c     \
29         server.c server-queue.c queue-ops.c state.c plugin.c            \
30         schedule.c exports.c ../lib/memgc.c disorder-server.h
31 disorderd_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
32         $(LIBPCRE) $(LIBDB) $(LIBAO) $(LIBGC) $(LIBGCRYPT) $(LIBICONV) \
33         $(LIBASOUND) $(COREAUDIO)
34 disorderd_LDFLAGS=-export-dynamic
35 disorderd_DEPENDENCIES=../lib/libdisorder.a
36
37 disorder_deadlock_SOURCES=deadlock.c disorder-server.h
38 disorder_deadlock_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
39         $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
40 disorder_deadlock_DEPENDENCIES=../lib/libdisorder.a
41
42 disorder_speaker_SOURCES=speaker.c speaker.h \
43                          speaker-command.c \
44                          speaker-network.c \
45                          speaker-coreaudio.c \
46                          speaker-oss.c \
47                          speaker-alsa.c
48 disorder_speaker_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
49         $(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO)
50 disorder_speaker_DEPENDENCIES=../lib/libdisorder.a
51
52 disorder_decode_SOURCES=decode.c disorder-server.h
53 disorder_decode_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
54         $(LIBMAD) $(LIBVORBISFILE) $(LIBFLAC)
55 disorder_decode_DEPENDENCIES=../lib/libdisorder.a
56
57 disorder_normalize_SOURCES=normalize.c disorder-server.h
58 disorder_normalize_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
59         $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
60 disorder_normalize_DEPENDENCIES=../lib/libdisorder.a
61
62 disorder_rescan_SOURCES=rescan.c plugin.c api.c api-server.c exports.c  \
63         ../lib/memgc.c disorder-server.h
64 disorder_rescan_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
65         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
66 disorder_rescan_LDFLAGS=-export-dynamic
67 disorder_rescan_DEPENDENCIES=../lib/libdisorder.a
68
69 disorder_choose_SOURCES=choose.c server-queue.c ../lib/memgc.c  \
70                         disorder-server.h
71 disorder_choose_LDADD=$(LIBOBJS) ../lib/libdisorder.a   \
72         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBGCRYPT)
73 disorder_choose_LDFLAGS=-export-dynamic
74 disorder_choose_DEPENDENCIES=../lib/libdisorder.a
75
76 disorder_stats_SOURCES=stats.c disorder-server.h
77 disorder_stats_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
78         $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
79 disorder_stats_DEPENDENCIES=../lib/libdisorder.a
80
81 disorder_dump_SOURCES=dump.c disorder-server.h ../lib/memgc.c
82 disorder_dump_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
83         $(LIBPCRE) $(LIBDB) $(LIBICONV) $(LIBGC) $(LIBGCRYPT)
84 disorder_dump_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
85
86 disorder_dbupgrade_SOURCES=dbupgrade.c ../lib/memgc.c disorder-server.h
87 disorder_dbupgrade_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
88         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
89 disorder_dbupgrade_DEPENDENCIES=../lib/libdisorder.a
90
91 trackname_SOURCES=trackname.c disorder-server.h
92 trackname_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
93 trackname_DEPENDENCIES=../lib/libdisorder.a
94
95 install-exec-hook:
96         $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
97
98 check: check-help check-decode
99
100 # check everything has working --help and --version
101 check-help: all
102         ./disorderd --help > /dev/null
103         ./disorderd --version > /dev/null
104         ./disorder-dump --help > /dev/null
105         ./disorder-dump --version > /dev/null
106         ./disorder-deadlock --help > /dev/null
107         ./disorder-deadlock --version > /dev/null
108         ./trackname --help > /dev/null
109         ./trackname --version > /dev/null
110         ./disorder-speaker --help > /dev/null
111         ./disorder-speaker --version > /dev/null
112         ./disorder-decode --help > /dev/null
113         ./disorder-decode --version > /dev/null
114         ./disorder-normalize --help > /dev/null
115         ./disorder-normalize --version > /dev/null
116         ./disorder-stats --help > /dev/null
117         ./disorder-stats --version > /dev/null
118         ./disorder-dbupgrade --help > /dev/null
119         ./disorder-dbupgrade --version > /dev/null
120         ./disorder-rescan --help > /dev/null
121         ./disorder-rescan --version > /dev/null
122         ./disorder-choose --help > /dev/null
123         ./disorder-choose --version > /dev/null
124
125 # My sox doesn't know MP3 or FLAC unfortunately
126 check-decode: disorder-decode disorder-normalize
127         echo "speaker_backend network" > config
128         echo "broadcast 127.255.255.255 discard" > config
129         ./disorder-decode ${top_srcdir}/sounds/scratch.ogg | \
130           ./disorder-normalize --config config > decoded.raw
131         oggdec -b 16 -e 1 -R -s 1 -o oggdec.raw ${top_srcdir}/sounds/scratch.ogg
132         cmp decoded.raw oggdec.raw
133         sox ${top_srcdir}/sounds/scratch.ogg scratch.wav
134         ./disorder-decode scratch.wav | \
135           ./disorder-normalize --config config > decoded.raw
136         ls -l *.raw
137         cmp decoded.raw oggdec.raw
138         rm -f scratch.wav config decoded.raw oggdec.raw
139
140 EXTRA_DIST=README.dbversions