chiark / gitweb /
debian/control: db4.8 is obsolete in wheezy.
[disorder] / server / Makefile.am
index 35571586a5635c17ff53fa8bd3a3b03acb7d4b59..c6febdca6370c73125caebf1ca7cd754656c6f24 100644 (file)
 #
 # This file is part of DisOrder.
 #
 # This file is part of DisOrder.
-# Copyright (C) 2004-2008 Richard Kettlewell
+# Copyright (C) 2004-2011 Richard Kettlewell
 #
 #
-# This program is free software; you can redistribute it and/or modify
+# This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # (at your option) any later version.
 #
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
 # You should have received a copy of the GNU General Public License
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
 sbin_PROGRAMS=disorderd disorder-deadlock disorder-rescan disorder-dump \
              disorder-speaker disorder-decode disorder-normalize \
              disorder-stats disorder-dbupgrade disorder-choose
 #
 
 sbin_PROGRAMS=disorderd disorder-deadlock disorder-rescan disorder-dump \
              disorder-speaker disorder-decode disorder-normalize \
              disorder-stats disorder-dbupgrade disorder-choose
-noinst_PROGRAMS=trackname
+noinst_PROGRAMS=trackname endian
 
 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
 
 disorderd_SOURCES=disorderd.c api.c api-server.c daemonize.c play.c    \
        server.c server-queue.c queue-ops.c state.c plugin.c            \
 
 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
 
 disorderd_SOURCES=disorderd.c api.c api-server.c daemonize.c play.c    \
        server.c server-queue.c queue-ops.c state.c plugin.c            \
-       schedule.c exports.c ../lib/memgc.c
+       schedule.c dbparams.c background.c mount.c \
+       exports.c ../lib/memgc.c disorder-server.h
 disorderd_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBPCRE) $(LIBDB) $(LIBAO) $(LIBGC) $(LIBGCRYPT) $(LIBICONV) \
 disorderd_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBPCRE) $(LIBDB) $(LIBAO) $(LIBGC) $(LIBGCRYPT) $(LIBICONV) \
-       $(LIBASOUND) $(COREAUDIO)
+       $(LIBASOUND) $(COREAUDIO) $(LIBPTHREAD) $(LIBDL)
 disorderd_LDFLAGS=-export-dynamic
 disorderd_DEPENDENCIES=../lib/libdisorder.a
 
 disorderd_LDFLAGS=-export-dynamic
 disorderd_DEPENDENCIES=../lib/libdisorder.a
 
-disorder_deadlock_SOURCES=deadlock.c
+disorder_deadlock_SOURCES=deadlock.c disorder-server.h
 disorder_deadlock_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_deadlock_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_deadlock_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_deadlock_DEPENDENCIES=../lib/libdisorder.a
 
-disorder_speaker_SOURCES=speaker.c speaker.h \
-                        speaker-command.c \
-                        speaker-network.c \
-                        speaker-coreaudio.c \
-                        speaker-oss.c \
-                        speaker-alsa.c
+disorder_speaker_SOURCES=speaker.c
 disorder_speaker_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
 disorder_speaker_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
-       $(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO)
+       $(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO) \
+       $(LIBPTHREAD)
 disorder_speaker_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_speaker_DEPENDENCIES=../lib/libdisorder.a
 
-disorder_decode_SOURCES=decode.c
+disorder_decode_SOURCES=decode.c decode.h disorder-server.h    \
+decode-mp3.c decode-ogg.c decode-wav.c decode-flac.c
 disorder_decode_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBMAD) $(LIBVORBISFILE) $(LIBFLAC)
 disorder_decode_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_decode_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBMAD) $(LIBVORBISFILE) $(LIBFLAC)
 disorder_decode_DEPENDENCIES=../lib/libdisorder.a
 
-disorder_normalize_SOURCES=normalize.c
+disorder_normalize_SOURCES=normalize.c disorder-server.h
 disorder_normalize_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
 disorder_normalize_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
-       $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
+       $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(LIBSAMPLERATE)
 disorder_normalize_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_rescan_SOURCES=rescan.c plugin.c api.c api-server.c exports.c \
 disorder_normalize_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_rescan_SOURCES=rescan.c plugin.c api.c api-server.c exports.c \
-       ../lib/memgc.c
+       ../lib/memgc.c disorder-server.h
 disorder_rescan_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
 disorder_rescan_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
-       $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
+       $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(LIBDL)
 disorder_rescan_LDFLAGS=-export-dynamic
 disorder_rescan_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_rescan_LDFLAGS=-export-dynamic
 disorder_rescan_DEPENDENCIES=../lib/libdisorder.a
 
-disorder_choose_SOURCES=choose.c server-queue.c ../lib/memgc.c
+disorder_choose_SOURCES=choose.c server-queue.c ../lib/memgc.c \
+                       disorder-server.h
 disorder_choose_LDADD=$(LIBOBJS) ../lib/libdisorder.a   \
 disorder_choose_LDADD=$(LIBOBJS) ../lib/libdisorder.a   \
