From 5c430386f564247882c9a75a44ccb81f316300a3 Mon Sep 17 00:00:00 2001
From: "Dustin L. Howett" <dustin@howett.net>
Date: Sun, 8 Oct 2023 12:17:13 -0500
Subject: [PATCH] Add a standalone makefile/kbuild and gitignore

---
 .gitignore | 7 +++++++
 Kbuild     | 1 +
 Makefile   | 9 +++++++++
 3 files changed, 17 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 Kbuild
 create mode 100644 Makefile

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..247b7c9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*.o
+*.ko
+*.mod.*
+*.mod
+modules.order
+Module.symvers
+.*.cmd
diff --git a/Kbuild b/Kbuild
new file mode 100644
index 0000000..6559580
--- /dev/null
+++ b/Kbuild
@@ -0,0 +1 @@
+obj-m := framework_laptop.o
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8b5dcf3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,9 @@
+KDIR ?= /lib/modules/$(shell uname -r)/build
+MDIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
+
+.PHONY: all modules modules_install
+
+all: modules
+
+modules modules_install:
+	make -C $(KDIR) M=$(MDIR) $@
-- 
GitLab