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