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