Scons
Scons是一个方便易用的软件构建工具。Scons基于python,跨平台。
github
https://github.com/SCons/scons
基本用法
env = Environment() # Initialize the environment
# 编译binary
env.Program(target = 'helloworld', source = ["helloworld.c"])
# 编译动态链接库
lib_target = "hello"
lib_sources = ["libhello.c"]
env.SharedLibrary(target = lib_target, source = lib_sources)
# 静态链接库
env.Library(target = lib_target, source = lib_sources)
env.StaticLibrary(target = lib_target, source = lib_sources)
env.Program(target = 'helloworld', LIBS=[lib_target], LIBPATH='.', source = ["helloworld.c"])
# install
hello = env.Program(source = ["helloworld.c"], target = "helloworld")
env.Install(dir = "/usr/local/bin", source = hello)
# scons编译子目录
SConscript('lib/SConscript')
wiki
如果有空的话,可以考虑搬运翻译下?