xmake v2.0 has supported the plugin module and we can develop ourself plugin module conveniently.
We can run command xmake -h
to look over some builtin plugins of xmake
Plugins:
l, lua Run the lua script.
m, macro Run the given macro.
doxygen Generate the doxygen document.
hello Hello xmake!
project Create the project file.
We new a site for the open source project: xmake
You can use xmake to run the given target and need not know where is the target program.
e.g.
We define a simple target with named ‘test’.
target("test")
set_kind("console")
add_files("*.c")
So, we can run it directly.
$xmake r test
or $xmake run test
xmake will compile it automaticly if the target has not been built.
Packages all targets for the current platform:
$xmake p
$xmake package
Packages the target test to the output directory: /tmp
$xmake p -o /tmp test
$xmake p --output=/tmp test
Packages targets for the iphoneos platform.
$xmake f -p iphoneos
$xmake p
We can uses the macro plugin to package all architectures of the given platform.
# packages targets for all architectures of the current platform
$xmake macro package
# packages targets for all architectures of the iphoneos platform
$xmake m package -p iphoneos
# packages targets with debug version for all architectures of the iphoneos platform and output to the directory: /tmp/output
$xmake m package -p iphoneos -f "-m debug" -o /tmp/output