-
Notifications
You must be signed in to change notification settings - Fork 17
build
Hanlei Qin edited this page Aug 26, 2023
·
9 revisions
Build automation is the process of automating the creation of a software build and the associated processes including: compiling computer source code into binary code, packaging binary code, and running automated tests.
- 构建工具从 Make 到 Ninja
- C++构建系统的选择
- C++ 工程中常用的构建系统(Build System)
- 500 Lines or Less Contingent: A Fully Dynamic Build System
- 每条规则的形式
<target> : <prerequisites> [tab] <commands>
-
order-only
依赖,使用管道符号 '|' 分隔 常规依赖 和order-only
依赖,order-only
依赖通常用来创建目录。targets : normal-prerequisites | order-only-prerequisites
- 伪目标
.PHONY
,声明clean是"伪目标"之后,make就不会去检查是否存在一个叫做clean的文件,而是每次运行都执行对应的命令。.PHONY: clean clean: rm *.o temp
- 目标变量
<target ...> : variable-assignment
- 自动变量
-
$@
当前目标-
$(@D)
和$(@F)
分别指向$@
的目录名和文件名 - 比如,
$@
是src/input.c
,那么$(@D)
的值为src
,$(@F)
的值为input.c
-
-
$<
第一个依赖-
$(<D)
和$(<F)
分别指向$<
的目录名和文件名
-
-
$^
所有依赖,但不包括order-only
依赖 -
$?
比目标更新的所有依赖,以空格分隔 -
$*
指代匹配符%
匹配的部分, 比如%
匹配f1.txt
中的f1
,$*
就表示f1
-
- Makefile简明教程
- Make 命令教程
- 跟我一起写Makefile
-
CMake
- CMake-tutorial
- cmake-examples Useful CMake Examples http://ttroy50.github.io/cmake-examples
- emake
- xmake, A cross-platform build utility based on lua.
- Awesome CMake: A curated list of awesome CMake resources, scripts, modules and examples.
芝士就是力量,法国就是培根!
Knowledge is power -- Francis Bacon
人要是没有梦想,和咸鱼有什么分别?光标请勿在最高司令官身上停留!
- mathematics
- algorithm
- theory-of-computation
- compiler
- operating-system
- networks
- security
- artificial-intelligence
- computer-graphics