From e42e3edca03f3cbefc3f44649c62948ae50066bb Mon Sep 17 00:00:00 2001 From: Dario Pagani <> Date: Fri, 15 Jan 2021 14:58:38 +0100 Subject: Allowing for a different KDIR to be used when calling make --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d666a97..dd5d7a0 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ obj-m += hid-tminit.o +KDIR ?= /lib/modules/$(shell uname -r)/build all: - make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules + make -C $(KDIR) M=$(shell pwd) modules install: - make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules_install + make -C $(KDIR) M=$(shell pwd) modules_install clean: - make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) clean + make -C $(KDIR) M=$(shell pwd) clean -- cgit v1.3