Makefile revision 233294
156067Smarkm# $FreeBSD: head/kerberos5/lib/libasn1/Makefile 233294 2012-03-22 08:48:42Z stas $
256067Smarkm
356067SmarkmLIB=	asn1
4225778SstasLDFLAGS=	-Wl,--no-undefined
5233294SstasINCS=	asn1_err.h asn1-common.h heim_asn1.h der.h der-protos.h der-private.h
6225778SstasLDADD=	-lcom_err -lroken
7225778SstasDPADD=	${LIBCOM_ERR} ${LIBROKEN}
8233294SstasVERSION_MAP=	${KRB5DIR}/lib/asn1/version-script.map
9117728Smarkm
10125491SruSRCS=	asn1_err.c \
11125491Sru	asn1_err.h \
12233294Sstas	der.c \
13125491Sru	der_copy.c \
14178828Sdfr	der_cmp.c \
15125491Sru	der_free.c \
16178828Sdfr	der_format.c \
17125491Sru	der_get.c \
18125491Sru	der_length.c \
19125491Sru	der_put.c \
20178828Sdfr	extra.c \
21233294Sstas	template.c \
22125491Sru	timegm.c \
23233294Sstas	${GEN:S/.x$/.c/:S/.hx$/.h/}
2456067Smarkm
25125491SruCFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I.
26117728Smarkm
27233294SstasGEN_RFC2459=	asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx
28233294SstasGEN_CMS= 	asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx
29233294SstasGEN_K5=		asn1_krb5_asn1.x krb5_asn1.hx krb5_asn1-priv.hx
30233294SstasGEN_PKINIT= 	asn1_pkinit_asn1.x pkinit_asn1.hx pkinit_asn1-priv.hx
31233294SstasGEN_PKCS8=	asn1_pkcs8_asn1.x pkcs8_asn1.hx pkcs8_asn1-priv.hx
32233294SstasGEN_PKCS9=	asn1_pkcs9_asn1.x pkcs9_asn1.hx pkcs9_asn1-priv.hx
33233294SstasGEN_PKCS12=	asn1_pkcs12_asn1.x pkcs12_asn1.hx pkcs12_asn1-priv.hx
34233294SstasGEN_DIGEST=	asn1_digest_asn1.x digest_asn1.hx digest_asn1-priv.hx
35233294SstasGEN_KX509=	asn1_kx509_asn1.x kx509_asn1.hx kx509_asn1-priv.hx
36178828Sdfr
37178828SdfrGEN+=	${GEN_RFC2459}
38178828SdfrGEN+=	${GEN_CMS}
39178828SdfrGEN+=	${GEN_K5}
40178828SdfrGEN+=	${GEN_PKINIT}
41178828SdfrGEN+=	${GEN_PKCS8}
42178828SdfrGEN+=	${GEN_PKCS9}
43178828SdfrGEN+=	${GEN_PKCS12}
44178828SdfrGEN+=	${GEN_DIGEST}
45178828SdfrGEN+=	${GEN_KX509}
46178828Sdfr
47233294SstasCLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} *_asn1_files
48178828Sdfr
49233294SstasINCS+=	krb5_asn1.h \
50233294Sstas	pkinit_asn1.h \
51233294Sstas	cms_asn1.h \
52233294Sstas	rfc2459_asn1.h \
53233294Sstas	pkcs8_asn1.h \
54233294Sstas	pkcs9_asn1.h \
55233294Sstas	pkcs12_asn1.h \
56233294Sstas	digest_asn1.h \
57233294Sstas	kx509_asn1.h
58178828Sdfr
59233294SstasASN1_COMPILE=	asn1_compile
60178828Sdfr
61233294Sstas${GEN_CMS}: cms.asn1 cms.opt
62233294Sstas	${ASN1_COMPILE} --one-code-file \
63233294Sstas		--option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1
64178828Sdfr
65233294Sstas${GEN_RFC2459}: rfc2459.asn1
66233294Sstas	${ASN1_COMPILE} \
67233294Sstas		--one-code-file \
68178828Sdfr		--preserve-binary=TBSCertificate \
69178828Sdfr		--preserve-binary=TBSCRLCertList \
70178828Sdfr		--preserve-binary=Name \
71178828Sdfr		--sequence=GeneralNames \
72178828Sdfr		--sequence=Extensions \
73178828Sdfr		--sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1
74178828Sdfr
75233294Sstas${GEN_K5}: krb5.asn1 krb5.opt
76233294Sstas	${ASN1_COMPILE} \
77233294Sstas		--one-code-file \
78233294Sstas		--option-file=${.ALLSRC:M*.opt} \
79233294Sstas		${.ALLSRC:M*.asn1} krb5_asn1
80178828Sdfr
81233294Sstas${GEN_PKINIT}: pkinit.asn1
82233294Sstas	${ASN1_COMPILE} --one-code-file \
83233294Sstas		${.ALLSRC:M*.asn1} pkinit_asn1
84178828Sdfr
85233294Sstas${GEN_PKCS8}: pkcs8.asn1
86233294Sstas	${ASN1_COMPILE} --one-code-file \
87233294Sstas		${.ALLSRC:M*.asn1} pkcs8_asn1
88178828Sdfr
89233294Sstas${GEN_PKCS9}: pkcs9.asn1
90233294Sstas	${ASN1_COMPILE} --one-code-file \
91233294Sstas		${.ALLSRC:M*.asn1} pkcs9_asn1
92178828Sdfr
93233294Sstas${GEN_PKCS12}: pkcs12.asn1
94233294Sstas	${ASN1_COMPILE} --one-code-file \
95233294Sstas		${.ALLSRC:M*.asn1} pkcs12_asn1
96178828Sdfr
97233294Sstas${GEN_DIGEST}: digest.asn1
98233294Sstas	${ASN1_COMPILE} --one-code-file \
99233294Sstas		${.ALLSRC:M*.asn1} digest_asn1
100178828Sdfr
101233294Sstas${GEN_KX509}: kx509.asn1
102233294Sstas	${ASN1_COMPILE} --one-code-file \
103233294Sstas		${.ALLSRC:M*.asn1} kx509_asn1
104178828Sdfr
105233294Sstas.SUFFIXES: .h .c .x .hx
10656067Smarkm
107233294Sstas.x.c:
108233294Sstas	cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET}
10956067Smarkm
110233294Sstas.hx.h:
111233294Sstas	cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET}
112233294Sstas	
113125261Sru.include <bsd.lib.mk>
11456067Smarkm
115233294Sstas.SUFFIXES: .h .c .x .hx
116233294Sstas
117125491Sru.PATH: ${KRB5DIR}/lib/asn1
118