| 1 | # |
| 2 | # This file is part of DisOrder. |
| 3 | # Copyright (C) 2006-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 | bin_PROGRAMS=disorder disorderfm disorder-playrtp |
| 22 | noinst_PROGRAMS=test-eclient filename-bytes |
| 23 | noinst_SCRIPTS=dump2wav |
| 24 | |
| 25 | AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib |
| 26 | |
| 27 | disorder_SOURCES=disorder.c authorize.c authorize.h \ |
| 28 | ../lib/memgc.c |
| 29 | disorder_LDADD=$(LIBOBJS) ../lib/libdisorder.a \ |
| 30 | $(LIBGC) $(LIBGCRYPT) $(LIBPCRE) $(LIBDB) |
| 31 | disorder_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a |
| 32 | |
| 33 | disorderfm_SOURCES=disorderfm.c \ |
| 34 | ../lib/memgc.c |
| 35 | disorderfm_LDADD=$(LIBOBJS) ../lib/libdisorder.a $(LIBGC) $(LIBICONV) |
| 36 | disorderfm_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a |
| 37 | |
| 38 | disorder_playrtp_SOURCES=playrtp.c playrtp.h playrtp-mem.c \ |
| 39 | playrtp-alsa.c playrtp-coreaudio.c playrtp-oss.c |
| 40 | disorder_playrtp_LDADD=$(LIBOBJS) ../lib/libdisorder.a \ |
| 41 | $(LIBASOUND) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(COREAUDIO) \ |
| 42 | $(LIBDB) $(LIBPTHREAD) |
| 43 | disorder_playrtp_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a |
| 44 | |
| 45 | filename_bytes_SOURCES=filename-bytes.c |
| 46 | |
| 47 | test_eclient_SOURCES=test-eclient.c \ |
| 48 | ../lib/memgc.c |
| 49 | test_eclient_LDADD=../lib/libdisorder.a \ |
| 50 | $(LIBGC) $(LIBGCRYPT) $(LIBPCRE) |
| 51 | test_eclient_DEPENDENCIES=../lib/libdisorder.a |
| 52 | |
| 53 | install-exec-hook: |
| 54 | $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir) |
| 55 | |
| 56 | check: check-help check-completions |
| 57 | |
| 58 | # check everything has working --help and --version |
| 59 | check-help: all |
| 60 | ./disorder --version > /dev/null |
| 61 | ./disorder --help > /dev/null |
| 62 | ./disorder --help-commands > /dev/null |
| 63 | ./disorderfm --version > /dev/null |
| 64 | ./disorderfm --help > /dev/null |
| 65 | ./disorder-playrtp --version > /dev/null |
| 66 | ./disorder-playrtp --help > /dev/null |
| 67 | |
| 68 | # check that the command completions are up to date |
| 69 | check-completions: disorder |
| 70 | ./disorder --help-commands \ |
| 71 | | awk '/^ [a-z]/ { print $$1 }' \ |
| 72 | | sort > ,commands |
| 73 | ( set -e;completions() { \ |
| 74 | for x; do \ |
| 75 | case $$x in\ |
| 76 | quack ) ;;\ |
| 77 | [a-z]* ) echo $$x; ;;\ |
| 78 | esac;\ |
| 79 | done;\ |
| 80 | }; \ |
| 81 | complete() { if [ "$$7" = disorder ]; then completions $$6; fi }; \ |
| 82 | . ${top_srcdir}/scripts/completion.bash )\ |
| 83 | | sort > ,completions |
| 84 | diff -u ,commands ,completions |
| 85 | |
| 86 | CLEANFILES=,commands ,completions |
| 87 | |
| 88 | EXTRA_DIST=dump2wav |