Android mk
- LOCAL_PATH:= $(call my-dir)
本mk文件所在的路径 - include $(CLEAR_VARS)
初始化清除除LOCAL_PATH以外的所有LOCAL_XX变量 - LOCAL_MODULE_TAGS := optional
取值 | 含义 |
---|
user | 该模块只在user版本下才编译 |
eng | 该模块只在eng版本下才编译 |
tests | 该模块只在tests版本下才编译 |
optional | 该模块在所有版本下都编译 |
- LOCAL_STATIC_JAVA_LIBRARIES := download
程序生成依赖于download.jar包 - LOCAL_JAVA_LIBRARIES := android.test.runner
生成库所依赖的其它java库列表
LOCAL_SRC_FILES := $(call all-java-files-under) 添加当前所有java源文件
LOCAL_SRC_FILES := $(call all-java-files-under, src) 添加src下所有java源文件
LOCAL_SRC_FILES+= src/net/aidl/IDownload.aidl 添加aidl文件
- LOCAL_CERTIFICATE := platform
生成的程序需要依赖平台的key签名 - LOCAL_PACKAGE_NAME := Music
apk包的名称 - LOCAL_SDK_VERSION := current
SDK版本
include $(BUILD_PACKAGE) 编译成apk
include $(BUILD_STATIC_LIBRARY) 编译成静态库
include $(BUILD_SHARED_LIBRARY) 编译成共享库
include $(BUILD_EXECUTABLE) 编译成可执行程序
include $(BUILD_STATIC_JAVA_LIBRARY) 编译成*.jar包
- include
(callall−makefiles−under,
(LOCAL_PATH))
进一步编译子目录下的项目(test.apk)
gyp
cmake
qmake
automake