summaryrefslogtreecommitdiff
path: root/usr.bin/dig/Makefile
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-02-07 09:58:55 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-02-07 09:58:55 +0000
commit0206bf0302d01f1ded5e327f1f25cb6efe31c0c4 (patch)
treeb0a81aca22c308c71123c50363c3e2bbfe93acf7 /usr.bin/dig/Makefile
parent88b00eb7b69cdda196f896af223d1ae3cc2a792a (diff)
Move dig(1) and needed DNS libraries into it's own source directory in
usr.bin/dig. From the beginning when we started to remove unneeded nameserver code, it was our goal to extract dig functionality from the bind sources, for everyone's benefit as this is easier to reason about. In total we removed about 2/3 or over 300.000 lines of code. We kept the lib/ subdirectory layout but moved the content of bin/ to the top from the old bind source directory. Previous sources and history can be found in the src/usr.sbin/bind Attic. With & OK deraadt Proposed directory layout sounds good to sthen
Diffstat (limited to 'usr.bin/dig/Makefile')
-rw-r--r--usr.bin/dig/Makefile52
1 files changed, 52 insertions, 0 deletions
diff --git a/usr.bin/dig/Makefile b/usr.bin/dig/Makefile
new file mode 100644
index 00000000000..6e1ff9da0c9
--- /dev/null
+++ b/usr.bin/dig/Makefile
@@ -0,0 +1,52 @@
+# $OpenBSD: Makefile,v 1.1 2020/02/07 09:58:52 florian Exp $
+
+PROG= dig
+SRCS= dig.c dighost.c host.c nslookup.c
+MAN= dig.1 host.1 nslookup.1
+LINKS= ${BINDIR}/dig ${BINDIR}/host \
+ ${BINDIR}/dig ${BINDIR}/nslookup
+CLEANFILES+= code.h enumclass.h enumtype.h gen gen.d rdatastruct.h
+
+.include "${.CURDIR}/lib/dns/Makefile.inc"
+.include "${.CURDIR}/lib/isc/Makefile.inc"
+.include "${.CURDIR}/lib/isc/unix/Makefile.inc"
+.include "${.CURDIR}/lib/isccfg/Makefile.inc"
+.include "${.CURDIR}/lib/lwres/Makefile.inc"
+
+CFLAGS+= -Wall -I${.CURDIR} -I${.OBJDIR}
+CFLAGS+= -I ${.CURDIR}/bin/dig/include
+CFLAGS+= -I ${.CURDIR}/lib/dns/include
+CFLAGS+= -I ${.CURDIR}/lib/isc/include
+CFLAGS+= -I ${.CURDIR}/lib/isc/unix/include
+CFLAGS+= -I ${.CURDIR}/lib/isccfg/include
+CFLAGS+= -I ${.CURDIR}/lib/lwres/include
+CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS+= -Wmissing-declarations
+CFLAGS+= -Wshadow -Wpointer-arith
+CFLAGS+= -Wsign-compare
+CFLAGS+= -DVERSION=\"9.10.8-P1\"
+YFLAGS=
+LDADD+= -lcrypto
+DPADD+= ${LIBCRYPTO}
+
+BUILDFIRST = enumtype.h enumclass.h rdatastruct.h code.h
+
+gen: lib/dns/gen.c
+ ${HOSTCC} ${CFLAGS} ${.CURDIR}/lib/dns/gen.c -o $@
+
+enumtype.h: gen
+ ./gen -s ${.CURDIR}/lib/dns -t > $@
+
+enumclass.h: gen
+ ./gen -s ${.CURDIR}/lib/dns -c > $@
+
+rdatastruct.h: gen lib/dns/rdata/rdatastructpre.h \
+ lib/dns/rdata/rdatastructsuf.h
+ ./gen -s ${.CURDIR}/lib/dns -i \
+ -P ${.CURDIR}/lib/dns/rdata/rdatastructpre.h \
+ -S ${.CURDIR}/lib/dns/rdata/rdatastructsuf.h > $@
+
+code.h: gen
+ ./gen -s ${.CURDIR}/lib/dns > code.h
+
+.include <bsd.prog.mk>