-       $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBGCRYPT)
+       $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_choose_LDFLAGS=-export-dynamic
 disorder_choose_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_choose_LDFLAGS=-export-dynamic
 disorder_choose_DEPENDENCIES=../lib/libdisorder.a
 
-disorder_stats_SOURCES=stats.c
+disorder_stats_SOURCES=stats.c disorder-server.h
 disorder_stats_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_stats_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_stats_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_stats_DEPENDENCIES=../lib/libdisorder.a
 
-disorder_dump_SOURCES=dump.c                                   \
-       ../lib/memgc.c
+disorder_dump_SOURCES=dump.c disorder-server.h ../lib/memgc.c
 disorder_dump_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBPCRE) $(LIBDB) $(LIBICONV) $(LIBGC) $(LIBGCRYPT)
 disorder_dump_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
 
 disorder_dump_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBPCRE) $(LIBDB) $(LIBICONV) $(LIBGC) $(LIBGCRYPT)
 disorder_dump_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
 
-disorder_dbupgrade_SOURCES=dbupgrade.c ../lib/memgc.c
+disorder_dbupgrade_SOURCES=dbupgrade.c ../lib/memgc.c disorder-server.h
 disorder_dbupgrade_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_dbupgrade_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_dbupgrade_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_dbupgrade_DEPENDENCIES=../lib/libdisorder.a
 
-trackname_SOURCES=trackname.c
+trackname_SOURCES=trackname.c disorder-server.h
 trackname_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 trackname_DEPENDENCIES=../lib/libdisorder.a
 
 trackname_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 trackname_DEPENDENCIES=../lib/libdisorder.a
 
-install-exec-hook:
-       $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
-
 check: check-help check-decode
 
 # check everything has working --help and --version
 check: check-help check-decode
 
 # check everything has working --help and --version
@@ -119,20 +112,37 @@ check-help: all
        ./disorder-dbupgrade --version > /dev/null
        ./disorder-rescan --help > /dev/null
        ./disorder-rescan --version > /dev/null
        ./disorder-dbupgrade --version > /dev/null
        ./disorder-rescan --help > /dev/null
        ./disorder-rescan --version > /dev/null
+       ./disorder-choose --help > /dev/null
+       ./disorder-choose --version > /dev/null
+
+check-decode: check-wav check-flac check-mp3
 
 
-# My sox doesn't know MP3 or FLAC unfortunately
-check-decode: disorder-decode disorder-normalize
-       echo "speaker_backend network" > config
-       echo "broadcast 127.255.255.255 discard" > config
+check-mp3: disorder-decode disorder-normalize
+       ./disorder-decode ${top_srcdir}/sounds/scratch.mp3 | \
+         ./disorder-normalize --config ${srcdir}/test-config > mp3ed.raw
+       cmp mp3ed.raw ${top_srcdir}/sounds/scratch-mp3.raw
+       rm -f mp3ed.raw
+
+# TODO ogg decoding comes out OK but different depending on platform, version
+# or something.  Makes it tricky to test!
+check-ogg: disorder-decode disorder-normalize
        ./disorder-decode ${top_srcdir}/sounds/scratch.ogg | \
        ./disorder-decode ${top_srcdir}/sounds/scratch.ogg | \
-         ./disorder-normalize --config config > decoded.raw
-       oggdec -b 16 -e 1 -R -s 1 -o oggdec.raw ${top_srcdir}/sounds/scratch.ogg
-       cmp decoded.raw oggdec.raw
-       sox ${top_srcdir}/sounds/scratch.ogg scratch.wav
-       ./disorder-decode scratch.wav | \
-         ./disorder-normalize --config config > decoded.raw
-       ls -l *.raw
-       cmp decoded.raw oggdec.raw
-       rm -f scratch.wav config decoded.raw oggdec.raw
-
-EXTRA_DIST=README.dbversions
+         ./disorder-normalize --config ${srcdir}/test-config > ogged.raw
+       cmp ogged.raw ${top_srcdir}/sounds/scratch.raw
+       rm -f ogged.raw
+
+check-wav: disorder-decode disorder-normalize
+       ./disorder-decode ${top_srcdir}/sounds/scratch.wav | \
+         ./disorder-normalize --config ${srcdir}/test-config > waved.raw
+       cmp waved.raw ${top_srcdir}/sounds/scratch.raw
+       rm -rf waved.raw
+
+check-flac: disorder-decode disorder-normalize
+       ./disorder-decode ${top_srcdir}/sounds/scratch.flac | \
+         ./disorder-normalize --config ${srcdir}/test-config > flacced.raw
+       cmp flacced.raw ${top_srcdir}/sounds/scratch.raw
+       rm -f flacced.raw
+
+EXTRA_DIST=README.dbversions test-config
+
+CLEANFILES=*.gcda *.gcov *.gcno *.c.html index.html