freebsd-dev/sbin/route/Makefile
Alexander V. Chernikov c597432e22 route(8): convert to netlink
This change converts all kernel rtsock interactions in route(8)
 to Netlink.

Based on the WITHOUT_NETLINK_SUPPORT src.conf(5) variable, route(8)
 now fully operates either via Netlink or via rtsock/sysctl.
The default (compile-time) is Netlink.

The output for route delete/add/get/flush is targeted to be exactly
 the same (apart from some error handling cases).
The output for the route monitor has been changed to improve
 readability and support netlink models.

Other behaviour changes:
* exact prefix lookup (route -n get a.b.c.d/e) is not yet supported.
* route monitor does not show the change originator yet.

Differential Revision:	https://reviews.freebsd.org/D39007
2023-03-26 11:06:56 +00:00

38 lines
689 B
Makefile

# @(#)Makefile 8.1 (Berkeley) 6/5/93
# $FreeBSD$
.include <src.opts.mk>
PACKAGE=runtime
PROG= route
MAN= route.8
SRCS= route.c keywords.h
WARNS?= 3
CLEANFILES+=keywords.h
CFLAGS+= -DNS
.if ${MK_INET_SUPPORT} != "no"
CFLAGS+= -DINET
.endif
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif
CFLAGS+= -I.
.if ${MK_NETLINK_SUPPORT} != "no"
SRCS+= route_netlink.c
.else
CFLAGS+=-DWITHOUT_NETLINK
.endif
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
keywords.h: keywords
LC_ALL=C awk '!/^#|^$$/ { \
printf "#define\tK_%s\t%d\n\t{\"%s\", K_%s},\n", \
toupper($$1), ++L, $$1, toupper($$1); \
}' < ${.CURDIR}/keywords > ${.TARGET} || (rm -f ${.TARGET}; false)
.include <bsd.prog.mk>