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