1eb9e1f54SMark Murray# $FreeBSD$ 2eb9e1f54SMark Murray 3eb9e1f54SMark MurrayLIB= asn1 4611ff617SStanislav SedovLDFLAGS= -Wl,--no-undefined 5*ae771770SStanislav SedovINCS= asn1_err.h asn1-common.h heim_asn1.h der.h der-protos.h der-private.h 6611ff617SStanislav SedovLDADD= -lcom_err -lroken 7611ff617SStanislav SedovDPADD= ${LIBCOM_ERR} ${LIBROKEN} 8*ae771770SStanislav SedovVERSION_MAP= ${KRB5DIR}/lib/asn1/version-script.map 9069b88ebSMark Murray 1086751859SRuslan ErmilovSRCS= asn1_err.c \ 1111bf3600SRuslan Ermilov asn1_err.h \ 12*ae771770SStanislav Sedov der.c \ 1386751859SRuslan Ermilov der_copy.c \ 1433f12199SDoug Rabson der_cmp.c \ 1586751859SRuslan Ermilov der_free.c \ 1633f12199SDoug Rabson der_format.c \ 1786751859SRuslan Ermilov der_get.c \ 1886751859SRuslan Ermilov der_length.c \ 1986751859SRuslan Ermilov der_put.c \ 2033f12199SDoug Rabson extra.c \ 21*ae771770SStanislav Sedov template.c \ 2286751859SRuslan Ermilov timegm.c \ 23*ae771770SStanislav Sedov ${GEN:S/.x$/.c/:S/.hx$/.h/} 24069b88ebSMark Murray 2586751859SRuslan ErmilovCFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. 26eb9e1f54SMark Murray 27*ae771770SStanislav SedovGEN_RFC2459= asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx 28*ae771770SStanislav SedovGEN_CMS= asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx 29*ae771770SStanislav SedovGEN_K5= asn1_krb5_asn1.x krb5_asn1.hx krb5_asn1-priv.hx 30*ae771770SStanislav SedovGEN_PKINIT= asn1_pkinit_asn1.x pkinit_asn1.hx pkinit_asn1-priv.hx 31*ae771770SStanislav SedovGEN_PKCS8= asn1_pkcs8_asn1.x pkcs8_asn1.hx pkcs8_asn1-priv.hx 32*ae771770SStanislav SedovGEN_PKCS9= asn1_pkcs9_asn1.x pkcs9_asn1.hx pkcs9_asn1-priv.hx 33*ae771770SStanislav SedovGEN_PKCS12= asn1_pkcs12_asn1.x pkcs12_asn1.hx pkcs12_asn1-priv.hx 34*ae771770SStanislav SedovGEN_DIGEST= asn1_digest_asn1.x digest_asn1.hx digest_asn1-priv.hx 35*ae771770SStanislav 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 47*ae771770SStanislav SedovCLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} *_asn1_files 4833f12199SDoug Rabson 49*ae771770SStanislav SedovINCS+= krb5_asn1.h \ 50*ae771770SStanislav Sedov pkinit_asn1.h \ 51*ae771770SStanislav Sedov cms_asn1.h \ 52*ae771770SStanislav Sedov rfc2459_asn1.h \ 53*ae771770SStanislav Sedov pkcs8_asn1.h \ 54*ae771770SStanislav Sedov pkcs9_asn1.h \ 55*ae771770SStanislav Sedov pkcs12_asn1.h \ 56*ae771770SStanislav Sedov digest_asn1.h \ 57*ae771770SStanislav Sedov kx509_asn1.h 5833f12199SDoug Rabson 59*ae771770SStanislav SedovASN1_COMPILE= asn1_compile 6033f12199SDoug Rabson 61*ae771770SStanislav Sedov${GEN_CMS}: cms.asn1 cms.opt 62*ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 63*ae771770SStanislav Sedov --option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1 6433f12199SDoug Rabson 65*ae771770SStanislav Sedov${GEN_RFC2459}: rfc2459.asn1 66*ae771770SStanislav Sedov ${ASN1_COMPILE} \ 67*ae771770SStanislav Sedov --one-code-file \ 6833f12199SDoug Rabson --preserve-binary=TBSCertificate \ 6933f12199SDoug Rabson --preserve-binary=TBSCRLCertList \ 7033f12199SDoug Rabson --preserve-binary=Name \ 7133f12199SDoug Rabson --sequence=GeneralNames \ 7233f12199SDoug Rabson --sequence=Extensions \ 7333f12199SDoug Rabson --sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1 7433f12199SDoug Rabson 75*ae771770SStanislav Sedov${GEN_K5}: krb5.asn1 krb5.opt 76*ae771770SStanislav Sedov ${ASN1_COMPILE} \ 77*ae771770SStanislav Sedov --one-code-file \ 78*ae771770SStanislav Sedov --option-file=${.ALLSRC:M*.opt} \ 79*ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} krb5_asn1 8033f12199SDoug Rabson 81*ae771770SStanislav Sedov${GEN_PKINIT}: pkinit.asn1 82*ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 83*ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} pkinit_asn1 8433f12199SDoug Rabson 85*ae771770SStanislav Sedov${GEN_PKCS8}: pkcs8.asn1 86*ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 87*ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} pkcs8_asn1 8833f12199SDoug Rabson 89*ae771770SStanislav Sedov${GEN_PKCS9}: pkcs9.asn1 90*ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 91*ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} pkcs9_asn1 9233f12199SDoug Rabson 93*ae771770SStanislav Sedov${GEN_PKCS12}: pkcs12.asn1 94*ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 95*ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} pkcs12_asn1 9633f12199SDoug Rabson 97*ae771770SStanislav Sedov${GEN_DIGEST}: digest.asn1 98*ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 99*ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} digest_asn1 10033f12199SDoug Rabson 101*ae771770SStanislav Sedov${GEN_KX509}: kx509.asn1 102*ae771770SStanislav Sedov ${ASN1_COMPILE} --one-code-file \ 103*ae771770SStanislav Sedov ${.ALLSRC:M*.asn1} kx509_asn1 10411bf3600SRuslan Ermilov 105*ae771770SStanislav Sedov.SUFFIXES: .h .c .x .hx 10611bf3600SRuslan Ermilov 107*ae771770SStanislav Sedov.x.c: 108*ae771770SStanislav Sedov cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET} 109*ae771770SStanislav Sedov 110*ae771770SStanislav Sedov.hx.h: 111*ae771770SStanislav Sedov cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET} 112079654e8SMark Murray 113eb9e1f54SMark Murray.include <bsd.lib.mk> 114eb9e1f54SMark Murray 115*ae771770SStanislav Sedov.SUFFIXES: .h .c .x .hx 116*ae771770SStanislav Sedov 117eb9e1f54SMark Murray.PATH: ${KRB5DIR}/lib/asn1 118