xref: /freebsd/kerberos5/lib/libasn1/Makefile (revision a30235a4c360c06bb57be1f10ae6866a71fb5622)
1eb9e1f54SMark Murray# $FreeBSD$
2eb9e1f54SMark Murray
3*a30235a4SEmmanuel VadotPACKAGE=	kerberos
4*a30235a4SEmmanuel Vadot
5eb9e1f54SMark MurrayLIB=	asn1
6611ff617SStanislav SedovLDFLAGS=	-Wl,--no-undefined
7ae771770SStanislav SedovINCS=	asn1_err.h asn1-common.h heim_asn1.h der.h der-protos.h der-private.h
8d65af1e7SBaptiste DaroussinLIBADD=	com_err roken
972c3f707SStanislav SedovVERSION_MAP=	${.CURDIR}/version.map
10069b88ebSMark Murray
1186751859SRuslan ErmilovSRCS=	asn1_err.c \
1211bf3600SRuslan Ermilov	asn1_err.h \
13ae771770SStanislav Sedov	der.c \
1486751859SRuslan Ermilov	der_copy.c \
1533f12199SDoug Rabson	der_cmp.c \
1686751859SRuslan Ermilov	der_free.c \
1733f12199SDoug Rabson	der_format.c \
1886751859SRuslan Ermilov	der_get.c \
1986751859SRuslan Ermilov	der_length.c \
2086751859SRuslan Ermilov	der_put.c \
2133f12199SDoug Rabson	extra.c \
22ae771770SStanislav Sedov	template.c \
2386751859SRuslan Ermilov	timegm.c \
24ae771770SStanislav Sedov	${GEN:S/.x$/.c/:S/.hx$/.h/}
25069b88ebSMark Murray
2640343be5SYoshihiro TakahashiCFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \
2740343be5SYoshihiro Takahashi	-I${SRCTOP}/contrib/com_err -I.
28eb9e1f54SMark Murray
29ae771770SStanislav SedovGEN_RFC2459=	asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx
30ae771770SStanislav SedovGEN_CMS= 	asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx
31ae771770SStanislav SedovGEN_K5=		asn1_krb5_asn1.x krb5_asn1.hx krb5_asn1-priv.hx
32ae771770SStanislav SedovGEN_PKINIT= 	asn1_pkinit_asn1.x pkinit_asn1.hx pkinit_asn1-priv.hx
33ae771770SStanislav SedovGEN_PKCS8=	asn1_pkcs8_asn1.x pkcs8_asn1.hx pkcs8_asn1-priv.hx
34ae771770SStanislav SedovGEN_PKCS9=	asn1_pkcs9_asn1.x pkcs9_asn1.hx pkcs9_asn1-priv.hx
35ae771770SStanislav SedovGEN_PKCS12=	asn1_pkcs12_asn1.x pkcs12_asn1.hx pkcs12_asn1-priv.hx
36ae771770SStanislav SedovGEN_DIGEST=	asn1_digest_asn1.x digest_asn1.hx digest_asn1-priv.hx
37ae771770SStanislav SedovGEN_KX509=	asn1_kx509_asn1.x kx509_asn1.hx kx509_asn1-priv.hx
3833f12199SDoug Rabson
3933f12199SDoug RabsonGEN+=	${GEN_RFC2459}
4033f12199SDoug RabsonGEN+=	${GEN_CMS}
4133f12199SDoug RabsonGEN+=	${GEN_K5}
4233f12199SDoug RabsonGEN+=	${GEN_PKINIT}
4333f12199SDoug RabsonGEN+=	${GEN_PKCS8}
4433f12199SDoug RabsonGEN+=	${GEN_PKCS9}
4533f12199SDoug RabsonGEN+=	${GEN_PKCS12}
4633f12199SDoug RabsonGEN+=	${GEN_DIGEST}
4733f12199SDoug RabsonGEN+=	${GEN_KX509}
4833f12199SDoug Rabson
49ae771770SStanislav SedovCLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} *_asn1_files
5033f12199SDoug Rabson
51ae771770SStanislav SedovINCS+=	krb5_asn1.h \
52ae771770SStanislav Sedov	pkinit_asn1.h \
53ae771770SStanislav Sedov	cms_asn1.h \
54ae771770SStanislav Sedov	rfc2459_asn1.h \
55ae771770SStanislav Sedov	pkcs8_asn1.h \
56ae771770SStanislav Sedov	pkcs9_asn1.h \
57ae771770SStanislav Sedov	pkcs12_asn1.h \
58ae771770SStanislav Sedov	digest_asn1.h \
59ae771770SStanislav Sedov	kx509_asn1.h
6033f12199SDoug Rabson
61f0258c45SPeter Wemm.ORDER: ${GEN_CMS}
6292edc966SBryan Drewery${GEN_CMS:[2..-1]}: .NOMETA
63ae771770SStanislav Sedov${GEN_CMS}: cms.asn1 cms.opt
64ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
65ae771770SStanislav Sedov		--option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1
6633f12199SDoug Rabson
67f0258c45SPeter Wemm.ORDER: ${GEN_RFC2459}
6892edc966SBryan Drewery${GEN_RFC2459:[2..-1]}: .NOMETA
69ae771770SStanislav Sedov${GEN_RFC2459}: rfc2459.asn1
70ae771770SStanislav Sedov	${ASN1_COMPILE} \
71ae771770SStanislav Sedov		--one-code-file \
7233f12199SDoug Rabson		--preserve-binary=TBSCertificate \
7333f12199SDoug Rabson		--preserve-binary=TBSCRLCertList \
7433f12199SDoug Rabson		--preserve-binary=Name \
7533f12199SDoug Rabson		--sequence=GeneralNames \
7633f12199SDoug Rabson		--sequence=Extensions \
7733f12199SDoug Rabson		--sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1
7833f12199SDoug Rabson
79f0258c45SPeter Wemm.ORDER: ${GEN_K5}
8092edc966SBryan Drewery${GEN_K5:[2..-1]}: .NOMETA
81ae771770SStanislav Sedov${GEN_K5}: krb5.asn1 krb5.opt
82ae771770SStanislav Sedov	${ASN1_COMPILE} \
83ae771770SStanislav Sedov		--one-code-file \
84ae771770SStanislav Sedov		--option-file=${.ALLSRC:M*.opt} \
85ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} krb5_asn1
8633f12199SDoug Rabson
87f0258c45SPeter Wemm.ORDER: ${GEN_PKINIT}
8892edc966SBryan Drewery${GEN_PKINIT:[2..-1]}: .NOMETA
89ae771770SStanislav Sedov${GEN_PKINIT}: pkinit.asn1
90ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
91ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} pkinit_asn1
9233f12199SDoug Rabson
93f0258c45SPeter Wemm.ORDER: ${GEN_PKCS8}
9492edc966SBryan Drewery${GEN_PKCS8:[2..-1]}: .NOMETA
95ae771770SStanislav Sedov${GEN_PKCS8}: pkcs8.asn1
96ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
97ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} pkcs8_asn1
9833f12199SDoug Rabson
99f0258c45SPeter Wemm.ORDER: ${GEN_PKCS9}
10092edc966SBryan Drewery${GEN_PKCS9:[2..-1]}: .NOMETA
101ae771770SStanislav Sedov${GEN_PKCS9}: pkcs9.asn1
102ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
103ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} pkcs9_asn1
10433f12199SDoug Rabson
105f0258c45SPeter Wemm.ORDER: ${GEN_PKCS12}
10692edc966SBryan Drewery${GEN_PKCS12:[2..-1]}: .NOMETA
107ae771770SStanislav Sedov${GEN_PKCS12}: pkcs12.asn1
108ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
109ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} pkcs12_asn1
11033f12199SDoug Rabson
111f0258c45SPeter Wemm.ORDER: ${GEN_DIGEST}
11292edc966SBryan Drewery${GEN_DIGEST:[2..-1]}: .NOMETA
113ae771770SStanislav Sedov${GEN_DIGEST}: digest.asn1
114ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
115ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} digest_asn1
11633f12199SDoug Rabson
117f0258c45SPeter Wemm.ORDER: ${GEN_KX509}
11892edc966SBryan Drewery${GEN_KX509:[2..-1]}: .NOMETA
119ae771770SStanislav Sedov${GEN_KX509}: kx509.asn1
120ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
121ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} kx509_asn1
12211bf3600SRuslan Ermilov
123ae771770SStanislav Sedov.SUFFIXES: .h .c .x .hx
12411bf3600SRuslan Ermilov
125ae771770SStanislav Sedov.x.c:
1267a37b5fcSWill Andrews	${CP} ${.IMPSRC} ${.TARGET}
127ae771770SStanislav Sedov
128ae771770SStanislav Sedov.hx.h:
1297a37b5fcSWill Andrews	${CP} ${.IMPSRC} ${.TARGET}
130079654e8SMark Murray
131eb9e1f54SMark Murray.include <bsd.lib.mk>
132eb9e1f54SMark Murray
133ae771770SStanislav Sedov.SUFFIXES: .h .c .x .hx
134ae771770SStanislav Sedov
135eb9e1f54SMark Murray.PATH: ${KRB5DIR}/lib/asn1
136