Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5
A script-only build utility like autotools
License
xmake-io/xmake.sh
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Support this project bybecoming a sponsor. Your logo will show up here with a link to your website. 🙏
You can also consider sponsoring us to get extra technical support services via theGithub sponsor program,This gives you access to thexmake-io/technical-support repository, where you can get more information on consulting.
- Handling Issues with higher priority
- One-to-one technical consulting service
- Review your xmake.lua and provide suggestions for improvement
Xmake.sh is a script-only build utility like autotools.
- No any dependencies
- No installation, only one shell script file
- Easy, similar configuration syntax to xmake
- Compatible with autotools, same usage
- Generate makefile
- Custom toolchains
- Detect options, code snippets, dependencies, compiler features
- Support builtin variables
- Generate build.ninja
- Support more xmake features
Copy./configure
script file to your project root directory.
We just writexmake.sh
project file, like this:
#!/bin/shset_project"hello"set_version"1.0.1""%Y%m%d%H%M"option"debug""Enable debug compilation mode."falseoption"tests""Enable tests."trueoption"pthread" add_links"pthread" add_cincludes"pthread.h" add_cfuncs"pthread_create"option_endoption"cxx_constexpr" set_languages"c++11" add_cxxsnippets"constexpr int k = 0;"option_endoption"lua" add_cfuncs"lua_pushstring" add_cincludes"lua.h""lualib.h""lauxlib.h" before_check"option_find_lua"option_endoption_find_lua() { option"lua" add_cxflags`pkg-config --cflags lua5.42>/dev/null` add_ldflags`pkg-config --libs lua5.42>/dev/null` option_end}set_warnings"all""error"set_languages"c99""c++11"if is_mode"debug";then set_symbols"debug" set_optimizes"none"else set_strip"all" set_symbols"hidden" set_optimizes"smallest"fitarget"demo" set_kind"binary" add_deps"foo""bar" add_files"*.cpp" add_includedirs"foo""bar" add_configfiles"config.h.in" set_configdir"${builddir}/include" add_headerfiles"${builddir}/include/config.h""hello" add_headerfiles"(bar/*.h)""hello" add_headerfiles"foo/(*.h)""hello" add_installfiles"res/(png/**.png)""share" add_options"lua"if has_config"debug";then add_defines"DEBUG""TEST"fiif is_plat"linux""macosx";then add_defines"POSIX"fiif has_config"pthread";then set_configvar"HAS_PTHREAD" 1fiif has_config"cxx_constexpr";then set_configvar"HAS_CONSTEXPR" 1fiincludes"foo""bar"if has_config"tests";then includes"tests"fi
$./configure
$make
$make install
$make run
- set_project
- set_version
- includes
- is_plat
- is_arch
- is_host
- is_mode
- is_config
- has_config
- set_config
- target
- set_kind
- add_deps
- add_files
- set_basename
- set_extension
- set_filename
- set_prefixname
- set_targetdir
- set_objectdir
- add_defines
- add_undefines
- add_includedirs
- add_linkdirs
- add_rpathdirs
- add_links
- add_syslinks
- set_strip
- set_symbols
- set_languages
- set_warnings
- set_optmizes
- add_frameworks
- add_frameworkdirs
- add_cflags
- add_cxflags
- add_cxxflags
- add_mflags
- add_mxflags
- add_mxxflags
- add_asflags
- add_ldflags
- add_shflags
- add_arflags
- set_configdir
- set_configfiles
- set_configvar
- set_installdir
- add_installfiles
- add_headerfiles
- add_options
- before_install
- after_install
- target_end
- option
- set_default
- set_description
- set_showmenu
- add_defines
- add_undefines
- add_includedirs
- add_linkdirs
- add_links
- add_syslinks
- add_cflags
- add_cxflags
- add_cxxflags
- add_cfuncs
- add_cxxfuncs
- add_cincludes
- add_cxxincludes
- add_ctypes
- add_cxxtypes
- add_csnippets
- add_cxxsnippets
- option_end
- toolchain
- set_toolset
- set_sdkdir
- set_bindir
- set_cross
- toolchain_end
- Email:waruqi@gmail.com
- Homepage:xmake.io
- Community
- Chat on reddit
- Chat on telegram
- Chat on gitter
- Chat on discord
- Chat on QQ Group: 343118190, 662147501
- Source Code:Github,Gitee
- Wechat Public: tboox-os
About
A script-only build utility like autotools
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.