chiark / gitweb /
examples/disorder.init.in: Read settings from `/etc/default/disorder'.
[disorder] / lib / Makefile.am
1 #
2 # This file is part of DisOrder.
3 # Copyright (C) 2004-2010, 2012, 2013 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 3 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,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU 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, see <http://www.gnu.org/licenses/>.
17 #
18
19 VPATH+=${top_srcdir}/common
20
21 noinst_LIBRARIES=libdisorder.a
22 include_HEADERS=disorder.h
23
24 if SERVER
25 TRACKDB=trackdb.c trackdb-playlists.c
26 else
27 TRACKDB=trackdb-stub.c
28 endif
29
30 libdisorder_a_SOURCES=charset.c charsetf.c charset.h    \
31         addr.c addr.h                                   \
32         authhash.c authhash.h                           \
33         basen.c basen.h                                 \
34         base64.c base64.h                               \
35         bits.c bits.h                                   \
36         byte-order.h                                    \
37         cache.c cache.h                                 \
38         cgi.c cgi.h                                     \
39         client.c client.h client-stubs.h                \
40         client-common.c client-common.h                 \
41         configuration.c configuration.h                 \
42         cookies.c cookies.h                             \
43         coreaudio.c coreaudio.h                         \
44         dateparse.c dateparse.h xgetdate.c              \
45         defs.c defs.h                                   \
46         eclient.c eclient.h eclient-stubs.h             \
47         email.c                                         \
48         eventdist.c eventdist.h                         \
49         event.c event.h                                 \
50         eventlog.c eventlog.h                           \
51         filepart.c filepart.h                           \
52         hash.c hash.h                                   \
53         heap.h                                          \
54         hex.c hex.h                                     \
55         hostname.c hostname.h                           \
56         hreader.h                                       \
57         ifreq.c ifreq.h                                 \
58         inputline.c inputline.h                         \
59         kvp.c kvp.h                                     \
60         log.c log.h                                     \
61         logfd.c logfd.h                                 \
62         macros.c macros-builtin.c macros.h              \
63         mem.c mem.h                                     \
64         mime.h mime.c                                   \
65         printf.c printf.h                               \
66         asprintf.c fprintf.c snprintf.c                 \
67         queue.c queue.h                                 \
68         random.c random.h                               \
69         regexp.c regexp.h                               \
70         regsub.c regsub.h                               \
71         resample.c resample.h                           \
72         rights.c queue-rights.c rights.h                \
73         rtp.h                                           \
74         salsa208.c salsa208.h                           \
75         selection.c selection.h                         \
76         sendmail.c sendmail.h                           \
77         signame.c signame.h                             \
78         sink.c sink.h                                   \
79         socketio.c socketio.h                           \
80         speaker-protocol.c speaker-protocol.h           \
81         split.c split.h                                 \
82         strptime.c strptime.h                           \
83         syscalls.c syscallsrt.c syscalls.h              \
84         common.h                                        \
85         table.c table.h                                 \
86         timeval.h                                       \
87         $(TRACKDB) trackdb.h trackdb-int.h              \
88         trackname.c trackorder.c trackname.h            \
89         tracksort.c                                     \
90         uaudio.c uaudio-thread.c uaudio.h uaudio-apis.c \
91         uaudio-oss.c uaudio-alsa.c                      \
92         uaudio-pulseaudio.c                             \
93         uaudio-coreaudio.c                              \
94         uaudio-rtp.c uaudio-command.c uaudio-schedule.c \
95         url.h url.c                                     \
96         user.h user.c                                   \
97         unicode.h unicode.c                             \
98         unidata.h unidata.c                             \
99         vacopy.h                                        \
100         validity.c validity.h                           \
101         vector.c vector.h                               \
102         version.c version.h                             \
103         versionstring.c                                 \
104         wav.h                                           \
105         wstat.c wstat.h                                 \
106         disorder.h
107 nodist_libdisorder_a_SOURCES=hreader.c                  \
108         wav.c
109
110 version-string: ../config.status ${top_srcdir}/scripts/make-version-string
111         CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new
112         @if cmp $@.new $@; then \
113                 echo rm -f $@.new; rm -f $@.new; else \
114                 echo mv $@.new $@; mv $@.new $@; fi
115
116 versionstring.c: version-string ${top_srcdir}/scripts/text2c
117         ${top_srcdir}/scripts/text2c -extern disorder_version_string \
118                 version-string > $@.new
119         @if cmp $@.new $@; then \
120                 echo rm -f $@.new; rm -f $@.new; else \
121                 echo mv $@.new $@; mv $@.new $@; fi
122
123 definitions.h: Makefile
124         rm -f $@.new
125         echo "/** @file lib/definitions.h" >> $@.new
126         echo " * @brief Definitions exported from makefile" >> $@.new
127         echo " *" >> $@.new
128         echo " * DO NOT EDIT." >> $@.new
129         echo " */" >> $@.new
130         echo "#define PKGLIBDIR \"${pkglibdir}\"" >> $@.new
131         echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new
132         echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new
133         echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new
134         echo "#define DOCHTMLDIR \"${dochtmldir}\"" >> $@.new
135         echo "#define SBINDIR \"${sbindir}/\"" >> $@.new
136         echo "#define BINDIR \"${bindir}/\"" >> $@.new
137         echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new
138         echo "#define SENDMAIL \"${SENDMAIL}\"" >> $@.new
139         @if cmp $@.new $@; then \
140                 echo rm -f $@.new; rm -f $@.new; else \
141                 echo mv $@.new $@; mv $@.new $@; fi
142 defs.o: definitions.h
143 defs.lo: definitions.h
144
145 client.o: client-stubs.c
146
147 rebuild-unicode:
148         cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
149
150 CLEANFILES=definitions.h definitions.h.new version-string versionstring.[ch] \
151            *.gcda *.gcov *.gcno *.c.html index.html
152
153 EXTRA_DIST=trackdb.c trackdb-stub.c client-stubs.c eclient-stubs.c \
154         getopt.c getopt.h getopt1.c \
155         disorder-win32.c disorder-win32.h \
156         lib.vcxproj lib.vcxproj.filters