From e7601c07dab520f2a974127607895ca829180906 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 27 Nov 2019 16:32:23 +0100 Subject: [PATCH] Fix path to kernel build dir. (#14) Don't use version of the currently running kernel, but the version the module is build for (when buildung for multiple installed kernels or during kernel upgrades). --- Makefile | 3 ++- dkms.conf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c93d77b..2f28c46 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -KDIR ?= /lib/modules/`uname -r`/build +KVERSION := `uname -r` +KDIR := /lib/modules/${KVERSION}/build default: $(MAKE) -C $(KDIR) M=$$PWD diff --git a/dkms.conf b/dkms.conf index 9fae752..87004c9 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,6 +1,6 @@ PACKAGE_NAME="new-lg4ff" PACKAGE_VERSION="0.1" -MAKE[0]="make" +MAKE[0]="make KVERSION=$kernelver" CLEAN="make clean" BUILT_MODULE_NAME[0]="hid-logitech-new" DEST_MODULE_NAME[0]="hid-logitech"