| 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 | noinst_PROGRAMS=test |
| 24 | |
| 25 | if SERVER |
| 26 | TRACKDB=trackdb.c |
| 27 | else |
| 28 | TRACKDB=trackdb-stub.c |
| 29 | endif |
| 30 | |
| 31 | libdisorder_a_SOURCES=charset.c charset.h \ |
| 32 | addr.c addr.h \ |
| 33 | alsabg.c alsabg.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 | client.c client.h \ |
| 40 | client-common.c client-common.h \ |
| 41 | configuration.c configuration.h \ |
| 42 | cookies.c cookies.h \ |
| 43 | defs.c defs.h \ |
| 44 | eclient.c eclient.h \ |
| 45 | event.c event.h \ |
| 46 | eventlog.c eventlog.h \ |
| 47 | filepart.c filepart.h \ |
| 48 | hash.c hash.h \ |
| 49 | heap.h \ |
| 50 | hex.c hex.h \ |
| 51 | hostname.c hostname.h \ |
| 52 | ifreq.c ifreq.h \ |
| 53 | inputline.c inputline.h \ |
| 54 | kvp.c kvp.h \ |
| 55 | log.c log.h log-impl.h \ |
| 56 | logfd.c logfd.h \ |
| 57 | mem.c mem.h mem-impl.h \ |
| 58 | mime.h mime.c \ |
| 59 | mixer.c mixer.h mixer-oss.c mixer-alsa.c \ |
| 60 | plugin.c plugin.h \ |
| 61 | printf.c printf.h \ |
| 62 | asprintf.c fprintf.c snprintf.c \ |
| 63 | queue.c queue.h \ |
| 64 | regsub.c regsub.h \ |
| 65 | rights.c queue-rights.c rights.h \ |
| 66 | rtp.h \ |
| 67 | selection.c selection.h \ |
| 68 | sendmail.c sendmail.h \ |
| 69 | signame.c signame.h \ |
| 70 | sink.c sink.h \ |
| 71 | speaker-protocol.c speaker-protocol.h \ |
| 72 | split.c split.h \ |
| 73 | syscalls.c syscalls.h \ |
| 74 | types.h \ |
| 75 | table.c table.h \ |
| 76 | timeval.h \ |
| 77 | $(TRACKDB) trackdb.h trackdb-int.h \ |
| 78 | trackname.c trackname.h \ |
| 79 | url.h url.c \ |
| 80 | user.h user.c \ |
| 81 | unicode.h unicode.c \ |
| 82 | unidata.h unidata.c \ |
| 83 | vacopy.h \ |
| 84 | vector.c vector.h \ |
| 85 | version.c version.h \ |
| 86 | wav.h wav.c \ |
| 87 | wstat.c wstat.h \ |
| 88 | disorder.h |
| 89 | |
| 90 | version-string: ../config.status ${top_srcdir}/scripts/make-version-string |
| 91 | CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new |
| 92 | @if cmp $@.new $@; then \ |
| 93 | echo rm -f $@.new; rm -f $@.new; else \ |
| 94 | echo mv $@.new $@; mv $@.new $@; fi |
| 95 | |
| 96 | versionstring.h: version-string ${top_srcdir}/scripts/text2c |
| 97 | ${top_srcdir}/scripts/text2c -extern disorder_version_string \ |
| 98 | version-string > $@.new |
| 99 | @if cmp $@.new $@; then \ |
| 100 | echo rm -f $@.new; rm -f $@.new; else \ |
| 101 | echo mv $@.new $@; mv $@.new $@; fi |
| 102 | |
| 103 | definitions.h: Makefile |
| 104 | rm -f $@.new |
| 105 | echo "#define PKGLIBDIR \"${pkglibdir}\"" > $@.new |
| 106 | echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new |
| 107 | echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new |
| 108 | echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new |
| 109 | echo "#define SBINDIR \"${sbindir}/\"" >> $@.new |
| 110 | echo "#define BINDIR \"${bindir}/\"" >> $@.new |
| 111 | echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new |
| 112 | @if cmp $@.new $@; then \ |
| 113 | echo rm -f $@.new; rm -f $@.new; else \ |
| 114 | echo mv $@.new $@; mv $@.new $@; fi |
| 115 | defs.o: definitions.h versionstring.h |
| 116 | defs.lo: definitions.h versionstring.h |
| 117 | |
| 118 | test_SOURCES=test.c memgc.c test.h t-addr.c t-basen.c t-cache.c \ |
| 119 | t-casefold.c t-cookies.c t-filepart.c t-hash.c t-heap.c \ |
| 120 | t-hex.c t-kvp.c t-mime.c t-printf.c t-regsub.c t-selection.c \ |
| 121 | t-signame.c t-sink.c t-split.c t-unicode.c t-url.c t-utf8.c \ |
| 122 | t-words.c t-wstat.c t-bits.c |
| 123 | test_LDADD=libdisorder.a $(LIBPCRE) $(LIBICONV) $(LIBGC) |
| 124 | test_DEPENDENCIES=libdisorder.a |
| 125 | |
| 126 | check: test #test.i |
| 127 | ./test |
| 128 | |
| 129 | check-report: before-check check make-coverage-reports |
| 130 | before-check: |
| 131 | rm -f *.gcda *.gcov |
| 132 | make-coverage-reports: |
| 133 | ${GCOV} *.c | ${PYTHON} ../scripts/format-gcov-report --html . *.c |
| 134 | |
| 135 | rebuild-unicode: |
| 136 | cd ${srcdir} && ${top_srcdir}/scripts/make-unidata |
| 137 | |
| 138 | %.i: %.c |
| 139 | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $< > $@.new |
| 140 | mv $@.new $@ |
| 141 | |
| 142 | CLEANFILES=definitions.h definitions.h.new |
| 143 | |
| 144 | EXTRA_DIST=trackdb.c trackdb-stub.c |