# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.

srcdir =	@srcdir@
#prefix =	@prefix@
#exec_prefix =	@exec_prefix@

CDEFINES =
CWARNINGS =

DNSLIBS =	-ldns @DNS_CRYPTO_LIBS@
ISCLIBS =	-lisc
ISCCFGLIBS =	-lisccfg
IRSLIBS =	-lirs

LIBS =		${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@

SUBDIRS =

TARGETS =	sample@EXEEXT@ sample-async@EXEEXT@ sample-gai@EXEEXT@ \
		sample-update@EXEEXT@ sample-request@EXEEXT@ nsprobe@EXEEXT@ \
		dlvchecks@EXEEXT@

OBJS =		sample.@O@ sample-async.@O@ sample-gai.@O@ sample-update.@O@ \
		sample-request.@O@ nsprobe.@O@ dlvchecks.@O@

SRCS =		sample.c sample-async.c sample-gai.c sample-update.c \
		sample-request.c nsprobe.c dlvchecks..c

@BIND9_MAKE_RULES@

# The following two may depend on BIND9_MAKE_RULES
CINCLUDES =	-I@export_includedir@
LDFLAGS =	-L@export_libdir@

sample@EXEEXT@: sample.@O@ ${DEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
	sample.@O@ ${LIBS}

sample-async@EXEEXT@: sample-async.@O@ ${DEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
	sample-async.@O@ ${LIBS}

sample-gai@EXEEXT@: sample-gai.@O@ ${IRSDEPLIBS} ${DEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
	sample-gai.@O@ ${IRSLIBS} ${LIBS}

sample-update@EXEEXT@: sample-update.@O@ ${DEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
	sample-update.@O@ ${LIBS}

sample-request@EXEEXT@: sample-request.@O@ ${DEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
	sample-request.@O@ ${LIBS}

nsprobe@EXEEXT@: nsprobe.@O@ ${DEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
	nsprobe.@O@ ${LIBS}

dlvchecks@EXEEXT@: dlvchecks.@O@ ${DEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
	dlvchecks.@O@ ${LIBS}

clean distclean maintainer-clean::
	rm -f ${TARGETS}
