chiark / gitweb /
More schedule code testing; fix C interface.
[disorder] / lib / Makefile.am
... / ...
CommitLineData
1#
2# This file is part of DisOrder.
3# Copyright (C) 2004-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
21TESTS=t-addr t-arcfour t-basen t-bits t-cache t-casefold t-charset \
22 t-cookies t-event t-filepart t-hash t-heap t-hex t-kvp t-mime \
23 t-printf t-regsub t-selection t-signame t-sink t-split \
24 t-syscalls t-trackname t-unicode t-url t-utf8 t-vector t-words \
25 t-wstat t-macros t-cgi
26
27noinst_LIBRARIES=libdisorder.a
28include_HEADERS=disorder.h
29noinst_PROGRAMS=$(TESTS)
30
31if SERVER
32TRACKDB=trackdb.c
33else
34TRACKDB=trackdb-stub.c
35endif
36
37libdisorder_a_SOURCES=charset.c charset.h \
38 addr.c addr.h \
39 alsabg.c alsabg.h \
40 arcfour.c arcfour.h \
41 authhash.c authhash.h \
42 basen.c basen.h \
43 base64.c base64.h \
44 bits.c bits.h \
45 cache.c cache.h \
46 cgi.c cgi.h \
47 client.c client.h \
48 client-common.c client-common.h \
49 configuration.c configuration.h \
50 cookies.c cookies.h \
51 defs.c defs.h \
52 eclient.c eclient.h \
53 event.c event.h \
54 eventlog.c eventlog.h \
55 filepart.c filepart.h \
56 hash.c hash.h \
57 heap.h \
58 hex.c hex.h \
59 hostname.c hostname.h \
60 ifreq.c ifreq.h \
61 inputline.c inputline.h \
62 kvp.c kvp.h \
63 log.c log.h log-impl.h \
64 logfd.c logfd.h \
65 macros.c macros-builtin.c macros.h \
66 mem.c mem.h mem-impl.h \
67 mime.h mime.c \
68 mixer.c mixer.h mixer-oss.c mixer-alsa.c \
69 plugin.c plugin.h \
70 printf.c printf.h \
71 asprintf.c fprintf.c snprintf.c \
72 queue.c queue.h \
73 random.c random.h \
74 regsub.c regsub.h \
75 rights.c queue-rights.c rights.h \
76 rtp.h \
77 selection.c selection.h \
78 sendmail.c sendmail.h \
79 signame.c signame.h \
80 sink.c sink.h \
81 speaker-protocol.c speaker-protocol.h \
82 split.c split.h \
83 syscalls.c syscalls.h \
84 types.h \
85 table.c table.h \
86 timeval.h \
87 $(TRACKDB) trackdb.h trackdb-int.h \
88 trackname.c trackorder.c trackname.h \
89 url.h url.c \
90 user.h user.c \
91 unicode.h unicode.c \
92 unidata.h unidata.c \
93 vacopy.h \
94 vector.c vector.h \
95 version.c version.h \
96 wav.h wav.c \
97 wstat.c wstat.h \
98 disorder.h
99
100version-string: ../config.status ${top_srcdir}/scripts/make-version-string
101 CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new
102 @if cmp $@.new $@; then \
103 echo rm -f $@.new; rm -f $@.new; else \
104 echo mv $@.new $@; mv $@.new $@; fi
105
106versionstring.h: version-string ${top_srcdir}/scripts/text2c
107 ${top_srcdir}/scripts/text2c -extern disorder_version_string \
108 version-string > $@.new
109 @if cmp $@.new $@; then \
110 echo rm -f $@.new; rm -f $@.new; else \
111 echo mv $@.new $@; mv $@.new $@; fi
112
113definitions.h: Makefile
114 rm -f $@.new
115 echo "#define PKGLIBDIR \"${pkglibdir}\"" > $@.new
116 echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new
117 echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new
118 echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new
119 echo "#define SBINDIR \"${sbindir}/\"" >> $@.new
120 echo "#define BINDIR \"${bindir}/\"" >> $@.new
121 echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new
122 @if cmp $@.new $@; then \
123 echo rm -f $@.new; rm -f $@.new; else \
124 echo mv $@.new $@; mv $@.new $@; fi
125defs.o: definitions.h versionstring.h
126defs.lo: definitions.h versionstring.h
127
128t_addr_SOURCES=t-addr.c test.c test.h
129t_addr_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
130t_addr_DEPENDENCIES=libdisorder.a
131
132t_arcfour_SOURCES=t-arcfour.c test.c test.h
133t_arcfour_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
134t_arcfour_DEPENDENCIES=libdisorder.a
135
136t_basen_SOURCES=t-basen.c test.c test.h
137t_basen_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
138t_basen_DEPENDENCIES=libdisorder.a
139
140t_bits_SOURCES=t-bits.c test.c test.h
141t_bits_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
142t_bits_DEPENDENCIES=libdisorder.a
143
144t_cache_SOURCES=t-cache.c test.c test.h
145t_cache_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
146t_cache_DEPENDENCIES=libdisorder.a
147
148t_casefold_SOURCES=t-casefold.c test.c test.h
149t_casefold_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
150t_casefold_DEPENDENCIES=libdisorder.a
151
152t_charset_SOURCES=t-charset.c test.c test.h
153t_charset_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
154t_charset_DEPENDENCIES=libdisorder.a
155
156t_cgi_SOURCES=t-cgi.c test.c test.h
157t_cgi_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
158t_cgi_DEPENDENCIES=libdisorder.a
159
160t_cookies_SOURCES=t-cookies.c test.c test.h
161t_cookies_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
162t_cookies_DEPENDENCIES=libdisorder.a
163
164t_event_SOURCES=t-event.c test.c test.h
165t_event_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
166t_event_DEPENDENCIES=libdisorder.a
167
168t_filepart_SOURCES=t-filepart.c test.c test.h
169t_filepart_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
170t_filepart_DEPENDENCIES=libdisorder.a
171
172t_hash_SOURCES=t-hash.c test.c test.h
173t_hash_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
174t_hash_DEPENDENCIES=libdisorder.a
175
176t_heap_SOURCES=t-heap.c test.c test.h
177t_heap_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
178t_heap_DEPENDENCIES=libdisorder.a
179
180t_hex_SOURCES=t-hex.c test.c test.h
181t_hex_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
182t_hex_DEPENDENCIES=libdisorder.a
183
184t_kvp_SOURCES=t-kvp.c test.c test.h
185t_kvp_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
186t_kvp_DEPENDENCIES=libdisorder.a
187
188t_macros_SOURCES=t-macros.c test.c test.h
189t_macros_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
190t_macros_DEPENDENCIES=libdisorder.a
191
192t_mime_SOURCES=t-mime.c test.c test.h
193t_mime_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
194t_mime_DEPENDENCIES=libdisorder.a
195
196t_printf_SOURCES=t-printf.c test.c test.h
197t_printf_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
198t_printf_DEPENDENCIES=libdisorder.a
199
200t_regsub_SOURCES=t-regsub.c test.c test.h
201t_regsub_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
202t_regsub_DEPENDENCIES=libdisorder.a
203
204t_selection_SOURCES=t-selection.c test.c test.h
205t_selection_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
206t_selection_DEPENDENCIES=libdisorder.a
207
208t_signame_SOURCES=t-signame.c test.c test.h
209t_signame_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
210t_signame_DEPENDENCIES=libdisorder.a
211
212t_sink_SOURCES=t-sink.c test.c test.h
213t_sink_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
214t_sink_DEPENDENCIES=libdisorder.a
215
216t_split_SOURCES=t-split.c test.c test.h
217t_split_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
218t_split_DEPENDENCIES=libdisorder.a
219
220t_syscalls_SOURCES=t-syscalls.c test.c test.h
221t_syscalls_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
222t_syscalls_DEPENDENCIES=libdisorder.a
223
224t_trackname_SOURCES=t-trackname.c test.c test.h
225t_trackname_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
226t_trackname_DEPENDENCIES=libdisorder.a
227
228t_unicode_SOURCES=t-unicode.c test.c test.h
229t_unicode_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
230t_unicode_DEPENDENCIES=libdisorder.a
231
232t_url_SOURCES=t-url.c test.c test.h
233t_url_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
234t_url_DEPENDENCIES=libdisorder.a
235
236t_utf8_SOURCES=t-utf8.c test.c test.h
237t_utf8_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
238t_utf8_DEPENDENCIES=libdisorder.a
239
240t_vector_SOURCES=t-vector.c test.c test.h
241t_vector_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
242t_vector_DEPENDENCIES=libdisorder.a
243
244t_words_SOURCES=t-words.c test.c test.h
245t_words_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
246t_words_DEPENDENCIES=libdisorder.a
247
248t_wstat_SOURCES=t-wstat.c test.c test.h
249t_wstat_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
250t_wstat_DEPENDENCIES=libdisorder.a
251
252check-report: before-check check make-coverage-reports
253before-check:
254 rm -f *.gcda *.gcov
255make-coverage-reports:
256 ${GCOV} *.c | ${PYTHON} ../scripts/format-gcov-report --html . *.c
257
258rebuild-unicode:
259 cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
260
261%.i: %.c
262 $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $< > $@.new
263 mv $@.new $@
264
265CLEANFILES=definitions.h definitions.h.new
266
267EXTRA_DIST=trackdb.c trackdb-stub.c t-macros-1.tmpl t-macros-2