Files
Varun Madiath c1386fc251
Some checks failed
Build kernel module for TrueNAS / build-and-run (push) Has been cancelled
Make build more flexible and complete. (#30)
* Allow specifying kernel directory when building

* Add install target to Makefile
2024-10-16 00:07:27 +08:00

18 lines
415 B
Makefile

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)
KDIR ?= /lib/modules/$(KERNELRELEASE)/build
INSTALL_MOD_PATH ?= /
all:
make -C $(KDIR) M=$(PWD) modules
clean:
make -C $(KDIR) M=$(PWD) clean
install:
make -C $(KDIR) M=$(PWD) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) modules_install