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