Commit | Line | Data |
---|---|---|
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 | ||
0b861e97 | 21 | noinst_LIBRARIES=libdisorder.a |
460b9539 | 22 | include_HEADERS=disorder.h |
23 | noinst_PROGRAMS=test | |
24 | ||
0b861e97 | 25 | libdisorder_a_SOURCES=charset.c charset.h \ |
460b9539 | 26 | addr.c addr.h \ |
4dadf1a2 | 27 | alsabg.c alsabg.h \ |
460b9539 | 28 | authhash.c authhash.h \ |
29 | basen.c basen.h \ | |
fce810c2 | 30 | base64.c base64.h \ |
f9d42b20 | 31 | bits.c bits.h \ |
460b9539 | 32 | cache.c cache.h \ |
33 | client.c client.h \ | |
34 | client-common.c client-common.h \ | |
35 | configuration.c configuration.h \ | |
b12be54a | 36 | cookies.c cookies.h \ |
460b9539 | 37 | defs.c defs.h \ |
38 | eclient.c eclient.h \ | |
39 | event.c event.h \ | |
40 | eventlog.c eventlog.h \ | |
41 | filepart.c filepart.h \ | |
42 | hash.c hash.h \ | |
22168975 | 43 | heap.h \ |
460b9539 | 44 | hex.c hex.h \ |
bb6ae3fb | 45 | hostname.c hostname.h \ |
81b1bf12 | 46 | ifreq.c ifreq.h \ |
460b9539 | 47 | inputline.c inputline.h \ |
48 | kvp.c kvp.h \ | |
49 | log.c log.h log-impl.h \ | |
50 | logfd.c logfd.h \ | |
51 | mem.c mem.h mem-impl.h \ | |
52 | mime.h mime.c \ | |
b25aac59 | 53 | mixer.c mixer.h mixer-oss.c mixer-alsa.c \ |
460b9539 | 54 | plugin.c plugin.h \ |
55 | printf.c printf.h \ | |
56 | asprintf.c fprintf.c snprintf.c \ | |
57 | queue.c queue.h \ | |
58 | regsub.c regsub.h \ | |
938d8157 | 59 | rights.c queue-rights.c rights.h \ |
e83d0967 | 60 | rtp.h \ |
460b9539 | 61 | selection.c selection.h \ |
bb6ae3fb | 62 | sendmail.c sendmail.h \ |
460b9539 | 63 | signame.c signame.h \ |
64 | sink.c sink.h \ | |
ea410ba1 | 65 | speaker-protocol.c speaker-protocol.h \ |
460b9539 | 66 | split.c split.h \ |
67 | syscalls.c syscalls.h \ | |
68 | types.h \ | |
69 | table.c table.h \ | |
e83d0967 | 70 | timeval.h \ |
f0feb22e | 71 | trackdb.h trackdb.c trackdb-int.h \ |
460b9539 | 72 | trackname.c trackname.h \ |
36bde473 | 73 | url.h url.c \ |
460b9539 | 74 | user.h user.c \ |
e5a5a138 | 75 | unicode.h unicode.c \ |
61507e3c | 76 | unidata.h unidata.c \ |
460b9539 | 77 | vacopy.h \ |
78 | vector.c vector.h \ | |
3fbdc96d | 79 | version.c version.h \ |
ce6c36be | 80 | wav.h wav.c \ |
460b9539 | 81 | wstat.c wstat.h \ |
82 | disorder.h | |
460b9539 | 83 | |
a05e4467 RK |
84 | version-string: ../config.status ${top_srcdir}/scripts/make-version-string |
85 | CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new | |
86 | @if cmp $@.new $@; then \ | |
87 | echo rm -f $@.new; rm -f $@.new; else \ | |
88 | echo mv $@.new $@; mv $@.new $@; fi | |
89 | ||
3fbdc96d | 90 | versionstring.h: version-string ${top_srcdir}/scripts/text2c |
a05e4467 RK |
91 | ${top_srcdir}/scripts/text2c -extern disorder_version_string \ |
92 | version-string > $@.new | |
93 | @if cmp $@.new $@; then \ | |
94 | echo rm -f $@.new; rm -f $@.new; else \ | |
95 | echo mv $@.new $@; mv $@.new $@; fi | |
96 | ||
460b9539 | 97 | definitions.h: Makefile |
98 | rm -f $@.new | |
99 | echo "#define PKGLIBDIR \"${pkglibdir}\"" > $@.new | |
100 | echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new | |
101 | echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new | |
102 | echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new | |
e83d0967 RK |
103 | echo "#define SBINDIR \"${sbindir}/\"" >> $@.new |
104 | echo "#define BINDIR \"${bindir}/\"" >> $@.new | |
105 | echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new | |
66ec39ed RK |
106 | @if cmp $@.new $@; then \ |
107 | echo rm -f $@.new; rm -f $@.new; else \ | |
108 | echo mv $@.new $@; mv $@.new $@; fi | |
3fbdc96d RK |
109 | defs.o: definitions.h versionstring.h |
110 | defs.lo: definitions.h versionstring.h | |
460b9539 | 111 | |
b90f122b RK |
112 | test_SOURCES=test.c memgc.c test.h t-addr.c t-basen.c t-cache.c \ |
113 | t-casefold.c t-cookies.c t-filepart.c t-hash.c t-heap.c \ | |
114 | t-hex.c t-kvp.c t-mime.c t-printf.c t-regsub.c t-selection.c \ | |
115 | t-signame.c t-sink.c t-split.c t-unicode.c t-url.c t-utf8.c \ | |
f9d42b20 | 116 | t-words.c t-wstat.c t-bits.c |
fe575537 | 117 | test_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC) |
0b861e97 | 118 | test_DEPENDENCIES=libdisorder.a |
460b9539 | 119 | |
033fd4e3 | 120 | check: test #test.i |
460b9539 | 121 | ./test |
122 | ||
fbd54d8e RK |
123 | check-report: before-check check make-coverage-reports |
124 | before-check: | |
125 | rm -f *.gcda *.gcov | |
126 | make-coverage-reports: | |
3d853cec | 127 | ${GCOV} *.c | ${PYTHON} ../scripts/format-gcov-report --html . *.c |
fbd54d8e | 128 | |
e5a5a138 RK |
129 | rebuild-unicode: |
130 | cd ${srcdir} && ${top_srcdir}/scripts/make-unidata | |
131 | ||
033fd4e3 RK |
132 | %.i: %.c |
133 | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $< > $@.new | |
134 | mv $@.new $@ | |
135 | ||
66ec39ed | 136 | CLEANFILES=definitions.h definitions.h.new |