| 1 | ### -*-makefile-*- |
| 2 | ### |
| 3 | ### Definitions used throughout the build system |
| 4 | ### |
| 5 | ### (c) 2008 Straylight/Edgeware |
| 6 | ### |
| 7 | |
| 8 | ###----- Licensing notice --------------------------------------------------- |
| 9 | ### |
| 10 | ### This file is part of Trivial IP Encryption (TrIPE). |
| 11 | ### |
| 12 | ### TrIPE is free software; you can redistribute it and/or modify |
| 13 | ### it under the terms of the GNU General Public License as published by |
| 14 | ### the Free Software Foundation; either version 2 of the License, or |
| 15 | ### (at your option) any later version. |
| 16 | ### |
| 17 | ### TrIPE 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 General Public License for more details. |
| 21 | ### |
| 22 | ### You should have received a copy of the GNU General Public License |
| 23 | ### along with TrIPE; if not, write to the Free Software Foundation, |
| 24 | ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | |
| 26 | ###-------------------------------------------------------------------------- |
| 27 | ### Initial values of common variables. |
| 28 | |
| 29 | EXTRA_DIST = |
| 30 | |
| 31 | CLEANFILES = |
| 32 | DISTCLEANFILES = |
| 33 | MAINTAINERCLEANFILES = |
| 34 | |
| 35 | SUFFIXES = |
| 36 | |
| 37 | ###-------------------------------------------------------------------------- |
| 38 | ### Include path. |
| 39 | |
| 40 | TRIPE_INCLUDES = \ |
| 41 | -I$(top_builddir)/config.h \ |
| 42 | -I$(top_srcdir)/common \ |
| 43 | -I$(top_srcdir)/priv |
| 44 | |
| 45 | CPPFLAGS += $(TRIPE_INCLUDES) |
| 46 | |
| 47 | ###-------------------------------------------------------------------------- |
| 48 | ### Miscellanous useful definitions. |
| 49 | |
| 50 | ## Libraries of common code. |
| 51 | libtripe = $(top_builddir)/common/libtripe.a |
| 52 | libpriv = $(top_builddir)/priv/libpriv.a |
| 53 | |
| 54 | ## Create a directory if it doesn't exist. |
| 55 | mkdir_p = $(top_srcdir)/config/install-sh -d |
| 56 | |
| 57 | ## Substitute tags in files. |
| 58 | confsubst = $(top_srcdir)/config/confsubst |
| 59 | |
| 60 | ###-------------------------------------------------------------------------- |
| 61 | ### Standard configuration substitutions. |
| 62 | |
| 63 | SUBSTITUTIONS = \ |
| 64 | prefix=$(prefix) exec_prefix=$(exec_prefix) \ |
| 65 | libdir=$(libdir) includedir=$(includedir) \ |
| 66 | bindir=$(bindir) sbindir=$(sbindir) \ |
| 67 | configdir=$(configdir) socketdir=$(socketdir) \ |
| 68 | initconfig=$(initconfig) \ |
| 69 | pidfile=$(pidfile) logfile=$(logfile) \ |
| 70 | PACKAGE=$(PACKAGE) VERSION=$(VERSION) \ |
| 71 | PYTHON=$(PYTHON) |
| 72 | |
| 73 | ###-------------------------------------------------------------------------- |
| 74 | ### Manpage substitutions. |
| 75 | |
| 76 | SUFFIXES += .1 .1.in |
| 77 | SUFFIXES += .5 .5.in |
| 78 | SUFFIXES += .7 .7.in |
| 79 | SUFFIXES += .8 .8.in |
| 80 | |
| 81 | mandefs = $(top_builddir)/defs.man |
| 82 | |
| 83 | mansubst = sed \ |
| 84 | -e '/@@@PRE@@@/ {' \ |
| 85 | -e 'r$(mandefs)' \ |
| 86 | -e 'd' \ |
| 87 | -e '}' |
| 88 | |
| 89 | .1.in.1 .5.in.5 .7.in.7 .8.in.8: $(mandefs) |
| 90 | $(mansubst) $< >$@.new && mv $@.new $@ |
| 91 | |
| 92 | $(mandefs): $(top_srcdir)/defs.man.in Makefile |
| 93 | $(confsubst) $(top_srcdir)/defs.man.in >$@.new $(SUBSTITUTIONS) |
| 94 | sed '/^\.$$/ d; /^\.\\"/ d' $@.new >$@.new2 |
| 95 | rm -f $@.new |
| 96 | mv $@.new2 $@ |
| 97 | |
| 98 | ###----- That's all, folks -------------------------------------------------- |