Rearrange the file tree.
[u/mdw/catacomb] / vars.am
diff --git a/vars.am b/vars.am
new file mode 100644 (file)
index 0000000..de79545
--- /dev/null
+++ b/vars.am
@@ -0,0 +1,102 @@
+### -*-makefile-*-
+###
+### Common definitions for build scripts
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+###--------------------------------------------------------------------------
+### Miscellaneous useful definitions.
+
+## Some convenient abbreviations for file suffixes.
+e                       = $(EXEEXT)
+o                       = $(OBJEXT)
+t                       = t$e
+
+## Installation directories.
+archincludedir          = $(pkglibdir)/include
+
+###--------------------------------------------------------------------------
+### Initial values of common variables.
+
+EXTRA_DIST              =
+CLEANFILES              =
+DISTCLEANFILES          =
+MAINTAINERCLEANFILES    =
+SUFFIXES                =
+TESTS                   =
+BUILT_SOURCES           =
+
+noinst_PROGRAMS                 =
+pkginclude_HEADERS      =
+nodist_pkginclude_HEADERS =
+archinclude_HEADERS     =
+nodist_archinclude_HEADERS =
+
+###--------------------------------------------------------------------------
+### Standard configuration substitutions.
+
+## Substitute tags in files.
+confsubst = $(top_srcdir)/config/confsubst
+
+SUBSTITUTIONS = \
+               prefix=$(prefix) exec_prefix=$(exec_prefix) \
+               libdir=$(libdir) includedir=$(includedir) \
+               PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
+               CATACOMB_LIBS="$(CATACOMB_LIBS)"
+
+V_SUBST = $(V_SUBST_$(V))
+V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
+V_SUBST_0 = @echo "  SUBST  $@";
+SUBST = $(V_SUBST)$(confsubst)
+
+###--------------------------------------------------------------------------
+### Include path.
+
+CATACOMB_INCLUDES       = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/base \
+       -I$(top_srcdir)/key \
+       -I$(top_srcdir)/math \
+       -I$(top_builddir)/math \
+       -I$(top_srcdir)/misc \
+       -I$(top_srcdir)/pub \
+       -I$(top_srcdir)/rand \
+       -I$(top_srcdir)/symm \
+       -I$(top_srcdir)/symm/modes -I$(top_builddir)/symm/modes
+
+AM_CPPFLAGS             = $(CATACOMB_INCLUDES)
+
+###--------------------------------------------------------------------------
+### Testing.
+
+SUFFIXES               += .c .$t .to
+.c.to:
+       $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@
+.to.$t: libcatacomb.la
+       $(AM_V_CCLD)$(LINK) $< \
+               $(TEST_LIBS) $(top_builddir)/libcatacomb.la \
+               $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS)
+.PRECIOUS: %.to
+CLEANFILES             += *.to *.$t
+
+###----- That's all, folks --------------------------------------------------