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