xref: /openbsd/regress/lib/libcrypto/c2sp/Makefile (revision 5bf24759)
1# $OpenBSD: Makefile,v 1.4 2024/10/28 16:27:14 tb Exp $
2
3C2SP_TESTVECTORS = /usr/local/share/c2sp-testvectors/
4
5.if !exists(${C2SP_TESTVECTORS}) || !exists(/usr/local/bin/go)
6regress:
7	@echo required packages: security/c2sp-testvectors lang/go
8	@echo optional packages: security/openssl/*
9	@echo SKIPPED
10.else
11
12PROGS += cctv
13SRCS_cctv =
14
15cctv: cctv.go
16	go build -o $@ ${.CURDIR}/cctv.go
17
18OSSL_LIB =	/usr/local/lib/eopenssl
19OSSL_INC =	/usr/local/include/eopenssl
20
21. for V in 11 32 33 34
22.  if exists(/usr/local/bin/eopenssl$V)
23PROGS +=	cctv-openssl$V
24SRCS_cctv-openssl$V =
25
26CGO_CFLAGS_$V += 	-I${OSSL_INC}$V
27CGO_LDFLAGS_$V += 	-Wl,-rpath,${OSSL_LIB}$V
28CGO_LDFLAGS_$V += 	-L${OSSL_LIB}$V
29
30cctv-openssl$V: cctv.go
31	env CGO_CFLAGS="${CGO_CFLAGS_$V}" CGO_LDFLAGS="${CGO_LDFLAGS_$V}" \
32	    go build -o $@ ${.CURDIR}/cctv.go
33.  endif
34. endfor
35
36.endif
37
38.include <bsd.regress.mk>
39