1eb9e1f54SMark Murray# $FreeBSD$ 2eb9e1f54SMark Murray 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 2486751859SRuslan ErmilovCFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. 25eb9e1f54SMark Murray 26ae771770SStanislav SedovGEN_RFC2459= asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx 27ae771770SStanislav SedovGEN_CMS= asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx 28ae771770SStanislav SedovGEN_K5= asn1_krb5_asn1.x krb5_asn1.hx krb5_asn1-priv.hx 29ae771770SStanislav SedovGEN_PKINIT= asn1_pkinit_asn1.x pkinit_asn1.hx pkinit_asn1-priv.hx 30ae771770SStanislav SedovGEN_PKCS8= asn1_pkcs8_asn1.x pkcs8_asn1.hx pkcs8_asn1-priv.hx 31ae771770SStanislav SedovGEN_PKCS9= asn1_pkcs9_asn1.x pkcs9_asn1.hx pkcs9_asn1-priv.hx 32ae771770SStanislav SedovGEN_PKCS12= asn1_pkcs12_asn1.x pkcs12_asn1.hx pkcs12_asn1-priv.hx 33ae771770SStanislav SedovGEN_DIGEST= asn1_digest_asn1.x digest_asn1.hx digest_asn1-priv.hx 34ae771770SStanislav SedovGEN_KX509= asn1_kx509_asn1.x kx509_asn1.hx kx509_asn1-priv.hx 3533f12199SDoug Rabson 3633f12199SDoug RabsonGEN+= ${GEN_RFC2459} 3733f12199SDoug RabsonGEN+= ${GEN_CMS} 3833f12199SDoug RabsonGEN+= ${GEN_K5} 3933f12199SDoug RabsonGEN+= ${GEN_PKINIT} 4033f12199SDoug RabsonGEN+= ${GEN_PKCS8} 4133f12199SDoug RabsonGEN+= ${GEN_PKCS9} 4233f12199SDoug RabsonGEN+= ${GEN_PKCS12} 4333f12199SDoug RabsonGEN+= ${GEN_DIGEST} 4433f12199SDoug RabsonGEN+= ${GEN_KX509} 4533f12199SDoug Rabson 46ae771770SStanislav SedovCLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} *_asn1_files 4733f12199SDoug Rabson 48ae771770SStanislav SedovINCS+= krb5_asn1.h \ 49ae771770SStanislav Sedov pkinit_asn1.h \ 50ae771770SStanislav Sedov cms_asn1.h \ 51ae771770SStanislav Sedov rfc2459_asn1.h \ 52ae771770SStanislav Sedov pkcs8_asn1.h \ 53ae771770SStanislav Sedov pkcs9_asn1.h \ 54ae771770SStanislav Sedov pkcs12_asn1.h \ 55ae771770SStanislav Sedov digest_asn1.h \ 56ae771770SStanislav Sedov kx509_asn1.h 5733f12199SDoug Rabson 58f0258c45SPeter Wemm.ORDER: ${GEN_CMS} 59ae771770SStanislav Sedov${GEN_CMS}: cms.asn1 cms.opt 60ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 61ae771770SStanislav Sedov --option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1 6233f12199SDoug Rabson 63f0258c45SPeter Wemm.ORDER: ${GEN_RFC2459} 64ae771770SStanislav Sedov${GEN_RFC2459}: rfc2459.asn1 65ae771770SStanislav Sedov ${ASN1_COMPILE} \ 66ae771770SStanislav Sedov --one-code-file \ 6733f12199SDoug Rabson --preserve-binary=TBSCertificate \ 6833f12199SDoug Rabson --preserve-binary=TBSCRLCertList \ 6933f12199SDoug Rabson --preserve-binary=Name \ 7033f12199SDoug Rabson --sequence=GeneralNames \ 7133f12199SDoug Rabson --sequence=Extensions \ 7233f12199SDoug Rabson --sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1 7333f12199SDoug Rabson 74f0258c45SPeter Wemm.ORDER: ${GEN_K5} 75ae771770SStanislav Sedov${GEN_K5}: krb5.asn1 krb5.opt 76ae771770SStanislav Sedov ${ASN1_COMPILE} \ 77ae771770SStanislav Sedov --one-code-file \ 78ae771770SStanislav Sedov --option-file=${.ALLSRC:M*.opt} \ 79ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} krb5_asn1 8033f12199SDoug Rabson 81f0258c45SPeter Wemm.ORDER: ${GEN_PKINIT} 82ae771770SStanislav Sedov${GEN_PKINIT}: pkinit.asn1 83ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 84ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} pkinit_asn1 8533f12199SDoug Rabson 86f0258c45SPeter Wemm.ORDER: ${GEN_PKCS8} 87ae771770SStanislav Sedov${GEN_PKCS8}: pkcs8.asn1 88ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 89ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} pkcs8_asn1 9033f12199SDoug Rabson 91f0258c45SPeter Wemm.ORDER: ${GEN_PKCS9} 92ae771770SStanislav Sedov${GEN_PKCS9}: pkcs9.asn1 93ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 94ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} pkcs9_asn1 9533f12199SDoug Rabson 96f0258c45SPeter Wemm.ORDER: ${GEN_PKCS12} 97ae771770SStanislav Sedov${GEN_PKCS12}: pkcs12.asn1 98ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 99ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} pkcs12_asn1 10033f12199SDoug Rabson 101f0258c45SPeter Wemm.ORDER: ${GEN_DIGEST} 102ae771770SStanislav Sedov${GEN_DIGEST}: digest.asn1 103ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 104ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} digest_asn1 10533f12199SDoug Rabson 106f0258c45SPeter Wemm.ORDER: ${GEN_KX509} 107ae771770SStanislav Sedov${GEN_KX509}: kx509.asn1 108ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 109ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} kx509_asn1 11011bf3600SRuslan Ermilov 111ae771770SStanislav Sedov.SUFFIXES: .h .c .x .hx 11211bf3600SRuslan Ermilov 113ae771770SStanislav Sedov.x.c: 114*7a37b5fcSWill Andrews ${CP} ${.IMPSRC} ${.TARGET} 115ae771770SStanislav Sedov 116ae771770SStanislav Sedov.hx.h: 117*7a37b5fcSWill Andrews ${CP} ${.IMPSRC} ${.TARGET} 118079654e8SMark Murray 119eb9e1f54SMark Murray.include <bsd.lib.mk> 120eb9e1f54SMark Murray 121ae771770SStanislav Sedov.SUFFIXES: .h .c .x .hx 122ae771770SStanislav Sedov 123eb9e1f54SMark Murray.PATH: ${KRB5DIR}/lib/asn1 124