aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorMikk Mar <mikkmar@airmail.cc>2019-08-28 16:01:25 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-28 07:40:30 -0600
commit5d70da9a27031f5a5af68b1b0726ec268740c6fc (patch)
tree2a849a93cf9262ffb679d59b7ff8dfb1f75d3510 /src
parentcompat: account for android-4.9 backport of addr_gen_mode (diff)
downloadwireguard-linux-compat-5d70da9a27031f5a5af68b1b0726ec268740c6fc.tar.xz
wireguard-linux-compat-5d70da9a27031f5a5af68b1b0726ec268740c6fc.zip
Makefile: allow specifying kernel release
This makes depmod work when building/installing the module for a kernel other than the currently running one. Signed-off-by: Mikk Mar <mikkmar@airmail.cc> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile
index 24b2ba0..8226038 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,8 @@
#
# Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
-KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+KERNELRELEASE ?= $(shell uname -r)
+KERNELDIR ?= /lib/modules/$(KERNELRELEASE)/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 $(KERNELRELEASE)
install: module-install tools-install