Mercurial > dropbear
comparison libtommath/makefile_include.mk @ 1655:f52919ffd3b1
update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79)
* make key-generation compliant to FIPS 186.4
* fix includes in tommath_class.h
* update fuzzcorpus instead of error-out
* fixup fuzzing make-targets
* update Makefile.in
* apply necessary patches to ltm sources
* clean-up not required ltm files
* update to vanilla ltm 1.1.0
this already only contains the required files
* remove set/get double
author | Steffen Jaeckel <s_jaeckel@gmx.de> |
---|---|
date | Mon, 16 Sep 2019 15:50:38 +0200 |
parents | 47fcbdd12d9b |
children | 823592f244c9 |
comparison
equal
deleted
inserted
replaced
1654:cc0fc5131c5c | 1655:f52919ffd3b1 |
---|---|
1 # | 1 # |
2 # Include makefile for libtommath | 2 # Include makefile for libtommath |
3 # | 3 # |
4 | 4 |
5 #version of library | 5 #version of library |
6 VERSION=1.0.1 | 6 VERSION=1.1.0 |
7 VERSION_PC=1.0.1 | 7 VERSION_PC=1.1.0 |
8 VERSION_SO=1:1 | 8 VERSION_SO=2:0:1 |
9 | 9 |
10 PLATFORM := $(shell uname | sed -e 's/_.*//') | 10 PLATFORM := $(shell uname | sed -e 's/_.*//') |
11 | 11 |
12 # default make target | 12 # default make target |
13 default: ${LIBNAME} | 13 default: ${LIBNAME} |
15 # Compiler and Linker Names | 15 # Compiler and Linker Names |
16 ifndef CROSS_COMPILE | 16 ifndef CROSS_COMPILE |
17 CROSS_COMPILE= | 17 CROSS_COMPILE= |
18 endif | 18 endif |
19 | 19 |
20 # Dropbear passes these down | 20 # We only need to go through this dance of determining the right compiler if we're using |
21 #ifeq ($(CC),cc) | 21 # cross compilation, otherwise $(CC) is fine as-is. |
22 # CC = $(CROSS_COMPILE)gcc | 22 ifneq (,$(CROSS_COMPILE)) |
23 #endif | 23 ifeq ($(origin CC),default) |
24 #LD=$(CROSS_COMPILE)ld | 24 CSTR := "\#ifdef __clang__\nCLANG\n\#endif\n" |
25 #AR=$(CROSS_COMPILE)ar | 25 ifeq ($(PLATFORM),FreeBSD) |
26 #RANLIB=$(CROSS_COMPILE)ranlib | 26 # XXX: FreeBSD needs extra escaping for some reason |
27 CSTR := $$$(CSTR) | |
28 endif | |
29 ifneq (,$(shell echo $(CSTR) | $(CC) -E - | grep CLANG)) | |
30 CC := $(CROSS_COMPILE)clang | |
31 else | |
32 CC := $(CROSS_COMPILE)gcc | |
33 endif # Clang | |
34 endif # cc is Make's default | |
35 endif # CROSS_COMPILE non-empty | |
36 | |
37 LD=$(CROSS_COMPILE)ld | |
38 AR=$(CROSS_COMPILE)ar | |
39 RANLIB=$(CROSS_COMPILE)ranlib | |
27 | 40 |
28 ifndef MAKE | 41 ifndef MAKE |
29 MAKE=make | 42 # BSDs refer to GNU Make as gmake |
43 ifneq (,$(findstring $(PLATFORM),FreeBSD OpenBSD DragonFly NetBSD)) | |
44 MAKE=gmake | |
45 else | |
46 MAKE=make | |
47 endif | |
30 endif | 48 endif |
31 | 49 |
32 CFLAGS += -I./ -Wall -Wsign-compare -Wextra -Wshadow | 50 CFLAGS += -I./ -Wall -Wsign-compare -Wextra -Wshadow |
33 | 51 |
34 ifndef NO_ADDTL_WARNINGS | 52 ifndef NO_ADDTL_WARNINGS |
59 endif # COMPILE_DEBUG | 77 endif # COMPILE_DEBUG |
60 | 78 |
61 ifneq ($(findstring clang,$(CC)),) | 79 ifneq ($(findstring clang,$(CC)),) |
62 CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header | 80 CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header |
63 endif | 81 endif |
82 ifneq ($(findstring mingw,$(CC)),) | |
83 CFLAGS += -Wno-shadow | |
84 endif | |
64 ifeq ($(PLATFORM), Darwin) | 85 ifeq ($(PLATFORM), Darwin) |
65 CFLAGS += -Wno-nullability-completeness | 86 CFLAGS += -Wno-nullability-completeness |
66 endif | 87 endif |
88 ifeq ($(PLATFORM), CYGWIN) | |
89 LIBTOOLFLAGS += -no-undefined | |
90 endif | |
91 | |
92 ifeq ($(PLATFORM),FreeBSD) | |
93 _ARCH := $(shell sysctl -b hw.machine_arch) | |
94 else | |
95 _ARCH := $(shell arch) | |
96 endif | |
67 | 97 |
68 # adjust coverage set | 98 # adjust coverage set |
69 ifneq ($(filter $(shell arch), i386 i686 x86_64 amd64 ia64),) | 99 ifneq ($(filter $(_ARCH), i386 i686 x86_64 amd64 ia64),) |
70 COVERAGE = test_standalone timing | 100 COVERAGE = test_standalone timing |
71 COVERAGE_APP = ./test && ./ltmtest | 101 COVERAGE_APP = ./test && ./timing |
72 else | 102 else |
73 COVERAGE = test_standalone | 103 COVERAGE = test_standalone |
74 COVERAGE_APP = ./test | 104 COVERAGE_APP = ./test |
75 endif | 105 endif |
76 | 106 |
109 | 139 |
110 # cleans everything - coverage output and standard 'clean' | 140 # cleans everything - coverage output and standard 'clean' |
111 cleancov: cleancov-clean clean | 141 cleancov: cleancov-clean clean |
112 | 142 |
113 clean: | 143 clean: |
114 rm -f *.gcda *.gcno *.gcov *.bat *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \ | 144 rm -f *.gcda *.gcno *.gcov *.bat *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test timing mpitest mtest/mtest mtest/mtest.exe \ |
115 *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex `find . -type f | grep [~] | xargs` *.lo *.la | 145 *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex `find . -type f | grep [~] | xargs` *.lo *.la |
116 rm -rf .libs/ | 146 rm -rf .libs/ |
117 #${MAKE} -C etc/ clean MAKE=${MAKE} | 147 # ${MAKE} -C etc/ clean MAKE=${MAKE} |
118 #${MAKE} -C doc/ clean MAKE=${MAKE} | 148 # ${MAKE} -C doc/ clean MAKE=${MAKE} |