1# $NetBSD: Makefile,v 1.10 2023/06/20 00:30:16 mrg Exp $
2
3NOLINT=		# defined
4
5.include <bsd.own.mk>
6.include <${.CURDIR}/../../Makefile.inc>
7
8.PATH:		${HEIMDIST}/lib/hx509 ${HEIMBASE}/include
9
10LIB=		hx509
11
12SSLBASE=	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}
13
14LIBDPLIBS+=	asn1	${HEIMBASE}/lib/libasn1		\
15		com_err	${HEIMBASE}/lib/libcom_err	\
16		crypt	${NETBSDSRCDIR}/lib/libcrypt	\
17		crypto	${SSLBASE}/lib/libcrypto	\
18		roken	${HEIMBASE}/lib/libroken	\
19		wind	${HEIMBASE}/lib/libwind
20
21YHEADER=1
22YPREFIX=  _hx509_sel_yy
23LPREFIX=  _hx509_sel_yy
24
25INCSDIR=	/usr/include/krb5 
26INCS+=		hx509.h hx509-protos.h ${ASN1_INCS} ${COMPILE_ET_INCS}
27
28HEIMSRCS = hx509_err.et ocsp.asn1 pkcs10.asn1
29
30SRCS=				\
31	ca.c			\
32	cert.c			\
33	cms.c			\
34	collector.c		\
35	crypto.c		\
36	crypto-ec.c		\
37	doxygen.c		\
38	env.c			\
39	error.c			\
40	file.c			\
41	keyset.c		\
42	ks_dir.c		\
43	ks_file.c		\
44	ks_keychain.c		\
45	ks_mem.c		\
46	ks_null.c		\
47	ks_p11.c		\
48	ks_p12.c		\
49	lock.c			\
50	name.c			\
51	peer.c			\
52	print.c			\
53	req.c			\
54	revoke.c		\
55	sel.c			\
56	sel-gram.y		\
57	sel-lex.l		\
58	softp11.c		\
59	${BUILT_SOURCES}
60
61
62CPPFLAGS+=				\
63	-I${HEIMDIST}/lib/hx509/ref	\
64	-I${HEIMDIST}/lib/asn1		\
65	-I${HEIMDIST}/lib
66
67sel-gram.c: ${ASN1_INCS} ${COMPILE_ET_INCS}
68
69ASN1_FILES.ocsp.asn1 =			\
70	asn1_OCSPBasicOCSPResponse.x    \
71	asn1_OCSPCertID.x               \
72	asn1_OCSPCertStatus.x           \
73	asn1_OCSPInnerRequest.x         \
74	asn1_OCSPKeyHash.x              \
75	asn1_OCSPRequest.x              \
76	asn1_OCSPResponderID.x          \
77	asn1_OCSPResponse.x             \
78	asn1_OCSPResponseBytes.x        \
79	asn1_OCSPResponseData.x         \
80	asn1_OCSPResponseStatus.x       \
81	asn1_OCSPSignature.x            \
82	asn1_OCSPSingleResponse.x       \
83	asn1_OCSPTBSRequest.x           \
84	asn1_OCSPVersion.x              \
85	asn1_id_pkix_ocsp.x             \
86	asn1_id_pkix_ocsp_basic.x       \
87	asn1_id_pkix_ocsp_nonce.x
88
89COPTS.cert.c += -Wno-error=deprecated-declarations
90COPTS.crypto-ec.c += -Wno-error=deprecated-declarations
91COPTS.crypto.c += -Wno-error=deprecated-declarations
92COPTS.ks_p11.c += -Wno-error=deprecated-declarations
93
94# XXX: Pull this in from hcrypto.  Be sure to be last!  This subdir
95# XXX: also has a "doxygen.c" in it, but the .PATH ordering ensures
96# XXX: that the lib/hx509 version is used here, not the lib/hcrypto
97# XXX: version.
98SRCS+=	ui.c
99.PATH:	${HEIMDIST}/lib/hcrypto
100CPPFLAGS.ui.c+= 		\
101	-I${HEIMDIST}/lib/hcrypto
102
103.include <${HEIMBASE}/Makefile.rules.inc>
104.include <bsd.lib.mk>
105