>From 9a959c2a542d3c7f584e26dca2673dd7dd1ef8fb Mon Sep 17 00:00:00 2001 From: Mikk <[email protected]> Date: Wed, 21 Aug 2019 06:48:02 +0300 Subject: [PATCH] Makefile: rework kernel version logic
This makes depmod actually work when building/installing the module for a kernel other than the currently running one Signed-off-by: Mikk <[email protected]> --- src/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 24b2ba0..d0d6c4d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,7 +2,8 @@ # # Copyright (C) 2015-2019 Jason A. Donenfeld <[email protected]>. All Rights Reserved. -KERNELDIR ?= /lib/modules/$(shell uname -r)/build +KVER ?= $(shell uname -r) +KERNELDIR ?= /lib/modules/$(KVER)/build PREFIX ?= /usr DESTDIR ?= SRCDIR ?= $(PREFIX)/src @@ -45,7 +46,7 @@ clean: module-install: @$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install - $(DEPMOD) -a + $(DEPMOD) -a $(KVER) install: module-install tools-install -- 2.23.0 _______________________________________________ WireGuard mailing list [email protected] https://lists.zx2c4.com/mailman/listinfo/wireguard
