xref: /freebsd/kerberos5/lib/libasn1/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1*6e4dbb7fSDoug RabsonPACKAGE=	kerberos-lib
2a30235a4SEmmanuel Vadot
3eb9e1f54SMark MurrayLIB=	asn1
4611ff617SStanislav SedovLDFLAGS=	-Wl,--no-undefined
5ae771770SStanislav SedovINCS=	asn1_err.h asn1-common.h heim_asn1.h der.h der-protos.h der-private.h
6d65af1e7SBaptiste DaroussinLIBADD=	com_err roken
772c3f707SStanislav SedovVERSION_MAP=	${.CURDIR}/version.map
8069b88ebSMark Murray
986751859SRuslan ErmilovSRCS=	asn1_err.c \
1011bf3600SRuslan Ermilov	asn1_err.h \
11ae771770SStanislav Sedov	der.c \
1286751859SRuslan Ermilov	der_copy.c \
1333f12199SDoug Rabson	der_cmp.c \
1486751859SRuslan Ermilov	der_free.c \
1533f12199SDoug Rabson	der_format.c \
1686751859SRuslan Ermilov	der_get.c \
1786751859SRuslan Ermilov	der_length.c \
1886751859SRuslan Ermilov	der_put.c \
1933f12199SDoug Rabson	extra.c \
20ae771770SStanislav Sedov	template.c \
2186751859SRuslan Ermilov	timegm.c \
22ae771770SStanislav Sedov	${GEN:S/.x$/.c/:S/.hx$/.h/}
23069b88ebSMark Murray
2440343be5SYoshihiro TakahashiCFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \
2540343be5SYoshihiro Takahashi	-I${SRCTOP}/contrib/com_err -I.
26eb9e1f54SMark Murray
27ae771770SStanislav SedovGEN_RFC2459=	asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx
28ae771770SStanislav SedovGEN_CMS= 	asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx
29ae771770SStanislav SedovGEN_K5=		asn1_krb5_asn1.x krb5_asn1.hx krb5_asn1-priv.hx
30ae771770SStanislav SedovGEN_PKINIT= 	asn1_pkinit_asn1.x pkinit_asn1.hx pkinit_asn1-priv.hx
31ae771770SStanislav SedovGEN_PKCS8=	asn1_pkcs8_asn1.x pkcs8_asn1.hx pkcs8_asn1-priv.hx
32ae771770SStanislav SedovGEN_PKCS9=	asn1_pkcs9_asn1.x pkcs9_asn1.hx pkcs9_asn1-priv.hx
33ae771770SStanislav SedovGEN_PKCS12=	asn1_pkcs12_asn1.x pkcs12_asn1.hx pkcs12_asn1-priv.hx
34ae771770SStanislav SedovGEN_DIGEST=	asn1_digest_asn1.x digest_asn1.hx digest_asn1-priv.hx
35ae771770SStanislav SedovGEN_KX509=	asn1_kx509_asn1.x kx509_asn1.hx kx509_asn1-priv.hx
3633f12199SDoug Rabson
3733f12199SDoug RabsonGEN+=	${GEN_RFC2459}
3833f12199SDoug RabsonGEN+=	${GEN_CMS}
3933f12199SDoug RabsonGEN+=	${GEN_K5}
4033f12199SDoug RabsonGEN+=	${GEN_PKINIT}
4133f12199SDoug RabsonGEN+=	${GEN_PKCS8}
4233f12199SDoug RabsonGEN+=	${GEN_PKCS9}
4333f12199SDoug RabsonGEN+=	${GEN_PKCS12}
4433f12199SDoug RabsonGEN+=	${GEN_DIGEST}
4533f12199SDoug RabsonGEN+=	${GEN_KX509}
4633f12199SDoug Rabson
47ae771770SStanislav SedovCLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} *_asn1_files
4833f12199SDoug Rabson
49ae771770SStanislav SedovINCS+=	krb5_asn1.h \
50ae771770SStanislav Sedov	pkinit_asn1.h \
51ae771770SStanislav Sedov	cms_asn1.h \
52ae771770SStanislav Sedov	rfc2459_asn1.h \
53ae771770SStanislav Sedov	pkcs8_asn1.h \
54ae771770SStanislav Sedov	pkcs9_asn1.h \
55ae771770SStanislav Sedov	pkcs12_asn1.h \
56ae771770SStanislav Sedov	digest_asn1.h \
57ae771770SStanislav Sedov	kx509_asn1.h
5833f12199SDoug Rabson
59f0258c45SPeter Wemm.ORDER: ${GEN_CMS}
6092edc966SBryan Drewery${GEN_CMS:[2..-1]}: .NOMETA
61ae771770SStanislav Sedov${GEN_CMS}: cms.asn1 cms.opt
62ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
63ae771770SStanislav Sedov		--option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1
6433f12199SDoug Rabson
65f0258c45SPeter Wemm.ORDER: ${GEN_RFC2459}
6692edc966SBryan Drewery${GEN_RFC2459:[2..-1]}: .NOMETA
67ae771770SStanislav Sedov${GEN_RFC2459}: rfc2459.asn1
68ae771770SStanislav Sedov	${ASN1_COMPILE} \
69ae771770SStanislav Sedov		--one-code-file \
7033f12199SDoug Rabson		--preserve-binary=TBSCertificate \
7133f12199SDoug Rabson		--preserve-binary=TBSCRLCertList \
7233f12199SDoug Rabson		--preserve-binary=Name \
7333f12199SDoug Rabson		--sequence=GeneralNames \
7433f12199SDoug Rabson		--sequence=Extensions \
7533f12199SDoug Rabson		--sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1
7633f12199SDoug Rabson
77f0258c45SPeter Wemm.ORDER: ${GEN_K5}
7892edc966SBryan Drewery${GEN_K5:[2..-1]}: .NOMETA
79ae771770SStanislav Sedov${GEN_K5}: krb5.asn1 krb5.opt
80ae771770SStanislav Sedov	${ASN1_COMPILE} \
81ae771770SStanislav Sedov		--one-code-file \
82ae771770SStanislav Sedov		--option-file=${.ALLSRC:M*.opt} \
83ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} krb5_asn1
8433f12199SDoug Rabson
85f0258c45SPeter Wemm.ORDER: ${GEN_PKINIT}
8692edc966SBryan Drewery${GEN_PKINIT:[2..-1]}: .NOMETA
87ae771770SStanislav Sedov${GEN_PKINIT}: pkinit.asn1
88ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
89ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} pkinit_asn1
9033f12199SDoug Rabson
91f0258c45SPeter Wemm.ORDER: ${GEN_PKCS8}
9292edc966SBryan Drewery${GEN_PKCS8:[2..-1]}: .NOMETA
93ae771770SStanislav Sedov${GEN_PKCS8}: pkcs8.asn1
94ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
95ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} pkcs8_asn1
9633f12199SDoug Rabson
97f0258c45SPeter Wemm.ORDER: ${GEN_PKCS9}
9892edc966SBryan Drewery${GEN_PKCS9:[2..-1]}: .NOMETA
99ae771770SStanislav Sedov${GEN_PKCS9}: pkcs9.asn1
100ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
101ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} pkcs9_asn1
10233f12199SDoug Rabson
103f0258c45SPeter Wemm.ORDER: ${GEN_PKCS12}
10492edc966SBryan Drewery${GEN_PKCS12:[2..-1]}: .NOMETA
105ae771770SStanislav Sedov${GEN_PKCS12}: pkcs12.asn1
106ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
107ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} pkcs12_asn1
10833f12199SDoug Rabson
109f0258c45SPeter Wemm.ORDER: ${GEN_DIGEST}
11092edc966SBryan Drewery${GEN_DIGEST:[2..-1]}: .NOMETA
111ae771770SStanislav Sedov${GEN_DIGEST}: digest.asn1
112ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
113ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} digest_asn1
11433f12199SDoug Rabson
115f0258c45SPeter Wemm.ORDER: ${GEN_KX509}
11692edc966SBryan Drewery${GEN_KX509:[2..-1]}: .NOMETA
117ae771770SStanislav Sedov${GEN_KX509}: kx509.asn1
118ae771770SStanislav Sedov	${ASN1_COMPILE} --one-code-file \
119ae771770SStanislav Sedov		${.ALLSRC:M*.asn1} kx509_asn1
12011bf3600SRuslan Ermilov
121ae771770SStanislav Sedov.SUFFIXES: .h .c .x .hx
12211bf3600SRuslan Ermilov
123ae771770SStanislav Sedov.x.c:
1247a37b5fcSWill Andrews	${CP} ${.IMPSRC} ${.TARGET}
125ae771770SStanislav Sedov
126ae771770SStanislav Sedov.hx.h:
1277a37b5fcSWill Andrews	${CP} ${.IMPSRC} ${.TARGET}
128079654e8SMark Murray
129eb9e1f54SMark Murray.include <bsd.lib.mk>
130eb9e1f54SMark Murray
131ae771770SStanislav Sedov.SUFFIXES: .h .c .x .hx
132ae771770SStanislav Sedov
133eb9e1f54SMark Murray.PATH: ${KRB5DIR}/lib/asn1
134