Skip to content

Commit

Permalink
Support DKMS specified kernel version (#26)
Browse files Browse the repository at this point in the history
* Allow DKMS to specify the kernel version to be built

* Default when not using DKMS KERNELRELEASE to current kernel
  • Loading branch information
xerootg authored Oct 12, 2024
1 parent 8587b51 commit 403b6e4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kmod/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ TARGET = led-ugreen
obj-m += led-ugreen.o
ccflags-y := -std=gnu11

# if KERNELRELEASE isn't set, i.e. not being built w/ DMKS, then use uname -r
KERNELRELEASE ?= $(shell uname -r)

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
make -C /lib/modules/$(KERNELRELEASE)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
make -C /lib/modules/$(KERNELRELEASE)/build M=$(PWD) clean

0 comments on commit 403b6e4

Please sign in to comment.