xref: /freebsd/sbin/route/Makefile (revision 911f0260390e18cf85f3dbf2c719b593efdc1e3c)
1#	@(#)Makefile	8.1 (Berkeley) 6/5/93
2# $FreeBSD$
3
4.include <src.opts.mk>
5
6PACKAGE=runtime
7PROG=	route
8MAN=	route.8
9SRCS=	route.c keywords.h
10WARNS?=	3
11CLEANFILES+=keywords.h
12
13CFLAGS+= -DNS
14.if ${MK_INET_SUPPORT} != "no"
15CFLAGS+= -DINET
16.endif
17.if ${MK_INET6_SUPPORT} != "no"
18CFLAGS+= -DINET6
19.endif
20CFLAGS+= -I.
21
22.if ${MK_NETLINK_SUPPORT} != "no"
23SRCS+= route_netlink.c
24.else
25CFLAGS+=-DWITHOUT_NETLINK
26.endif
27
28.if ${MK_JAIL} != "no" && !defined(RESCUE)
29CFLAGS+= -DJAIL
30LIBADD+= jail
31.endif
32
33HAS_TESTS=
34SUBDIR.${MK_TESTS}+= tests
35
36keywords.h: keywords
37	LC_ALL=C awk '!/^#|^$$/ { \
38		printf "#define\tK_%s\t%d\n\t{\"%s\", K_%s},\n", \
39		    toupper($$1), ++L, $$1, toupper($$1); \
40	}' < ${.CURDIR}/keywords > ${.TARGET} || (rm -f ${.TARGET}; false)
41
42.include <bsd.prog.mk>
43