Xmake

xmake is a cross-platform build utility based on Lua. It is available for many platforms, languages and toolchains.
Examples
Build project
<syntaxhighlight lang="bash">
$ xmake
</syntaxhighlight>
Run target
<syntaxhighlight lang="bash">
$ xmake run console
</syntaxhighlight>
Debug target
<syntaxhighlight lang="bash">
$ xmake run -d console
</syntaxhighlight>
Simple description
<syntaxhighlight lang="lua">
target("console")
set_kind("binary")
add_files("src/*.c")
</syntaxhighlight>
Debug/Release modes
<syntaxhighlight lang="lua">
add_rules("mode.debug", "mode.release")
target("console")
set_kind("binary")
add_files("src/*.c")
if is_mode("debug") then
add_defines("DEBUG")
end
</syntaxhighlight>
Custom script
<syntaxhighlight lang="lua">
target("test")
set_kind("binary")
add_files("src/*.c")
after_build(function (target)
print("hello: %s", target:name())
os.exec("echo %s", target:targetfile())
end)
</syntaxhighlight>
 
< Prev   Next >