From f3f7255c8572c412f320cb5d1053e187a569479d Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 13 Jul 2026 01:32:16 +0200 Subject: Makefile for out-of-tree building Signed-off-by: Mel --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..89cf763 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +# out-of-tree module build of the mhs35 panel driver. + +# defaults to *your* current running kernel! +KDIR ?= /lib/modules/$(shell uname -r)/build +# kernel module artifacts output to build. +BUILD := build + +all: + mkdir -p $(BUILD) + ln -sf ../mhs35.c ../Kbuild $(BUILD)/ + $(MAKE) -C $(KDIR) M=$(CURDIR)/$(BUILD) modules + +clean: + rm -rf $(BUILD) -- cgit 1.4.1