Commit | Line | Data |
---|---|---|
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. | |
31 | e = $(EXEEXT) | |
32 | o = $(OBJEXT) | |
33 | t = t$e | |
18c831dc | 34 | |
118a549c | 35 | ## Installation directories. |
18c831dc MW |
36 | pkglibexecdir = $(libexecdir)/$(PACKAGE) |
37 | ||
38 | ###-------------------------------------------------------------------------- | |
39 | ### Initial values for common variables. | |
40 | ||
118a549c MW |
41 | EXTRA_DIST = |
42 | CLEANFILES = | |
43 | DISTCLEANFILES = | |
44 | MAINTAINERCLEANFILES = | |
45 | BUILT_SOURCES = | |
46 | ||
18c831dc MW |
47 | bin_PROGRAMS = |
48 | check_PROGRAMS = | |
49 | pkginclude_HEADERS = | |
118a549c | 50 | |
18c831dc MW |
51 | PROGMANS = |
52 | LIBMANS = | |
118a549c MW |
53 | EXTRA_DIST += $(PROGMANS) $(LIBMANS) |
54 | ||
55 | ###-------------------------------------------------------------------------- | |
56 | ### Machinery for precomputations. | |
57 | ||
58 | ## Location of precomputed tables. | |
59 | precomp = $(top_srcdir)/precomp | |
60 | ||
61 | ## Precomputed source code files. | |
62 | PRECOMPS = | |
63 | EXTRA_DIST += $(PRECOMPS) | |
64 | BUILT_SOURCES += $(PRECOMPS) | |
65 | MAINTAINERCLEANFILES += $(PRECOMPS) | |
18c831dc MW |
66 | |
67 | ###-------------------------------------------------------------------------- | |
68 | ### Include path. | |
69 | ||
4af1c336 | 70 | MLIB_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 | 83 | AM_CPPFLAGS = $(MLIB_INCLUDES) |
18c831dc MW |
84 | |
85 | ###-------------------------------------------------------------------------- | |
118a549c | 86 | ### Standard configuration substitutions. |
18c831dc MW |
87 | |
88 | ## Substitute tags in files. | |
89 | confsubst = $(top_srcdir)/config/confsubst | |
90 | ||
91 | SUBSTITUTIONS = \ | |
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 |
97 | V_SUBST = $(V_SUBST_$(V)) |
98 | V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY)) | |
99 | V_SUBST_0 = @echo " SUBST $@"; | |
100 | SUBST = $(V_SUBST)$(confsubst) | |
173ff44a | 101 | |
18c831dc MW |
102 | ###-------------------------------------------------------------------------- |
103 | ### Building utilities. | |
104 | ||
105 | ## Which libraries we need. | |
106 | UTIL_LIBS = \ | |
107 | $(top_builddir)/ui/libui.la \ | |
108 | $(top_builddir)/utils/libutils.la | |
109 | ||
18c831dc MW |
110 | ###-------------------------------------------------------------------------- |
111 | ### Testing. | |
112 | ||
113 | TEST_CPPFLAGS = -DTEST_RIG -DSRCDIR="\"$(srcdir)\"" $(AM_CPPFLAGS) | |
114 | LDADD = $(top_builddir)/libmLib.la | |
115 | ||
116 | check: tests | |
117 | .PHONY: check tests | |
118 | ||
7cf5c72a MW |
119 | tests::; |
120 | .PHONY: tests | |
121 | ||
18c831dc MW |
122 | ###-------------------------------------------------------------------------- |
123 | ### Manual. | |
124 | ||
125 | EXTRA_DIST += $(LIBMANS) $(PROGMANS) | |
126 | ||
127 | install-data-local: install-man | |
128 | install-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 | ||
141 | uninstall-local: uninstall-man | |
142 | uninstall-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 -------------------------------------------------- |