1# $FreeBSD$ 2 3LIB= asn1 4LDFLAGS= -Wl,--no-undefined 5INCS= asn1_err.h asn1-common.h heim_asn1.h der.h der-protos.h der-private.h 6LDADD= -lcom_err -lroken 7DPADD= ${LIBCOM_ERR} ${LIBROKEN} 8VERSION_MAP= ${.CURDIR}/version.map 9 10SRCS= asn1_err.c \ 11 asn1_err.h \ 12 der.c \ 13 der_copy.c \ 14 der_cmp.c \ 15 der_free.c \ 16 der_format.c \ 17 der_get.c \ 18 der_length.c \ 19 der_put.c \ 20 extra.c \ 21 template.c \ 22 timegm.c \ 23 ${GEN:S/.x$/.c/:S/.hx$/.h/} 24 25CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. 26 27GEN_RFC2459= asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx 28GEN_CMS= asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx 29GEN_K5= asn1_krb5_asn1.x krb5_asn1.hx krb5_asn1-priv.hx 30GEN_PKINIT= asn1_pkinit_asn1.x pkinit_asn1.hx pkinit_asn1-priv.hx 31GEN_PKCS8= asn1_pkcs8_asn1.x pkcs8_asn1.hx pkcs8_asn1-priv.hx 32GEN_PKCS9= asn1_pkcs9_asn1.x pkcs9_asn1.hx pkcs9_asn1-priv.hx 33GEN_PKCS12= asn1_pkcs12_asn1.x pkcs12_asn1.hx pkcs12_asn1-priv.hx 34GEN_DIGEST= asn1_digest_asn1.x digest_asn1.hx digest_asn1-priv.hx 35GEN_KX509= asn1_kx509_asn1.x kx509_asn1.hx kx509_asn1-priv.hx 36 37GEN+= ${GEN_RFC2459} 38GEN+= ${GEN_CMS} 39GEN+= ${GEN_K5} 40GEN+= ${GEN_PKINIT} 41GEN+= ${GEN_PKCS8} 42GEN+= ${GEN_PKCS9} 43GEN+= ${GEN_PKCS12} 44GEN+= ${GEN_DIGEST} 45GEN+= ${GEN_KX509} 46 47CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} *_asn1_files 48 49INCS+= krb5_asn1.h \ 50 pkinit_asn1.h \ 51 cms_asn1.h \ 52 rfc2459_asn1.h \ 53 pkcs8_asn1.h \ 54 pkcs9_asn1.h \ 55 pkcs12_asn1.h \ 56 digest_asn1.h \ 57 kx509_asn1.h 58 59.ORDER: ${GEN_CMS} 60${GEN_CMS}: cms.asn1 cms.opt 61 ${ASN1_COMPILE} --one-code-file \ 62 --option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1 63 64.ORDER: ${GEN_RFC2459} 65${GEN_RFC2459}: rfc2459.asn1 66 ${ASN1_COMPILE} \ 67 --one-code-file \ 68 --preserve-binary=TBSCertificate \ 69 --preserve-binary=TBSCRLCertList \ 70 --preserve-binary=Name \ 71 --sequence=GeneralNames \ 72 --sequence=Extensions \ 73 --sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1 74 75.ORDER: ${GEN_K5} 76${GEN_K5}: krb5.asn1 krb5.opt 77 ${ASN1_COMPILE} \ 78 --one-code-file \ 79 --option-file=${.ALLSRC:M*.opt} \ 80 ${.ALLSRC:M*.asn1} krb5_asn1 81 82.ORDER: ${GEN_PKINIT} 83${GEN_PKINIT}: pkinit.asn1 84 ${ASN1_COMPILE} --one-code-file \ 85 ${.ALLSRC:M*.asn1} pkinit_asn1 86 87.ORDER: ${GEN_PKCS8} 88${GEN_PKCS8}: pkcs8.asn1 89 ${ASN1_COMPILE} --one-code-file \ 90 ${.ALLSRC:M*.asn1} pkcs8_asn1 91 92.ORDER: ${GEN_PKCS9} 93${GEN_PKCS9}: pkcs9.asn1 94 ${ASN1_COMPILE} --one-code-file \ 95 ${.ALLSRC:M*.asn1} pkcs9_asn1 96 97.ORDER: ${GEN_PKCS12} 98${GEN_PKCS12}: pkcs12.asn1 99 ${ASN1_COMPILE} --one-code-file \ 100 ${.ALLSRC:M*.asn1} pkcs12_asn1 101 102.ORDER: ${GEN_DIGEST} 103${GEN_DIGEST}: digest.asn1 104 ${ASN1_COMPILE} --one-code-file \ 105 ${.ALLSRC:M*.asn1} digest_asn1 106 107.ORDER: ${GEN_KX509} 108${GEN_KX509}: kx509.asn1 109 ${ASN1_COMPILE} --one-code-file \ 110 ${.ALLSRC:M*.asn1} kx509_asn1 111 112.SUFFIXES: .h .c .x .hx 113 114.x.c: 115 cp -f ${.IMPSRC} ${.TARGET} 116 117.hx.h: 118 cp -f ${.IMPSRC} ${.TARGET} 119 120.include <bsd.lib.mk> 121 122.SUFFIXES: .h .c .x .hx 123 124.PATH: ${KRB5DIR}/lib/asn1 125