Android编译系统参考手册

2019-07-15  本文已影响0人  andforce

TARGET_PRODUCT

示例:cm_i9100

UNAME

操作系统+体系结构
例:Linux x86_64

HOST_OS

主机操作系统
linux darwin windows

BUILD_OS

编译所在主机的操作系统
BUILD_OS := $(HOST_OS)

HOST_ARCH

主机体系结构
x86 ppc

BUILD_ARCH

编译系统所在主机的操作系统
$(BUILD_OS)
x86 ppc

HOST_BUILD_TYPE

主机编译类型 release 或者debug

HOST_PREBUILT_TAG

This is the standard way to name a directory containing prebuilt host
objects. E.g., prebuilt/$(HOST_PREBUILT_TAG)/cc
ifeq ($(HOST_OS),windows)
  HOST_PREBUILT_TAG := windows
else
  HOST_PREBUILT_TAG := $(HOST_OS)-$(HOST_ARCH)
endif
linux-x86

TARGET_COPY_OUT_SYSTEM

TARGET_COPY_OUT_SYSTEM := system

TARGET_COPY_OUT_DATA

TARGET_COPY_OUT_DATA := data

TARGET_COPY_OUT_VENDOR

TARGET_COPY_OUT_VENDOR := system/vendor

TARGET_COPY_OUT_ROOT

TARGET_COPY_OUT_ROOT := root

TARGET_COPY_OUT_RECOVERY

TARGET_COPY_OUT_RECOVERY := recovery

TARGET_OS

TARGET_OS := linux

TARGET_BUILD_TYPE

ifneq ($(TARGET_BUILD_TYPE),debug)
  TARGET_BUILD_TYPE := release
endif   

OUT_DIR

ifeq (,$(strip $(OUT_DIR)))
    ifeq (,$(strip $(OUT_DIR_COMMON_BASE)))
        ifneq ($(TOPDIR),)
            OUT_DIR := $(TOPDIR)out
        else
            OUT_DIR := $(CURDIR)/out
        endif
    else
        OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD))
    endif
endif

DEBUG_OUT_DIR

DEBUG_OUT_DIR := $(OUT_DIR)/debug

示例:out/debug

TARGET_OUT_ROOT_release

TARGET_OUT_ROOT_release := $(OUT_DIR)/target

示例:out/target

TARGET_OUT_ROOT_debug

TARGET_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/target

示例:out/debug/target

TARGET_OUT_ROOT

TARGET_OUT_ROOT := $(TARGET_OUT_ROOT_$(TARGET_BUILD_TYPE))

示例:out/target 或者out/debug/target

HOST_OUT_ROOT_release

HOST_OUT_ROOT_release := $(OUT_DIR)/host

示例:out/host

HOST_OUT_ROOT_debug

HOST_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/host

示例:out/debug/host

HOST_OUT_ROOT

HOST_OUT_ROOT := $(HOST_OUT_ROOT_$(HOST_BUILD_TYPE))

示例:out/host或者out/debug/host

HOST_OUT_release

HOST_OUT_release := $(HOST_OUT_ROOT_release)/$(HOST_OS)-$(HOST_ARCH)

示例:oust/host/linux-x86

HOST_OUT_debug

HOST_OUT_debug := $(HOST_OUT_ROOT_debug)/$(HOST_OS)-$(HOST_ARCH)

示例:out/debug/host/linux-x86

HOST_OUT

HOST_OUT := $(HOST_OUT_$(HOST_BUILD_TYPE))

示例:oust/host/linux-x86

BUILD_OUT

BUILD_OUT := $(OUT_DIR)/host/$(BUILD_OS)-$(BUILD_ARCH)

示例:out/host/linux-x86

TARGET_PRODUCT_OUT_ROOT

TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product

示例:out/target/product

TARGET_COMMON_OUT_ROOT

TARGET_COMMON_OUT_ROOT := $(TARGET_OUT_ROOT)/common

示例:out/target/common

HOST_COMMON_OUT_ROOT

HOST_COMMON_OUT_ROOT := $(HOST_OUT_ROOT)/common

示例:out/target/common

PRODUCT_OUT

PRODUCT_OUT := $(TARGET_PRODUCT_OUT_ROOT)/$(TARGET_DEVICE)

示例:out/target/product/i9100

OUT_DOCS

OUT_DOCS := $(TARGET_COMMON_OUT_ROOT)/docs

示例:out/target/common/docs

BUILD_OUT

示例:out/host/linux-x86

BUILD_OUT_EXECUTABLES

BUILD_OUT_EXECUTABLES:= $(BUILD_OUT)/bin

示例:out/host/linux-x86/bin

HOST_OUT_EXECUTABLES

HOST_OUT_EXECUTABLES:= $(HOST_OUT)/bin
示例:out/host/linux-x86/bin

HOST_OUT_SHARED_LIBRARIES

