# /usr/src/etc/named/tools/Makefile for MacMach

include /usr/src/COPYRIGHTS

CFLAGS=	-O
RES=
LIBC=	/lib/libc.a
SRCS=	nsquery.c nstest.c
OBJS=	nsquery.o nstest.o

all:	.depend nsquery nstest nslookup

nsquery: ${LIBC}
	${CC} -o $@ nsquery.c ${RES}

# test programs and utilities
nstest: ${LIBC}
	@echo "The resolver routines in libc must be compiled with the -DDEBUG"
	@echo "option or nstest will not have any output."
	${CC} -o $@ nstest.c ${RES}

nslookup:	FRC
	cd nslookup; make ${MFLAGS} RES=${RES}

install: FRC
	cd nslookup; make ${MFLAGS} DESTDIR=${DESTDIR} install

clean:	FRC
	cd nslookup; make ${MFLAGS} clean
	rm -f .depend ${OBJS} core nsquery nstest

compress: clean
	find . -type f ! -name Makefile ! -name '*.Z' -exec compress {} \;

uncompress: FRC
	find . -type f ! -name Makefile -name '*.Z' -exec uncompress {} \;

.depend: ${SRCS}
	@echo "#`date`" >.depend
	mkdep -p -f .depend ${CFLAGS} ${SRCS}

-include .depend

FRC:
