chiark / gitweb /
codec, baseconv: Cleanup of the various binary encoding functions.
[mLib] / struct / Makefile.am
CommitLineData
18c831dc
MW
1### -*-makefile-*-
2###
3### Build script for data structures
4###
5### (c) 2009 Straylight/Edgeware
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of the mLib utilities library.
11###
12### mLib is free software; you can redistribute it and/or modify
13### it under the terms of the GNU Library General Public License as
14### published by the Free Software Foundation; either version 2 of the
15### License, or (at your option) any later version.
16###
17### mLib is distributed in the hope that it will be useful,
18### but WITHOUT ANY WARRANTY; without even the implied warranty of
19### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20### GNU Library General Public License for more details.
21###
22### You should have received a copy of the GNU Library General Public
23### License along with mLib; if not, write to the Free
24### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25### MA 02111-1307, USA.
26
27include $(top_srcdir)/vars.am
28
29noinst_LTLIBRARIES = libstruct.la
30libstruct_la_SOURCES =
31
32###--------------------------------------------------------------------------
33### Component files.
34
35## Dynamic strings.
36pkginclude_HEADERS += dstr.h dspool.h
37libstruct_la_SOURCES += dstr.c dstr-putf.c dspool.c
38LIBMANS += dstr.3 dspool.3
39
40## Buffers.
41pkginclude_HEADERS += buf.h
42libstruct_la_SOURCES += buf.c buf-dstr.c
43LIBMANS += buf.3
44
45## Dynamic arrays.
46pkginclude_HEADERS += darray.h
47libstruct_la_SOURCES += darray.c
48LIBMANS += darray.3
49
50CLEANFILES += da.out
51tests:: darray.t da.in da.ref
52 ./darray.t <da.in >da.out
53 cmp da.out da.ref
54 @echo "darray OK"
55
56check_PROGRAMS += darray.t
57darray_t_SOURCES = da-test.c
58darray_t_CPPFLAGS = $(TEST_CPPFLAGS)
59darray_t_LDFLAGS = -static
60
61EXTRA_DIST += da-gtest
62CLEANFILES += da.in
63da.in: da-gtest
64 perl $(srcdir)/da-gtest 10000 >$@.new && mv $@.new $@
65
66EXTRA_DIST += da-ref
67CLEANFILES += da.ref
68da.ref: da-ref da.in
69 perl $(srcdir)/da-ref <da.in >$@.new && mv $@.new $@
70
71## Hash tables.
72pkginclude_HEADERS += hash.h
73libstruct_la_SOURCES += hash.c
74LIBMANS += hash.3
75
76## Symbol tables.
77pkginclude_HEADERS += sym.h
78libstruct_la_SOURCES += sym.c
79LIBMANS += sym.3
80
81CLEANFILES += sym.out
82tests:: sym.t sym.in sym.ref
83 ./sym.t <sym.in >sym.out
84 cmp sym.out sym.ref
85 @echo "sym OK"
86
87check_PROGRAMS += sym.t
88sym_t_SOURCES = sym-test.c
89sym_t_CPPFLAGS = $(TEST_CPPFLAGS)
90sym_t_LDFLAGS = -static
91
92EXTRA_DIST += sym-gtest
93CLEANFILES += sym.in
94sym.in: sym-gtest
95 perl $(srcdir)/sym-gtest 10000 >$@.new && mv $@.new $@
96
97EXTRA_DIST += sym-ref
98CLEANFILES += sym.ref
99sym.ref: sym-ref sym.in
100 perl $(srcdir)/sym-ref <sym.in >$@.new && mv $@.new $@
101
102## Atoms.
103pkginclude_HEADERS += atom.h
104libstruct_la_SOURCES += atom.c
105LIBMANS += atom.3
106
107## Association tables.
108pkginclude_HEADERS += assoc.h
109libstruct_la_SOURCES += assoc.c
110LIBMANS += assoc.3
111
112CLEANFILES += assoc.out
113tests:: assoc.t sym.in sym.ref
114 ./assoc.t <sym.in >assoc.out
115 cmp assoc.out sym.ref
116 @echo "sym OK"
117
118check_PROGRAMS += assoc.t
119assoc_t_SOURCES = assoc-test.c
120assoc_t_CPPFLAGS = $(TEST_CPPFLAGS)
121assoc_t_LDFLAGS = -static
122
123###----- That's all, folks --------------------------------------------------