chiark / gitweb /
Missing argument in sel_addtimer docs.
[mLib] / Makefile.am
CommitLineData
0875b58f 1## -*-Makefile-*-
2##
1c4fa429 3## $Id$
0875b58f 4##
5## Building the distribution
6##
7## (c) 1998 Straylight/Edgeware
8##
9
10##----- Licensing notice ----------------------------------------------------
11##
12## This file is part of the mLib utilities library.
c846879c 13##
0875b58f 14## mLib is free software; you can redistribute it and/or modify
c846879c 15## it under the terms of the GNU Library General Public License as
16## published by the Free Software Foundation; either version 2 of the
17## License, or (at your option) any later version.
0875b58f 18##
19## mLib is distributed in the hope that it will be useful,
20## but WITHOUT ANY WARRANTY; without even the implied warranty of
21## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c846879c 22## GNU Library General Public License for more details.
0875b58f 23##
c846879c 24## You should have received a copy of the GNU Library General Public
0bd98442 25## License along with mLib; if not, write to the Free
26## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
27## MA 02111-1307, USA.
0875b58f 28
0875b58f 29## --- Options ---
30
31AUTOMAKE_OPTIONS = foreign
32
33## --- What to build ---
34
8f207948 35SUBDIRS = man
36
ae24fcf7 37bin_SCRIPTS = mLib-config
18756bee 38bin_PROGRAMS = crc-mktab unihash-mkstatic
ae24fcf7 39
c7f30b36 40lib_LTLIBRARIES = libmLib.la
90a332ae 41pkglibexecdir = $(libexecdir)/$(PACKAGE)
14d7100d 42pkglibexec_PROGRAMS = @BRES_LIBEXEC@
43EXTRA_PROGRAMS = bres
0875b58f 44
64b4afc3 45pkginclude_HEADERS = \
14d7100d 46 align.h alloc.h arena.h bits.h exc.h macros.h quis.h report.h sub.h \
c5775f49 47 trace.h track.h unihash.h \
e9184b1e 48 pool.h \
8c685f42 49 atom.h assoc.h darray.h dstr.h dspool.h hash.h sym.h crc32.h \
ad61a8f8 50 env.h fdflags.h fdpass.h fwatch.h lock.h \
7b979907 51 bres.h conn.h lbuf.h ident.h pkbuf.h sel.h selbuf.h selpk.h sig.h \
52 tv.h \
1c4fa429 53 base64.h base32.h hex.h mdwopt.h str.h testrig.h url.h
0875b58f 54
55## --- Things to put in the library ---
56
14d7100d 57libmLib_la_LDFLAGS = -version-info 2:3:0
c7f30b36 58## Middle number is the patchlevel. Final number is the minor version. The
59## difference between the first and last numbers is major version.
0875b58f 60
c7f30b36 61libmLib_la_SOURCES = \
7b979907 62 alloc.c arena.c exc.c quis.c pquis.c report.c sub.c trace.c \
18756bee 63 traceopt.c track.c \
e9184b1e 64 pool.c pool-file.c pool-sub.c \
8c685f42 65 atom.c assoc.c darray.c dstr.c dputf.c dspool.c hash.c sym.c \
66 crc32.c crc32-tab.c \
18756bee 67 unihash.c unihash-global.c \
ad61a8f8 68 env.c fdflags.c fdpass.c fwatch.c lock.c \
14d7100d 69 @BRES_SOURCE@.c \
70 conn.c lbuf.c ident.c pkbuf.c sel.c selbuf.c selpk.c sig.c \
7b979907 71 tv.c \
1c4fa429 72 base64.c base32.c hex.c mdwopt.c str.c testrig.c url.c
14d7100d 73EXTRA_libmLib_la_SOURCES = bres.c bres-adns.c
74libmLib_la_LIBADD = @DEPLIBS@
8f207948 75
18756bee 76BUILT_SOURCES = crc32-tab.c unihash-global.c
b7580524 77
1a6043f9 78crc32-tab.c: crc-mktab$(EXEEXT)
b7580524 79 ./crc-mktab \
80 -p0x04c11db7 -b32 -B8 -r \
75721625 81 -c -scrc32_table -icrc32.h -tuint32 -ocrc32-tab.c.new
82 mv crc32-tab.c.new crc32-tab.c
b7580524 83
1a6043f9 84unihash-global.c: unihash-mkstatic$(EXEEXT)
18756bee 85 ./unihash-mkstatic \
86 -c -sunihash_global -iunihash.h -ounihash-global.c.new
87 mv unihash-global.c.new unihash-global.c
88
89crc_mktab_SOURCES = \
90 crc-mktab.c \
91 mdwopt.c quis.c pquis.c report.c str.c
d6cf7c44 92crc_mktab_CFLAGS = $(AM_CFLAGS)
18756bee 93unihash_mkstatic_SOURCES = \
94 unihash-mkstatic.c \
95 mdwopt.c quis.c pquis.c report.c str.c unihash.c
d6cf7c44 96unihash_mkstatic_CFLAGS = $(AM_CFLAGS)
b7580524 97
21c22b5c 98## --- Test code ---
99
3980d2f1 100noinst_PROGRAMS = da.t sym.t assoc.t bits.t
d04f4733 101
102check: \
573eadb5 103 da.test sym.test assoc.test bits.test base64.test hex.test \
1c4fa429 104 base32.test \
573eadb5 105 unihash.test
d04f4733 106
107da_t_SOURCES = da-test.c
108da_t_LDADD = libmLib.la
109da_t_LDFLAGS = -static
110da.in: $(srcdir)/da-gtest
c5775f49 111 perl $(srcdir)/da-gtest 10000 >da.in.new
112 mv da.in.new da.in
d04f4733 113da.ref: da.in $(srcdir)/da-ref
c5775f49 114 perl $(srcdir)/da-ref <da.in >da.ref.new
115 mv da.ref.new da.ref
d04f4733 116da.test: da.t da.in da.ref
d5679ed0 117 ./da.t <da.in >da.out
118 cmp da.out da.ref
21c22b5c 119 @echo "darray tested OK."
120
d04f4733 121sym_t_SOURCES = sym-test.c
122sym_t_LDADD = libmLib.la
123sym_t_LDFLAGS = -static
124sym.in: $(srcdir)/sym-gtest
c5775f49 125 perl $(srcdir)/sym-gtest 10000 >sym.in.new
126 mv sym.in.new sym.in
d04f4733 127sym.ref: sym.in $(srcdir)/sym-ref
c5775f49 128 perl $(srcdir)/sym-ref <sym.in >sym.ref.new
129 mv sym.ref.new sym.ref
d04f4733 130sym.test: sym.t sym.in sym.ref
d5679ed0 131 ./sym.t <sym.in >sym.out
132 cmp sym.out sym.ref
21c22b5c 133 @echo "sym tested OK."
134
d04f4733 135assoc_t_SOURCES = assoc-test.c
136assoc_t_LDADD = libmLib.la
137assoc_t_LDFLAGS = -static
138assoc.test: assoc.t sym.in sym.ref
d5679ed0 139 ./assoc.t <sym.in >assoc.out
140 cmp assoc.out sym.ref
5c5bbeb9 141 @echo "assoc tested OK."
142
e9184b1e 143bits_t_SOURCES = bits.c
c8e26384 144bits_t_LDADD = libmLib.la
145bits_t_LDFLAGS = -static
cb114820 146bits.o: bits.c
90a332ae 147 $(COMPILE) -c -DSRCDIR="\"$(srcdir)\"" $(srcdir)/bits.c -o bits.o
d5679ed0 148bits.test: bits.t
149 ./bits.t -f $(srcdir)/bits.in
150
151base64.to: base64.c
573eadb5 152 $(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" \
153 $(srcdir)/base64.c -o base64.to
d5679ed0 154base64.t: base64.to base64.o libmLib.la
573eadb5 155 $(CC) $(CFLAGS) $(LDFLAGS) \
156 base64.to .libs/libmLib.a $(LIBS) -o base64.t
d5679ed0 157base64.test: base64.t base64.in base64.ref
158 ./base64.t <$(srcdir)/base64.in >base64.out
159 cmp base64.out $(srcdir)/base64.ref
160 ./base64.t -d <$(srcdir)/base64.ref >base64.out
161 cmp base64.out $(srcdir)/base64.in
162 @echo "base64 tested OK."
163
1c4fa429 164base32.to: base32.c
165 $(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" \
166 $(srcdir)/base32.c -o base32.to
167base32.t: base32.to base32.o libmLib.la
168 $(CC) $(CFLAGS) $(LDFLAGS) \
169 base32.to .libs/libmLib.a $(LIBS) -o base32.t
170base32.test: base32.t base32.in base32.ref
171 ./base32.t <$(srcdir)/base32.in >base32.out
172 cmp base32.out $(srcdir)/base32.ref
173 ./base32.t -d <$(srcdir)/base32.ref >base32.out
174 cmp base32.out $(srcdir)/base32.in
175 @echo "base32 tested OK."
176
d5679ed0 177hex.to: hex.c
573eadb5 178 $(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" \
179 $(srcdir)/hex.c -o hex.to
d5679ed0 180hex.t: hex.to hex.o libmLib.la
573eadb5 181 $(CC) $(CFLAGS) $(LDFLAGS) \
182 hex.to .libs/libmLib.a $(LIBS) -o hex.t
d5679ed0 183hex.test: hex.t hex.in hex.ref
184 ./hex.t <$(srcdir)/hex.in >hex.out
185 cmp hex.out $(srcdir)/hex.ref
186 ./hex.t -d <$(srcdir)/hex.ref >hex.out
187 cmp hex.out $(srcdir)/hex.in
188 @echo "hex tested OK."
e9184b1e 189
573eadb5 190unihash.to: unihash.c
191 $(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" \
192 $(srcdir)/unihash.c -o unihash.to
193unihash.t: unihash.to libmLib.la
194 $(CC) $(CFLAGS) $(LDFLAGS) \
195 unihash.to .libs/libmLib.a $(LIBS) -o unihash.t
196unihash.in: unihash-check.pl
197 perl $(srcdir)/unihash-check.pl >unihash.in.new
3cbb08ea 198 mv unihash.in.new $(srcdir)/unihash.in
573eadb5 199unihash.test: unihash.t unihash.in
3cbb08ea 200 ./unihash.t -f $(srcdir)/unihash.in
573eadb5 201
21c22b5c 202TEST_CLEAN = \
573eadb5 203 *.t *.to \
d5679ed0 204 da.in da.ref da.out \
205 sym.in sym.ref sym.out \
1c4fa429 206 base64.out base32.out hex.out unihash.in
21c22b5c 207
208TEST_DIST = \
209 da-gtest da-ref \
e9184b1e 210 sym-gtest sym-ref \
d5679ed0 211 bits.in bits-testgen.c \
3cbb08ea 212 unihash-check.pl unihash.in \
1c4fa429 213 base64.in base64.ref base32.in base32.ref hex.in hex.ref
21c22b5c 214
891a96e4 215## --- Background resolver ---
216##
217## I must (a) build the standalone version, and (b) inform the client library
218## where the standalone version is.
219
d6cf7c44 220bres_SOURCES = bres.c
221bres_CFLAGS = -DBRES_STANDALONE
891a96e4 222
c7f30b36 223bres.lo: $(srcdir)/bres.c
90a332ae 224 $(LTCOMPILE) -c -DBRES_SERVER="\"$(libexecdir)/$(PACKAGE)/`echo bres|sed '$(transform)'`\"" $(srcdir)/bres.c
891a96e4 225
226## --- Other useful rules ---
c255a2ee 227
228install-man:
a9f61b5f 229 (cd man && $(MAKE) install-man)
c3b137c8 230uninstall-man:
231 (cd man && $(MAKE) uninstall-man)
c255a2ee 232
58084d9f 233CLEANFILES = $(TEST_CLEAN) crc32-tab.c
234DISTCLEANFILES = libtool
471f9daa 235EXTRA_DIST = \
236 $(TEST_DIST) maninst \
75721625 237 debian/rules debian/copyright debian/control debian/changelog
21c22b5c 238
8f207948 239##----- That's all, folks ---------------------------------------------------