diff options
Diffstat (limited to 'src/regress/lib/libcrypto/wycheproof/Makefile')
-rw-r--r-- | src/regress/lib/libcrypto/wycheproof/Makefile | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/Makefile b/src/regress/lib/libcrypto/wycheproof/Makefile index 0fcde086f7..2e1d16b165 100644 --- a/src/regress/lib/libcrypto/wycheproof/Makefile +++ b/src/regress/lib/libcrypto/wycheproof/Makefile | |||
@@ -1,17 +1,21 @@ | |||
1 | # $OpenBSD: Makefile,v 1.3 2019/04/24 20:25:19 bluhm Exp $ | 1 | # $OpenBSD: Makefile,v 1.4 2022/07/07 20:01:20 tb Exp $ |
2 | 2 | ||
3 | .if ! (make(clean) || make(cleandir) || make(obj)) | 3 | WYCHEPROOF_TESTVECTORS = /usr/local/share/wycheproof/testvectors/ |
4 | GO_VERSION != sh -c "(go version) 2>/dev/null || true" | ||
5 | .endif | ||
6 | 4 | ||
7 | .if empty(GO_VERSION) | 5 | .if !exists(${WYCHEPROOF_TESTVECTORS}) |
8 | regress: | 6 | regress: |
9 | @echo package go is required for this regress | 7 | @echo package wycheproof-testvectors is required for this regress |
8 | @echo package go should be installed if available | ||
10 | @echo SKIPPED | 9 | @echo SKIPPED |
11 | .endif | 10 | .else |
11 | |||
12 | # REGRESS_TARGETS += regress-wycheproof-primes | ||
13 | |||
14 | . if exists(/usr/local/bin/go) | ||
12 | 15 | ||
13 | CLEANFILES+=wycheproof | 16 | REGRESS_TARGETS += regress-wycheproof |
14 | REGRESS_TARGETS=regress-wycheproof | 17 | |
18 | CLEANFILES += wycheproof | ||
15 | 19 | ||
16 | audit: wycheproof | 20 | audit: wycheproof |
17 | ./wycheproof -v | 21 | ./wycheproof -v |
@@ -24,4 +28,25 @@ regress-wycheproof: wycheproof | |||
24 | 28 | ||
25 | .PHONY: audit | 29 | .PHONY: audit |
26 | 30 | ||
31 | . endif | ||
32 | |||
33 | PROGS += wycheproof-primes | ||
34 | |||
35 | LDADD = -lcrypto | ||
36 | DPADD = ${LIBCRYPTO} | ||
37 | CFLAGS = -I${.CURDIR} -I${.OBJDIR} | ||
38 | |||
39 | primality_testcases.h: wycheproof-json.pl ${WYCHEPROOF_TESTVECTORS}/primality_test.json | ||
40 | perl ${.CURDIR}/wycheproof-json.pl > $@.tmp | ||
41 | mv -f $@.tmp $@ | ||
42 | |||
43 | wycheproof-primes: wycheproof-primes.c primality_testcases.h | ||
44 | |||
45 | regress-wycheproof-primes: primality_testcases.h wycheproof-primes | ||
46 | ./wycheproof-primes | ||
47 | |||
48 | CLEANFILES += primality_testcases.h | ||
49 | |||
50 | .endif | ||
51 | |||
27 | .include <bsd.regress.mk> | 52 | .include <bsd.regress.mk> |