summaryrefslogtreecommitdiff
path: root/xmake/templates/c/module/binary/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-02 23:52:25 +0800
committerruki <[email protected]>2026-03-02 23:52:25 +0800
commitb01dcb775c98cc48abe65a91ef9bf093be875682 (patch)
treeaef3e65981edc5506f9d20197be0892ce2957ba1 /xmake/templates/c/module/binary/xmake.lua
parent3c1e3d746b7cc0a1a5dec9448a72a13bfe30f246 (diff)
improve template dirs
Diffstat (limited to 'xmake/templates/c/module/binary/xmake.lua')
-rw-r--r--xmake/templates/c/module/binary/xmake.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/xmake/templates/c/module/binary/xmake.lua b/xmake/templates/c/module/binary/xmake.lua
new file mode 100644
index 000000000..7df556cb8
--- /dev/null
+++ b/xmake/templates/c/module/binary/xmake.lua
@@ -0,0 +1,15 @@
+add_rules("mode.debug", "mode.release")
+
+add_moduledirs("modules")
+
+target("${TARGET_NAME}")
+ set_kind("binary")
+ add_files("src/*.c")
+ on_config(function (target)
+ import("binary.bar")
+ print("binary: 1 + 1 = %s", bar.add(1, 1))
+ print("binary: 1 - 1 = %s", bar.sub(1, 1))
+ end)
+
+${FAQ}
+