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