Rearrange the file tree.
[u/mdw/catacomb] / vars.am
CommitLineData
0f00dc4c
MW
1### -*-makefile-*-
2###
3### Common definitions for build scripts
4###
5### (c) 2013 Straylight/Edgeware
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of Catacomb.
11###
12### Catacomb 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### Catacomb 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 Catacomb; 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## Some convenient abbreviations for file suffixes.
31e = $(EXEEXT)
32o = $(OBJEXT)
33t = t$e
34
35## Installation directories.
36archincludedir = $(pkglibdir)/include
37
38###--------------------------------------------------------------------------
39### Initial values of common variables.
40
41EXTRA_DIST =
42CLEANFILES =
43DISTCLEANFILES =
44MAINTAINERCLEANFILES =
45SUFFIXES =
46TESTS =
47BUILT_SOURCES =
48
49noinst_PROGRAMS =
50pkginclude_HEADERS =
51nodist_pkginclude_HEADERS =
52archinclude_HEADERS =
53nodist_archinclude_HEADERS =
54
55###--------------------------------------------------------------------------
56### Standard configuration substitutions.
57
58## Substitute tags in files.
59confsubst = $(top_srcdir)/config/confsubst
60
61SUBSTITUTIONS = \
62 prefix=$(prefix) exec_prefix=$(exec_prefix) \
63 libdir=$(libdir) includedir=$(includedir) \
64 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
65 CATACOMB_LIBS="$(CATACOMB_LIBS)"
66
67V_SUBST = $(V_SUBST_$(V))
68V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
69V_SUBST_0 = @echo " SUBST $@";
70SUBST = $(V_SUBST)$(confsubst)
71
72###--------------------------------------------------------------------------
73### Include path.
74
75CATACOMB_INCLUDES = \
76 -I$(top_srcdir) \
77 -I$(top_srcdir)/base \
78 -I$(top_srcdir)/key \
79 -I$(top_srcdir)/math \
80 -I$(top_builddir)/math \
81 -I$(top_srcdir)/misc \
82 -I$(top_srcdir)/pub \
83 -I$(top_srcdir)/rand \
84 -I$(top_srcdir)/symm \
85 -I$(top_srcdir)/symm/modes -I$(top_builddir)/symm/modes
86
87AM_CPPFLAGS = $(CATACOMB_INCLUDES)
88
89###--------------------------------------------------------------------------
90### Testing.
91
92SUFFIXES += .c .$t .to
93.c.to:
94 $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@
95.to.$t: libcatacomb.la
96 $(AM_V_CCLD)$(LINK) $< \
97 $(TEST_LIBS) $(top_builddir)/libcatacomb.la \
98 $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS)
99.PRECIOUS: %.to
100CLEANFILES += *.to *.$t
101
102###----- That's all, folks --------------------------------------------------