summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/wycheproof/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libcrypto/wycheproof/Makefile')
-rw-r--r--src/regress/lib/libcrypto/wycheproof/Makefile43
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)) 3WYCHEPROOF_TESTVECTORS = /usr/local/share/wycheproof/testvectors/
4GO_VERSION != sh -c "(go version) 2>/dev/null || true"
5.endif
6 4
7.if empty(GO_VERSION) 5.if !exists(${WYCHEPROOF_TESTVECTORS})
8regress: 6regress:
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
13CLEANFILES+=wycheproof 16REGRESS_TARGETS += regress-wycheproof
14REGRESS_TARGETS=regress-wycheproof 17
18CLEANFILES += wycheproof
15 19
16audit: wycheproof 20audit: 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
33PROGS += wycheproof-primes
34
35LDADD = -lcrypto
36DPADD = ${LIBCRYPTO}
37CFLAGS = -I${.CURDIR} -I${.OBJDIR}
38
39primality_testcases.h: wycheproof-json.pl ${WYCHEPROOF_TESTVECTORS}/primality_test.json
40 perl ${.CURDIR}/wycheproof-json.pl > $@.tmp
41 mv -f $@.tmp $@
42
43wycheproof-primes: wycheproof-primes.c primality_testcases.h
44
45regress-wycheproof-primes: primality_testcases.h wycheproof-primes
46 ./wycheproof-primes
47
48CLEANFILES += primality_testcases.h
49
50.endif
51
27.include <bsd.regress.mk> 52.include <bsd.regress.mk>