1#	$NetBSD: Makefile,v 1.10 2024/02/21 22:52:53 christos Exp $
2
3NOLINT=yes	# XXX
4LIB=dns
5#USE_SHLIBDIR=   yes
6
7.include <bsd.own.mk>
8
9.include "${.CURDIR}/../Makefile.inc"
10
11DIST=	${IDIST}/lib/dns
12#.include "${DIST}/mapapi"
13
14LIBDPLIBS+=	isc	${.CURDIR}/../libisc
15
16.PATH.c:	${DIST}/unix ${DIST}/sec/dst ${DIST}
17CPPFLAGS+=	-I${BIND_SRCDIR}/include/dns -I${DIST}
18CPPFLAGS+=	-I${IDIST}/lib/isc
19
20CWARNFLAGS.clang+=	-Wno-tautological-constant-out-of-range-compare
21
22.for f in lookup byaddr request sdb validator
23COPTS.${f}.c+=  -Wno-pointer-sign -fno-strict-aliasing
24.endfor
25
26DNSSEC_SRCS=	dst_api.c dst_parse.c \
27	gssapictx.c hmac_link.c key.c openssl_link.c \
28	openssldh_link.c opensslrsa_link.c \
29	opensslecdsa_link.c openssleddsa_link.c
30.if ${MKKERBEROS} != "no"
31DNSSEC_SRCS+=	gssapi_link.c
32
33CWARNFLAGS.clang+=	-Wno-error=tautological-constant-compare
34.endif
35
36# util.h, ISC_REQUIRE
37LINTFLAGS+=	-X 129	# expression has null effect
38# opensslecdsa_link.c, DST_RET does not conform to macro conventions.
39LINTFLAGS+=	-X 193	# statement not reached
40# Most casts are to isc__magic_t and thus look intentional.
41LINTFLAGS+=	-X 247	# pointer cast from '%s' to '%s' may be troublesome
42# 'uint32_tobuffer(token.value.as_ulong' looks obviously wrong but is used in
43# a lot of places.
44LINTFLAGS+=	-X 132	# conversion from '%s' to '%s' may lose accuracy
45LINTFLAGS+=	-X 298	# conversion from '%s' to '%s' may lose accuracy, arg #%d
46
47SRCS=	acl.c adb.c badcache.c byaddr.c cache.c callbacks.c catz.c \
48	clientinfo.c compress.c client.c dyndb.c tsec.c ecs.c \
49	db.c dbiterator.c diff.c dispatch.c dlz.c dns64.c dnsrps.c \
50	dnssec.c \
51	ds.c fixedname.c forward.c ipkeylist.c iptable.c journal.c \
52	kasp.c keydata.c keymgr.c keytable.c log.c \
53	lookup.c master.c masterdump.c message.c name.c ncache.c nsec.c \
54	nsec3.c nta.c order.c peer.c rbt.c rbtdb.c \
55	rcode.c rdata.c rdatalist.c rdataset.c rdatasetiter.c rdataslab.c \
56	request.c resolver.c result.c rootns.c rpz.c rriterator.c rrl.c sdb.c \
57	soa.c ssu.c ssu_external.c stats.c time.c tkey.c transport.c \
58	tsig.c ttl.c private.c validator.c view.c xfrin.c zone.c \
59	zonekey.c zoneverify.c zt.c sdlz.c update.c ${DNSSEC_SRCS}
60
61COPTS.openssl_link.c+= -Wno-error=deprecated-declarations
62COPTS.openssldh_link.c+= -Wno-error=deprecated-declarations
63COPTS.openssldsa_link.c+= -Wno-error=deprecated-declarations
64COPTS.opensslecdsa_link.c+= -Wno-error=deprecated-declarations
65COPTS.openssleddsa_link.c+= -Wno-error=deprecated-declarations
66COPTS.opensslrsa_link.c+= -Wno-error=deprecated-declarations
67
68.include <bsd.lib.mk>
69