chiark / gitweb /
280e52d171c38c1a6a1f71221dab251edb0ae0f3
[mLib] / struct / Makefile.am
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
27 include $(top_srcdir)/vars.am
28
29 noinst_LTLIBRARIES       = libstruct.la
30 libstruct_la_SOURCES     =
31
32 ###--------------------------------------------------------------------------
33 ### Component files.
34
35 ## Dynamic strings.
36 pkginclude_HEADERS      += dstr.h dspool.h
37 libstruct_la_SOURCES    += dstr.c dstr-putf.c dspool.c
38 LIBMANS                 += dstr.3 dspool.3
39
40 ## Buffers.
41 pkginclude_HEADERS      += buf.h
42 libstruct_la_SOURCES    += buf.c buf-dstr.c
43 LIBMANS                 += buf.3
44
45 ## Dynamic arrays.
46 pkginclude_HEADERS      += darray.h
47 libstruct_la_SOURCES    += darray.c
48 LIBMANS                 += darray.3
49
50 CLEANFILES              += da.out
51 tests:: darray.t da.in da.ref
52         ./darray.t <da.in >da.out
53         cmp da.out da.ref
54         @echo "darray OK"
55
56 check_PROGRAMS          += darray.t
57 darray_t_SOURCES         = da-test.c
58 darray_t_CPPFLAGS        = $(TEST_CPPFLAGS)
59 darray_t_LDFLAGS         = -static
60
61 EXTRA_DIST              += da-gtest
62 CLEANFILES              += da.in
63 da.in: da-gtest
64         perl $(srcdir)/da-gtest 10000 >$@.new && mv $@.new $@
65
66 EXTRA_DIST              += da-ref
67 CLEANFILES              += da.ref
68 da.ref: da-ref da.in
69         perl $(srcdir)/da-ref <da.in >$@.new && mv $@.new $@
70
71 ## Hash tables.
72 pkginclude_HEADERS      += hash.h
73 libstruct_la_SOURCES    += hash.c
74 LIBMANS                 += hash.3
75
76 ## Symbol tables.
77 pkginclude_HEADERS      += sym.h
78 libstruct_la_SOURCES    += sym.c
79 LIBMANS                 += sym.3
80
81 CLEANFILES              += sym.out
82 tests:: sym.t sym.in sym.ref
83         ./sym.t <sym.in >sym.out
84         cmp sym.out sym.ref
85         @echo "sym OK"
86
87 check_PROGRAMS          += sym.t
88 sym_t_SOURCES            = sym-test.c
89 sym_t_CPPFLAGS           = $(TEST_CPPFLAGS)
90 sym_t_LDFLAGS            = -static
91
92 EXTRA_DIST              += sym-gtest
93 CLEANFILES              += sym.in
94 sym.in: sym-gtest
95         perl $(srcdir)/sym-gtest 10000 >$@.new && mv $@.new $@
96
97 EXTRA_DIST              += sym-ref
98 CLEANFILES              += sym.ref
99 sym.ref: sym-ref sym.in
100         perl $(srcdir)/sym-ref <sym.in >$@.new && mv $@.new $@
101
102 ## Atoms.
103 pkginclude_HEADERS      += atom.h
104 libstruct_la_SOURCES    += atom.c
105 LIBMANS                 += atom.3
106
107 ## Association tables.
108 pkginclude_HEADERS      += assoc.h
109 libstruct_la_SOURCES    += assoc.c
110 LIBMANS                 += assoc.3
111
112 CLEANFILES              += assoc.out
113 tests:: assoc.t sym.in sym.ref
114         ./assoc.t <sym.in >assoc.out
115         cmp assoc.out sym.ref
116         @echo "sym OK"
117
118 check_PROGRAMS          += assoc.t
119 assoc_t_SOURCES          = assoc-test.c
120 assoc_t_CPPFLAGS         = $(TEST_CPPFLAGS)
121 assoc_t_LDFLAGS          = -static
122
123 ###----- That's all, folks --------------------------------------------------