LOCAL_MODULE_PATH

LOCAL_MODULE_PATH 表示模块生成的目标将最终存放的目录,也即目标的安装路径。

LOCAL_MODULE_CLASS用于制定LOCAL_MODULE_PATH的路径所在。

如果在Android.mk没有直接明确LOCAL_MODULE_PATH 的话,需要通过以下规则来自动生成base_rules.mk:

LOCAL_MODULE_PATH := (strip(LOCAL_MODULE_PATH))
ifeq ((LOCAL_MODULE_PATH),)
        #LOCAL_MODULE_CLASS :=
  LOCAL_MODULE_PATH :=((my_prefix)OUT(partition_tag)_(LOCAL_MODULE_CLASS))(info *******//(LOCAL_MODULE_PATH))
ifeq ((strip (LOCAL_MODULE_PATH)),)(error (LOCAL_PATH): unhandled LOCAL_MODULE_CLASS "(LOCAL_MODULE_CLASS)")
  endif
endif

在不同的Android.mk文件中,对于模块include()不同的编译类型选项,比如对于Library或者app,execut等在调用对应的处理mk文件时,会默认就指定当前的LOCAL_MODULE_CLASS的值,比如EXECUTABLES、SHARED_LIBRARIES等。所以在自己编写的Android.mk可不显示的指定LOCAL_MODULE_CLASS的值。
但当遇到 include $(BUILD_PREBUILT) 的预编译选项时不会指定模块模块编译输出的类型CLASS,需要在自己编写的Android.mk中明确指定LOCAL_MODULE_CLASS的值如ETC/APP等,使其值为非空,从而帮助系统确定LOCAL_MODULE_PATH的路径,比如最终编译输出 LOCAL_MODULE_PATH := $(TARGRT_OUT_ETC)

LOCAL_MODULE_PATH常用的取值

TARGET_OUT_INTERMEDIATES

TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj
示例:out/target/product/i9100/obj

TARGET_OUT_HEADERS

TARGET_OUT_HEADERS:= $(TARGET_OUT_INTERMEDIATES)/include
示例:out/target/product/i9100/obj/include

TARGET_OUT_INTERMEDIATE_LIBRARIES

TARGET_OUT_INTERMEDIATE_LIBRARIES := $(TARGET_OUT_INTERMEDIATES)/lib
示例:out/target/product/i9100/obj/lib

TARGET_OUT_COMMON_INTERMEDIATES

TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj
示例:out/target/common/obj

TARGET_OUT

TARGET_OUT := (PRODUCT_OUT)/(TARGET_COPY_OUT_SYSTEM)
示例:out/target/product/i9100/system

TARGET_OUT_EXECUTABLES

TARGET_OUT_EXECUTABLES:= $(TARGET_OUT)/bin
示例:out/target/product/i9100/system/bin

TARGET_OUT_OPTIONAL_EXECUTABLES

TARGET_OUT_OPTIONAL_EXECUTABLES:= $(TARGET_OUT)/xbin
示例:out/target/product/i9100/system/xbin

TARGET_OUT_SHARED_LIBRARIES

TARGET_OUT_SHARED_LIBRARIES:= $(TARGET_OUT)/lib
示例:out/target/product/i9100/system/lib

TARGET_OUT_JAVA_LIBRARIES

TARGET_OUT_JAVA_LIBRARIES:= $(TARGET_OUT)/framework
示例:out/target/product/i9100/system/framework

TARGET_OUT_APPS

TARGET_OUT_APPS:= $(TARGET_OUT)/app
示例:out/target/product/i9100/system/app

TARGET_OUT_KEYLAYOUT

TARGET_OUT_KEYLAYOUT := $(TARGET_OUT)/usr/keylayout
示例:out/target/product/i9100/system/usr/keylayout

TARGET_OUT_KEYCHARS

TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars
示例:out/target/product/i9100/system/usr/keychars

TARGET_OUT_ETC

TARGET_OUT_ETC := $(TARGET_OUT)/etc
示例:out/target/product/i9100/system/etc

TARGET_OUT_NOTICE_FILES

TARGET_OUT_NOTICE_FILES:=$(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES
示例:out/target/product/i9100/obj/NOTICE_FILES

TARGET_OUT_FAKE

TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages
示例:out/target/product/i9100/fake_packages

TARGET_OUT_DATA

TARGET_OUT_DATA := (PRODUCT_OUT)/(TARGET_COPY_OUT_DATA)

示例:out/target/product/i9100/data

TARGET_OUT_DATA_EXECUTABLES

TARGET_OUT_DATA_EXECUTABLES:= $(TARGET_OUT_EXECUTABLES)
示例:out/target/product/i9100/system/bin

TARGET_OUT_DATA_SHARED_LIBRARIES

TARGET_OUT_DATA_SHARED_LIBRARIES:= $(TARGET_OUT_SHARED_LIBRARIES)
示例:out/target/product/i9100/system/lib

TARGET_OUT_DATA_JAVA_LIBRARIES

TARGET_OUT_DATA_JAVA_LIBRARIES:= $(TARGET_OUT_JAVA_LIBRARIES)
示例:out/target/product/i9100/system/framework

TARGET_OUT_DATA_APPS

TARGET_OUT_DATA_APPS:= $(TARGET_OUT_DATA)/app
示例:out/target/product/i9100/data/app

TARGET_OUT_DATA_KEYLAYOUT

TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT)
示例:out/target/product/i9100/system/usr/keylayout

TARGET_OUT_DATA_KEYCHARS

TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS)
示例:out/target/product/i9100/system/usr/keychars

