diff --git a/Makefile b/Makefile index b8e8179..fc77e28 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ obj-m := nuc_led.o -KVERSION := $(shell uname -r) -KDIR := /lib/modules/$(KVERSION)/build +KVERSION ?= $(shell uname -r) +KDIR ?= /lib/modules/$(KVERSION)/build PWD := $(shell pwd) .PHONY: clean default dkms-add dkms-build dkms-deb dkms-install dkms-rpm dkms-uninstall install @@ -16,20 +16,20 @@ dkms-add: dkms add --force $(PWD) dkms-build: dkms-add - dkms build -m intel-nuc-led -v 1.0 + dkms build -m intel-nuc-led -v 1.0 -k $(KVERSION) dkms-deb: dkms-add dkms mkdeb intel-nuc-led/1.0 --source-only dkms-install: dkms-build - dkms install -m intel-nuc-led -v 1.0 + dkms install -m intel-nuc-led -v 1.0 -k $(KVERSION) @depmod -a $(KVERSION) dkms-rpm: dkms-add dkms mkrpm intel-nuc-led/1.0 --source-only dkms-status: - dkms status intel-nuc-led/1.0 + dkms status intel-nuc-led/1.0 -k $(KVERSION) dkms-uninstall: dkms remove -m intel-nuc-led -v 1.0 --all