summaryrefslogtreecommitdiff
path: root/regress/lib/libcrypto/c2sp/Makefile
blob: ddeb1fd965752714091abdec2503b4b3de6ce261 (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
# $OpenBSD: Makefile,v 1.3 2024/09/17 06:12:06 tb Exp $

C2SP_TESTVECTORS = /usr/local/share/c2sp-testvectors/

.if !exists(${C2SP_TESTVECTORS}) || !exists(/usr/local/bin/go)
regress:
	@echo required packages: security/c2sp-testvectors lang/go
	@echo optional packages: security/openssl/*
	@echo SKIPPED
.else

PROGS += cctv
SRCS_cctv =

cctv: cctv.go
	go build -o $@ ${.CURDIR}/cctv.go

OSSL_LIB =	/usr/local/lib/eopenssl
OSSL_INC =	/usr/local/include/eopenssl

. for V in 11 32 33
.  if exists(/usr/local/bin/eopenssl$V)
PROGS +=	cctv-openssl$V
SRCS_cctv-openssl$V =

CGO_CFLAGS_$V += 	-I${OSSL_INC}$V
CGO_LDFLAGS_$V += 	-Wl,-rpath,${OSSL_LIB}$V
CGO_LDFLAGS_$V += 	-L${OSSL_LIB}$V

cctv-openssl$V: cctv.go
	env CGO_CFLAGS="${CGO_CFLAGS_$V}" CGO_LDFLAGS="${CGO_LDFLAGS_$V}" \
	    go build -o $@ ${.CURDIR}/cctv.go
.  endif
. endfor

.endif

.include <bsd.regress.mk>