chiark / gitweb /
Rearrange the file tree.
[catacomb] / vars.am
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.
31 e                        = $(EXEEXT)
32 o                        = $(OBJEXT)
33 t                        = t$e
34
35 ## Installation directories.
36 archincludedir           = $(pkglibdir)/include
37
38 ###--------------------------------------------------------------------------
39 ### Initial values of common variables.
40
41 EXTRA_DIST               =
42 CLEANFILES               =
43 DISTCLEANFILES           =
44 MAINTAINERCLEANFILES     =
45 SUFFIXES                 =
46 TESTS                    =
47 BUILT_SOURCES            =
48
49 noinst_PROGRAMS          =
50 pkginclude_HEADERS       =
51 nodist_pkginclude_HEADERS =
52 archinclude_HEADERS      =
53 nodist_archinclude_HEADERS =
54
55 ###--------------------------------------------------------------------------
56 ### Standard configuration substitutions.
57
58 ## Substitute tags in files.
59 confsubst = $(top_srcdir)/config/confsubst
60
61 SUBSTITUTIONS = \
62                 prefix=$(prefix) exec_prefix=$(exec_prefix) \
63                 libdir=$(libdir) includedir=$(includedir) \
64                 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
65                 CATACOMB_LIBS="$(CATACOMB_LIBS)"
66
67 V_SUBST = $(V_SUBST_$(V))
68 V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
69 V_SUBST_0 = @echo "  SUBST  $@";
70 SUBST = $(V_SUBST)$(confsubst)
71
72 ###--------------------------------------------------------------------------
73 ### Include path.
74
75 CATACOMB_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
87 AM_CPPFLAGS              = $(CATACOMB_INCLUDES)
88
89 ###--------------------------------------------------------------------------
90 ### Testing.
91
92 SUFFIXES                += .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
100 CLEANFILES              += *.to *.$t
101
102 ###----- That's all, folks --------------------------------------------------