xref: /freebsd/kerberos5/lib/libhx509/Makefile (revision 39beb93c3f8bdbf72a61fda42300b5ebed7390c8)
1# $FreeBSD$
2
3LIB=	hx509
4VERSION_MAP= ${KRB5DIR}/lib/hx509/version-script.map
5
6INCS=	hx509-private.h \
7	hx509-protos.h \
8	hx509.h \
9	hx509_err.h
10
11SRCS=	ca.c \
12	cert.c \
13	cms.c \
14	collector.c \
15	crypto.c \
16	doxygen.c \
17	error.c \
18	env.c \
19	file.c \
20	hx509-private.h \
21	hx509-protos.h \
22	hx509.h \
23	hx_locl.h \
24	keyset.c \
25	ks_dir.c \
26	ks_file.c \
27	ks_mem.c \
28	ks_null.c \
29	ks_p11.c \
30	ks_p12.c \
31	ks_keychain.c \
32	lock.c \
33	name.c \
34	peer.c \
35	print.c \
36	softp11.c \
37	ref/pkcs11.h \
38	req.c \
39	revoke.c
40
41SRCS+=	hx509_err.c \
42	hx509_err.h
43
44SRCS+=	${GEN:S/.x$/.c/}
45
46CFLAGS+=-I${KRB5DIR}/lib/hx509
47CFLAGS+=-I${KRB5DIR}/lib/hx509/ref
48CFLAGS+=-I${KRB5DIR}/lib/asn1
49CFLAGS+=-I${KRB5DIR}/lib/roken -I.
50
51GEN_OCSP= \
52	asn1_OCSPBasicOCSPResponse.x \
53	asn1_OCSPCertID.x \
54	asn1_OCSPCertStatus.x \
55	asn1_OCSPInnerRequest.x \
56	asn1_OCSPKeyHash.x \
57	asn1_OCSPRequest.x \
58	asn1_OCSPResponderID.x \
59	asn1_OCSPResponse.x \
60	asn1_OCSPResponseBytes.x \
61	asn1_OCSPResponseData.x \
62	asn1_OCSPResponseStatus.x \
63	asn1_OCSPSignature.x \
64	asn1_OCSPSingleResponse.x \
65	asn1_OCSPTBSRequest.x \
66	asn1_OCSPVersion.x \
67	asn1_id_pkix_ocsp.x \
68	asn1_id_pkix_ocsp_basic.x \
69	asn1_id_pkix_ocsp_nonce.x
70
71GEN_PKCS10= \
72	asn1_CertificationRequestInfo.x \
73	asn1_CertificationRequest.x
74
75GEN+=	${GEN_OCSP}
76GEN+=	${GEN_PKCS10}
77
78CLEANFILES= ${GEN} ${GEN:S/.x$/.c/} asn1_files
79
80GEN_ASN1=ocsp_asn1.h pkcs10_asn1.h
81CLEANFILES+=${GEN_ASN1}
82SRCS+=${GEN_ASN1}
83INCS+=${GEN_ASN1}
84
85.ORDER: ${GEN} ${GEN_ASN1}
86
87${GEN_OCSP} ocsp_asn1.h: ocsp.asn1 ../../tools/asn1_compile/asn1_compile
88	../../tools/asn1_compile/asn1_compile --preserve-binary=OCSPTBSRequest --preserve-binary=OCSPResponseData ${.ALLSRC:M*.asn1} ocsp_asn1
89
90${GEN_PKCS10} pkcs10_asn1.h: pkcs10.asn1 ../../tools/asn1_compile/asn1_compile
91	../../tools/asn1_compile/asn1_compile ${.ALLSRC:M*.asn1} pkcs10_asn1
92
93../../tools/asn1_compile/asn1_compile:
94	cd ${.CURDIR}/../../tools/asn1_compile && ${MAKE}
95
96.for I in ${GEN}
97${I:R}.c: ${I}
98	cat ${.ALLSRC} > ${.TARGET}
99.endfor
100
101.include <bsd.lib.mk>
102
103.PATH: ${KRB5DIR}/lib/hx509 ${KRB5DIR}/lib/asn1
104