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