summaryrefslogtreecommitdiff
path: root/kerberosV/lib/libasn1/Makefile
blob: 2360a60deb595be5feb1e4e7ce989dc257b365f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# $OpenBSD: Makefile,v 1.5 2013/07/02 19:00:09 ajacoutot Exp $

LIB=	asn1
INCS=	asn1_err.h asn1-common.h heim_asn1.h der.h der-protos.h der-private.h

SRCS=	asn1_err.c \
	asn1_err.h \
	der.c \
	der_copy.c \
	der_cmp.c \
	der_free.c \
	der_format.c \
	der_get.c \
	der_length.c \
	der_put.c \
	extra.c \
	template.c \
	timegm.c \
	roken.h \
	${GEN:S/.x$/.c/:S/.hx$/.h/}

CPPFLAGS=	-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/com_err -I.

GEN_RFC2459=	asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx
GEN_CMS= 	asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx
GEN_K5=		asn1_krb5_asn1.x krb5_asn1.hx krb5_asn1-priv.hx
GEN_DIGEST=	asn1_digest_asn1.x digest_asn1.hx digest_asn1-priv.hx

GEN+=	${GEN_RFC2459}
GEN+=	${GEN_CMS}
GEN+=	${GEN_K5}
GEN+=	${GEN_DIGEST}

CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} *_asn1_files

INCS+=	krb5_asn1.h \
	cms_asn1.h \
	rfc2459_asn1.h \
	digest_asn1.h

${GEN_CMS}: cms.asn1 cms.opt
	${ASN1_COMPILE} --one-code-file \
		--option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1

${GEN_RFC2459}: rfc2459.asn1
	${ASN1_COMPILE} \
		--one-code-file \
		--preserve-binary=TBSCertificate \
		--preserve-binary=TBSCRLCertList \
		--preserve-binary=Name \
		--sequence=GeneralNames \
		--sequence=Extensions \
		--sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1

${GEN_K5}: krb5.asn1 krb5.opt
	${ASN1_COMPILE} \
		--one-code-file \
		--option-file=${.ALLSRC:M*.opt} \
		${.ALLSRC:M*.asn1} krb5_asn1

${GEN_DIGEST}: digest.asn1
	${ASN1_COMPILE} --one-code-file \
		${.ALLSRC:M*.asn1} digest_asn1

.SUFFIXES: .h .c .x .hx

.x.c:
	cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET}

.hx.h:
	cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET}

.include <bsd.lib.mk>

.SUFFIXES: .h .c .x .hx

.PATH: ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include ${.CURDIR}/../../include