HOST_OUT_SHARED_LIBRARIES:= $(HOST_OUT)/lib

示例:out/host/linux-x86/lib

HOST_OUT_JAVA_LIBRARIES

HOST_OUT_JAVA_LIBRARIES:= $(HOST_OUT)/framework

示例:out/host/linux-x86/framework

HOST_OUT_SDK_ADDON

HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon

示例:out/host/linux-x86/sdk_addon

HOST_OUT_INTERMEDIATES

HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj

示例:out/host/linux-x86/obj

HOST_OUT_HEADERS

HOST_OUT_HEADERS:= $(HOST_OUT_INTERMEDIATES)/include

示例:out/host/linux-x86/obj/include

HOST_OUT_INTERMEDIATE_LIBRARIES

HOST_OUT_INTERMEDIATE_LIBRARIES := $(HOST_OUT_INTERMEDIATES)/lib

示例:out/host/linux-x86/obj/lib

HOST_OUT_NOTICE_FILES

HOST_OUT_NOTICE_FILES:=$(HOST_OUT_INTERMEDIATES)/NOTICE_FILES

示例:out/host/linux-x86/obj/NOTICE_FILES

HOST_OUT_COMMON_INTERMEDIATES

HOST_OUT_COMMON_INTERMEDIATES := $(HOST_COMMON_OUT_ROOT)/obj

示例:out/host/linux-x86/obj

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

TARGET_ROOT_OUT_UNSTRIPPED

TARGET_ROOT_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)

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

TARGET_ROOT_OUT_SBIN_UNSTRIPPED

TARGET_ROOT_OUT_SBIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/sbin

示例:out/target/product/i9100/sysmbols/sbin

TARGET_ROOT_OUT_BIN_UNSTRIPPED

TARGET_ROOT_OUT_BIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/bin

示例:out/target/product/i9100/sysmbols/bin

TARGET_ROOT_OUT

TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT)

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

TARGET_ROOT_OUT_BIN

TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin

示例:out/target/product/i9100/root/bin

TARGET_ROOT_OUT_SBIN

TARGET_ROOT_OUT_SBIN := $(TARGET_ROOT_OUT)/sbin

示例:out/target/product/i9100/root/sbin

TARGET_ROOT_OUT_ETC

TARGET_ROOT_OUT_ETC := $(TARGET_ROOT_OUT)/etc

示例:out/target/product/i9100/root/etc

TARGET_ROOT_OUT_USR

TARGET_ROOT_OUT_USR := $(TARGET_ROOT_OUT)/usr

示例:out/target/product/i9100/root/usr

TARGET_RECOVERY_OUT

TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RECOVERY)

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

TARGET_RECOVERY_ROOT_OUT

TARGET_RECOVERY_ROOT_OUT := $(TARGET_RECOVERY_OUT)/root

示例:out/target/product/i9100/recovery/root

TARGET_SYSLOADER_OUT

TARGET_SYSLOADER_OUT := $(PRODUCT_OUT)/sysloader

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

TARGET_SYSLOADER_ROOT_OUT

TARGET_SYSLOADER_ROOT_OUT := $(TARGET_SYSLOADER_OUT)/root

示例:out/target/product/i9100/sysloader/root

TARGET_SYSLOADER_SYSTEM_OUT

TARGET_SYSLOADER_SYSTEM_OUT := $(TARGET_SYSLOADER_OUT)/root/system

示例:out/target/product/i9100/sysloader/root/system

TARGET_INSTALLER_OUT

TARGET_INSTALLER_OUT := $(PRODUCT_OUT)/installer

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

TARGET_INSTALLER_DATA_OUT

TARGET_INSTALLER_DATA_OUT := $(TARGET_INSTALLER_OUT)/data

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

TARGET_INSTALLER_ROOT_OUT

TARGET_INSTALLER_ROOT_OUT := $(TARGET_INSTALLER_OUT)/root

示例:out/target/product/i9100/installer/root

TARGET_INSTALLER_SYSTEM_OUT

TARGET_INSTALLER_SYSTEM_OUT := $(TARGET_INSTALLER_OUT)/root/system

示例:out/target/product/i9100/installer/root/system

TARGET_FACTORY_RAMDISK_OUT

TARGET_FACTORY_RAMDISK_OUT := $(PRODUCT_OUT)/factory_ramdisk

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

COMMON_MODULE_CLASSES

COMMON_MODULE_CLASSES := TARGET-NOTICE_FILES HOST-NOTICE_FILES HOST-JAVA_LIBRARIES

DIST_DIR

ifeq (,$(strip $(DIST_DIR)))
    DIST_DIR := $(OUT_DIR)/dist
endif

示例:out/dist

PRINT_BUILD_CONFIG

ifeq ($(PRINT_BUILD_CONFIG),)
    PRINT_BUILD_CONFIG := true
endif
上一篇下一篇

猜你喜欢

热点阅读