mirror of
https://github.com/miskcoo/ugreen_dx4600_leds_controller.git
synced 2025-07-23 20:30:46 +02:00
Make build more flexible and complete. (#30)
Some checks failed
Build kernel module for TrueNAS / build-and-run (push) Has been cancelled
Some checks failed
Build kernel module for TrueNAS / build-and-run (push) Has been cancelled
* Allow specifying kernel directory when building * Add install target to Makefile
This commit is contained in:
@@ -4,8 +4,14 @@ ccflags-y := -std=gnu11
|
||||
|
||||
# if KERNELRELEASE isn't set, i.e. not being built w/ DMKS, then use uname -r
|
||||
KERNELRELEASE ?= $(shell uname -r)
|
||||
KDIR ?= /lib/modules/$(KERNELRELEASE)/build
|
||||
INSTALL_MOD_PATH ?= /
|
||||
|
||||
all:
|
||||
make -C /lib/modules/$(KERNELRELEASE)/build M=$(PWD) modules
|
||||
make -C $(KDIR) M=$(PWD) modules
|
||||
|
||||
clean:
|
||||
make -C /lib/modules/$(KERNELRELEASE)/build M=$(PWD) clean
|
||||
make -C $(KDIR) M=$(PWD) clean
|
||||
|
||||
install:
|
||||
make -C $(KDIR) M=$(PWD) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) modules_install
|
||||
|
Reference in New Issue
Block a user