1# $FreeBSD$ 2 3.include <bsd.own.mk> 4 5.if ${MK_LDNS_UTILS} != "no" 6 7LDNSDIR= ${.CURDIR}/../../contrib/ldns 8LDNSHOSTDIR= ${.CURDIR}/../../contrib/ldns-host 9 10.PATH: ${LDNSHOSTDIR} 11 12PROG= host 13SRCS= ldns-host.c 14MAN= host.1 15 16host.1: ldns-host.1 17 sed -e 's/ldns-//gI' <${.ALLSRC} >${.TARGET} || \ 18 (rm -rf ${.TARGET} ; false) 19 20CFLAGS+= -I${LDNSDIR} 21DPADD+= ${LIBLDNS} ${LIBCRYPTO} 22LDADD+= -lldns -lcrypto 23USEPRIVATELIB= ldns 24 25.else 26 27BIND_DIR= ${.CURDIR}/../../contrib/bind9 28LIB_BIND_REL= ../../lib/bind 29LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL} 30SRCDIR= ${BIND_DIR}/bin/dig 31 32.include "${LIB_BIND_DIR}/config.mk" 33 34PROG= host 35 36.PATH: ${SRCDIR} 37SRCS+= dighost.c host.c 38 39CFLAGS+= -I${SRCDIR}/include 40CFLAGS+= -I${BIND_DIR}/lib/isc/${ISC_ATOMIC_ARCH}/include 41 42WARNS?= 0 43 44DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} 45LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} 46 47.endif 48 49.include <bsd.prog.mk> 50