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