chiark / gitweb /
move speaker declarations to speaker.h
[disorder] / server / Makefile.am
1
2 #
3 # This file is part of DisOrder.
4 # Copyright (C) 2004, 2005, 2006, 2007 Richard Kettlewell
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 # USA
20 #
21
22 sbin_PROGRAMS=disorderd disorder-deadlock disorder-rescan disorder-dump \
23               disorder-speaker
24 noinst_PROGRAMS=disorder.cgi trackname
25 noinst_DATA=uk.org.greenend.rjk.disorder.plist
26
27 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
28
29 disorderd_SOURCES=disorderd.c                           \
30         api.c api-server.c                              \
31         daemonize.c daemonize.h                         \
32         play.c play.h                                   \
33         server.c server.h                               \
34         state.c state.h                                 \
35         trackdb.c trackdb.h trackdb-int.h exports.c     \
36         ../lib/memgc.c
37 disorderd_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
38         $(LIBPCRE) $(LIBDB) $(LIBAO) $(LIBGC) $(LIBGCRYPT) $(LIBICONV)
39 disorderd_LDFLAGS=-export-dynamic
40 disorderd_DEPENDENCIES=../lib/libdisorder.a
41
42 disorder_deadlock_SOURCES=deadlock.c                    \
43         trackdb.c trackdb.h
44 disorder_deadlock_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
45         $(LIBDB) $(LIBPCRE) $(LIBICONV)
46 disorder_deadlock_DEPENDENCIES=../lib/libdisorder.a
47
48 disorder_speaker_SOURCES=speaker.c speaker.h
49 disorder_speaker_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
50         $(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
51 disorder_speaker_DEPENDENCIES=../lib/libdisorder.a
52
53 disorder_rescan_SOURCES=rescan.c                        \
54         api.c api-server.c                              \
55         trackdb.c trackdb.h exports.c                   \
56         ../lib/memgc.c
57 disorder_rescan_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
58         $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV)
59 disorder_rescan_LDFLAGS=-export-dynamic
60 disorder_rescan_DEPENDENCIES=../lib/libdisorder.a
61
62 disorder_dump_SOURCES=dump.c                            \
63         trackdb.c trackdb.h                             \
64         ../lib/memgc.c
65 disorder_dump_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
66         $(LIBPCRE) $(LIBDB) $(LIBICONV) $(LIBGC)
67 disorder_dump_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
68
69 disorder_cgi_SOURCES=dcgi.c dcgi.h                      \
70         api.c api-client.c api-client.h                 \
71         cgi.c cgi.h cgimain.c exports.c
72 disorder_cgi_LDADD=../lib/libdisorder.a \
73         $(LIBPCRE) $(LIBGCRYPT) $(LIBDL)
74 disorder_cgi_LDFLAGS=-export-dynamic
75 disorder_cgi_DEPENDENCIES=../lib/libdisorder.a
76
77 trackname_SOURCES=trackname.c
78 trackname_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBICONV)
79 trackname_DEPENDENCIES=../lib/libdisorder.a
80
81 install-exec-hook:
82         $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
83
84 check: check-help
85
86 # check everything has working --help
87 check-help: all
88         ./disorderd --help > /dev/null
89         ./disorder-dump --help > /dev/null
90         ./disorder-deadlock --help > /dev/null
91         ./trackname --help > /dev/null
92         ./disorder-speaker --help > /dev/null
93
94 cgi.o: ../lib/definitions.h
95
96 # for Mac OS X >=10.4
97 SEDFILES=uk.org.greenend.rjk.disorder.plist
98 include ${top_srcdir}/scripts/sedfiles.make
99 EXTRA_DIST=uk.org.greenend.rjk.disorder.plist.in
100 LAUNCHD=/Library/LaunchDaemons
101
102 install-data-hook:
103         @if [ -d ${LAUNCHD} ]; then \
104           echo $(INSTALL) -m 644 uk.org.greenend.rjk.disorder.plist ${LAUNCHD};\
105           $(INSTALL) -m 644 uk.org.greenend.rjk.disorder.plist ${LAUNCHD};\
106           echo launchctl unload ${LAUNCHD} \|\| true;\
107           launchctl unload ${LAUNCHD} || true;\
108           echo launchctl load ${LAUNCHD} \|\| true;\
109           launchctl load ${LAUNCHD} || true;\
110         fi