chiark / gitweb /
General build system spring-cleaning.
[mLib] / vars.am
CommitLineData
18c831dc
MW
1### -*-Makefile-*-
2###
3### Common build-system definition
4###
5### (c) 1998 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###--------------------------------------------------------------------------
118a549c
MW
28### Miscellaneous useful definitions.
29
30## Some convenient abbreviations for file suffixes.
31e = $(EXEEXT)
32o = $(OBJEXT)
33t = t$e
18c831dc 34
118a549c 35## Installation directories.
18c831dc
MW
36pkglibexecdir = $(libexecdir)/$(PACKAGE)
37
38###--------------------------------------------------------------------------
39### Initial values for common variables.
40
118a549c
MW
41EXTRA_DIST =
42CLEANFILES =
43DISTCLEANFILES =
44MAINTAINERCLEANFILES =
45BUILT_SOURCES =
46
18c831dc
MW
47bin_PROGRAMS =
48check_PROGRAMS =
49pkginclude_HEADERS =
118a549c 50
18c831dc
MW
51PROGMANS =
52LIBMANS =
118a549c
MW
53EXTRA_DIST += $(PROGMANS) $(LIBMANS)
54
55###--------------------------------------------------------------------------
56### Machinery for precomputations.
57
58## Location of precomputed tables.
59precomp = $(top_srcdir)/precomp
60
61## Precomputed source code files.
62PRECOMPS =
63EXTRA_DIST += $(PRECOMPS)
64BUILT_SOURCES += $(PRECOMPS)
65MAINTAINERCLEANFILES += $(PRECOMPS)
18c831dc
MW
66
67###--------------------------------------------------------------------------
68### Include path.
69
4af1c336 70MLIB_INCLUDES = \
18c831dc
MW
71 -I$(top_srcdir)/buf \
72 -I$(top_srcdir)/codec \
73 -I$(top_srcdir)/hash \
74 -I$(top_srcdir)/mem \
75 -I$(top_srcdir)/net \
76 -I$(top_srcdir)/struct \
77 -I$(top_srcdir)/sys \
78 -I$(top_srcdir)/test \
79 -I$(top_srcdir)/trace \
80 -I$(top_srcdir)/ui \
81 -I$(top_srcdir)/utils
82
4af1c336 83AM_CPPFLAGS = $(MLIB_INCLUDES)
18c831dc
MW
84
85###--------------------------------------------------------------------------
118a549c 86### Standard configuration substitutions.
18c831dc
MW
87
88## Substitute tags in files.
89confsubst = $(top_srcdir)/config/confsubst
90
91SUBSTITUTIONS = \
92 prefix=$(prefix) exec_prefix=$(exec_prefix) \
93 libdir=$(libdir) includedir=$(includedir) \
94 bindir=$(bindir) sbindir=$(sbindir) \
95 PACKAGE=$(PACKAGE) VERSION=$(VERSION)
96
118a549c
MW
97V_SUBST = $(V_SUBST_$(V))
98V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
99V_SUBST_0 = @echo " SUBST $@";
100SUBST = $(V_SUBST)$(confsubst)
173ff44a 101
18c831dc
MW
102###--------------------------------------------------------------------------
103### Building utilities.
104
105## Which libraries we need.
106UTIL_LIBS = \
107 $(top_builddir)/ui/libui.la \
108 $(top_builddir)/utils/libutils.la
109
18c831dc
MW
110###--------------------------------------------------------------------------
111### Testing.
112
113TEST_CPPFLAGS = -DTEST_RIG -DSRCDIR="\"$(srcdir)\"" $(AM_CPPFLAGS)
114LDADD = $(top_builddir)/libmLib.la
115
116check: tests
117.PHONY: check tests
118
7cf5c72a
MW
119tests::;
120.PHONY: tests
121
18c831dc
MW
122###--------------------------------------------------------------------------
123### Manual.
124
125EXTRA_DIST += $(LIBMANS) $(PROGMANS)
126
127install-data-local: install-man
128install-man: $(LIBMANS) $(PROGMANS)
129 @$(NORMAL_INSTALL)
130 $(mkdir_p) $(DESTDIR)$(mandir)
131 $(top_srcdir)/config/maninst \
132 -d $(DESTDIR)$(mandir) -s $(srcdir) \
133 -i "$(INSTALL)" \
134 install $(PROGMANS)
135 $(top_srcdir)/config/maninst \
136 -d $(DESTDIR)$(mandir) -s $(srcdir) \
137 -i "$(INSTALL)" -e $(manext) \
138 install $(LIBMANS)
139.PHONY: install-man
140
141uninstall-local: uninstall-man
142uninstall-man:
143 @$(NORMAL_UNINSTALL)
144 $(top_srcdir)/config/maninst \
145 -d $(DESTDIR)$(mandir) -s $(srcdir) \
146 uninstall $(PROGMANS)
147 $(top_srcdir)/config/maninst \
148 -d $(DESTDIR)$(mandir) -s $(srcdir) -e $(manext) \
149 uninstall $(LIBMANS)
150.PHONY: uninstall-man
151
152###----- That's all, folks --------------------------------------------------