build: only include compat.h for if_wg.c and fix build with an obj directory

In particular, this permits building the module as part of a kernel
build via the LOCAL_MODULES facility.

Signed-off-by: John Baldwin <jhb@FreeBSD.org>
This commit is contained in:
John Baldwin 2021-08-27 14:59:42 -07:00 committed by Jason A. Donenfeld
parent b5cb87eebb
commit 54b2075e29
1 changed files with 1 additions and 1 deletions

View File

@ -6,6 +6,6 @@ SRCS= opt_inet.h opt_inet6.h device_if.h bus_if.h ifdi_if.h
SRCS+= if_wg.c wg_noise.c wg_cookie.c crypto.c
CFLAGS+= -include compat.h
CFLAGS.if_wg.c+= -include ${.CURDIR}/compat.h
.include <bsd.kmod.mk>