Skip to content

Commit

Permalink
add cflags in xmake, see more on xmake-io/xmake#2857 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidingPlus committed Oct 17, 2024
1 parent 4cdf503 commit f8094a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

A Simple Hello World Module.

# 两种构建方式

TODO

# 两种构建方式

## 基于 Makefile

## 基于 XMake

# 更多细节

2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int add(int a, int b);

static int __init hello_init(void)
{
printk(KERN_INFO "Hello World: %d\n", add(1, 2));
printk(KERN_INFO "Hello World %d\n", add(1, 2));


return 0;
Expand Down
2 changes: 2 additions & 0 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ target ("hello")
add_rules ("platform.linux.driver")
add_files ("src/*.c")
set_values ("linux.driver.linux-headers", "$(linux-headers)")

add_cflags ("-O1")

0 comments on commit f8094a9

Please sign in to comment.