3 ### Common definitions for build scripts
5 ### (c) 2013 Straylight/Edgeware
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of Catacomb.
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.
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.
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.
27 ###--------------------------------------------------------------------------
28 ### Miscellaneous useful definitions.
30 ## Some convenient abbreviations for file suffixes.
35 ## Installation directories.
36 archincludedir = $(pkglibdir)/include
38 ###--------------------------------------------------------------------------
39 ### Initial values of common variables.
44 MAINTAINERCLEANFILES =
53 nodist_pkginclude_HEADERS =
55 nodist_archinclude_HEADERS =
57 ###--------------------------------------------------------------------------
58 ### Machinery for precomputations.
60 ## Location of precomputed tables.
61 precomp = $(top_srcdir)/precomp
63 ## Precomputed source code files.
65 EXTRA_DIST += $(PRECOMPS)
66 BUILT_SOURCES += $(PRECOMPS)
67 MAINTAINERCLEANFILES += $(PRECOMPS)
69 ## Programs which make the tables. These should be made by an explicit
70 ## recursive `make' call in the relevant rule, so that we don't try to
71 ## reconstruct them unnecessarily.
73 EXTRA_PROGRAMS += $(PRECOMP_PROGS)
74 CLEANFILES += $(PRECOMP_PROGS)
76 ###--------------------------------------------------------------------------
77 ### Standard configuration substitutions.
79 ## Substitute tags in files.
80 confsubst = $(top_srcdir)/config/confsubst
83 prefix=$(prefix) exec_prefix=$(exec_prefix) \
84 libdir=$(libdir) includedir=$(includedir) \
85 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
86 CATACOMB_LIBS="$(CATACOMB_LIBS)"
88 V_SUBST = $(V_SUBST_$(V))
89 V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
90 V_SUBST_0 = @echo " SUBST $@";
91 SUBST = $(V_SUBST)$(confsubst)
93 ###--------------------------------------------------------------------------
99 -I$(top_srcdir)/base \
100 -I$(top_srcdir)/key \
101 -I$(top_srcdir)/math \
102 -I$(top_builddir)/math \
103 -I$(top_srcdir)/misc \
104 -I$(top_srcdir)/pub \
105 -I$(top_srcdir)/rand \
106 -I$(top_srcdir)/symm \
107 -I$(top_srcdir)/symm/modes -I$(top_builddir)/symm/modes
109 AM_CPPFLAGS = $(CATACOMB_INCLUDES)
111 ###--------------------------------------------------------------------------
114 SUFFIXES += .c .$t .to
116 $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@
118 $(AM_V_CCLD)$(LINK) $< $(TEST_LIBS) $(top_builddir)/libcatacomb.la \
119 $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS)
121 CLEANFILES += *.to *.$t
123 ###----- That's all, folks --------------------------------------------------