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