demo地址:https://github.com/JuneLeo/makefile-sample
手动构建Makefile
https://github.com/JuneLeo/makefile-sample/blob/master/sample-one/Makefile
autotools构建Makefile
https://github.com/JuneLeo/makefile-sample/blob/master/sample-three/README.md
- autotools下载和安装
- autotools使用
工具分析
- autoscan:扫描工作目录,并且生成configure.scan文件。
- aclocal:扫描configure.ac ,根据已经安装的宏,用户定义的宏和acinclude.m4文件中的宏将configure.ac文件需要的宏集中定义到aclocal.m4
- autoconf:将configure.ac中的宏展开,生成configure脚本
- autoheader:从 “acconfig.h” 文件中复制用户附加的符号定义,生成config.h
- automake:生成 Makefile.in 文件
Cmake构建
https://github.com/JuneLeo/makefile-sample/blob/master/sample-four/README.md
后续
- ninja https://github.com/ninja-build/ninja
- ninja gen https://github.com/ninja-build/ninja/wiki/List-of-generators-producing-ninja-build-files
- meson + ninja
- blueprint + ninja aosp