2 # This file is part of DisOrder.
3 # Copyright (C) 2004-2008 Richard Kettlewell
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.
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.
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
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
26 noinst_LIBRARIES=libdisorder.a
27 include_HEADERS=disorder.h
28 noinst_PROGRAMS=$(TESTS)
33 TRACKDB=trackdb-stub.c
36 libdisorder_a_SOURCES=charset.c charset.h \
39 authhash.c authhash.h \
45 client-common.c client-common.h \
46 configuration.c configuration.h \
51 eventlog.c eventlog.h \
52 filepart.c filepart.h \
56 hostname.c hostname.h \
58 inputline.c inputline.h \
60 log.c log.h log-impl.h \
62 mem.c mem.h mem-impl.h \
64 mixer.c mixer.h mixer-oss.c mixer-alsa.c \
67 asprintf.c fprintf.c snprintf.c \
70 rights.c queue-rights.c rights.h \
72 selection.c selection.h \
73 sendmail.c sendmail.h \
76 speaker-protocol.c speaker-protocol.h \
78 syscalls.c syscalls.h \
82 $(TRACKDB) trackdb.h trackdb-int.h \
83 trackname.c trackorder.c trackname.h \
95 version-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
101 versionstring.h: version-string ${top_srcdir}/scripts/text2c
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
108 definitions.h: Makefile
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
114 echo "#define SBINDIR \"${sbindir}/\"" >> $@.new
115 echo "#define BINDIR \"${bindir}/\"" >> $@.new
116 echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new
117 @if cmp $@.new $@; then \
118 echo rm -f $@.new; rm -f $@.new; else \
119 echo mv $@.new $@; mv $@.new $@; fi
120 defs.o: definitions.h versionstring.h
121 defs.lo: definitions.h versionstring.h
123 t_addr_SOURCES=t-addr.c test.c test.h
124 t_addr_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
125 t_addr_DEPENDENCIES=libdisorder.a
127 t_basen_SOURCES=t-basen.c test.c test.h
128 t_basen_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
129 t_basen_DEPENDENCIES=libdisorder.a
131 t_bits_SOURCES=t-bits.c test.c test.h
132 t_bits_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
133 t_bits_DEPENDENCIES=libdisorder.a
135 t_cache_SOURCES=t-cache.c test.c test.h
136 t_cache_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
137 t_cache_DEPENDENCIES=libdisorder.a
139 t_casefold_SOURCES=t-casefold.c test.c test.h
140 t_casefold_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
141 t_casefold_DEPENDENCIES=libdisorder.a
143 t_cookies_SOURCES=t-cookies.c test.c test.h
144 t_cookies_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
145 t_cookies_DEPENDENCIES=libdisorder.a
147 t_filepart_SOURCES=t-filepart.c test.c test.h
148 t_filepart_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
149 t_filepart_DEPENDENCIES=libdisorder.a
151 t_hash_SOURCES=t-hash.c test.c test.h
152 t_hash_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
153 t_hash_DEPENDENCIES=libdisorder.a
155 t_heap_SOURCES=t-heap.c test.c test.h
156 t_heap_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
157 t_heap_DEPENDENCIES=libdisorder.a
159 t_hex_SOURCES=t-hex.c test.c test.h
160 t_hex_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
161 t_hex_DEPENDENCIES=libdisorder.a
163 t_kvp_SOURCES=t-kvp.c test.c test.h
164 t_kvp_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
165 t_kvp_DEPENDENCIES=libdisorder.a
167 t_mime_SOURCES=t-mime.c test.c test.h
168 t_mime_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
169 t_mime_DEPENDENCIES=libdisorder.a
171 t_printf_SOURCES=t-printf.c test.c test.h
172 t_printf_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
173 t_printf_DEPENDENCIES=libdisorder.a
175 t_regsub_SOURCES=t-regsub.c test.c test.h
176 t_regsub_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
177 t_regsub_DEPENDENCIES=libdisorder.a
179 t_selection_SOURCES=t-selection.c test.c test.h
180 t_selection_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
181 t_selection_DEPENDENCIES=libdisorder.a
183 t_signame_SOURCES=t-signame.c test.c test.h
184 t_signame_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
185 t_signame_DEPENDENCIES=libdisorder.a
187 t_sink_SOURCES=t-sink.c test.c test.h
188 t_sink_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
189 t_sink_DEPENDENCIES=libdisorder.a
191 t_split_SOURCES=t-split.c test.c test.h
192 t_split_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
193 t_split_DEPENDENCIES=libdisorder.a
195 t_syscalls_SOURCES=t-syscalls.c test.c test.h
196 t_syscalls_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
197 t_syscalls_DEPENDENCIES=libdisorder.a
199 t_trackname_SOURCES=t-trackname.c test.c test.h
200 t_trackname_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
201 t_trackname_DEPENDENCIES=libdisorder.a
203 t_unicode_SOURCES=t-unicode.c test.c test.h
204 t_unicode_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
205 t_unicode_DEPENDENCIES=libdisorder.a
207 t_url_SOURCES=t-url.c test.c test.h
208 t_url_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
209 t_url_DEPENDENCIES=libdisorder.a
211 t_utf8_SOURCES=t-utf8.c test.c test.h
212 t_utf8_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
213 t_utf8_DEPENDENCIES=libdisorder.a
215 t_vector_SOURCES=t-vector.c test.c test.h
216 t_vector_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
217 t_vector_DEPENDENCIES=libdisorder.a
219 t_words_SOURCES=t-words.c test.c test.h
220 t_words_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
221 t_words_DEPENDENCIES=libdisorder.a
223 t_wstat_SOURCES=t-wstat.c test.c test.h
224 t_wstat_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
225 t_wstat_DEPENDENCIES=libdisorder.a
227 check-report: before-check check make-coverage-reports
230 make-coverage-reports:
231 ${GCOV} *.c | ${PYTHON} ../scripts/format-gcov-report --html . *.c
234 cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
237 $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $< > $@.new
240 CLEANFILES=definitions.h definitions.h.new
242 EXTRA_DIST=trackdb.c trackdb-stub.c