TARGET_OUT_DATA_ETC

TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC)
示例:out/target/product/i9100/system/etc

TARGET_OUT_DATA_NATIVE_TESTS

TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
示例:out/target/product/i9100/data/nativetest

TARGET_OUT_CACHE

TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache
示例:out/target/product/i9100/cache

TARGET_OUT_VENDOR

TARGET_OUT_VENDOR := (PRODUCT_OUT)/(TARGET_COPY_OUT_VENDOR)
示例:out/target/product/i9100/system/vendor

TARGET_OUT_VENDOR_EXECUTABLES

TARGET_OUT_VENDOR_EXECUTABLES:= $(TARGET_OUT_VENDOR)/bin
示例:out/target/product/i9100/system/vendor/bin

TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES

TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES:= $(TARGET_OUT_VENDOR)/xbin
示例:out/target/product/i9100/system/vendor/xbin

TARGET_OUT_VENDOR_SHARED_LIBRARIES

TARGET_OUT_VENDOR_SHARED_LIBRARIES:= $(TARGET_OUT_VENDOR)/lib
示例:out/target/product/i9100/system/vendor/lib

TARGET_OUT_VENDOR_JAVA_LIBRARIES

TARGET_OUT_VENDOR_JAVA_LIBRARIES:= $(TARGET_OUT_VENDOR)/framework
示例:out/target/product/i9100/system/vendor/framework

TARGET_OUT_VENDOR_APPS

TARGET_OUT_VENDOR_APPS:= $(TARGET_OUT_VENDOR)/app
示例:out/target/product/i9100/system/vendor/app

TARGET_OUT_VENDOR_ETC

TARGET_OUT_VENDOR_ETC := $(TARGET_OUT_VENDOR)/etc
示例:out/target/product/i9100/system/vendor/etc

TARGET_OUT_UNSTRIPPED

TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols
示例:out/target/product/i9100/system/symbols

TARGET_OUT_EXECUTABLES_UNSTRIPPED

TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin
示例:out/target/product/i9100/sysmbols/system/bin

TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED

TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/lib
示例:out/target/product/i9100/sysmbols/system/lib

Camera课程

Python教程

Java教程

Web教程

数据库教程

图形图像教程

办公软件教程

Linux教程

计算机教程

大数据教程

开发工具教程