annotate libtommath/makefile_include.mk @ 1848:84b664071c7d

Upload config.log on failure Change tests to avoid double-negative for skipcheck Skip some actions when running under act
author Matt Johnston <matt@ucc.asn.au>
date Tue, 19 Oct 2021 11:50:12 +0800
parents 93e738ef0d9d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 #
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2 # Include makefile for libtommath
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 #
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5 #version of library
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
6 VERSION=1.2.0
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
7 VERSION_PC=1.2.0
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
8 VERSION_SO=3:0:2
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10 PLATFORM := $(shell uname | sed -e 's/_.*//')
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12 # default make target
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13 default: ${LIBNAME}
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 # Compiler and Linker Names
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16 ifndef CROSS_COMPILE
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17 CROSS_COMPILE=
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18 endif
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
19
1655
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
20 # We only need to go through this dance of determining the right compiler if we're using
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
21 # cross compilation, otherwise $(CC) is fine as-is.
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
22 ifneq (,$(CROSS_COMPILE))
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
23 ifeq ($(origin CC),default)
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
24 CSTR := "\#ifdef __clang__\nCLANG\n\#endif\n"
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
25 ifeq ($(PLATFORM),FreeBSD)
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
26 # XXX: FreeBSD needs extra escaping for some reason
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
27 CSTR := $$$(CSTR)
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
28 endif
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
29 ifneq (,$(shell echo $(CSTR) | $(CC) -E - | grep CLANG))
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
30 CC := $(CROSS_COMPILE)clang
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
31 else
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
32 CC := $(CROSS_COMPILE)gcc
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
33 endif # Clang
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
34 endif # cc is Make's default
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
35 endif # CROSS_COMPILE non-empty
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
36
1657
823592f244c9 Bring back Dropbear patch to avoid setting AR/LD/RANLIB in LTM
Matt Johnston <matt@ucc.asn.au>
parents: 1655
diff changeset
37 # Dropbear passes these down
823592f244c9 Bring back Dropbear patch to avoid setting AR/LD/RANLIB in LTM
Matt Johnston <matt@ucc.asn.au>
parents: 1655
diff changeset
38 #LD=$(CROSS_COMPILE)ld
823592f244c9 Bring back Dropbear patch to avoid setting AR/LD/RANLIB in LTM
Matt Johnston <matt@ucc.asn.au>
parents: 1655
diff changeset
39 #AR=$(CROSS_COMPILE)ar
823592f244c9 Bring back Dropbear patch to avoid setting AR/LD/RANLIB in LTM
Matt Johnston <matt@ucc.asn.au>
parents: 1655
diff changeset
40 #RANLIB=$(CROSS_COMPILE)ranlib
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
41
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
42 ifndef MAKE
1655
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
43 # BSDs refer to GNU Make as gmake
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
44 ifneq (,$(findstring $(PLATFORM),FreeBSD OpenBSD DragonFly NetBSD))
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
45 MAKE=gmake
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
46 else
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
47 MAKE=make
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
48 endif
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
49 endif
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
50
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
51 LTM_CFLAGS += -I./ -Wall -Wsign-compare -Wextra -Wshadow
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
52
1695
93e738ef0d9d Avoid oss-fuzz $SANITIZER causing wrong build
Matt Johnston <matt@ucc.asn.au>
parents: 1692
diff changeset
53 # renamed for Dropbear to avoid clash with oss-fuzz $SANITIZER var
93e738ef0d9d Avoid oss-fuzz $SANITIZER causing wrong build
Matt Johnston <matt@ucc.asn.au>
parents: 1692
diff changeset
54 ifdef LTM_SANITIZER
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
55 LTM_CFLAGS += -fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=float-divide-by-zero
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
56 endif
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
57
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
58 ifndef NO_ADDTL_WARNINGS
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
59 # additional warnings
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
60 LTM_CFLAGS += -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
61 LTM_CFLAGS += -Wstrict-prototypes -Wpointer-arith
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
62 endif
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
63
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
64 ifdef CONV_WARNINGS
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
65 LTM_CFLAGS += -std=c89 -Wconversion -Wsign-conversion
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
66 ifeq ($(CONV_WARNINGS), strict)
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
67 LTM_CFLAGS += -DMP_USE_ENUMS -Wc++-compat
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
68 endif
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
69 else
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
70 LTM_CFLAGS += -Wsystem-headers
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
71 endif
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
72
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
73 ifdef COMPILE_DEBUG
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
74 #debug
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
75 LTM_CFLAGS += -g3
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
76 endif
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
77
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
78 ifdef COMPILE_SIZE
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
79 #for size
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
80 LTM_CFLAGS += -Os
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
81 else
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
82
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
83 ifndef IGNORE_SPEED
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
84 #for speed
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
85 LTM_CFLAGS += -O3 -funroll-loops
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
86
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
87 #x86 optimizations [should be valid for any GCC install though]
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
88 LTM_CFLAGS += -fomit-frame-pointer
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
89 endif
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
90
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
91 endif # COMPILE_SIZE
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
92
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
93 ifneq ($(findstring clang,$(CC)),)
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
94 LTM_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
95 endif
1655
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
96 ifneq ($(findstring mingw,$(CC)),)
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
97 LTM_CFLAGS += -Wno-shadow
1655
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
98 endif
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
99 ifeq ($(PLATFORM), Darwin)
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
100 LTM_CFLAGS += -Wno-nullability-completeness
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
101 endif
1655
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
102 ifeq ($(PLATFORM), CYGWIN)
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
103 LIBTOOLFLAGS += -no-undefined
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
104 endif
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
105
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
106 # add in the standard FLAGS
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
107 LTM_CFLAGS += $(CFLAGS)
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
108 LTM_LFLAGS += $(LFLAGS)
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
109 LTM_LDFLAGS += $(LDFLAGS)
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
110 LTM_LIBTOOLFLAGS += $(LIBTOOLFLAGS)
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
111
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
112
1655
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
113 ifeq ($(PLATFORM),FreeBSD)
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
114 _ARCH := $(shell sysctl -b hw.machine_arch)
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
115 else
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
116 _ARCH := $(shell uname -m)
1655
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
117 endif
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
118
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
119 # adjust coverage set
1655
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
120 ifneq ($(filter $(_ARCH), i386 i686 x86_64 amd64 ia64),)
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
121 COVERAGE = test_standalone timing
1655
f52919ffd3b1 update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
Steffen Jaeckel <s_jaeckel@gmx.de>
parents: 1522
diff changeset
122 COVERAGE_APP = ./test && ./timing
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
123 else
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
124 COVERAGE = test_standalone
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
125 COVERAGE_APP = ./test
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
126 endif
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
127
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
128 HEADERS_PUB=tommath.h
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
129 HEADERS=tommath_private.h tommath_class.h tommath_superclass.h tommath_cutoffs.h $(HEADERS_PUB)
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
130
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
131 #LIBPATH The directory for libtommath to be installed to.
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
132 #INCPATH The directory to install the header files for libtommath.
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
133 #DATAPATH The directory to install the pdf docs.
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
134 DESTDIR ?=
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
135 PREFIX ?= /usr/local
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
136 LIBPATH ?= $(PREFIX)/lib
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
137 INCPATH ?= $(PREFIX)/include
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
138 DATAPATH ?= $(PREFIX)/share/doc/libtommath/pdf
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
139
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
140 #make the code coverage of the library
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
141 #
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
142 coverage: LTM_CFLAGS += -fprofile-arcs -ftest-coverage -DTIMING_NO_LOGS
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
143 coverage: LTM_LFLAGS += -lgcov
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
144 coverage: LTM_LDFLAGS += -lgcov
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
145
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
146 coverage: $(COVERAGE)
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
147 $(COVERAGE_APP)
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
148
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
149 lcov: coverage
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
150 rm -f coverage.info
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
151 lcov --capture --no-external --no-recursion $(LCOV_ARGS) --output-file coverage.info -q
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
152 genhtml coverage.info --output-directory coverage -q
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
153
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
154 # target that removes all coverage output
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
155 cleancov-clean:
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
156 rm -f `find . -type f -name "*.info" | xargs`
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
157 rm -rf coverage/
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
158
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
159 # cleans everything - coverage output and standard 'clean'
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
160 cleancov: cleancov-clean clean
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
161
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
162 clean:
1692
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
163 rm -f *.gcda *.gcno *.gcov *.bat *.o *.a *.obj *.lib *.exe *.dll etclib/*.o \
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
164 demo/*.o test timing mtest_opponent mtest/mtest mtest/mtest.exe tuning_list \
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
165 *.s mpi.c *.da *.dyn *.dpi tommath.tex `find . -type f | grep [~] | xargs` *.lo *.la
1051e4eea25a Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents: 1657
diff changeset
166 rm -rf .libs/ demo/.libs