# Copyright (C) 2009, 2012-2014  Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

srcdir =	@srcdir@
VPATH =		@srcdir@
top_srcdir =	@top_srcdir@

@BIND9_VERSION@

@BIND9_MAKE_INCLUDES@

CINCLUDES =	-I${srcdir}/include -I../dns/include \
		${DNS_INCLUDES} ${ISC_INCLUDES} \
		-I${top_srcdir}/lib/irs/include \
		-I../../lib/irs/include

CDEFINES =	-DVERSION=\"${VERSION}\" -DSYSCONFDIR=\"${sysconfdir}\"
CWARNINGS =

ISCLIBS =	../isc/libisc.@A@
DNSLIBS =	../dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCCFGLIBS =	../isccfg/libisccfg.@A@
IRSLIBS =	../irs/libirs.@A@

ISCDEPLIBS =	../isc/libisc.@A@
DNSDEPLIBS =	../dns/libdns.@A@
ISCCFGDEPLIBS =	../isccfg/libisccfg.@A@
IRSDEPLIBS =	../irs/libirs.@A@

DEPLIBS =	${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS}

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

SUBDIRS =

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

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

UOBJS =

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

MANPAGES =

HTMLPAGES =

MANOBJS =	${MANPAGES} ${HTMLPAGES}

@BIND9_MAKE_RULES@

resolve@EXEEXT@: resolve.@O@ ${IRSDEPLIBS} ${DEPLIBS}
	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
	resolve.@O@ ${IRSLIBS} ${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}

doc man:: ${MANOBJS}

docclean manclean maintainer-clean::
	rm -f ${MANOBJS}

clean distclean maintainer-clean::
	rm -f ${TARGETS}
	rm -f sample.key
