2 # This file is part of DisOrder.
3 # Copyright (C) 2004-2010 Richard Kettlewell
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.
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.
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/>.
19 noinst_LIBRARIES=libdisorder.a
20 include_HEADERS=disorder.h
23 TRACKDB=trackdb.c trackdb-playlists.c
25 TRACKDB=trackdb-stub.c
28 libdisorder_a_SOURCES=charset.c charsetf.c charset.h \
31 authhash.c authhash.h \
38 client.c client.h client-stubs.h \
39 client-common.c client-common.h \
40 configuration.c configuration.h \
42 coreaudio.c coreaudio.h \
43 dateparse.c dateparse.h xgetdate.c \
47 eventdist.c eventdist.h \
49 eventlog.c eventlog.h \
50 filepart.c filepart.h \
54 hostname.c hostname.h \
57 inputline.c inputline.h \
61 macros.c macros-builtin.c macros.h \
65 asprintf.c fprintf.c snprintf.c \
69 resample.c resample.h \
70 rights.c queue-rights.c rights.h \
72 selection.c selection.h \
73 sendmail.c sendmail.h \
76 speaker-protocol.c speaker-protocol.h \
78 strptime.c strptime.h \
79 syscalls.c syscalls.h \
83 $(TRACKDB) trackdb.h trackdb-int.h \
84 trackname.c trackorder.c trackname.h \
86 uaudio.c uaudio-thread.c uaudio.h uaudio-apis.c \
87 uaudio-oss.c uaudio-alsa.c \
89 uaudio-rtp.c uaudio-command.c uaudio-schedule.c \
95 validity.c validity.h \
102 version-string: ../config.status ${top_srcdir}/scripts/make-version-string
103 CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new
104 @if cmp $@.new $@; then \
105 echo rm -f $@.new; rm -f $@.new; else \
106 echo mv $@.new $@; mv $@.new $@; fi
108 versionstring.h: version-string ${top_srcdir}/scripts/text2c
109 ${top_srcdir}/scripts/text2c -extern disorder_version_string \
110 version-string > $@.new
111 @if cmp $@.new $@; then \
112 echo rm -f $@.new; rm -f $@.new; else \
113 echo mv $@.new $@; mv $@.new $@; fi
115 definitions.h: Makefile
117 echo "/** @file lib/definitions.h" >> $@.new
118 echo " * @brief Definitions exported from makefile" >> $@.new
120 echo " * DO NOT EDIT." >> $@.new
122 echo "#define PKGLIBDIR \"${pkglibdir}\"" >> $@.new
123 echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new
124 echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new
125 echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new
126 echo "#define DOCHTMLDIR \"${dochtmldir}\"" >> $@.new
127 echo "#define SBINDIR \"${sbindir}/\"" >> $@.new
128 echo "#define BINDIR \"${bindir}/\"" >> $@.new
129 echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new
130 echo "#define SENDMAIL \"${SENDMAIL}\"" >> $@.new
131 @if cmp $@.new $@; then \
132 echo rm -f $@.new; rm -f $@.new; else \
133 echo mv $@.new $@; mv $@.new $@; fi
134 defs.o: definitions.h versionstring.h
135 defs.lo: definitions.h versionstring.h
137 client.o: client-stubs.c
140 cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
142 CLEANFILES=definitions.h definitions.h.new version-string versionstring.h \
143 *.gcda *.gcov *.gcno *.c.html index.html
145 EXTRA_DIST=trackdb.c trackdb-stub.c client-stubs.c