progs/perftest.c: Use from Glibc syscall numbers.
[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
0f00dc4c
MW
30## Installation directories.
31archincludedir = $(pkglibdir)/include
32
33###--------------------------------------------------------------------------
34### Initial values of common variables.
35
36EXTRA_DIST =
37CLEANFILES =
38DISTCLEANFILES =
39MAINTAINERCLEANFILES =
40SUFFIXES =
41TESTS =
42BUILT_SOURCES =
43
e5b61a8d 44EXTRA_PROGRAMS =
0f00dc4c 45noinst_PROGRAMS =
e5b61a8d 46check_PROGRAMS =
0f00dc4c
MW
47pkginclude_HEADERS =
48nodist_pkginclude_HEADERS =
49archinclude_HEADERS =
50nodist_archinclude_HEADERS =
51
52###--------------------------------------------------------------------------
e5b61a8d
MW
53### Machinery for precomputations.
54
55## Location of precomputed tables.
56precomp = $(top_srcdir)/precomp
57
58## Precomputed source code files.
59PRECOMPS =
60EXTRA_DIST += $(PRECOMPS)
61BUILT_SOURCES += $(PRECOMPS)
62MAINTAINERCLEANFILES += $(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.
67PRECOMP_PROGS =
68EXTRA_PROGRAMS += $(PRECOMP_PROGS)
69CLEANFILES += $(PRECOMP_PROGS)
70
71###--------------------------------------------------------------------------
0f00dc4c
MW
72### Standard configuration substitutions.
73
74## Substitute tags in files.
37592064 75confsubst = $(top_srcdir)/config/confsubst
0f00dc4c
MW
76
77SUBSTITUTIONS = \
37592064
MW
78 prefix=$(prefix) exec_prefix=$(exec_prefix) \
79 libdir=$(libdir) includedir=$(includedir) \
80 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
81 CATACOMB_LIBS="$(CATACOMB_LIBS)"
0f00dc4c 82
3eda76a3
MW
83V_SUBST = $(V_SUBST_@AM_V@)
84V_SUBST_ = $(V_SUBST_@AM_DEFAULT_V@)
85V_SUBST_0 = @echo " SUBST $@";
37592064 86SUBST = $(V_SUBST)$(confsubst)
0f00dc4c
MW
87
88###--------------------------------------------------------------------------
89### Include path.
90
37592064 91CATACOMB_INCLUDES = \
0f00dc4c 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
106AM_CPPFLAGS = $(CATACOMB_INCLUDES)
107
108###--------------------------------------------------------------------------
109### Testing.
110
3c8d8c60 111TEST_EXTENSIONS = .t
ba57d652 112SUFFIXES += .c .t$(EXEEXT) .to
c0160f6c
MW
113
114## This unpleasant duplication of rules makes the build system basically work
115## for non-GNU make(1) variants, while GNU Make will associate useful
116## additional dependencies with the test programs. GNU Make seems not to
117## mind the duplicate rules, and uses the second (better) set; non-GNU Make
118## will think the second set refer to bizarrely-named targets which nobody is
119## apparently interested in.
0f00dc4c
MW
120.c.to:
121 $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@
ba57d652 122.to.t$(EXEEXT):
aad774b2 123 $(AM_V_CCLD)$(LINK) $(TEST_LDFLAGS) $< \
d49bdecf 124 $(TEST_LIBS) $(top_builddir)/libcatacomb.la \
0f00dc4c 125 $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS)
c0160f6c
MW
126%.to: %.c %.lo
127 $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@
128%.t$(EXEEXT): %.to $(TEST_LIBS) $(top_builddir)/libcatacomb.la
aad774b2 129 $(AM_V_CCLD)$(LINK) $(TEST_LDFLAGS) $+ \
d49bdecf 130 $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS)
c0160f6c 131
d05aba32 132.PRECIOUS: %.to %.t$(EXEEXT)
ba57d652 133CLEANFILES += *.to *.t$(EXEEXT)
0f00dc4c 134
9a2fd09e
MW
135###--------------------------------------------------------------------------
136### Experimental flymake hack.
137
138check-syntax:
139 $(COMPILE) -S -o/dev/null \
140 -DTEST_RIG -DSRCDIR=\"$(SRCDIR)\" \
141 $(CHK_SOURCES)
142
0f00dc4c 143###----- That's all, folks --------------------------------------------------