Set AUTOMAKE_OPTIONS=subdir-objects where necessary.
[disorder] / clients / Makefile.am
1 #
2 # This file is part of DisOrder.
3 # Copyright (C) 2006-2009, 2011-2013 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 bin_PROGRAMS=disorder disorderfm disorder-playrtp
20 noinst_PROGRAMS=filename-bytes rtpmon resample
21 noinst_SCRIPTS=dump2wav
22
23 AUTOMAKE_OPTIONS=subdir-objects
24 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
25
26 disorder_SOURCES=disorder.c authorize.c authorize.h \
27 ../lib/memgc.c
28 disorder_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
29 $(LIBGC) $(LIBGCRYPT) $(LIBPCRE) $(LIBICONV) $(LIBPTHREAD)
30 disorder_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
31
32 disorderfm_SOURCES=disorderfm.c \
33 ../lib/memgc.c
34 disorderfm_LDADD=$(LIBOBJS) ../lib/libdisorder.a $(LIBGC) $(LIBICONV)
35 disorderfm_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
36
37 disorder_playrtp_SOURCES=playrtp.c playrtp.h playrtp-mem.c
38 disorder_playrtp_CFLAGS=$(PULSEAUDIO_CFLAGS) $(PULSEAUDIO_SIMPLE_CFLAGS)
39 disorder_playrtp_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
40 $(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO) \
41 $(LIBPTHREAD) $(PULSEAUDIO_SIMPLE_LIBS) $(PULSEAUDIO_LIBS) -lm
42 disorder_playrtp_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
43
44 rtpmon_SOURCES=rtpmon.c
45 rtpmon_LDADD=$(LIBOBJS) ../lib/libdisorder.a
46
47 filename_bytes_SOURCES=filename-bytes.c
48
49 resample_SOURCES=resample.c
50 resample_LDADD=$(LIBOBJS) ../lib/libdisorder.a $(LIBSAMPLERATE)
51
52 check: check-help check-completions
53
54 # check everything has working --help and --version
55 check-help: all
56 ./disorder --version > /dev/null
57 ./disorder --help > /dev/null
58 ./disorder --help-commands > /dev/null
59 ./disorderfm --version > /dev/null
60 ./disorderfm --help > /dev/null
61 ./disorder-playrtp --version > /dev/null
62 ./disorder-playrtp --help > /dev/null
63
64 # check that the command completions are up to date
65 check-completions: disorder
66 ./disorder --help-commands \
67 | awk '/^ [a-z]/ { print $$1 }' \
68 | sort > ,commands
69 ( set -e;completions() { \
70 for x; do \
71 case $$x in\
72 quack ) ;;\
73 [a-z]* ) echo $$x; ;;\
74 esac;\
75 done;\
76 }; \
77 complete() { if [ "$$7" = disorder ]; then completions $$6; fi }; \
78 . ${top_srcdir}/scripts/completion.bash )\
79 | sort > ,completions
80 diff -u ,commands ,completions
81
82 CLEANFILES=,commands ,completions \
83 *.gcda *.gcov *.gcno *.c.html index.html
84
85 EXTRA_DIST=dump2wav disorder.vcxproj disorder.vcxproj.filters