summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-07-13 01:32:16 +0200
committerMel <mel@rnrd.eu>2026-07-13 01:32:16 +0200
commitf3f7255c8572c412f320cb5d1053e187a569479d (patch)
tree6d26c11afc1717c9d08a32a752acd4420c59bd62 /Makefile
parentad2f15853aa4bb2f1e8e7658e0a2198935a76fda (diff)
downloadmhs35-drm-f3f7255c8572c412f320cb5d1053e187a569479d.tar.zst
mhs35-drm-f3f7255c8572c412f320cb5d1053e187a569479d.zip
Makefile for out-of-tree building
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
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)