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