blob: 6e88568eeb9dd2b7f5a0b32f4fbcddb6925da3d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# $OpenBSD: Makefile,v 1.8 2023/07/08 18:33:41 espie Exp $
WYCHEPROOF_TESTVECTORS = /usr/local/share/wycheproof/testvectors/
.if !exists(${WYCHEPROOF_TESTVECTORS})
regress:
@echo package wycheproof-testvectors is required for this regress
@echo package go should be installed if available
@echo SKIPPED
.else
REGRESS_TARGETS += regress-wycheproof-primes
. if exists(/usr/local/bin/go)
REGRESS_TARGETS += regress-wycheproof
CLEANFILES += wycheproof
wycheproof: wycheproof.go
go build -o wycheproof ${.CURDIR}/wycheproof.go
regress-wycheproof: wycheproof
./wycheproof
. endif
PROGS += wycheproof-primes
LDADD += -lcrypto
DPADD += ${LIBCRYPTO}
CFLAGS += -I${.CURDIR} -I${.OBJDIR}
primality_testcases.h: wycheproof-json.pl ${WYCHEPROOF_TESTVECTORS}/primality_test.json
perl ${.CURDIR}/wycheproof-json.pl > $@.tmp && mv $@.tmp $@
wycheproof-primes.o: primality_testcases.h
regress-wycheproof-primes: wycheproof-primes
./wycheproof-primes
CLEANFILES += primality_testcases.h
.endif
.include <bsd.regress.mk>
|