@@@ fltfmt wip
[mLib] / Makefile.am
1 ### -*-makefile-*-
2 ###
3 ### Top-level build for mLib
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 ACLOCAL_AMFLAGS = -Im4
29
30 SUBDIRS =
31
32 ###--------------------------------------------------------------------------
33 ### Top-level library.
34
35 lib_LTLIBRARIES = libmLib.la
36 libmLib_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) \
37 -no-undefined
38 libmLib_la_SOURCES =
39 libmLib_la_LIBADD = $(MLIB_LIBS)
40
41 ###--------------------------------------------------------------------------
42 ### Package-configuration file.
43
44 pkgconfigdir = $(libdir)/pkgconfig
45 pkgconfig_DATA = mLib.pc
46 EXTRA_DIST += mLib.pc.in
47 CLEANFILES += mLib.pc
48
49 mLib.pc: mLib.pc.in Makefile
50 $(SUBST) $(srcdir)/mLib.pc.in >$@.new \
51 $(SUBSTITUTIONS) && \
52 mv $@.new $@
53
54 ###--------------------------------------------------------------------------
55 ### Subdirectories.
56 ###
57 ### Note: There are implicit dependencies between the subdirectories. Be
58 ### careful about reordering them.
59
60 ## Utilities.
61 SUBDIRS += utils
62 libmLib_la_LIBADD += utils/libutils.la
63
64 ## Memory allocation.
65 SUBDIRS += mem
66 libmLib_la_LIBADD += mem/libmem.la
67
68 ## User interface.
69 SUBDIRS += ui
70 libmLib_la_LIBADD += ui/libui.la
71
72 ## Hashing.
73 SUBDIRS += hash
74 libmLib_la_LIBADD += hash/libhash.la
75
76 ## Data structures.
77 SUBDIRS += struct
78 libmLib_la_LIBADD += struct/libstruct.la
79
80 ## Encoding and decoding.
81 SUBDIRS += codec
82 libmLib_la_LIBADD += codec/libcodec.la
83
84 ## System utilities.
85 SUBDIRS += sys
86 libmLib_la_LIBADD += sys/libsys.la
87
88 ## Buffering.
89 SUBDIRS += buf
90 libmLib_la_LIBADD += buf/libbuf.la
91
92 ## Event-driven networking.
93 SUBDIRS += sel
94 libmLib_la_LIBADD += sel/libsel.la
95
96 ## Testing.
97 SUBDIRS += test
98 libmLib_la_LIBADD += test/libtest.la
99
100 ## Tracing.
101 SUBDIRS += trace
102 libmLib_la_LIBADD += trace/libtrace.la
103
104 ## At this point we should construct the library.
105 SUBDIRS += .
106
107 ## Examples.
108 SUBDIRS += test/example
109
110 ###--------------------------------------------------------------------------
111 ### Manual.
112
113 EXTRA_DIST += defs.man
114
115 EXTRA_DIST += mLib.3.in
116 LIBMANS += mLib.3
117
118 ###--------------------------------------------------------------------------
119 ### Testing.
120
121 SUBDIRS += t
122
123 ###--------------------------------------------------------------------------
124 ### Distribution.
125
126 ## Make sure the precomputed tables are available. Hang this off of any
127 ## distributed file.
128 mLib.pc.in: ensure-precomp-libs
129 ensure-precomp-libs:
130 for d in ui utils; do (cd $$d && $(MAKE) all) || exit 1; done
131
132 ## Release number.
133 dist-hook::
134 echo $(VERSION) >$(distdir)/RELEASE
135
136 ## Additional build tools.
137 EXTRA_DIST += config/confsubst
138 EXTRA_DIST += config/auto-version
139 EXTRA_DIST += config/maninst
140
141 ###--------------------------------------------------------------------------
142 ### Debian.
143
144 ## General stuff.
145 EXTRA_DIST += debian/rules debian/copyright
146 EXTRA_DIST += debian/control debian/changelog
147 EXTRA_DIST += debian/compat debian/source/format
148 EXTRA_DIST += debian/common.symbols
149
150 ## mlib2
151 EXTRA_DIST += debian/mlib2.install
152 EXTRA_DIST += debian/mlib2.symbols
153
154 ## mlib2-adns
155 EXTRA_DIST += debian/mlib2-adns.install.in
156 EXTRA_DIST += debian/mlib2-adns.symbols
157
158 ## mlib-bin
159 EXTRA_DIST += debian/mlib-bin.install
160
161 ## mlib-dev
162 EXTRA_DIST += debian/mlib-dev.install
163
164 ###----- That's all, folks --------------------------------------------------