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