chiark / gitweb /
more testing
[disorder] / lib / Makefile.am
... / ...
CommitLineData
1#
2# This file is part of DisOrder.
3# Copyright (C) 2004, 2005, 2006, 2007 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
21noinst_LIBRARIES=libdisorder.a
22include_HEADERS=disorder.h
23noinst_PROGRAMS=test
24
25libdisorder_a_SOURCES=charset.c charset.h \
26 addr.c addr.h \
27 authhash.c authhash.h \
28 basen.c basen.h \
29 cache.c cache.h \
30 client.c client.h \
31 client-common.c client-common.h \
32 configuration.c configuration.h \
33 defs.c defs.h \
34 eclient.c eclient.h \
35 event.c event.h \
36 eventlog.c eventlog.h \
37 filepart.c filepart.h \
38 hash.c hash.h \
39 heap.h \
40 hex.c hex.h \
41 ifreq.c ifreq.h \
42 inputline.c inputline.h \
43 kvp.c kvp.h \
44 log.c log.h log-impl.h \
45 logfd.c logfd.h \
46 mem.c mem.h mem-impl.h \
47 mime.h mime.c \
48 mixer.c mixer.h \
49 plugin.c plugin.h \
50 printf.c printf.h \
51 asprintf.c fprintf.c snprintf.c \
52 queue.c queue.h \
53 regsub.c regsub.h \
54 rtp.h \
55 selection.c selection.h \
56 signame.c signame.h \
57 sink.c sink.h \
58 speaker-protocol.c speaker-protocol.h \
59 split.c split.h \
60 syscalls.c syscalls.h \
61 types.h \
62 table.c table.h \
63 timeval.h \
64 trackname.c trackname.h \
65 user.h user.c \
66 unicode.h unicode.c \
67 unidata.h unidata.c \
68 vacopy.h \
69 vector.c vector.h \
70 wav.h wav.c \
71 wstat.c wstat.h \
72 disorder.h
73
74definitions.h: Makefile
75 rm -f $@.new
76 echo "#define PKGLIBDIR \"${pkglibdir}\"" > $@.new
77 echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new
78 echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new
79 echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new
80 echo "#define SBINDIR \"${sbindir}/\"" >> $@.new
81 echo "#define BINDIR \"${bindir}/\"" >> $@.new
82 echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new
83 echo "#define DOCDIR \"${docdir}/\"" >> $@.new
84 @if cmp $@.new $@; then \
85 echo rm -f $@.new; rm -f $@.new; else \
86 echo mv $@.new $@; mv $@.new $@; fi
87defs.o: definitions.h
88defs.lo: definitions.h
89
90test_SOURCES=test.c memgc.c
91test_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
92test_DEPENDENCIES=libdisorder.a
93
94check: test #test.i
95 ./test
96
97check-report: before-check check make-coverage-reports
98before-check:
99 rm -f *.gcda *.gcov
100make-coverage-reports:
101 ${GCOV} *.c | ${PYTHON} ../scripts/format-gcov-report --html . *.c
102
103rebuild-unicode:
104 cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
105
106%.i: %.c
107 $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $< > $@.new
108 mv $@.new $@
109
110CLEANFILES=definitions.h definitions.h.new