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