Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for kernels other than uname #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down