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