diff options
| author | ruki <[email protected]> | 2021-12-08 23:15:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-12-08 23:15:44 +0800 |
| commit | b76de4c1fb632724c412a1638af8694fb35e021d (patch) | |
| tree | 48066720fc7379e5aa0ca7f002dff6fbc36d66c5 /tests/projects/linux/driver | |
| parent | b3ae4feec5afe623183d92f8f3f9f0347f6abaea (diff) | |
add linux driver rule stub
Diffstat (limited to 'tests/projects/linux/driver')
| -rw-r--r-- | tests/projects/linux/driver/hello/Makefile | 2 | ||||
| -rw-r--r-- | tests/projects/linux/driver/hello/src/hello.c (renamed from tests/projects/linux/driver/hello/hello.c) | 0 | ||||
| -rw-r--r-- | tests/projects/linux/driver/hello/xmake.lua | 9 |
3 files changed, 10 insertions, 1 deletions
diff --git a/tests/projects/linux/driver/hello/Makefile b/tests/projects/linux/driver/hello/Makefile index d69924339..0cac0535c 100644 --- a/tests/projects/linux/driver/hello/Makefile +++ b/tests/projects/linux/driver/hello/Makefile @@ -1,5 +1,5 @@ ifneq ($(KERNELRELEASE),) - obj-m := hello.o + obj-m := src/hello.o else KERN_DIR ?= /usr/src/linux-headers-5.11.0-41-generic/ PWD := $(shell pwd) diff --git a/tests/projects/linux/driver/hello/hello.c b/tests/projects/linux/driver/hello/src/hello.c index 2614fb2cc..2614fb2cc 100644 --- a/tests/projects/linux/driver/hello/hello.c +++ b/tests/projects/linux/driver/hello/src/hello.c diff --git a/tests/projects/linux/driver/hello/xmake.lua b/tests/projects/linux/driver/hello/xmake.lua new file mode 100644 index 000000000..079c31754 --- /dev/null +++ b/tests/projects/linux/driver/hello/xmake.lua @@ -0,0 +1,9 @@ +add_rules("mode.release", "mode.debug") + +add_requires("linux-headers", {configs = {driver_modules = true}}) + +target("hello") + add_rules("platform.linux.driver") + add_files("src/*.c") + add_packages("linux-headers") + set_license("GPL-2.0") |
