SUBDIR=	libipv6 addr6 flow6 frag6 icmp6 jumbo6 \
	na6 ni6 ns6 path6 ra6 rd6 rs6 scan6 tcp6 udp6

all: ${SUBDIR}
addr6 flow6 frag6 icmp6 jumbo6 na6 ni6 ns6 path6 \
	ra6 rd6 rs6 scan6 tcp6 udp6: libipv6

.PATH: ${.CURDIR}/manuals

FILESGROUPS=	CONF DB
CONF=		data/ipv6toolkit.conf
CONFDIR?=	${PREFIX}/etc
DB=		data/oui.txt
DBDIR?=		${PREFIX}/share/ipv6toolkit

PREFIX?=	/usr/local
BINDIR?=	${PREFIX}/bin
MANDIR?=	${PREFIX}/man/man
MAN=		blackhole6.1 script6.1 ipv6toolkit.conf.5 ipv6toolkit.7

data/ipv6toolkit.conf:
	echo "# SI6 Networks' IPv6 Toolkit Configuration File" > ${.TARGET}
	echo OUI-Database=${DESTDIR}${DBDIR}/oui.txt >> ${.TARGET}

beforeinstall:
	install -d -m 0755 ${DESTDIR}${DBDIR}
afterinstall: installfiles maninstall

.include <bsd.prog.mk>
