From: Ricardo Mendoza <[email protected]>

When building in an environment with a different modules install path
we need to be able to also override the depmod basedir flag.

Signed-off-by: Ricardo Mendoza <[email protected]>
---
 src/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Makefile b/src/Makefile
index c20bfd3..35e8e98 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -9,6 +9,7 @@ DESTDIR ?=
 SRCDIR ?= $(PREFIX)/src
 DKMSDIR ?= $(SRCDIR)/wireguard
 DEPMOD ?= depmod
+MODBASE ?= /
 
 PWD := $(shell pwd)
 
@@ -32,7 +33,7 @@ clean:
 
 module-install:
        @$(MAKE) -C $(KERNELDIR) M=$(PWD) 
WIREGUARD_VERSION="$(WIREGUARD_VERSION)" modules_install
-       $(DEPMOD) -a $(KERNELRELEASE)
+       $(DEPMOD) -b $(MODBASE) -a $(KERNELRELEASE)
 
 install: module-install
 
-- 
2.17.1

Reply via email to