Android編譯系統參考手冊

build/core/clear_vars.mk Clear out values of all variables used by rule templates 清除LOCAL變量,每一個模塊的Android.mk,通常會先包含該文件 變量定義主要出如今base_rules.mk,config.mk,definitions.mk LOCAL_MODULE LOCAL_MODULE表示模塊的名稱    LOCAL_MODULE將在每一個模塊的makefile裏定義,若是未定義,編譯系統會報錯 LOCAL_MODULE_PATH 表示模塊編譯結果將要存放的目錄     recovery模塊的Android.mk裏有     LOCAL_MODULE := nandroid-md5.sh      LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin      說明:nandroid-md5.sh 將存放於out/Cyanogenmod/target/product/m7ul/recovery/root/sbin     若是模塊的Android.mk裏未定義LOCAL_MODULE_PATH     那麼LOCAL_MODULE_PATH := $($(my_prefix)OUT$(partition_tag)_$(LOCAL_MODULE_CLASS))     在recovery模塊裏recovery可執行文件相關變量以下:     好比my_prefix爲TARGET_,partition_tag爲空,LOCAL_MODULE_CLASS爲EXECUTABLES     那麼LOCAL_MODULE_PATH爲$(TARGET_OUT_EXECUTABLES),     值應該爲     out/Cyanogenmod/target/product/m7ul/system/bin LOCAL_MODULE_STEM 表示編譯連接後的目標文件的文件名,不帶後綴      LOCAL_MODULE_STEM := $(strip $(LOCAL_MODULE_STEM))  ifeq ($(LOCAL_MODULE_STEM),)      LOCAL_MODULE_STEM := $(LOCAL_MODULE)  endif  例:    recovery模塊編譯recovery可執行文件:    LOCAL_MODULE_STEM:=recovery LOCAL_DONT_CHECK_MODULE 若是定義了該變量,那麼模塊將不被檢查 ifdef LOCAL_DONT_CHECK_MODULE   LOCAL_CHECKED_MODULE := endif LOCAL_CHECKED_MODULE 須要檢查的模塊  ifndef LOCAL_CHECKED_MODULE   ifndef LOCAL_SDK_VERSION     LOCAL_CHECKED_MODULE := $(LOCAL_BUILT_MODULE)   endif endif LOCAL_BUILT_MODULE 表示編譯連接後的目標文件(文件路徑+文件名)   LOCAL_BUILT_MODULE := $(built_module_path)/$(LOCAL_BUILT_MODULE_STEM)   好比recovery:   LOCAL_BUILT_MODULE 路徑;   out/Cyanogenmod/target/product/m7ul/obj/EXECUTABLES/recovery_intermediates/recovery LOCAL_BUILT_MODULE_STEM 表示編譯連接後的目標文件的文件名,帶後綴 LOCAL_BUILT_MODULE_STEM := $(strip $(LOCAL_BUILT_MODULE_STEM)) ifeq ($(LOCAL_BUILT_MODULE_STEM),)   LOCAL_BUILT_MODULE_STEM := $(LOCAL_INSTALLED_MODULE_STEM) endif 例: recovery模塊編譯recovery可執行文件: LOCAL_INSTALLED_MODULE_STEM:=recovery OVERRIDE_BUILT_MODULE_PATH 只有內部動態連接庫模塊可使用OVERRIDE_BUILT_MODULE_PATH         OVERRIDE_BUILT_MODULE_PATH := $(strip $(OVERRIDE_BUILT_MODULE_PATH)) ifdef OVERRIDE_BUILT_MODULE_PATH   ifneq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)     $(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)   endif   built_module_path := $(OVERRIDE_BUILT_MODULE_PATH) else   built_module_path := $(intermediates) endif LOCAL_INSTALLED_MODULE 表示模塊的安裝路徑+文件名,存放在安裝目錄 ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))  LOCAL_INSTALLED_MODULE := $(LOCAL_MODULE_PATH)/$(LOCAL_INSTALLED_MODULE_STEM)   endif   示例:   out/Cyanogenmod/target/product/m7ul/system/bin/recovery LOCAL_UNINSTALLABLE_MODULE 表示該模塊是否安裝至手機,像sdk文檔模塊不會被安裝至手機,  所以LOCAL_UNINSTALLABLE_MODULE爲true LOCAL_INTERMEDIATE_TARGETS Assemble the list of targets to create PRIVATE_ variables for. LOCAL_INTERMEDIATE_TARGETS += $(LOCAL_BUILT_MODULE) LOCAL_UNSTRIPPED_PATH 沒有strip的程序存放路徑,一般放在symbols目錄 Instructs the build system to put the unstripped version of the module somewhere  other than what's normal for its type.  Usually, you override this because you overrode LOCAL_MODULE_PATH for an executable or a shared  library. If you overrode LOCAL_MODULE_PATH, but not LOCAL_UNSTRIPPED_PATH, an error will occur. LOCAL_MODULE_CLASS 將用於決定編譯時的中間文件存放的位置 LOCAL_MODULE_CLASS在定義目標生成方式的makefile文件裏定義,   好比executable.mk裏定義LOCAL_MODULE_CLASS := EXECUTABLES 在recovery模塊的Android.mk裏定義的LOCAL_MODULE_CLASS有:   LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES   LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES 其它的LOCAL_MODULE_CLASS有  LOCAL_MODULE_CLASS := ETC  LOCAL_MODULE_CLASS := STATIC_LIBRARIES  LOCAL_MODULE_CLASS := EXECUTABLES  LOCAL_MODULE_CLASS := FAKE  LOCAL_MODULE_CLASS := JAVA_LIBRARIES  LOCAL_MODULE_CLASS := SHARED_LIBRARIES  LOCAL_MODULE_CLASS := APPS 對應 Cyanogenmod/target/product/m7ul/obj 的目錄    好比說若 LOCAL_MODULE_CLASS := ETC    那麼該模塊編譯的中間文件將存放於   Cyanogenmod/target/product/m7ul/obj/ETC LOCAL_MODULE_SUFFIX 表示編譯連接後的目標文件的後綴 LOCAL_PACKAGE_NAME App名字  示例: Dialer, Contacts, etc.  This will probably change or go away when we switch to an ant-based build system for the apps. LOCAL_OVERRIDES_PACKAGES Some packages may override others using LOCAL_OVERRIDES_PACKAGE    示例:   packages/apps/DeskClock/Android.mk:13:LOCAL_OVERRIDES_PACKAGES := AlarmClock LOCAL_EXPORT_PACKAGE_RESOURCES 若定義該變量,資源文件打包成一個apk 示例:   frameworks/base/core/res/Android.mk:34:LOCAL_EXPORT_PACKAGE_RESOURCES := true LOCAL_MANIFEST_PACKAGE_NAME 在build/core/definitions.mk裏inherit-package函數有用到LOCAL_MANIFEST_PACKAGE_NAME  LOCAL_REQUIRED_MODULES 本模塊依賴的模塊  Set LOCAL_REQUIRED_MODULES to any number of whitespace-separated module names, like "libblah" or  "Email".   If this module is installed, all of the modules that it requires will be installed as well.   This can be used to, e.g., ensure that necessary shared libraries   or providers are installed when a given app is installed 示例:   LOCAL_REQUIRED_MODULES += $(installed_shared_library_module_names) LOCAL_ACP_UNAVAILABLE 示例:  build/tools/acp/Android.mk:23:LOCAL_ACP_UNAVAILABLE := true LOCAL_MODULE_TAGS 模塊的tag,爲debug eng tests optional samples shell_ash shell_mksh等tag的組合,一個模塊可有多個 Tag, 注意如今模塊如今不能使用user做爲模塊的Tag,   之前若是使用user作爲tag,那麼這個模塊將被自動安裝,   若是想定義自動安裝的模塊,須要在PRODUCT_PACKAGES變量裏添加該模塊,   該變量在build/target/product/base.mk和build/target/product/core.mk裏有賦值,這是全部產品都將繼承 的基礎配置   另外每一個設備可在本身的產品配置文件device_*.mk裏設置該變量,添加更多的模塊  若是當前目錄或者父目錄有*_GPL*的文件,那麼將自動添加gnu的tag LOCAL_SRC_FILES 源代碼文件集合 LOCAL_PREBUILT_OBJ_FILES 示例:    sdk/find_lock/Android.mk:50:LOCAL_PREBUILT_OBJ_FILES += images/$(FIND_LOCK_ICON_OBJ) LOCAL_STATIC_JAVA_LIBRARIES 要連接的Java庫,被連接的庫將不會安裝在手機上,所以會放到連接生成的java包裏 示例:  packages/apps/Exchange/Android.mk:24:LOCAL_STATIC_JAVA_LIBRARIES := android-common  com.android.emailcommon LOCAL_STATIC_LIBRARIES 表示模塊要連接的靜態庫    ifneq (,$(filter libcutils libutils,$(LOCAL_STATIC_LIBRARIES)))     LOCAL_STATIC_LIBRARIES := $(call insert-liblog,$(LOCAL_STATIC_LIBRARIES))   endif   示例:external/busybox/Android.mk   LOCAL_STATIC_LIBRARIES := libcutils libc libm   最終:      LOCAL_STATIC_LIBRARIES := libcutils libc libm liblog  LOCAL_GROUP_STATIC_LIBRARIES 示例:  build/core/binary.mk:223:ifeq (true,$(LOCAL_GROUP_STATIC_LIBRARIES)) LOCAL_WHOLE_STATIC_LIBRARIES 連接時會將LOCAL_WHOLE_STATIC_LIBRARIES類型的靜態連接庫的全部目標代碼放入最終目標文件裏,而不去掉 These are the static libraries that you want to include in your module without allowing the linker  to remove dead code from them. This is mostly useful if you want to add a static library to a  shared library and have the static library's content exposed from the shared library. ifneq (,$(filter libcutils libutils,$(LOCAL_WHOLE_STATIC_LIBRARIES)))   LOCAL_WHOLE_STATIC_LIBRARIES := $(call insert-liblog,$(LOCAL_WHOLE_STATIC_LIBRARIES)) endif 示例: dalvik/vm/Android.mk LOCAL_WHOLE_STATIC_LIBRARIES += libexpat libcutils libdex liblog libz 最終  LOCAL_WHOLE_STATIC_LIBRARIES += libexpat libcutils libdex liblog libz liblog LOCAL_SHARED_LIBRARIES 表示模塊要連接的動態連接庫   ifneq (,$(filter libcutils libutils,$(LOCAL_SHARED_LIBRARIES)))   LOCAL_SHARED_LIBRARIES := $(call insert-liblog,$(LOCAL_SHARED_LIBRARIES))   endif   示例:frameworks/av/media/mtp模塊 Android.mk LOCAL_SHARED_LIBRARIES := libutils libcutils libusbhost libbinder 最終:LOCAL_SHARED_LIBRARIES: libutils liblog libcutils libusbhost libbinder   LOCAL_IS_HOST_MODULE 表示該模塊是不是將在主機上運行的模塊 LOCAL_CC 你能夠經過LOCAL_CC定義一個不一樣的C編譯器 LOCAL_CXX 你能夠經過LOCAL_CXX定義一個不一樣的C++編譯器 LOCAL_CPP_EXTENSION 當前c++代碼文件後綴 external/protobuf/Android.mk:177:LOCAL_CPP_EXTENSION := .cc LOCAL_NO_DEFAULT_COMPILER_FLAGS 一般爲C或者C++源代碼文件的編譯提供了默認的頭文件目錄和flag,能夠經過 LOCAL_NO_DEFAULT_COMPILER_FLAGS設置不使用這些東東 LOCAL_NO_FDO_SUPPORT 示例: build/core/binary.mk:136:ifeq ($(strip $(LOCAL_NO_FDO_SUPPORT)),) LOCAL_ARM_MODE 示例: ndk/tests/build/build-mode/jni/Android.mk:19:LOCAL_ARM_MODE := thumb ndk/tests/build/build-mode/jni/Android.mk:32:LOCAL_ARM_MODE := arm   LOCAL_YACCFLAGS Any flags to pass to invocations of yacc for your module.  A known limitation here is that the flags will be the same for all invocations of YACC for your  module.  This can be fixed. If you ever need it to be, just ask. LOCAL_YACCFLAGS := -p kjsyy LOCAL_ASFLAGS Explicitly declare assembly-only __ASSEMBLY__ macro for assembly source   LOCAL_ASFLAGS += -D__ASSEMBLY__ LOCAL_CFLAGS 表示編譯C代碼時用的參數 LOCAL_CPPFLAGS 編譯C++代碼使用的flag  ./frameworks/av/media/libstagefright/Android.mk:78:LOCAL_CPPFLAGS += -DUSE_TI_CUSTOM_DOMX LOCAL_RTTI_FLAG 編譯C++代碼使用rtti標記 ./external/icu4c/common/Android.mk:135:LOCAL_RTTI_FLAG := -frtti LOCAL_C_INCLUDES 編譯C代碼使用的頭文件目錄 LOCAL_EXPORT_C_INCLUDE_DIRS 示例: system/core/libsuspend/Android.mk:18:LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include LOCAL_LDFLAGS 表示連接時用的參數 LOCAL_LDLIBS 額外的動態連接庫 LOCAL_LDLIBS allows you to specify additional libraries that are not part of the build for your  executable or library.  Specify the libraries you want in -lxxx format; they're passed directly to the link line.  However, keep in mind that there will be no dependency generated for these libraries. It's most useful in simulator builds where you want to use a library preinstalled on the host. The linker (ld) is a particularly fussy beast,  so it's sometimes necessary to pass other flags here if you're doing something sneaky. Some examples: LOCAL_LDLIBS += -lcurses -lpthread LOCAL_AAPT_FLAGS 使用aapt編譯資源包時所用的flag packages/apps/Calendar/Android.mk:35:LOCAL_AAPT_FLAGS := --auto-add-overlay LOCAL_AAPT_INCLUDE_ALL_RESOURCES 使用AAPT編譯時需用的一個標記,打包資源時會用到該比較  build/core/package.mk:391:ifeq ($(LOCAL_AAPT_INCLUDE_ALL_RESOURCES),true)  packages/inputmethods/LatinIME/java/Android.mk:37:LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true LOCAL_SYSTEM_SHARED_LIBRARIES ifdef LOCAL_IS_HOST_MODULE   ifeq ($(LOCAL_SYSTEM_SHARED_LIBRARIES),none) LOCAL_SYSTEM_SHARED_LIBRARIES :=   endif else   ifeq ($(LOCAL_SYSTEM_SHARED_LIBRARIES),none) LOCAL_SYSTEM_SHARED_LIBRARIES := $(TARGET_DEFAULT_SYSTEM_SHARED_LIBRARIES)   endif endif 示例:   TARGET_DEFAULT_SYSTEM_SHARED_LIBRARIES:libc libstdc++ libm  LOCAL_SYSTEM_SHARED_LIBRARIES:libc libstdc++ libm LOCAL_PREBUILT_LIBS 預編譯好的庫,當使用including $(BUILD_PREBUILT) or $(BUILD_HOST_PREBUILT) 會將LOCAL_PREBUILT_LIBS所指的庫拷貝到安裝目錄 LOCAL_PREBUILT_EXECUTABLES 預編譯好的可執行程序,通常經過include $(BUILD_PREBUILT)設置 會將預編譯好的程序拷貝直接拷貝至安裝目錄 LOCAL_PREBUILT_JAVA_LIBRARIES 示例: prebuilts/misc/common/kxml2/Android.mk:19:LOCAL_PREBUILT_JAVA_LIBRARIES := kxml2-2.3.0 $(COMMON_JAVA_PACKAGE_SUFFIX) LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES 示例: packages/apps/CMUpdater/Android.mk:39:LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES :=  dashclockapi:libs/dashclock-api-r1.1.jar LOCAL_PREBUILT_STRIP_COMMENTS 示例: build/core/prebuilt.mk:52:  ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),) LOCAL_INTERMEDIATE_SOURCES 示例: frameworks/base/Android.mk:249:LOCAL_INTERMEDIATE_SOURCES := \ LOCAL_INTERMEDIATE_SOURCE_DIR 表示編譯生成的源文件存放目錄 LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src 例:out/target/common/obj/EXECUTABLES/recovery_intermediates/src LOCAL_JAVACFLAGS If you have additional flags to pass into the javac compiler, add them here. For example:  LOCAL_JAVACFLAGS += -Xlint:deprecation LOCAL_JAVA_LIBRARIES 當連接java app程序和庫時, LOCAL_JAVA_LIBRARIES指定了哪些java類將被包含, 目前只有 LOCAL_JAVA_LIBRARIES := core framework 注意目前編譯app設置LOCAL_JAVA_LIBRARIES是沒必要要的,也不被容許的,在include  $(BUILD_PACKAGE)時 合適的庫都會被包含進來 LOCAL_NO_STANDARD_LIBRARIES 示例:   frameworks/base/Android.mk:254:LOCAL_NO_STANDARD_LIBRARIES := true LOCAL_CLASSPATH 示例:  external/javassist/Android.mk:21:LOCAL_CLASSPATH := $(HOST_JDK_TOOLS_JAR) LOCAL_DROIDDOC_USE_STANDARD_DOCLET 示例: device/sample/frameworks/PlatformLibrary/Android.mk:48:LOCAL_DROIDDOC_USE_STANDARD_DOCLET := true LOCAL_DROIDDOC_SOURCE_PATH 示例: build/core/droiddoc.mk:40:LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH) LOCAL_DROIDDOC_TEMPLATE_DIR 暫時未見用到 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR 示例: frameworks/base/Android.mk:591:LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates -sdk LOCAL_DROIDDOC_ASSET_DIR 示例: build/core/droiddoc.mk:143:$(full_target): PRIVATE_OUT_ASSET_DIR := $(out_dir)/ $(LOCAL_DROIDDOC_ASSET_DIR) LOCAL_DROIDDOC_CUSTOM_ASSET_DIR 示例: build/tools/droiddoc/test/stubs/Android.mk:25:LOCAL_DROIDDOC_CUSTOM_ASSET_DIR:=assets-google LOCAL_DROIDDOC_OPTIONS 示例: device/sample/frameworks/PlatformLibrary/Android.mk:46:LOCAL_DROIDDOC_OPTIONS :=  com.example.android.platform_library LOCAL_DROIDDOC_HTML_DIR 示例:  frameworks/base/Android.mk:429:framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html LOCAL_ASSET_FILES 編譯Android Package(app)程序時,一般用LOCAL_ASSET_FILES,表示assets目錄的全部文件 一般使用方式: LOCAL_ASSET_FILES += $(call find-subdir-assets)    LOCAL_ASSET_DIR 編譯Android Package(app)程序時,一般用LOCAL_ASSET_FILES,表示assets目錄的全部文件 一般使用方式: LOCAL_ASSET_FILES += $(call find-subdir-assets)    LOCAL_RESOURCE_DIR 示例:   packages/apps/Gallery2/Android.mk:59:LOCAL_RESOURCE_DIR += $(LOCAL_PATH)/res  LOCAL_JAVA_RESOURCE_DIRS 示例: frameworks/base/tools/layoutlib/bridge/Android.mk:20:LOCAL_JAVA_RESOURCE_DIRS := resources LOCAL_JAVA_RESOURCE_FILES 示例:   frameworks/base/Android.mk:261:LOCAL_JAVA_RESOURCE_FILES += $(LOCAL_PATH)/preloaded-classes LOCAL_GENERATED_SOURCES 編譯時生成的源代碼文件,像aidl將轉爲java代碼 LOCAL_COPY_HEADERS_TO 須要拷貝頭頭文件至哪一個安裝目錄 LOCAL_COPY_HEADERS 須要拷貝至安裝目錄的頭文件集合,你須要同時定義LOCAL_COPY_HEADERS_TO  LOCAL_FORCE_STATIC_EXECUTABLE 強制編譯爲靜態可執行文件,這樣在執行時不會去查找動態連接庫 通常只有安裝在sbin目錄下的可執行文件使用該變量 若是想程序在recovery下運行,通常都須要添加該變量 示例:    LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_ADDITIONAL_DEPENDENCIES 額外的依賴 If your module needs to depend on anything else that isn't actually built in to it, you can add those make targets to LOCAL_ADDITIONAL_DEPENDENCIES.  Usually this is a workaround for some other dependency that isn't created automatically. LOCAL_ENABLE_APROF 編譯動態連接庫時用到 LOCAL_ENABLE_APROF_JNI 示例:   build/core/shared_library.mk:26:ifeq ($(strip $(LOCAL_ENABLE_APROF_JNI)),true) LOCAL_COMPRESS_MODULE_SYMBOLS 暫未見賦值之處 示例: build/core/dynamic_binary.mk:74:ifeq ($(LOCAL_COMPRESS_MODULE_SYMBOLS),true) LOCAL_STRIP_MODULE 表示該模塊生成的目標是否須要被strip    Calculated in base_rules.make to determine if this module should actually be stripped or not,    based on whether LOCAL_STRIPPABLE_MODULE is set, and whether the combo is configured to ever  strip modules.     With Iliyan's stripping tool, this might change. LOCAL_JNI_SHARED_LIBRARIES 示例:   packages/inputmethods/LatinIME/java/Android.mk:27:LOCAL_JNI_SHARED_LIBRARIES := libjni_latinime LOCAL_JNI_SHARED_LIBRARIES_ABI 暫未見賦值之處  示例:   build/core/package.mk:346:    jni_shared_libraries_abi := $(LOCAL_JNI_SHARED_LIBRARIES_ABI) LOCAL_JAR_MANIFEST 示例:   cts/tools/dasm/src/Android.mk:24:LOCAL_JAR_MANIFEST := ../etc/manifest.txt LOCAL_INSTRUMENTATION_FOR 示例:  packages/apps/Gallery/tests/Android.mk:15:LOCAL_INSTRUMENTATION_FOR := Gallery LOCAL_MANIFEST_INSTRUMENTATION_FOR 示例:   build/core/definitions.mk:2046:    $(call keep-or- override,LOCAL_MANIFEST_INSTRUMENTATION_FOR,$(patsubst &&%,%,$(word 7,$(_o)))) \ LOCAL_AIDL_INCLUDES 示例:   build/core/base_rules.mk:185:LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) LOCAL_JARJAR_RULES 示例:   frameworks/base/Android.mk:263:#LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt   build/core/java.mk:281:$(full_classes_jarjar_jar): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES) LOCAL_ADDITIONAL_JAVA_DIR 示例:   frameworks/base/Android.mk:738:LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_D IR) LOCAL_ALLOW_UNDEFINED_SYMBOLS 示例:  bionic/libthread_db/Android.mk:27:LOCAL_ALLOW_UNDEFINED_SYMBOLS := false LOCAL_DX_FLAGS 用dx處理jar代碼的flag LOCAL_CERTIFICATE 簽名用的證書 ./device/samsung/galaxys2-common/DeviceSettings/Android.mk:11:LOCAL_CERTIFICATE := platform LOCAL_SDK_VERSION build/core/java.mk裏定義該變量 LOCAL_SDK_VERSION := $(PDK_BUILD_SDK_VERSION) 若是定義了LOCAL_SDK_VERSION,那麼須要定義ndk編譯相關變量 由於編譯app時,常須要編譯jni代碼 示例:LOCAL_SDK_VERSION: 9 LOCAL_SDK_RES_VERSION ./build/core/static_java_library.mk:62:LOCAL_SDK_RES_VERSION:=$(strip $(LOCAL_SDK_RES_VERSION)) LOCAL_NDK_STL_VARIANT ./packages/inputmethods/LatinIME/native/jni/Android.mk:97:LOCAL_NDK_STL_VARIANT := stlport_static LOCAL_EMMA_INSTRUMENT 使用emma進行覆蓋代碼測試  ./build/core/java_library.mk:54:LOCAL_EMMA_INSTRUMENT := false LOCAL_PROGUARD_ENABLED 是否啓用混淆 LOCAL_PROGUARD_FLAGS 混淆使用的flag LOCAL_PROGUARD_FLAG_FILES 混淆使用的flag文件 LOCAL_EMMA_COVERAGE_FILTER 示例:   packages/apps/Browser/Android.mk:20:LOCAL_EMMA_COVERAGE_FILTER := *,-com.android.common.* LOCAL_WARNINGS_ENABLE 示例:   build/core/definitions.mk:1468:    $(if $(findstring  true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \ LOCAL_FULL_MANIFEST_FILE 示例:  build/core/package.mk:63:LOCAL_FULL_MANIFEST_FILE := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE) LOCAL_MANIFEST_FILE 示例:   build/core/package.mk:57:LOCAL_MANIFEST_FILE := AndroidManifest.xml LOCAL_RENDERSCRIPT_INCLUDES 示例:   frameworks/base/tests/RenderScriptTests/ImageProcessing2/Android.mk:30:LOCAL_RENDERSCRIPT_INCLUDES _OVERRIDE := $(TOPDIR)external/clang/lib/Headers \ LOCAL_RENDERSCRIPT_INCLUDES_OVERRIDE 示例:    frameworks/base/tests/RenderScriptTests/ImageProcessing2/Android.mk:30:LOCAL_RENDERSCRIPT_INCLUDES _OVERRIDE := $(TOPDIR)external/clang/lib/Headers \ LOCAL_RENDERSCRIPT_CC 示例:   build/core/java.mk:161:LOCAL_RENDERSCRIPT_CC := $(LLVM_RS_CC) LOCAL_RENDERSCRIPT_FLAGS 示例:  frameworks/base/tests/RenderScriptTests/ImageProcessing2/Android.mk:33:LOCAL_RENDERSCRIPT_FLAGS  := -rs-package-name=android.support.v8.renderscript LOCAL_RENDERSCRIPT_TARGET_API 示例:   frameworks/base/tests/RenderScriptTests/ImageProcessing2/Android.mk:29:LOCAL_RENDERSCRIPT_TARGET_A PI := 17 LOCAL_BUILD_HOST_DEX 示例:    libcore/JavaLibrary.mk:137:LOCAL_BUILD_HOST_DEX := true LOCAL_DEX_PREOPT 若是編譯模式選擇的是user或者userdebug,那麼LOCAL_DEX_PREOPT默認爲true,這樣資源apk和代碼文件分離 成爲odex  build/core/package.mk:156:LOCAL_DEX_PREOPT := true LOCAL_PROTOC_OPTIMIZE_TYPE 示例:   hardware/ril/mock-ril/Android.mk:57:LOCAL_PROTOC_OPTIMIZE_TYPE := full LOCAL_PROTOC_FLAGS 編譯.proto文件使用的flag,暫未見賦值  build/core/binary.mk:291:$(proto_generated_cc_sources): PRIVATE_PROTOC_FLAGS :=  $(LOCAL_PROTOC_FLAGS) LOCAL_NO_CRT 示例:    bionic/linker/Android.mk:70:LOCAL_NO_CRT := true LOCAL_PROPRIETARY_MODULE 是不是設備專有模塊 LOCAL_MODULE_OWNER 示例:   vendor/samsung/galaxys2-common/proprietary/Android.mk:21:LOCAL_MODULE_OWNER := samsung LOCAL_CTS_TEST_PACKAGE 示例: cts/tests/uiautomator/Android.mk:29:LOCAL_CTS_TEST_PACKAGE := android.uiautomator LOCAL_CTS_TEST_RUNNER 示例:    cts/tests/tests/accessibilityservice/Android.mk:32:LOCAL_CTS_TEST_RUNNER :=  com.android.cts.tradefed.testtype.AccessibilityServiceTestRunner LOCAL_CLANG 表示編譯C代碼 LOCAL_ADDRESS_SANITIZER 地址對齊 LOCAL_JAR_EXCLUDE_FILES 示例:      build/core/static_java_library.mk:44:LOCAL_JAR_EXCLUDE_FILES :=  $(ANDROID_RESOURCE_GENERATED_CLASSES) LOCAL_LINT_FLAGS 暫未見賦值之處 LOCAL_SOURCE_FILES_ALL_GENERATED LOCAL_SOURCE_FILES_ALL_GENERATED is set only if the module does not have static source files, but generated source files in its LOCAL_INTERMEDIATE_SOURCE_DIR You have to set up the dependency in some other way. LOCAL_DONT_DELETE_JAR_META_INF 示例:   cts/tests/core/ctscore.mk:24:LOCAL_DONT_DELETE_JAR_META_INF := true   build/core/java.mk:263:$(full_classes_compiled_jar): PRIVATE_DONT_DELETE_JAR_META_INF :=  $(LOCAL_DONT_DELETE_JAR_META_INF)
相關文章
相關標籤/搜索