控制整个android系统编译的make文件。其内容如下:
### DO NOT EDIT THIS FILE ###
include build/core/main.mk
### DO NOT EDIT THIS FILE ###
可以看出,实际上控制编译的文件是:build/core/main.mk
6.3. Make命令
²
²
make all: LOCAL_MODULE_TAGS
定义的不包括
android tag
的模块。这将确保所有的在代码树里面同时有
Android.mk
文件的模块。
²
删除某个模块的目标文件。例如:clean-libutils将删除所有的libutils.so以及和它相关的中间文件;clean-Home将删除Home应用。
²
make clean
:删除本次配置所编译输出的结果文件。类似于:
rm –rf ./out/
<configuration>
²
make clobber
:删除所有配置所编译输出的结果文件。类似于:
rm –rf ./out/
² make dataclean
:
make dataclean
deletes contents of the data directory inside the current combo directory. This is especially useful on the simulator and emulator, where the persistent data remains present between builds.
²
make showcommands
:在编译的时候显示脚本的命令,而不是显示编译的简报。用于调试脚本。
² make
LOCAL_MODULE:编译一个单独得模块(需要有Android.mk文件存在)。
²
make targets
:将输出所有拟可以编译的模块名称列表。
注:还有一些命令,从make文件里面应该可以找到。本文不做探讨。
6.4. build/core/config.mk
config.mk文件的主要内容如下:
Ø
在定义头文件的部分,还include了pathmap.mk,如下:
include $(BUILD_SYSTEM)/pathmap.mk
该文件设置include目录和frameworks/base下子目录等的信息。
Ø
Ø
Ø
n
n
n
n
n
Ø
In order to make easier for people when the build system changes, when it is necessary to make changes to buildspec.mk or to rerun the environment setup scripts, they contain a version number in the variable BUILD_ENV_SEQUENCE_NUMBER. If this variable does not match what the build system expects, it fails printing an error message explaining what happened. If you make a change that requires an update, you need to update two places so this message will be printed.
·
·
The scripts automatically get the value from the build system, so they will trigger the warning as well.
Ø
Ø
Ø