2 # This file is part of DisOrder.
3 # Copyright (C) 2004, 2005, 2006, 2007 Richard Kettlewell
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.
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.
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
21 noinst_LIBRARIES=libdisorder.a
22 include_HEADERS=disorder.h
25 libdisorder_a_SOURCES=charset.c charset.h \
27 authhash.c authhash.h \
32 client-common.c client-common.h \
33 configuration.c configuration.h \
38 eventlog.c eventlog.h \
39 filepart.c filepart.h \
43 hostname.c hostname.h \
45 inputline.c inputline.h \
47 log.c log.h log-impl.h \
49 mem.c mem.h mem-impl.h \
51 mixer.c mixer.h mixer-oss.c mixer-alsa.c \
54 asprintf.c fprintf.c snprintf.c \
57 rights.c queue-rights.c rights.h \
59 selection.c selection.h \
60 sendmail.c sendmail.h \
63 speaker-protocol.c speaker-protocol.h \
65 syscalls.c syscalls.h \
69 trackdb.h trackdb.c trackdb-int.h \
70 trackname.c trackname.h \
81 version-string: ../config.status ${top_srcdir}/scripts/make-version-string
82 CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new
83 @if cmp $@.new $@; then \
84 echo rm -f $@.new; rm -f $@.new; else \
85 echo mv $@.new $@; mv $@.new $@; fi
87 version.h: version-string ${top_srcdir}/scripts/text2c
88 ${top_srcdir}/scripts/text2c -extern disorder_version_string \
89 version-string > $@.new
90 @if cmp $@.new $@; then \
91 echo rm -f $@.new; rm -f $@.new; else \
92 echo mv $@.new $@; mv $@.new $@; fi
94 definitions.h: Makefile
96 echo "#define PKGLIBDIR \"${pkglibdir}\"" > $@.new
97 echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new
98 echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new
99 echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new
100 echo "#define SBINDIR \"${sbindir}/\"" >> $@.new
101 echo "#define BINDIR \"${bindir}/\"" >> $@.new
102 echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new
103 echo "#define DOCDIR \"${docdir}/\"" >> $@.new
104 @if cmp $@.new $@; then \
105 echo rm -f $@.new; rm -f $@.new; else \
106 echo mv $@.new $@; mv $@.new $@; fi
107 defs.o: definitions.h version.h
108 defs.lo: definitions.h version.h
110 test_SOURCES=test.c memgc.c
111 test_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
112 test_DEPENDENCIES=libdisorder.a
117 check-report: before-check check make-coverage-reports
120 make-coverage-reports:
121 ${GCOV} *.c | ${PYTHON} ../scripts/format-gcov-report --html . *.c
124 cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
127 $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $< > $@.new
130 CLEANFILES=definitions.h definitions.h.new