mirror of
https://github.com/miskcoo/ugreen_dx4600_leds_controller.git
synced 2025-07-23 04:13:04 +02:00
Some checks failed
Build kernel module for TrueNAS / build-and-run (push) Has been cancelled
* Fix grep: lsmod changes '-' to underscores. * Add SPECS for RHEL8/9 Prepare SOURCES: download source archive and copy to ~/rpmbuild/SOURCES copy SPECS/kmod-led-ugreen.spec to ~/rpmbuild/SPECS Build with: rpmbuild -ba kmod-led-ugreen.spec --define 'kmod_kernel_version (your_kernel_version)' --------- Co-authored-by: gulikoza <gulikoza@users.noreply.github.com>
41 lines
1.1 KiB
Makefile
41 lines
1.1 KiB
Makefile
# If KERNELRELEASE is defined, the make command using this Makefile has
|
|
# been invoked by the kernel build system and so can use its language.
|
|
# Otherwise, if KERNELRELEASE is null, a make command was issued from
|
|
# the command line. So invoke the kernel build system.
|
|
|
|
ifeq ($(KERNELRELEASE),)
|
|
|
|
# KVERSION should be set in the environment if this
|
|
# build is not for the currently running kernel.
|
|
KVERSION ?= $(shell uname -r)
|
|
|
|
# BUILD_DIR should be set in the environment if a
|
|
# subdirectory of /lib/modules/ is not appropriate.
|
|
BUILD_DIR ?= /lib/modules/${KVERSION}/build
|
|
|
|
PWD := $(shell pwd)
|
|
|
|
all:
|
|
$(MAKE) -C $(BUILD_DIR) M=$(PWD) modules
|
|
|
|
modules:
|
|
$(MAKE) -C $(BUILD_DIR) M=$(PWD) modules
|
|
|
|
modules_install:
|
|
$(MAKE) -C $(BUILD_DIR) M=$(PWD) modules_install
|
|
|
|
clean:
|
|
$(MAKE) -C $(BUILD_DIR) M=$(PWD) clean
|
|
rm -rf *~ *.o .*.cmd *.mod.c *.ko *.ko.unsigned .depend \
|
|
.tmp_versions modules.order Module.symvers Module.markers
|
|
|
|
.PHONY: modules modules_install clean
|
|
|
|
else
|
|
|
|
# Called from kernel build system -- just declare the module(s).
|
|
|
|
obj-m += led-ugreen.o
|
|
|
|
endif
|