summaryrefslogtreecommitdiff
path: root/xmake/templates/c/tbox.shared/project/src
diff options
context:
space:
mode:
authorruki <[email protected]>2019-09-19 00:55:37 +0800
committerruki <[email protected]>2019-09-18 23:33:46 +0800
commit336029c68e4d0fc58bb55dca3ce5fb62bfdbf41b (patch)
tree68072128ac59708b7f56615e626d87e30ed951e2 /xmake/templates/c/tbox.shared/project/src
parentbb3455b845e0b776937283b3ddae4ae557eea52e (diff)
rewrite templates
Diffstat (limited to 'xmake/templates/c/tbox.shared/project/src')
-rw-r--r--xmake/templates/c/tbox.shared/project/src/_demo/main.c2
-rw-r--r--xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua2
-rw-r--r--xmake/templates/c/tbox.shared/project/src/_library/xmake.lua6
3 files changed, 5 insertions, 5 deletions
diff --git a/xmake/templates/c/tbox.shared/project/src/_demo/main.c b/xmake/templates/c/tbox.shared/project/src/_demo/main.c
index 818ff6919..99a42f2a5 100644
--- a/xmake/templates/c/tbox.shared/project/src/_demo/main.c
+++ b/xmake/templates/c/tbox.shared/project/src/_demo/main.c
@@ -1,7 +1,7 @@
/* //////////////////////////////////////////////////////////////////////////////////////
* includes
*/
-#include "[targetname]/interface.h"
+#include "${TARGETNAME}/interface.h"
/* //////////////////////////////////////////////////////////////////////////////////////
* main
diff --git a/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua b/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua
index c62ddcec5..145096668 100644
--- a/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua
+++ b/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua
@@ -5,7 +5,7 @@ target("demo")
set_kind("binary")
-- add deps
- add_deps("[targetname]")
+ add_deps("${TARGETNAME}")
-- add defines
add_defines("__tb_prefix__=\"demo\"")
diff --git a/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua b/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua
index cb36ba3b8..1941864d0 100644
--- a/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua
+++ b/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua
@@ -1,14 +1,14 @@
-- add target
-target("[targetname]")
+target("${TARGETNAME}")
-- set kind
set_kind("shared")
-- add defines
- add_defines("__tb_prefix__=\"[targetname]\"")
+ add_defines("__tb_prefix__=\"${TARGETNAME}\"")
-- add the header files for installing
- add_headerfiles("../([targetname]/**.h)")
+ add_headerfiles("../(${TARGETNAME}/**.h)")
-- add includes directory
add_includedirs("..", {interface = true})