chiark / gitweb /
Move track sorting to its own function. Only choose_populate() uses
[disorder] / lib / Makefile.am
1 #
2 # This file is part of DisOrder.
3 # Copyright (C) 2004-2008 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
24 if SERVER
25 TRACKDB=trackdb.c
26 else
27 TRACKDB=trackdb-stub.c
28 endif
29
30 libdisorder_a_SOURCES=charset.c charset.h               \
31         addr.c addr.h                                   \
32         alsabg.c alsabg.h                               \
33         arcfour.c arcfour.h                             \
34         authhash.c authhash.h                           \
35         basen.c basen.h                                 \
36         base64.c base64.h                               \
37         bits.c bits.h                                   \
38         cache.c cache.h                                 \
39         cgi.c cgi.h                                     \
40         client.c client.h                               \
41         client-common.c client-common.h                 \
42         configuration.c configuration.h                 \
43         cookies.c cookies.h                             \
44         dateparse.c dateparse.h xgetdate.c              \
45         defs.c defs.h                                   \
46         eclient.c eclient.h                             \
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         ifreq.c ifreq.h                                 \
56         inputline.c inputline.h                         \
57         kvp.c kvp.h                                     \
58         log.c log.h log-impl.h                          \
59         logfd.c logfd.h                                 \
60         macros.c macros-builtin.c macros.h              \
61         mem.c mem.h mem-impl.h                          \
62         mime.h mime.c                                   \
63         mixer.c mixer.h mixer-oss.c mixer-alsa.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         rights.c queue-rights.c rights.h                \
70         rtp.h                                           \
71         selection.c selection.h                         \
72         sendmail.c sendmail.h                           \
73         signame.c signame.h                             \
74         sink.c sink.h                                   \
75         speaker-protocol.c speaker-protocol.h           \
76         split.c split.h                                 \
77         syscalls.c syscalls.h                           \
78         common.h                                        \
79         table.c table.h                                 \
80         timeval.h                                       \
81         $(TRACKDB) trackdb.h trackdb-int.h              \
82         trackname.c trackorder.c trackname.h            \
83         tracksort.c                                     \
84         url.h url.c                                     \
85         user.h user.c                                   \
86         unicode.h unicode.c                             \
87         unidata.h unidata.c                             \
88         vacopy.h                                        \
89         vector.c vector.h                               \
90         version.c version.h                             \
91         wav.h wav.c                                     \
92         wstat.c wstat.h                                 \
93         disorder.h
94
95 version-string: ../config.status ${top_srcdir}/scripts/make-version-string
96         CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new
97         @if cmp $@.new $@; then \
98                 echo rm -f $@.new; rm -f $@.new; else \
99                 echo mv $@.new $@; mv $@.new $@; fi
100
101 versionstring.h: version-string ${top_srcdir}/scripts/text2c
102         ${top_srcdir}/scripts/text2c -extern disorder_version_string \
103                 version-string > $@.new
104         @if cmp $@.new $@; then \
105                 echo rm -f $@.new; rm -f $@.new; else \
106                 echo mv $@.new $@; mv $@.new $@; fi
107
108 definitions.h: Makefile
109         rm -f $@.new
110         echo "#define PKGLIBDIR \"${pkglibdir}\"" > $@.new
111         echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new
112         echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new
113         echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new
114         echo "#define SBINDIR \"${sbindir}/\"" >> $@.new
115         echo "#define BINDIR \"${bindir}/\"" >> $@.new
116         echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new
117         echo "#define SENDMAIL \"${SENDMAIL}\"" >> $@.new
118         @if cmp $@.new $@; then \
119                 echo rm -f $@.new; rm -f $@.new; else \
120                 echo mv $@.new $@; mv $@.new $@; fi
121 defs.o: definitions.h versionstring.h
122 defs.lo: definitions.h versionstring.h
123
124 rebuild-unicode:
125         cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
126
127 %.i: %.c
128         $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $< > $@.new
129         mv $@.new $@
130
131 CLEANFILES=definitions.h definitions.h.new version-string versionstring.h \
132            *.gcda *.gcov *.gcno
133
134 EXTRA_DIST=trackdb.c trackdb-stub.c