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 | ||
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 | ||
e5b61a8d | 49 | EXTRA_PROGRAMS = |
0f00dc4c | 50 | noinst_PROGRAMS = |
e5b61a8d | 51 | check_PROGRAMS = |
0f00dc4c MW |
52 | pkginclude_HEADERS = |
53 | nodist_pkginclude_HEADERS = | |
54 | archinclude_HEADERS = | |
55 | nodist_archinclude_HEADERS = | |
56 | ||
e5b61a8d MW |
57 | ###-------------------------------------------------------------------------- |
58 | ### Machinery for precomputations. | |
59 | ||
60 | ## Location of precomputed tables. | |
61 | precomp = $(top_srcdir)/precomp | |
62 | ||
63 | ## Precomputed source code files. | |
64 | PRECOMPS = | |
65 | EXTRA_DIST += $(PRECOMPS) | |
66 | BUILT_SOURCES += $(PRECOMPS) | |
67 | MAINTAINERCLEANFILES += $(PRECOMPS) | |
68 | ||
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. | |
72 | PRECOMP_PROGS = | |
73 | EXTRA_PROGRAMS += $(PRECOMP_PROGS) | |
74 | CLEANFILES += $(PRECOMP_PROGS) | |
75 | ||
0f00dc4c MW |
76 | ###-------------------------------------------------------------------------- |
77 | ### Standard configuration substitutions. | |
78 | ||
79 | ## Substitute tags in files. | |
80 | confsubst = $(top_srcdir)/config/confsubst | |
81 | ||
82 | SUBSTITUTIONS = \ | |
83 | prefix=$(prefix) exec_prefix=$(exec_prefix) \ | |
84 | libdir=$(libdir) includedir=$(includedir) \ | |
85 | PACKAGE=$(PACKAGE) VERSION=$(VERSION) \ | |
86 | CATACOMB_LIBS="$(CATACOMB_LIBS)" | |
87 | ||
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) | |
92 | ||
93 | ###-------------------------------------------------------------------------- | |
94 | ### Include path. | |
95 | ||
96 | CATACOMB_INCLUDES = \ | |
97 | -I$(top_srcdir) \ | |
e5b61a8d | 98 | -I$(precomp) \ |
0f00dc4c MW |
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 | |
108 | ||
109 | AM_CPPFLAGS = $(CATACOMB_INCLUDES) | |
110 | ||
111 | ###-------------------------------------------------------------------------- | |
112 | ### Testing. | |
113 | ||
114 | SUFFIXES += .c .$t .to | |
115 | .c.to: | |
116 | $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@ | |
4c26bf2b MW |
117 | .to.$t: |
118 | $(AM_V_CCLD)$(LINK) $< $(TEST_LIBS) $(top_builddir)/libcatacomb.la \ | |
0f00dc4c MW |
119 | $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS) |
120 | .PRECIOUS: %.to | |
121 | CLEANFILES += *.to *.$t | |
122 | ||
123 | ###----- That's all, folks -------------------------------------------------- |