常用的Android平台编译变量

来源:互联网 发布:mt7688 linux 编辑:程序博客网 时间:2024/06/15 03:10

BOOTLOADER_PLATFORM: BootLoader代码中平台的选择

KERNEL_DEFCONFIG:确认内核defconfig使用的文件

TARGET_BOARD_PLATFORM:目标平台Platform

TARGET_BUILD_VARIANT:目标编译tags

LOCAL_FORCE_STATIC_EXECUTABLE:如果编译时候需要链接的动态库库存在静态库形式,那么在这个编译变量等于true的情况下,将会链接到对应的静态库而不是动态库。比如列出的libm,libz,libc,libcutils,libutils,liblog等动静态库都存在,那么在该变量被置true的时候,将会链接对应的静态库。当然对于本来就是静态库的libHWrecog.a来说,该变量值不会影响它是被静态链接的。可以想到这个参数的设置是和用gcc编译时候指定-static参数一样的效果, 推荐只是编译特殊ELF文件才用。通常这种情况只会在编译root/sbin目录下的应用才会用到,应为通常他们执行的时间比较早,文件系统的其他部分都没加载,所以动态库就会链接不上,这个时候静态链接是最好不过了。实际用的不多。


附:编译命令说明

- m:       Makes from the top of the tree.
- mm:      Builds all of the modules in the current directory, but not their dependencies.
- mmm:     Builds all of the modules in the supplied directories, but not their dependencies.
           To limit the modules being built use the syntax: mmm dir/:target1,target2.
- mma:     Builds all of the modules in the current directory, and their dependencies.
- mmma:    Builds all of the modules in the supplied directories, and their dependencies.