1# $NetBSD: Makefile,v 1.2 2013/09/11 23:04:09 joerg Exp $
2
3USE_FORT?= yes	# network protocol library
4
5.include <bsd.own.mk>
6.include <${.CURDIR}/../../Makefile.inc>
7
8.PATH:		${HEIMDIST}/lib/asn1 ${HEIMBASE}/include
9
10LIB=		asn1
11
12LIBDPLIBS+=	com_err	${.CURDIR}/../libcom_err
13LIBDPLIBS+=	roken	${.CURDIR}/../libroken
14
15HEIMSRCS =		\
16	asn1_err.et	\
17	krb5.asn1	\
18	cms.asn1	\
19	rfc2459.asn1	\
20	pkinit.asn1	\
21	pkcs12.asn1	\
22	pkcs8.asn1	\
23	pkcs9.asn1	\
24	digest.asn1	\
25	kx509.asn1
26
27ASN1_OPTS.rfc2459.asn1 = \
28	--one-code-file				\
29	--preserve-binary=TBSCertificate	\
30	--preserve-binary=TBSCRLCertList	\
31	--preserve-binary=Name			\
32	--sequence=GeneralNames			\
33	--sequence=Extensions			\
34	--sequence=CRLDistributionPoints
35
36INCSDIR= /usr/include/krb5
37
38INCS=	asn1-common.h		\
39	heim_asn1.h		\
40	der.h			\
41	der-protos.h		\
42	${COMPILE_ET_INCS}	\
43	${ASN1_INCS}
44
45SRCS=			\
46	der.c		\
47	der_get.c	\
48	der_put.c	\
49	der_free.c	\
50	der_length.c	\
51	der_copy.c	\
52	der_cmp.c	\
53	der_format.c	\
54	extra.c		\
55	timegm.c
56
57.if ${USETOOLS} != "yes"
58# .PHONY: ${ASN1COMPILEOBJ}/asn1_compile
59.PHONY: try_to_build_asn1_compile
60
61try_to_build_asn1_compile:
62	@cd ${.CURDIR}/asn1_compile && ${MAKE}
63
64${ASN1COMPILEOBJ}/asn1_compile: try_to_build_asn1_compile
65
66SUBDIR=	asn1_compile
67.endif
68
69.include <${HEIMBASE}/Makefile.rules.inc>
70.include <bsd.lib.mk>
71.if ${USETOOLS} != "yes"
72.include <bsd.subdir.mk>
73.endif
74