Commit | Line | Data |
---|---|---|
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 | ||
0f00dc4c MW |
30 | ## Installation directories. |
31 | archincludedir = $(pkglibdir)/include | |
32 | ||
33 | ###-------------------------------------------------------------------------- | |
34 | ### Initial values of common variables. | |
35 | ||
36 | EXTRA_DIST = | |
37 | CLEANFILES = | |
38 | DISTCLEANFILES = | |
39 | MAINTAINERCLEANFILES = | |
40 | SUFFIXES = | |
41 | TESTS = | |
42 | BUILT_SOURCES = | |
43 | ||
e5b61a8d | 44 | EXTRA_PROGRAMS = |
0f00dc4c | 45 | noinst_PROGRAMS = |
e5b61a8d | 46 | check_PROGRAMS = |
0f00dc4c MW |
47 | pkginclude_HEADERS = |
48 | nodist_pkginclude_HEADERS = | |
49 | archinclude_HEADERS = | |
50 | nodist_archinclude_HEADERS = | |
51 | ||
e5b61a8d MW |
52 | ###-------------------------------------------------------------------------- |
53 | ### Machinery for precomputations. | |
54 | ||
55 | ## Location of precomputed tables. | |
56 | precomp = $(top_srcdir)/precomp | |
57 | ||
58 | ## Precomputed source code files. | |
59 | PRECOMPS = | |
60 | EXTRA_DIST += $(PRECOMPS) | |
61 | BUILT_SOURCES += $(PRECOMPS) | |
62 | MAINTAINERCLEANFILES += $(PRECOMPS) | |
63 | ||
64 | ## Programs which make the tables. These should be made by an explicit | |
65 | ## recursive `make' call in the relevant rule, so that we don't try to | |
66 | ## reconstruct them unnecessarily. | |
67 | PRECOMP_PROGS = | |
68 | EXTRA_PROGRAMS += $(PRECOMP_PROGS) | |
69 | CLEANFILES += $(PRECOMP_PROGS) | |
70 | ||
0f00dc4c MW |
71 | ###-------------------------------------------------------------------------- |
72 | ### Standard configuration substitutions. | |
73 | ||
74 | ## Substitute tags in files. | |
75 | confsubst = $(top_srcdir)/config/confsubst | |
76 | ||
77 | SUBSTITUTIONS = \ | |
78 | prefix=$(prefix) exec_prefix=$(exec_prefix) \ | |
79 | libdir=$(libdir) includedir=$(includedir) \ | |
80 | PACKAGE=$(PACKAGE) VERSION=$(VERSION) \ | |
81 | CATACOMB_LIBS="$(CATACOMB_LIBS)" | |
82 | ||
83 | V_SUBST = $(V_SUBST_$(V)) | |
84 | V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY)) | |
85 | V_SUBST_0 = @echo " SUBST $@"; | |
86 | SUBST = $(V_SUBST)$(confsubst) | |
87 | ||
88 | ###-------------------------------------------------------------------------- | |
89 | ### Include path. | |
90 | ||
91 | CATACOMB_INCLUDES = \ | |
92 | -I$(top_srcdir) \ | |
c9cfa678 MW |
93 | -I$(precomp)/math \ |
94 | -I$(precomp)/misc \ | |
95 | -I$(precomp)/symm \ | |
0f00dc4c MW |
96 | -I$(top_srcdir)/base \ |
97 | -I$(top_srcdir)/key \ | |
98 | -I$(top_srcdir)/math \ | |
99 | -I$(top_builddir)/math \ | |
100 | -I$(top_srcdir)/misc \ | |
101 | -I$(top_srcdir)/pub \ | |
102 | -I$(top_srcdir)/rand \ | |
103 | -I$(top_srcdir)/symm \ | |
104 | -I$(top_srcdir)/symm/modes -I$(top_builddir)/symm/modes | |
105 | ||
106 | AM_CPPFLAGS = $(CATACOMB_INCLUDES) | |
107 | ||
108 | ###-------------------------------------------------------------------------- | |
109 | ### Testing. | |
110 | ||
ba57d652 | 111 | SUFFIXES += .c .t$(EXEEXT) .to |
0f00dc4c MW |
112 | .c.to: |
113 | $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@ | |
ba57d652 | 114 | .to.t$(EXEEXT): |
4c26bf2b | 115 | $(AM_V_CCLD)$(LINK) $< $(TEST_LIBS) $(top_builddir)/libcatacomb.la \ |
0f00dc4c MW |
116 | $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS) |
117 | .PRECIOUS: %.to | |
ba57d652 | 118 | CLEANFILES += *.to *.t$(EXEEXT) |
0f00dc4c MW |
119 | |
120 | ###----- That's all, folks -------------------------------------------------- |