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