chiark / gitweb /
Merge scratch fixes branch
[disorder] / server / Makefile.am
CommitLineData
460b9539 1#
2# This file is part of DisOrder.
b50cfb8a 3# Copyright (C) 2004-2009 Richard Kettlewell
460b9539 4#
e7eb3a27 5# This program is free software: you can redistribute it and/or modify
460b9539 6# it under the terms of the GNU General Public License as published by
e7eb3a27 7# the Free Software Foundation, either version 3 of the License, or
460b9539 8# (at your option) any later version.
9#
e7eb3a27
RK
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#
460b9539 15# You should have received a copy of the GNU General Public License
e7eb3a27 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
460b9539 17#
18
19sbin_PROGRAMS=disorderd disorder-deadlock disorder-rescan disorder-dump \
d6dde5a3 20 disorder-speaker disorder-decode disorder-normalize \
bea6f6d5 21 disorder-stats disorder-dbupgrade disorder-choose
0a829a95 22noinst_PROGRAMS=trackname endian
460b9539 23
24AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
25
05b75f8d
RK
26disorderd_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 \
5bac5b78 28 schedule.c dbparams.c background.c \
74f77840 29 exports.c ../lib/memgc.c disorder-server.h
0b861e97 30disorderd_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
b25aac59 31 $(LIBPCRE) $(LIBDB) $(LIBAO) $(LIBGC) $(LIBGCRYPT) $(LIBICONV) \
b50cfb8a 32 $(LIBASOUND) $(COREAUDIO)
460b9539 33disorderd_LDFLAGS=-export-dynamic
0b861e97 34disorderd_DEPENDENCIES=../lib/libdisorder.a
460b9539 35
4ba9806f 36disorder_deadlock_SOURCES=deadlock.c disorder-server.h
0b861e97 37disorder_deadlock_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
637fdea3 38 $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
0b861e97 39disorder_deadlock_DEPENDENCIES=../lib/libdisorder.a
460b9539 40
b50cfb8a 41disorder_speaker_SOURCES=speaker.c
0b861e97 42disorder_speaker_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
adeb58a0
RK
43 $(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO) \
44 $(LIBPTHREAD)
0b861e97 45disorder_speaker_DEPENDENCIES=../lib/libdisorder.a
460b9539 46
4ba9806f 47disorder_decode_SOURCES=decode.c disorder-server.h
f8f8039f 48disorder_decode_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
75db8354 49 $(LIBMAD) $(LIBVORBISFILE) $(LIBFLAC)
f8f8039f
RK
50disorder_decode_DEPENDENCIES=../lib/libdisorder.a
51
4ba9806f 52disorder_normalize_SOURCES=normalize.c disorder-server.h
637fdea3 53disorder_normalize_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
bfdadcc9 54 $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(LIBSAMPLERATE)
6d2d327c
RK
55disorder_normalize_DEPENDENCIES=../lib/libdisorder.a
56
05b75f8d 57disorder_rescan_SOURCES=rescan.c plugin.c api.c api-server.c exports.c \
4ba9806f 58 ../lib/memgc.c disorder-server.h
0b861e97 59disorder_rescan_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
637fdea3 60 $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
460b9539 61disorder_rescan_LDFLAGS=-export-dynamic
0b861e97 62disorder_rescan_DEPENDENCIES=../lib/libdisorder.a
460b9539 63
4ba9806f
RK
64disorder_choose_SOURCES=choose.c server-queue.c ../lib/memgc.c \
65 disorder-server.h
bea6f6d5 66disorder_choose_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
a4766caa 67 $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
bea6f6d5
RK
68disorder_choose_LDFLAGS=-export-dynamic
69disorder_choose_DEPENDENCIES=../lib/libdisorder.a
70
4ba9806f 71disorder_stats_SOURCES=stats.c disorder-server.h
d6dde5a3
RK
72disorder_stats_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
73 $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
74disorder_stats_DEPENDENCIES=../lib/libdisorder.a
75
4ba9806f 76disorder_dump_SOURCES=dump.c disorder-server.h ../lib/memgc.c
0b861e97 77disorder_dump_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
637fdea3 78 $(LIBPCRE) $(LIBDB) $(LIBICONV) $(LIBGC) $(LIBGCRYPT)
0b861e97 79disorder_dump_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
460b9539 80
4ba9806f 81disorder_dbupgrade_SOURCES=dbupgrade.c ../lib/memgc.c disorder-server.h
3dc3d7db
RK
82disorder_dbupgrade_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
83 $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
84disorder_dbupgrade_DEPENDENCIES=../lib/libdisorder.a
85
4ba9806f 86trackname_SOURCES=trackname.c disorder-server.h
637fdea3 87trackname_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
0b861e97 88trackname_DEPENDENCIES=../lib/libdisorder.a
460b9539 89
90install-exec-hook:
91 $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
92
5fa6c4f8 93check: check-help check-decode
460b9539 94
5fa6c4f8 95# check everything has working --help and --version
460b9539 96check-help: all
97 ./disorderd --help > /dev/null
5fa6c4f8 98 ./disorderd --version > /dev/null
460b9539 99 ./disorder-dump --help > /dev/null
5fa6c4f8 100 ./disorder-dump --version > /dev/null
460b9539 101 ./disorder-deadlock --help > /dev/null
5fa6c4f8 102 ./disorder-deadlock --version > /dev/null
460b9539 103 ./trackname --help > /dev/null
5fa6c4f8 104 ./trackname --version > /dev/null
460b9539 105 ./disorder-speaker --help > /dev/null
5fa6c4f8
RK
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
fcb632a2
RK
117 ./disorder-choose --help > /dev/null
118 ./disorder-choose --version > /dev/null
5fa6c4f8 119
94a91e1b 120check-decode: check-wav check-flac check-mp3
e5a506cb 121
e5a506cb
RK
122check-mp3: disorder-decode disorder-normalize
123 ./disorder-decode ${top_srcdir}/sounds/scratch.mp3 | \
124 ./disorder-normalize --config test-config > mp3ed.raw
125 cmp mp3ed.raw ${top_srcdir}/sounds/scratch-mp3.raw
126 rm -f mp3ed.raw
127
94a91e1b
RK
128# TODO ogg decoding comes out OK but different depending on platform, version
129# or something. Makes it tricky to test!
e5a506cb 130check-ogg: disorder-decode disorder-normalize
6df8b1b7 131 ./disorder-decode ${top_srcdir}/sounds/scratch.ogg | \
e5a506cb
RK
132 ./disorder-normalize --config test-config > ogged.raw
133 cmp ogged.raw ${top_srcdir}/sounds/scratch.raw
6df8b1b7
RK
134 rm -f ogged.raw
135
e5a506cb
RK
136check-wav: disorder-decode disorder-normalize
137 ./disorder-decode ${top_srcdir}/sounds/scratch.wav | \
138 ./disorder-normalize --config test-config > waved.raw
139 cmp waved.raw ${top_srcdir}/sounds/scratch.raw
140 rm -rf waved.raw
141
142check-flac: disorder-decode disorder-normalize
143 ./disorder-decode ${top_srcdir}/sounds/scratch.flac | \
144 ./disorder-normalize --config test-config > flacced.raw
145 cmp flacced.raw ${top_srcdir}/sounds/scratch.raw
146 rm -f flacced.raw
147
148EXTRA_DIST=README.dbversions test-config
67e8149c
RK
149
150CLEANFILES=*.gcda *.gcov *.gcno *.c.html index.html