chiark / gitweb /
keep cookie more private to disorder.cgi
[disorder] / lib / Makefile.am
... / ...
CommitLineData
1#
2# This file is part of DisOrder.
3# Copyright (C) 2004, 2005, 2006, 2007 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
21noinst_LIBRARIES=libdisorder.a
22include_HEADERS=disorder.h
23noinst_PROGRAMS=test
24
25libdisorder_a_SOURCES=charset.c charset.h \
26 addr.c addr.h \
27 authhash.c authhash.h \
28 basen.c basen.h \
29 base64.c base64.h \
30 cache.c cache.h \
31 client.c client.h \
32 client-common.c client-common.h \
33 configuration.c configuration.h \
34 cookies.c cookies.h \
35 defs.c defs.h \
36 eclient.c eclient.h \
37 event.c event.h \
38 eventlog.c eventlog.h \
39 filepart.c filepart.h \
40 hash.c hash.h \
41 heap.h \
42 hex.c hex.h \
43 ifreq.c ifreq.h \
44 inputline.c inputline.h \
45 kvp.c kvp.h \
46 log.c log.h log-impl.h \
47 logfd.c logfd.h \
48 mem.c mem.h mem-impl.h \
49 mime.h mime.c \
50 mixer.c mixer.h \
51 plugin.c plugin.h \
52 printf.c printf.h \
53 asprintf.c fprintf.c snprintf.c \
54 queue.c queue.h \
55 regsub.c regsub.h \
56 rights.c queue-rights.c rights.h \
57 rtp.h \
58 selection.c selection.h \
59 signame.c signame.h \
60 sink.c sink.h \
61 speaker-protocol.c speaker-protocol.h \
62 split.c split.h \
63 syscalls.c syscalls.h \
64 types.h \
65 table.c table.h \
66 timeval.h \
67 trackdb.h trackdb.c trackdb-int.h \
68 trackname.c trackname.h \
69 url.h url.c \
70 user.h user.c \
71 unicode.h unicode.c \
72 unidata.h unidata.c \
73 vacopy.h \
74 vector.c vector.h \
75 wav.h wav.c \
76 wstat.c wstat.h \
77 disorder.h
78
79version-string: ../config.status ${top_srcdir}/scripts/make-version-string
80 CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new
81 @if cmp $@.new $@; then \
82 echo rm -f $@.new; rm -f $@.new; else \
83 echo mv $@.new $@; mv $@.new $@; fi
84
85version.h: version-string ${top_srcdir}/scripts/text2c
86 ${top_srcdir}/scripts/text2c -extern disorder_version_string \
87 version-string > $@.new
88 @if cmp $@.new $@; then \
89 echo rm -f $@.new; rm -f $@.new; else \
90 echo mv $@.new $@; mv $@.new $@; fi
91
92definitions.h: Makefile
93 rm -f $@.new
94 echo "#define PKGLIBDIR \"${pkglibdir}\"" > $@.new
95 echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new
96 echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new
97 echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new
98 echo "#define SBINDIR \"${sbindir}/\"" >> $@.new
99 echo "#define BINDIR \"${bindir}/\"" >> $@.new
100 echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new
101 echo "#define DOCDIR \"${docdir}/\"" >> $@.new
102 @if cmp $@.new $@; then \
103 echo rm -f $@.new; rm -f $@.new; else \
104 echo mv $@.new $@; mv $@.new $@; fi
105defs.o: definitions.h version.h
106defs.lo: definitions.h version.h
107
108test_SOURCES=test.c memgc.c
109test_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC)
110test_DEPENDENCIES=libdisorder.a
111
112check: test #test.i
113 ./test
114
115check-report: before-check check make-coverage-reports
116before-check:
117 rm -f *.gcda *.gcov
118make-coverage-reports:
119 ${GCOV} *.c | ${PYTHON} ../scripts/format-gcov-report --html . *.c
120
121rebuild-unicode:
122 cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
123
124%.i: %.c
125 $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $< > $@.new
126 mv $@.new $@
127
128CLEANFILES=definitions.h definitions.h.new