1# This is included by the top-level Makefile. 2# It sets up standard variables based on the 3# current configuration and platform, which 4# are not specific to what is being built. 5 6ifndef KATI 7$(warning Directly using config.mk from make is no longer supported.) 8$(warning ) 9$(warning If you are just attempting to build, you probably need to re-source envsetup.sh:) 10$(warning ) 11$(warning $$ source build/envsetup.sh) 12$(warning ) 13$(warning If you are attempting to emulate get_build_var, use one of the following:) 14$(warning $$ build/soong/soong_ui.bash --dumpvar-mode) 15$(warning $$ build/soong/soong_ui.bash --dumpvars-mode) 16$(warning ) 17$(error done) 18endif 19 20BUILD_SYSTEM :=$= build/make/core 21BUILD_SYSTEM_COMMON :=$= build/make/common 22 23include $(BUILD_SYSTEM_COMMON)/core.mk 24 25# Mark variables that should be coming as environment variables from soong_ui 26# as readonly 27.KATI_READONLY := OUT_DIR TMPDIR BUILD_DATETIME_FILE 28ifdef CALLED_FROM_SETUP 29 .KATI_READONLY := CALLED_FROM_SETUP 30endif 31ifdef KATI_PACKAGE_MK_DIR 32 .KATI_READONLY := KATI_PACKAGE_MK_DIR 33endif 34 35# Mark variables deprecated/obsolete 36CHANGES_URL := https://android.googlesource.com/platform/build/+/master/Changes.md 37.KATI_READONLY := CHANGES_URL 38$(KATI_obsolete_var PATH,Do not use PATH directly. See $(CHANGES_URL)#PATH) 39$(KATI_obsolete_var PYTHONPATH,Do not use PYTHONPATH directly. See $(CHANGES_URL)#PYTHONPATH) 40$(KATI_obsolete_var OUT,Use OUT_DIR instead. See $(CHANGES_URL)#OUT) 41$(KATI_obsolete_var ANDROID_HOST_OUT,Use HOST_OUT instead. See $(CHANGES_URL)#ANDROID_HOST_OUT) 42$(KATI_obsolete_var ANDROID_PRODUCT_OUT,Use PRODUCT_OUT instead. See $(CHANGES_URL)#ANDROID_PRODUCT_OUT) 43$(KATI_obsolete_var ANDROID_HOST_OUT_TESTCASES,Use HOST_OUT_TESTCASES instead. See $(CHANGES_URL)#ANDROID_HOST_OUT_TESTCASES) 44$(KATI_obsolete_var ANDROID_TARGET_OUT_TESTCASES,Use TARGET_OUT_TESTCASES instead. See $(CHANGES_URL)#ANDROID_TARGET_OUT_TESTCASES) 45$(KATI_obsolete_var ANDROID_BUILD_TOP,Use '.' instead. See $(CHANGES_URL)#ANDROID_BUILD_TOP) 46$(KATI_obsolete_var \ 47 ANDROID_TOOLCHAIN \ 48 ANDROID_TOOLCHAIN_2ND_ARCH \ 49 ANDROID_DEV_SCRIPTS \ 50 ANDROID_EMULATOR_PREBUILTS \ 51 ANDROID_PRE_BUILD_PATHS \ 52 ,See $(CHANGES_URL)#other_envsetup_variables) 53$(KATI_obsolete_var PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE,Set FCM Version in device manifest instead. See $(CHANGES_URL)#PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE) 54$(KATI_obsolete_var USE_CLANG_PLATFORM_BUILD,Clang is the only supported Android compiler. See $(CHANGES_URL)#USE_CLANG_PLATFORM_BUILD) 55$(KATI_obsolete_var BUILD_DROIDDOC,Droiddoc is only supported in Soong. See details on build/soong/java/droiddoc.go) 56$(KATI_obsolete_var BUILD_APIDIFF,Apidiff is only supported in Soong. See details on build/soong/java/droiddoc.go) 57$(KATI_obsolete_var \ 58 DEFAULT_GCC_CPP_STD_VERSION \ 59 HOST_GLOBAL_CFLAGS 2ND_HOST_GLOBAL_CFLAGS \ 60 HOST_GLOBAL_CONLYFLAGS 2ND_HOST_GLOBAL_CONLYFLAGS \ 61 HOST_GLOBAL_CPPFLAGS 2ND_HOST_GLOBAL_CPPFLAGS \ 62 HOST_GLOBAL_LDFLAGS 2ND_HOST_GLOBAL_LDFLAGS \ 63 HOST_GLOBAL_LLDFLAGS 2ND_HOST_GLOBAL_LLDFLAGS \ 64 HOST_CLANG_SUPPORTED 2ND_HOST_CLANG_SUPPORTED \ 65 HOST_CC 2ND_HOST_CC \ 66 HOST_CXX 2ND_HOST_CXX \ 67 HOST_CROSS_GLOBAL_CFLAGS 2ND_HOST_CROSS_GLOBAL_CFLAGS \ 68 HOST_CROSS_GLOBAL_CONLYFLAGS 2ND_HOST_CROSS_GLOBAL_CONLYFLAGS \ 69 HOST_CROSS_GLOBAL_CPPFLAGS 2ND_HOST_CROSS_GLOBAL_CPPFLAGS \ 70 HOST_CROSS_GLOBAL_LDFLAGS 2ND_HOST_CROSS_GLOBAL_LDFLAGS \ 71 HOST_CROSS_GLOBAL_LLDFLAGS 2ND_HOST_CROSS_GLOBAL_LLDFLAGS \ 72 HOST_CROSS_CLANG_SUPPORTED 2ND_HOST_CROSS_CLANG_SUPPORTED \ 73 HOST_CROSS_CC 2ND_HOST_CROSS_CC \ 74 HOST_CROSS_CXX 2ND_HOST_CROSS_CXX \ 75 TARGET_GLOBAL_CFLAGS 2ND_TARGET_GLOBAL_CFLAGS \ 76 TARGET_GLOBAL_CONLYFLAGS 2ND_TARGET_GLOBAL_CONLYFLAGS \ 77 TARGET_GLOBAL_CPPFLAGS 2ND_TARGET_GLOBAL_CPPFLAGS \ 78 TARGET_GLOBAL_LDFLAGS 2ND_TARGET_GLOBAL_LDFLAGS \ 79 TARGET_GLOBAL_LLDFLAGS 2ND_TARGET_GLOBAL_LLDFLAGS \ 80 TARGET_CLANG_SUPPORTED 2ND_TARGET_CLANG_SUPPORTED \ 81 TARGET_CC 2ND_TARGET_CC \ 82 TARGET_CXX 2ND_TARGET_CXX \ 83 TARGET_TOOLCHAIN_ROOT 2ND_TARGET_TOOLCHAIN_ROOT \ 84 HOST_TOOLCHAIN_ROOT 2ND_HOST_TOOLCHAIN_ROOT \ 85 HOST_CROSS_TOOLCHAIN_ROOT 2ND_HOST_CROSS_TOOLCHAIN_ROOT \ 86 HOST_TOOLS_PREFIX 2ND_HOST_TOOLS_PREFIX \ 87 HOST_CROSS_TOOLS_PREFIX 2ND_HOST_CROSS_TOOLS_PREFIX \ 88 HOST_GCC_VERSION 2ND_HOST_GCC_VERSION \ 89 HOST_CROSS_GCC_VERSION 2ND_HOST_CROSS_GCC_VERSION \ 90 TARGET_NDK_GCC_VERSION 2ND_TARGET_NDK_GCC_VERSION \ 91 GLOBAL_CFLAGS_NO_OVERRIDE GLOBAL_CPPFLAGS_NO_OVERRIDE \ 92 ,GCC support has been removed. Use Clang instead) 93$(KATI_obsolete_var DIST_DIR dist_goal,Use dist-for-goals instead. See $(CHANGES_URL)#dist) 94$(KATI_obsolete_var TARGET_ANDROID_FILESYSTEM_CONFIG_H,Use TARGET_FS_CONFIG_GEN instead) 95$(KATI_deprecated_var USER,Use BUILD_USERNAME instead. See $(CHANGES_URL)#USER) 96 97# This is marked as obsolete in envsetup.mk after reading the BoardConfig.mk 98$(KATI_deprecate_export It is a global setting. See $(CHANGES_URL)#export_keyword) 99 100# Used to force goals to build. Only use for conditionally defined goals. 101.PHONY: FORCE 102FORCE: 103 104ORIGINAL_MAKECMDGOALS := $(MAKECMDGOALS) 105 106UNAME := $(shell uname -sm) 107 108SRC_TARGET_DIR := $(TOPDIR)build/target 109 110# Some specific paths to tools 111SRC_DROIDDOC_DIR := $(TOPDIR)build/make/tools/droiddoc 112 113# Mark some inputs as readonly 114ifdef TARGET_DEVICE_DIR 115 .KATI_READONLY := TARGET_DEVICE_DIR 116endif 117 118# Set up efficient math functions which are used in make. 119# Here since this file is included by envsetup as well as during build. 120include $(BUILD_SYSTEM_COMMON)/math.mk 121 122include $(BUILD_SYSTEM_COMMON)/strings.mk 123 124include $(BUILD_SYSTEM_COMMON)/json.mk 125 126# Various mappings to avoid hard-coding paths all over the place 127include $(BUILD_SYSTEM)/pathmap.mk 128 129# Allow projects to define their own globally-available variables 130include $(BUILD_SYSTEM)/project_definitions.mk 131 132# ############################################################### 133# Build system internal files 134# ############################################################### 135 136BUILD_COMBOS:= $(BUILD_SYSTEM)/combo 137 138CLEAR_VARS:= $(BUILD_SYSTEM)/clear_vars.mk 139BUILD_HOST_STATIC_LIBRARY:= $(BUILD_SYSTEM)/host_static_library.mk 140BUILD_HOST_SHARED_LIBRARY:= $(BUILD_SYSTEM)/host_shared_library.mk 141BUILD_STATIC_LIBRARY:= $(BUILD_SYSTEM)/static_library.mk 142BUILD_HEADER_LIBRARY:= $(BUILD_SYSTEM)/header_library.mk 143BUILD_AUX_STATIC_LIBRARY:= $(BUILD_SYSTEM)/aux_static_library.mk 144BUILD_AUX_EXECUTABLE:= $(BUILD_SYSTEM)/aux_executable.mk 145BUILD_SHARED_LIBRARY:= $(BUILD_SYSTEM)/shared_library.mk 146BUILD_EXECUTABLE:= $(BUILD_SYSTEM)/executable.mk 147BUILD_HOST_EXECUTABLE:= $(BUILD_SYSTEM)/host_executable.mk 148BUILD_PACKAGE:= $(BUILD_SYSTEM)/package.mk 149BUILD_PHONY_PACKAGE:= $(BUILD_SYSTEM)/phony_package.mk 150BUILD_RRO_PACKAGE:= $(BUILD_SYSTEM)/build_rro_package.mk 151BUILD_HOST_PREBUILT:= $(BUILD_SYSTEM)/host_prebuilt.mk 152BUILD_PREBUILT:= $(BUILD_SYSTEM)/prebuilt.mk 153BUILD_MULTI_PREBUILT:= $(BUILD_SYSTEM)/multi_prebuilt.mk 154BUILD_JAVA_LIBRARY:= $(BUILD_SYSTEM)/java_library.mk 155BUILD_STATIC_JAVA_LIBRARY:= $(BUILD_SYSTEM)/static_java_library.mk 156BUILD_HOST_JAVA_LIBRARY:= $(BUILD_SYSTEM)/host_java_library.mk 157BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk 158BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk 159BUILD_NATIVE_BENCHMARK := $(BUILD_SYSTEM)/native_benchmark.mk 160BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk 161BUILD_FUZZ_TEST := $(BUILD_SYSTEM)/fuzz_test.mk 162BUILD_HOST_FUZZ_TEST := $(BUILD_SYSTEM)/host_fuzz_test.mk 163 164BUILD_SHARED_TEST_LIBRARY := $(BUILD_SYSTEM)/shared_test_lib.mk 165BUILD_HOST_SHARED_TEST_LIBRARY := $(BUILD_SYSTEM)/host_shared_test_lib.mk 166BUILD_STATIC_TEST_LIBRARY := $(BUILD_SYSTEM)/static_test_lib.mk 167BUILD_HOST_STATIC_TEST_LIBRARY := $(BUILD_SYSTEM)/host_static_test_lib.mk 168 169BUILD_NOTICE_FILE := $(BUILD_SYSTEM)/notice_files.mk 170BUILD_HOST_DALVIK_JAVA_LIBRARY := $(BUILD_SYSTEM)/host_dalvik_java_library.mk 171BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY := $(BUILD_SYSTEM)/host_dalvik_static_java_library.mk 172 173BUILD_HOST_TEST_CONFIG := $(BUILD_SYSTEM)/host_test_config.mk 174BUILD_TARGET_TEST_CONFIG := $(BUILD_SYSTEM)/target_test_config.mk 175 176# ############################################################### 177# Parse out any modifier targets. 178# ############################################################### 179 180hide := @ 181 182################################################################ 183# Tools needed in product configuration makefiles. 184################################################################ 185NORMALIZE_PATH := build/make/tools/normalize_path.py 186 187# $(1): the paths to be normalized 188define normalize-paths 189$(if $(1),$(shell $(NORMALIZE_PATH) $(1))) 190endef 191 192# ############################################################### 193# Set common values 194# ############################################################### 195 196# Initialize SOONG_CONFIG_NAMESPACES so that it isn't recursive. 197SOONG_CONFIG_NAMESPACES := 198 199# Set the extensions used for various packages 200COMMON_PACKAGE_SUFFIX := .zip 201COMMON_JAVA_PACKAGE_SUFFIX := .jar 202COMMON_ANDROID_PACKAGE_SUFFIX := .apk 203 204ifdef TMPDIR 205JAVA_TMPDIR_ARG := -Djava.io.tmpdir=$(TMPDIR) 206else 207JAVA_TMPDIR_ARG := 208endif 209 210# ############################################################### 211# Include sub-configuration files 212# ############################################################### 213 214# --------------------------------------------------------------- 215# Try to include buildspec.mk, which will try to set stuff up. 216# If this file doesn't exist, the environment variables will 217# be used, and if that doesn't work, then the default is an 218# arm build 219ifndef ANDROID_BUILDSPEC 220ANDROID_BUILDSPEC := $(TOPDIR)buildspec.mk 221endif 222-include $(ANDROID_BUILDSPEC) 223 224# --------------------------------------------------------------- 225# Define most of the global variables. These are the ones that 226# are specific to the user's build configuration. 227include $(BUILD_SYSTEM)/envsetup.mk 228 229# Pruned directory options used when using findleaves.py 230# See envsetup.mk for a description of SCAN_EXCLUDE_DIRS 231FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(SCAN_EXCLUDE_DIRS) .repo .git) 232 233# The build system exposes several variables for where to find the kernel 234# headers: 235# TARGET_DEVICE_KERNEL_HEADERS is automatically created for the current 236# device being built. It is set as $(TARGET_DEVICE_DIR)/kernel-headers, 237# e.g. device/samsung/tuna/kernel-headers. This directory is not 238# explicitly set by anyone, the build system always adds this subdir. 239# 240# TARGET_BOARD_KERNEL_HEADERS is specified by the BoardConfig.mk file 241# to allow other directories to be included. This is useful if there's 242# some common place where a few headers are being kept for a group 243# of devices. For example, device/<vendor>/common/kernel-headers could 244# contain some headers for several of <vendor>'s devices. 245# 246# TARGET_PRODUCT_KERNEL_HEADERS is generated by the product inheritance 247# graph. This allows architecture products to provide headers for the 248# devices using that architecture. For example, 249# hardware/ti/omap4xxx/omap4.mk will specify 250# PRODUCT_VENDOR_KERNEL_HEADERS variable that specify where the omap4 251# specific headers are, e.g. hardware/ti/omap4xxx/kernel-headers. 252# The build system then combines all the values specified by all the 253# PRODUCT_VENDOR_KERNEL_HEADERS directives in the product inheritance 254# tree and then exports a TARGET_PRODUCT_KERNEL_HEADERS variable. 255# 256# The layout of subdirs in any of the kernel-headers dir should mirror the 257# layout of the kernel include/ directory. For example, 258# device/samsung/tuna/kernel-headers/linux/, 259# hardware/ti/omap4xxx/kernel-headers/media/, 260# etc. 261# 262# NOTE: These directories MUST contain post-processed headers using the 263# bionic/libc/kernel/tools/clean_header.py tool. Additionally, the original 264# kernel headers must also be checked in, but in a different subdirectory. By 265# convention, the originals should be checked into original-kernel-headers 266# directory of the same parent dir. For example, 267# device/samsung/tuna/kernel-headers <----- post-processed 268# device/samsung/tuna/original-kernel-headers <----- originals 269# 270TARGET_DEVICE_KERNEL_HEADERS := $(strip $(wildcard $(TARGET_DEVICE_DIR)/kernel-headers)) 271 272define validate-kernel-headers 273$(if $(firstword $(foreach hdr_dir,$(1),\ 274 $(filter-out kernel-headers,$(notdir $(hdr_dir))))),\ 275 $(error Kernel header dirs must be end in kernel-headers: $(1))) 276endef 277# also allow the board config to provide additional directories since 278# there could be device/oem/base_hw and device/oem/derived_hw 279# that both are valid devices but derived_hw needs to use kernel headers 280# from base_hw. 281TARGET_BOARD_KERNEL_HEADERS := $(strip $(wildcard $(TARGET_BOARD_KERNEL_HEADERS))) 282TARGET_BOARD_KERNEL_HEADERS := $(patsubst %/,%,$(TARGET_BOARD_KERNEL_HEADERS)) 283$(call validate-kernel-headers,$(TARGET_BOARD_KERNEL_HEADERS)) 284 285# then add product-inherited includes, to allow for 286# hardware/sivendor/chip/chip.mk to include their own headers 287TARGET_PRODUCT_KERNEL_HEADERS := $(strip $(wildcard $(PRODUCT_VENDOR_KERNEL_HEADERS))) 288TARGET_PRODUCT_KERNEL_HEADERS := $(patsubst %/,%,$(TARGET_PRODUCT_KERNEL_HEADERS)) 289$(call validate-kernel-headers,$(TARGET_PRODUCT_KERNEL_HEADERS)) 290.KATI_READONLY := TARGET_DEVICE_KERNEL_HEADERS TARGET_BOARD_KERNEL_HEADERS TARGET_PRODUCT_KERNEL_HEADERS 291 292# Commands to generate .toc file common to ELF .so files. 293define _gen_toc_command_for_elf 294$(hide) ($($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)READELF) -d $(1) | grep SONAME || echo "No SONAME for $1") > $(2) 295$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)READELF) --dyn-syms $(1) | awk '{$$2=""; $$3=""; print}' >> $(2) 296endef 297 298# Commands to generate .toc file from Darwin dynamic library. 299define _gen_toc_command_for_macho 300$(hide) $(HOST_OTOOL) -l $(1) | grep LC_ID_DYLIB -A 5 > $(2) 301$(hide) $(HOST_NM) -gP $(1) | cut -f1-2 -d" " | (grep -v U$$ >> $(2) || true) 302endef 303 304ifeq ($(CALLED_FROM_SETUP),true) 305include $(BUILD_SYSTEM)/ccache.mk 306include $(BUILD_SYSTEM)/goma.mk 307endif 308 309ifdef TARGET_PREFER_32_BIT 310TARGET_PREFER_32_BIT_APPS := true 311TARGET_PREFER_32_BIT_EXECUTABLES := true 312endif 313 314# GCC version selection 315TARGET_GCC_VERSION := 4.9 316ifdef TARGET_2ND_ARCH 3172ND_TARGET_GCC_VERSION := 4.9 318endif 319 320# Normalize WITH_STATIC_ANALYZER 321ifeq ($(strip $(WITH_STATIC_ANALYZER)),0) 322 WITH_STATIC_ANALYZER := 323endif 324 325# Unset WITH_TIDY_ONLY if global WITH_TIDY_ONLY is not true nor 1. 326ifeq (,$(filter 1 true,$(WITH_TIDY_ONLY))) 327 WITH_TIDY_ONLY := 328endif 329 330# Pick a Java compiler. 331include $(BUILD_SYSTEM)/combo/javac.mk 332 333# --------------------------------------------------------------- 334# Check that the configuration is current. We check that 335# BUILD_ENV_SEQUENCE_NUMBER is current against this value. 336# Don't fail if we're called from envsetup, so they have a 337# chance to update their environment. 338 339ifeq (,$(strip $(CALLED_FROM_SETUP))) 340ifneq (,$(strip $(BUILD_ENV_SEQUENCE_NUMBER))) 341ifneq ($(BUILD_ENV_SEQUENCE_NUMBER),$(CORRECT_BUILD_ENV_SEQUENCE_NUMBER)) 342$(warning BUILD_ENV_SEQUENCE_NUMBER is set incorrectly.) 343$(info *** If you use envsetup/lunch/choosecombo:) 344$(info *** - Re-execute envsetup (". envsetup.sh")) 345$(info *** - Re-run lunch or choosecombo) 346$(info *** If you use buildspec.mk:) 347$(info *** - Look at buildspec.mk.default to see what has changed) 348$(info *** - Update BUILD_ENV_SEQUENCE_NUMBER to "$(CORRECT_BUILD_ENV_SEQUENCE_NUMBER)") 349$(error bailing..) 350endif 351endif 352endif 353 354# Set up PDK so we can use TARGET_BUILD_PDK to select prebuilt tools below 355.PHONY: pdk fusion 356pdk fusion: $(DEFAULT_GOAL) 357 358# What to build: 359# pdk fusion if: 360# 1) PDK_FUSION_PLATFORM_ZIP / PDK_FUSION_PLATFORM_DIR is passed in from the environment 361# or 362# 2) the platform.zip / pdk.mk exists in the default location 363# or 364# 3) fusion is a command line build goal, 365# PDK_FUSION_PLATFORM_ZIP is needed anyway, then do we need the 'fusion' goal? 366# otherwise pdk only if: 367# 1) pdk is a command line build goal 368# or 369# 2) TARGET_BUILD_PDK is passed in from the environment 370 371# if PDK_FUSION_PLATFORM_ZIP or PDK_FUSION_PLATFORM_DIR is specified, do not override. 372ifeq (,$(strip $(PDK_FUSION_PLATFORM_ZIP)$(PDK_FUSION_PLATFORM_DIR))) 373 # Most PDK project paths should be using vendor/pdk/TARGET_DEVICE 374 # but some legacy ones (e.g. mini_armv7a_neon generic PDK) were setup 375 # with vendor/pdk/TARGET_PRODUCT. 376 # Others are set up with vendor/pdk/TARGET_DEVICE/TARGET_DEVICE-userdebug 377 _pdk_fusion_search_paths := \ 378 vendor/pdk/$(TARGET_DEVICE)/$(TARGET_DEVICE)-$(TARGET_BUILD_VARIANT)/platform \ 379 vendor/pdk/$(TARGET_DEVICE)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform \ 380 vendor/pdk/$(TARGET_DEVICE)/$(patsubst aosp_%,full_%,$(TARGET_PRODUCT))-$(TARGET_BUILD_VARIANT)/platform \ 381 vendor/pdk/$(TARGET_PRODUCT)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform \ 382 vendor/pdk/$(TARGET_PRODUCT)/$(patsubst aosp_%,full_%,$(TARGET_PRODUCT))-$(TARGET_BUILD_VARIANT)/platform 383 384 _pdk_fusion_default_platform_zip := $(strip $(foreach p,$(_pdk_fusion_search_paths),$(wildcard $(p)/platform.zip))) 385 ifneq (,$(_pdk_fusion_default_platform_zip)) 386 PDK_FUSION_PLATFORM_ZIP := $(word 1, $(_pdk_fusion_default_platform_zip)) 387 _pdk_fusion_default_platform_zip := 388 else 389 _pdk_fusion_default_platform_mk := $(strip $(foreach p,$(_pdk_fusion_search_paths),$(wildcard $(p)/pdk.mk))) 390 ifneq (,$(_pdk_fusion_default_platform_mk)) 391 PDK_FUSION_PLATFORM_DIR := $(dir $(word 1,$(_pdk_fusion_default_platform_mk))) 392 _pdk_fusion_default_platform_mk := 393 endif 394 endif # _pdk_fusion_default_platform_zip 395 _pdk_fusion_search_paths := 396endif # !PDK_FUSION_PLATFORM_ZIP && !PDK_FUSION_PLATFORM_DIR 397 398ifneq (,$(PDK_FUSION_PLATFORM_ZIP)) 399 ifneq (,$(PDK_FUSION_PLATFORM_DIR)) 400 $(error Only one of PDK_FUSION_PLATFORM_ZIP or PDK_FUSION_PLATFORM_DIR may be specified) 401 endif 402endif 403 404ifneq (,$(filter pdk fusion, $(MAKECMDGOALS))) 405TARGET_BUILD_PDK := true 406ifneq (,$(filter fusion, $(MAKECMDGOALS))) 407ifeq (,$(strip $(PDK_FUSION_PLATFORM_ZIP)$(PDK_FUSION_PLATFORM_DIR))) 408 $(error Specify PDK_FUSION_PLATFORM_ZIP or PDK_FUSION_PLATFORM_DIR to do a PDK fusion.) 409endif 410endif # fusion 411endif # pdk or fusion 412 413ifdef PDK_FUSION_PLATFORM_ZIP 414TARGET_BUILD_PDK := true 415ifeq (,$(wildcard $(PDK_FUSION_PLATFORM_ZIP))) 416 ifneq (,$(wildcard $(patsubst %.zip,%,$(PDK_FUSION_PLATFORM_ZIP))/pdk.mk)) 417 PDK_FUSION_PLATFORM_DIR := $(patsubst %.zip,%,$(PDK_FUSION_PLATFORM_ZIP)) 418 PDK_FUSION_PLATFORM_ZIP := 419 else 420 $(error Cannot find file $(PDK_FUSION_PLATFORM_ZIP).) 421 endif 422endif 423endif 424 425ifdef PDK_FUSION_PLATFORM_DIR 426TARGET_BUILD_PDK := true 427ifeq (,$(wildcard $(PDK_FUSION_PLATFORM_DIR)/pdk.mk)) 428 $(error Cannot find file $(PDK_FUSION_PLATFORM_DIR)/pdk.mk.) 429endif 430endif 431 432BUILD_PLATFORM_ZIP := $(filter platform platform-java,$(MAKECMDGOALS)) 433 434# --------------------------------------------------------------- 435# Whether we can expect a full build graph 436ALLOW_MISSING_DEPENDENCIES := $(filter true,$(ALLOW_MISSING_DEPENDENCIES)) 437ifneq ($(TARGET_BUILD_APPS),) 438ALLOW_MISSING_DEPENDENCIES := true 439endif 440ifeq ($(TARGET_BUILD_PDK),true) 441ALLOW_MISSING_DEPENDENCIES := true 442endif 443ifneq ($(filter true,$(SOONG_ALLOW_MISSING_DEPENDENCIES)),) 444ALLOW_MISSING_DEPENDENCIES := true 445endif 446ifneq ($(ONE_SHOT_MAKEFILE),) 447ALLOW_MISSING_DEPENDENCIES := true 448endif 449.KATI_READONLY := ALLOW_MISSING_DEPENDENCIES 450 451TARGET_BUILD_APPS_USE_PREBUILT_SDK := 452ifdef TARGET_BUILD_APPS 453 ifndef UNBUNDLED_BUILD_SDKS_FROM_SOURCE 454 TARGET_BUILD_APPS_USE_PREBUILT_SDK := true 455 endif 456endif 457 458prebuilt_sdk_tools := prebuilts/sdk/tools 459prebuilt_sdk_tools_bin := $(prebuilt_sdk_tools)/$(HOST_OS)/bin 460 461# Always use prebuilts for ckati and makeparallel 462prebuilt_build_tools := prebuilts/build-tools 463prebuilt_build_tools_wrappers := prebuilts/build-tools/common/bin 464prebuilt_build_tools_jars := prebuilts/build-tools/common/framework 465prebuilt_build_tools_bin_noasan := $(prebuilt_build_tools)/$(HOST_PREBUILT_TAG)/bin 466ifeq ($(filter address,$(SANITIZE_HOST)),) 467prebuilt_build_tools_bin := $(prebuilt_build_tools_bin_noasan) 468else 469prebuilt_build_tools_bin := $(prebuilt_build_tools)/$(HOST_PREBUILT_TAG)/asan/bin 470endif 471 472USE_PREBUILT_SDK_TOOLS_IN_PLACE := true 473 474# Work around for b/68406220 475# This should match the soong version. 476USE_D8 := true 477.KATI_READONLY := USE_D8 478 479# 480# Tools that are prebuilts for TARGET_BUILD_APPS 481# 482ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK))) 483 AIDL := $(HOST_OUT_EXECUTABLES)/aidl 484 AAPT := $(HOST_OUT_EXECUTABLES)/aapt 485 AAPT2 := $(HOST_OUT_EXECUTABLES)/aapt2 486 MAINDEXCLASSES := $(HOST_OUT_EXECUTABLES)/mainDexClasses 487 SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX) 488 SIGNAPK_JNI_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES) 489 ZIPALIGN := $(HOST_OUT_EXECUTABLES)/zipalign 490 491else # TARGET_BUILD_APPS || TARGET_BUILD_PDK 492 AIDL := $(prebuilt_build_tools_bin)/aidl 493 AAPT := $(prebuilt_sdk_tools_bin)/aapt 494 AAPT2 := $(prebuilt_sdk_tools_bin)/aapt2 495 MAINDEXCLASSES := $(prebuilt_sdk_tools)/mainDexClasses 496 SIGNAPK_JAR := $(prebuilt_sdk_tools)/lib/signapk$(COMMON_JAVA_PACKAGE_SUFFIX) 497 SIGNAPK_JNI_LIBRARY_PATH := $(prebuilt_sdk_tools)/$(HOST_OS)/lib64 498 ZIPALIGN := $(prebuilt_build_tools_bin)/zipalign 499endif # TARGET_BUILD_APPS || TARGET_BUILD_PDK 500 501ifeq (,$(TARGET_BUILD_APPS)) 502 # Use RenderScript prebuilts for unbundled builds but not PDK builds 503 LLVM_RS_CC := $(HOST_OUT_EXECUTABLES)/llvm-rs-cc 504 BCC_COMPAT := $(HOST_OUT_EXECUTABLES)/bcc_compat 505else 506 LLVM_RS_CC := $(prebuilt_sdk_tools_bin)/llvm-rs-cc 507 BCC_COMPAT := $(prebuilt_sdk_tools_bin)/bcc_compat 508endif # TARGET_BUILD_PDK 509 510prebuilt_sdk_tools := 511prebuilt_sdk_tools_bin := 512 513ACP := $(prebuilt_build_tools_bin)/acp 514CKATI := $(prebuilt_build_tools_bin)/ckati 515DEPMOD := $(HOST_OUT_EXECUTABLES)/depmod 516FILESLIST := $(SOONG_HOST_OUT_EXECUTABLES)/fileslist 517HOST_INIT_VERIFIER := $(HOST_OUT_EXECUTABLES)/host_init_verifier 518MAKEPARALLEL := $(prebuilt_build_tools_bin)/makeparallel 519SOONG_JAVAC_WRAPPER := $(SOONG_HOST_OUT_EXECUTABLES)/soong_javac_wrapper 520SOONG_ZIP := $(SOONG_HOST_OUT_EXECUTABLES)/soong_zip 521MERGE_ZIPS := $(SOONG_HOST_OUT_EXECUTABLES)/merge_zips 522XMLLINT := $(SOONG_HOST_OUT_EXECUTABLES)/xmllint 523ZIP2ZIP := $(SOONG_HOST_OUT_EXECUTABLES)/zip2zip 524ZIPTIME := $(prebuilt_build_tools_bin)/ziptime 525 526# --------------------------------------------------------------- 527# Generic tools. 528 529LEX := $(prebuilt_build_tools_bin_noasan)/flex 530# The default PKGDATADIR built in the prebuilt bison is a relative path 531# prebuilts/build-tools/common/bison. 532# To run bison from elsewhere you need to set up enviromental variable 533# BISON_PKGDATADIR. 534BISON_PKGDATADIR := $(PWD)/prebuilts/build-tools/common/bison 535BISON := $(prebuilt_build_tools_bin_noasan)/bison 536YACC := $(BISON) -d 537BISON_DATA := $(wildcard $(BISON_PKGDATADIR)/* $(BISON_PKGDATADIR)/*/*) 538 539YASM := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/yasm/yasm 540 541DOXYGEN:= doxygen 542ifeq ($(HOST_OS),linux) 543BREAKPAD_DUMP_SYMS := $(HOST_OUT_EXECUTABLES)/dump_syms 544else 545# For non-supported hosts, do not generate breakpad symbols. 546BREAKPAD_GENERATE_SYMBOLS := false 547endif 548PROTOC := $(HOST_OUT_EXECUTABLES)/aprotoc$(HOST_EXECUTABLE_SUFFIX) 549NANOPB_SRCS := $(HOST_OUT_EXECUTABLES)/protoc-gen-nanopb 550VTSC := $(HOST_OUT_EXECUTABLES)/vtsc$(HOST_EXECUTABLE_SUFFIX) 551MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX) 552MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX) 553BROTLI := $(HOST_OUT_EXECUTABLES)/brotli$(HOST_EXECUTABLE_SUFFIX) 554ifeq (,$(strip $(BOARD_CUSTOM_MKBOOTIMG))) 555MKBOOTIMG := $(HOST_OUT_EXECUTABLES)/mkbootimg$(HOST_EXECUTABLE_SUFFIX) 556else 557MKBOOTIMG := $(BOARD_CUSTOM_MKBOOTIMG) 558endif 559ifeq (,$(strip $(BOARD_CUSTOM_BPTTOOL))) 560BPTTOOL := $(HOST_OUT_EXECUTABLES)/bpttool$(HOST_EXECUTABLE_SUFFIX) 561else 562BPTTOOL := $(BOARD_CUSTOM_BPTTOOL) 563endif 564ifeq (,$(strip $(BOARD_CUSTOM_AVBTOOL))) 565AVBTOOL := $(HOST_OUT_EXECUTABLES)/avbtool$(HOST_EXECUTABLE_SUFFIX) 566else 567AVBTOOL := $(BOARD_CUSTOM_AVBTOOL) 568endif 569APICHECK := $(HOST_OUT_JAVA_LIBRARIES)/metalava$(COMMON_JAVA_PACKAGE_SUFFIX) 570FS_GET_STATS := $(HOST_OUT_EXECUTABLES)/fs_get_stats$(HOST_EXECUTABLE_SUFFIX) 571MAKE_EXT4FS := $(HOST_OUT_EXECUTABLES)/mke2fs$(HOST_EXECUTABLE_SUFFIX) 572MKEXTUSERIMG := $(HOST_OUT_EXECUTABLES)/mkuserimg_mke2fs 573MKE2FS_CONF := system/extras/ext4_utils/mke2fs.conf 574BLK_ALLOC_TO_BASE_FS := $(HOST_OUT_EXECUTABLES)/blk_alloc_to_base_fs$(HOST_EXECUTABLE_SUFFIX) 575MAKE_SQUASHFS := $(HOST_OUT_EXECUTABLES)/mksquashfs$(HOST_EXECUTABLE_SUFFIX) 576MKSQUASHFSUSERIMG := $(HOST_OUT_EXECUTABLES)/mksquashfsimage.sh 577MAKE_F2FS := $(HOST_OUT_EXECUTABLES)/make_f2fs$(HOST_EXECUTABLE_SUFFIX) 578MKF2FSUSERIMG := $(HOST_OUT_EXECUTABLES)/mkf2fsuserimg.sh 579SIMG2IMG := $(HOST_OUT_EXECUTABLES)/simg2img$(HOST_EXECUTABLE_SUFFIX) 580IMG2SIMG := $(HOST_OUT_EXECUTABLES)/img2simg$(HOST_EXECUTABLE_SUFFIX) 581E2FSCK := $(HOST_OUT_EXECUTABLES)/e2fsck$(HOST_EXECUTABLE_SUFFIX) 582MKTARBALL := build/make/tools/mktarball.sh 583TUNE2FS := $(HOST_OUT_EXECUTABLES)/tune2fs$(HOST_EXECUTABLE_SUFFIX) 584JARJAR := $(HOST_OUT_JAVA_LIBRARIES)/jarjar.jar 585DATA_BINDING_COMPILER := $(HOST_OUT_JAVA_LIBRARIES)/databinding-compiler.jar 586FAT16COPY := build/make/tools/fat16copy.py 587CHECK_LINK_TYPE := build/make/tools/check_link_type.py 588CHECK_ELF_FILE := build/make/tools/check_elf_file.py 589LPMAKE := $(HOST_OUT_EXECUTABLES)/lpmake$(HOST_EXECUTABLE_SUFFIX) 590BUILD_SUPER_IMAGE := build/make/tools/releasetools/build_super_image.py 591 592PROGUARD_HOME := external/proguard 593PROGUARD := $(PROGUARD_HOME)/bin/proguard.sh 594PROGUARD_DEPS := $(PROGUARD) $(PROGUARD_HOME)/lib/proguard.jar 595JAVATAGS := build/make/tools/java-event-log-tags.py 596MERGETAGS := build/make/tools/merge-event-log-tags.py 597BUILD_IMAGE_SRCS := $(wildcard build/make/tools/releasetools/*.py) 598APPEND2SIMG := $(HOST_OUT_EXECUTABLES)/append2simg 599VERITY_SIGNER := $(HOST_OUT_EXECUTABLES)/verity_signer 600BUILD_VERITY_METADATA := $(HOST_OUT_EXECUTABLES)/build_verity_metadata.py 601BUILD_VERITY_TREE := $(HOST_OUT_EXECUTABLES)/build_verity_tree 602BOOT_SIGNER := $(HOST_OUT_EXECUTABLES)/boot_signer 603FUTILITY := $(HOST_OUT_EXECUTABLES)/futility-host 604VBOOT_SIGNER := prebuilts/misc/scripts/vboot_signer/vboot_signer.sh 605FEC := $(HOST_OUT_EXECUTABLES)/fec 606BRILLO_UPDATE_PAYLOAD := $(HOST_OUT_EXECUTABLES)/brillo_update_payload 607 608DEXDUMP := $(HOST_OUT_EXECUTABLES)/dexdump2$(BUILD_EXECUTABLE_SUFFIX) 609PROFMAN := $(HOST_OUT_EXECUTABLES)/profman 610 611FINDBUGS_DIR := external/owasp/sanitizer/tools/findbugs/bin 612FINDBUGS := $(FINDBUGS_DIR)/findbugs 613 614JETIFIER := prebuilts/sdk/tools/jetifier/jetifier-standalone/bin/jetifier-standalone 615 616EXTRACT_KERNEL := build/make/tools/extract_kernel.py 617 618USE_OPENJDK9 := true 619 620ifeq ($(EXPERIMENTAL_USE_OPENJDK9),) 621TARGET_OPENJDK9 := 622else ifeq ($(EXPERIMENTAL_USE_OPENJDK9),1.8) 623TARGET_OPENJDK9 := 624else ifeq ($(EXPERIMENTAL_USE_OPENJDK9),true) 625TARGET_OPENJDK9 := true 626endif 627 628# Path to tools.jar 629HOST_JDK_TOOLS_JAR := $(ANDROID_JAVA8_HOME)/lib/tools.jar 630 631# It's called md5 on Mac OS and md5sum on Linux 632ifeq ($(HOST_OS),darwin) 633MD5SUM:=md5 -q 634else 635MD5SUM:=md5sum 636endif 637 638APICHECK_COMMAND := $(JAVA) -Xmx4g -jar $(APICHECK) --no-banner --compatible-output=yes 639 640# Boolean variable determining if the whitelist for compatible properties is enabled 641PRODUCT_COMPATIBLE_PROPERTY := false 642ifneq ($(PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE),) 643 PRODUCT_COMPATIBLE_PROPERTY := $(PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE) 644else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),) 645 #$(warning no product shipping level defined) 646else ifneq ($(call math_lt,27,$(PRODUCT_SHIPPING_API_LEVEL)),) 647 PRODUCT_COMPATIBLE_PROPERTY := true 648endif 649 650.KATI_READONLY := \ 651 PRODUCT_COMPATIBLE_PROPERTY 652 653# Boolean variable determining if Treble is fully enabled 654PRODUCT_FULL_TREBLE := false 655ifneq ($(PRODUCT_FULL_TREBLE_OVERRIDE),) 656 PRODUCT_FULL_TREBLE := $(PRODUCT_FULL_TREBLE_OVERRIDE) 657else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),) 658 #$(warning no product shipping level defined) 659else ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),26),) 660 PRODUCT_FULL_TREBLE := true 661endif 662 663# TODO(b/69865032): Make PRODUCT_NOTICE_SPLIT the default behavior and remove 664# references to it here and below. 665ifdef PRODUCT_NOTICE_SPLIT_OVERRIDE 666 $(error PRODUCT_NOTICE_SPLIT_OVERRIDE cannot be set.) 667endif 668 669requirements := \ 670 PRODUCT_TREBLE_LINKER_NAMESPACES \ 671 PRODUCT_SEPOLICY_SPLIT \ 672 PRODUCT_ENFORCE_VINTF_MANIFEST \ 673 PRODUCT_NOTICE_SPLIT 674 675# If it is overriden, then the requirement override is taken, otherwise it's 676# PRODUCT_FULL_TREBLE 677$(foreach req,$(requirements),$(eval \ 678 $(req) := $(if $($(req)_OVERRIDE),$($(req)_OVERRIDE),$(PRODUCT_FULL_TREBLE)))) 679# If the requirement is false for any reason, then it's not PRODUCT_FULL_TREBLE 680$(foreach req,$(requirements),$(eval \ 681 PRODUCT_FULL_TREBLE := $(if $(filter false,$($(req))),false,$(PRODUCT_FULL_TREBLE)))) 682 683PRODUCT_FULL_TREBLE_OVERRIDE ?= 684$(foreach req,$(requirements),$(eval $(req)_OVERRIDE ?=)) 685 686# TODO(b/114488870): disallow PRODUCT_FULL_TREBLE_OVERRIDE from being used. 687.KATI_READONLY := \ 688 PRODUCT_FULL_TREBLE_OVERRIDE \ 689 $(foreach req,$(requirements),$(req)_OVERRIDE) \ 690 $(requirements) \ 691 PRODUCT_FULL_TREBLE \ 692 693$(KATI_obsolete_var $(foreach req,$(requirements),$(req)_OVERRIDE) \ 694 ,This should be referenced without the _OVERRIDE suffix.) 695 696requirements := 697 698# BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED can be true only if early-mount of 699# partitions is supported. But the early-mount must be supported for full 700# treble products, and so BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED should be set 701# by default for full treble products. 702ifeq ($(PRODUCT_FULL_TREBLE),true) 703 BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED ?= true 704endif 705 706# If PRODUCT_USE_VNDK is true and BOARD_VNDK_VERSION is not defined yet, 707# BOARD_VNDK_VERSION will be set to "current" as default. 708# PRODUCT_USE_VNDK will be true in Android-P or later launching devices. 709PRODUCT_USE_VNDK := false 710ifneq ($(PRODUCT_USE_VNDK_OVERRIDE),) 711 PRODUCT_USE_VNDK := $(PRODUCT_USE_VNDK_OVERRIDE) 712else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),) 713 # No shipping level defined 714else ifeq ($(call math_gt_or_eq,27,$(PRODUCT_SHIPPING_API_LEVEL)),) 715 PRODUCT_USE_VNDK := $(PRODUCT_FULL_TREBLE) 716endif 717 718ifeq ($(PRODUCT_USE_VNDK),true) 719 ifndef BOARD_VNDK_VERSION 720 BOARD_VNDK_VERSION := current 721 endif 722endif 723 724$(KATI_obsolete_var PRODUCT_USE_VNDK_OVERRIDE,Use PRODUCT_USE_VNDK instead) 725.KATI_READONLY := \ 726 PRODUCT_USE_VNDK 727 728# Set BOARD_SYSTEMSDK_VERSIONS to the latest SystemSDK version starting from P-launching 729# devices if unset. 730ifndef BOARD_SYSTEMSDK_VERSIONS 731 ifdef PRODUCT_SHIPPING_API_LEVEL 732 ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),28),) 733 ifeq (REL,$(PLATFORM_VERSION_CODENAME)) 734 BOARD_SYSTEMSDK_VERSIONS := $(PLATFORM_SDK_VERSION) 735 else 736 BOARD_SYSTEMSDK_VERSIONS := $(PLATFORM_VERSION_CODENAME) 737 endif 738 endif 739 endif 740endif 741 742 743ifdef PRODUCT_SHIPPING_API_LEVEL 744 ifneq ($(call numbers_less_than,$(PRODUCT_SHIPPING_API_LEVEL),$(BOARD_SYSTEMSDK_VERSIONS)),) 745 $(error BOARD_SYSTEMSDK_VERSIONS ($(BOARD_SYSTEMSDK_VERSIONS)) must all be greater than or equal to PRODUCT_SHIPPING_API_LEVEL ($(PRODUCT_SHIPPING_API_LEVEL))) 746 endif 747 ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),28),) 748 ifneq ($(TARGET_IS_64_BIT), true) 749 ifneq ($(TARGET_USES_64_BIT_BINDER), true) 750 $(error When PRODUCT_SHIPPING_API_LEVEL >= 28, TARGET_USES_64_BIT_BINDER must be true) 751 endif 752 endif 753 endif 754 ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),29),) 755 ifneq ($(BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE),) 756 $(error When PRODUCT_SHIPPING_API_LEVEL >= 29, BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE cannot be set) 757 endif 758 endif 759endif 760 761# The default key if not set as LOCAL_CERTIFICATE 762ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE 763 DEFAULT_SYSTEM_DEV_CERTIFICATE := $(PRODUCT_DEFAULT_DEV_CERTIFICATE) 764else 765 DEFAULT_SYSTEM_DEV_CERTIFICATE := build/target/product/security/testkey 766endif 767.KATI_READONLY := DEFAULT_SYSTEM_DEV_CERTIFICATE 768 769BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt) 770BUILD_DATETIME_FROM_FILE := $$(cat $(BUILD_DATETIME_FILE)) 771 772# SEPolicy versions 773 774# PLATFORM_SEPOLICY_VERSION is a number of the form "NN.m" with "NN" mapping to 775# PLATFORM_SDK_VERSION and "m" as a minor number which allows for SELinux 776# changes independent of PLATFORM_SDK_VERSION. This value will be set to 777# 10000.0 to represent tip-of-tree development that is inherently unstable and 778# thus designed not to work with any shipping vendor policy. This is similar in 779# spirit to how DEFAULT_APP_TARGET_SDK is set. 780# The minor version ('m' component) must be updated every time a platform release 781# is made which breaks compatibility with the previous platform sepolicy version, 782# not just on every increase in PLATFORM_SDK_VERSION. The minor version should 783# be reset to 0 on every bump of the PLATFORM_SDK_VERSION. 784sepolicy_major_vers := 29 785sepolicy_minor_vers := 0 786 787ifneq ($(sepolicy_major_vers), $(PLATFORM_SDK_VERSION)) 788$(error sepolicy_major_version does not match PLATFORM_SDK_VERSION, please update.) 789endif 790 791TOT_SEPOLICY_VERSION := 10000.0 792ifneq (REL,$(PLATFORM_VERSION_CODENAME)) 793 PLATFORM_SEPOLICY_VERSION := $(TOT_SEPOLICY_VERSION) 794else 795 PLATFORM_SEPOLICY_VERSION := $(join $(addsuffix .,$(sepolicy_major_vers)), $(sepolicy_minor_vers)) 796endif 797sepolicy_major_vers := 798sepolicy_minor_vers := 799 800# A list of SEPolicy versions, besides PLATFORM_SEPOLICY_VERSION, that the framework supports. 801PLATFORM_SEPOLICY_COMPAT_VERSIONS := \ 802 26.0 \ 803 27.0 \ 804 28.0 \ 805 806.KATI_READONLY := \ 807 PLATFORM_SEPOLICY_COMPAT_VERSIONS \ 808 PLATFORM_SEPOLICY_VERSION \ 809 TOT_SEPOLICY_VERSION \ 810 811ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true) 812 ifneq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) 813 $(error PRODUCT_USE_DYNAMIC_PARTITIONS must be true when PRODUCT_RETROFIT_DYNAMIC_PARTITIONS \ 814 is set) 815 endif 816 ifdef PRODUCT_SHIPPING_API_LEVEL 817 ifeq (true,$(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),29)) 818 $(error Devices with shipping API level $(PRODUCT_SHIPPING_API_LEVEL) must not set \ 819 PRODUCT_RETROFIT_DYNAMIC_PARTITIONS) 820 endif 821 endif 822endif 823 824ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) 825 ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) 826 $(error BOARD_BUILD_SYSTEM_ROOT_IMAGE cannot be true for devices with dynamic partitions) 827 endif 828 ifneq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true) 829 $(error PRODUCT_USE_DYNAMIC_PARTITION_SIZE must be true for devices with dynamic partitions) 830 endif 831endif 832 833ifeq ($(PRODUCT_BUILD_SUPER_PARTITION),true) 834 ifneq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) 835 $(error Can only build super partition for devices with dynamic partitions) 836 endif 837endif 838 839 840ifeq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true) 841 842ifneq ($(BOARD_SYSTEMIMAGE_PARTITION_SIZE),) 843ifneq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),) 844$(error Should not define BOARD_SYSTEMIMAGE_PARTITION_SIZE and \ 845 BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE together) 846endif 847endif 848 849ifneq ($(BOARD_VENDORIMAGE_PARTITION_SIZE),) 850ifneq ($(BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE),) 851$(error Should not define BOARD_VENDORIMAGE_PARTITION_SIZE and \ 852 BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE together) 853endif 854endif 855 856ifneq ($(BOARD_ODMIMAGE_PARTITION_SIZE),) 857ifneq ($(BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE),) 858$(error Should not define BOARD_ODMIMAGE_PARTITION_SIZE and \ 859 BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE together) 860endif 861endif 862 863ifneq ($(BOARD_PRODUCTIMAGE_PARTITION_SIZE),) 864ifneq ($(BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE),) 865$(error Should not define BOARD_PRODUCTIMAGE_PARTITION_SIZE and \ 866 BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE together) 867endif 868endif 869 870ifneq ($(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE),) 871ifneq ($(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE),) 872$(error Should not define BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE and \ 873 BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE together) 874endif 875endif 876 877endif # PRODUCT_USE_DYNAMIC_PARTITION_SIZE 878 879ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) 880 881# BOARD_SUPER_PARTITION_GROUPS defines a list of "updatable groups". Each updatable group is a 882# group of partitions that share the same pool of free spaces. 883# For each group in BOARD_SUPER_PARTITION_GROUPS, a BOARD_{GROUP}_SIZE and 884# BOARD_{GROUP}_PARTITION_PARTITION_LIST may be defined. 885# - BOARD_{GROUP}_SIZE: The maximum sum of sizes of all partitions in the group. 886# Must not be empty. 887# - BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that belongs to this group. 888# If empty, no partitions belong to this group, and the sum of sizes is effectively 0. 889$(foreach group,$(call to-upper,$(BOARD_SUPER_PARTITION_GROUPS)), \ 890 $(eval BOARD_$(group)_PARTITION_LIST ?=) \ 891 $(eval .KATI_READONLY := BOARD_$(group)_PARTITION_LIST) \ 892) 893ifeq ($(PRODUCT_BUILD_SUPER_PARTITION),true) 894$(foreach group,$(call to-upper,$(BOARD_SUPER_PARTITION_GROUPS)), \ 895 $(eval BOARD_$(group)_SIZE := $(strip $(BOARD_$(group)_SIZE))) \ 896 $(if $(BOARD_$(group)_SIZE),,$(error BOARD_$(group)_SIZE must not be empty)) \ 897 $(eval .KATI_READONLY := BOARD_$(group)_SIZE) \ 898) 899endif # PRODUCT_BUILD_SUPER_PARTITION 900 901# BOARD_*_PARTITION_LIST: a list of the following tokens 902valid_super_partition_list := system vendor product product_services odm 903$(foreach group,$(call to-upper,$(BOARD_SUPER_PARTITION_GROUPS)), \ 904 $(if $(filter-out $(valid_super_partition_list),$(BOARD_$(group)_PARTITION_LIST)), \ 905 $(error BOARD_$(group)_PARTITION_LIST contains invalid partition name \ 906 $(filter-out $(valid_super_partition_list),$(BOARD_$(group)_PARTITION_LIST)). \ 907 Valid names are $(valid_super_partition_list)))) 908valid_super_partition_list := 909 910 911# Define BOARD_SUPER_PARTITION_PARTITION_LIST, the sum of all BOARD_*_PARTITION_LIST 912ifdef BOARD_SUPER_PARTITION_PARTITION_LIST 913$(error BOARD_SUPER_PARTITION_PARTITION_LIST should not be defined, but computed from \ 914 BOARD_SUPER_PARTITION_GROUPS and BOARD_*_PARTITION_LIST) 915endif 916BOARD_SUPER_PARTITION_PARTITION_LIST := \ 917 $(foreach group,$(call to-upper,$(BOARD_SUPER_PARTITION_GROUPS)), \ 918 $(BOARD_$(group)_PARTITION_LIST)) 919.KATI_READONLY := BOARD_SUPER_PARTITION_PARTITION_LIST 920 921endif # PRODUCT_USE_DYNAMIC_PARTITIONS 922 923ifeq ($(PRODUCT_BUILD_SUPER_PARTITION),true) 924 925ifneq ($(BOARD_SUPER_PARTITION_SIZE),) 926ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true) 927 928# The metadata device must be specified manually for retrofitting. 929ifeq ($(BOARD_SUPER_PARTITION_METADATA_DEVICE),) 930$(error Must specify BOARD_SUPER_PARTITION_METADATA_DEVICE if PRODUCT_RETROFIT_DYNAMIC_PARTITIONS=true.) 931endif 932 933# The super partition block device list must be specified manually for retrofitting. 934ifeq ($(BOARD_SUPER_PARTITION_BLOCK_DEVICES),) 935$(error Must specify BOARD_SUPER_PARTITION_BLOCK_DEVICES if PRODUCT_RETROFIT_DYNAMIC_PARTITIONS=true.) 936endif 937 938# The metadata device must be included in the super partition block device list. 939ifeq (,$(filter $(BOARD_SUPER_PARTITION_METADATA_DEVICE),$(BOARD_SUPER_PARTITION_BLOCK_DEVICES))) 940$(error BOARD_SUPER_PARTITION_METADATA_DEVICE is not listed in BOARD_SUPER_PARTITION_BLOCK_DEVICES.) 941endif 942 943# The metadata device must be supplied to init via the kernel command-line. 944INTERNAL_KERNEL_CMDLINE += androidboot.super_partition=$(BOARD_SUPER_PARTITION_METADATA_DEVICE) 945 946BOARD_BUILD_RETROFIT_DYNAMIC_PARTITIONS_OTA_PACKAGE := true 947 948# If "vendor" is listed as one of the dynamic partitions but without its image available (e.g. an 949# AOSP target built without vendor image), don't build the retrofit full OTA package. Because we 950# won't be able to build meaningful super_* images for retrofitting purpose. 951ifneq (,$(filter vendor,$(BOARD_SUPER_PARTITION_PARTITION_LIST))) 952ifndef BUILDING_VENDOR_IMAGE 953ifndef BOARD_PREBUILT_VENDORIMAGE 954BOARD_BUILD_RETROFIT_DYNAMIC_PARTITIONS_OTA_PACKAGE := 955endif # BOARD_PREBUILT_VENDORIMAGE 956endif # BUILDING_VENDOR_IMAGE 957endif # BOARD_SUPER_PARTITION_PARTITION_LIST 958 959else # PRODUCT_RETROFIT_DYNAMIC_PARTITIONS 960 961# For normal devices, we populate BOARD_SUPER_PARTITION_BLOCK_DEVICES so the 962# build can handle both cases consistently. 963ifeq ($(BOARD_SUPER_PARTITION_METADATA_DEVICE),) 964BOARD_SUPER_PARTITION_METADATA_DEVICE := super 965endif 966 967ifeq ($(BOARD_SUPER_PARTITION_BLOCK_DEVICES),) 968BOARD_SUPER_PARTITION_BLOCK_DEVICES := $(BOARD_SUPER_PARTITION_METADATA_DEVICE) 969endif 970 971# If only one super block device, default to super partition size. 972ifeq ($(word 2,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)),) 973BOARD_SUPER_PARTITION_$(call to-upper,$(strip $(BOARD_SUPER_PARTITION_BLOCK_DEVICES)))_DEVICE_SIZE ?= \ 974 $(BOARD_SUPER_PARTITION_SIZE) 975endif 976 977ifneq ($(BOARD_SUPER_PARTITION_METADATA_DEVICE),super) 978INTERNAL_KERNEL_CMDLINE += androidboot.super_partition=$(BOARD_SUPER_PARTITION_METADATA_DEVICE) 979endif 980BOARD_BUILD_RETROFIT_DYNAMIC_PARTITIONS_OTA_PACKAGE := 981 982endif # PRODUCT_RETROFIT_DYNAMIC_PARTITIONS 983endif # BOARD_SUPER_PARTITION_SIZE 984.KATI_READONLY := BOARD_SUPER_PARTITION_BLOCK_DEVICES 985.KATI_READONLY := BOARD_SUPER_PARTITION_METADATA_DEVICE 986.KATI_READONLY := BOARD_BUILD_RETROFIT_DYNAMIC_PARTITIONS_OTA_PACKAGE 987 988$(foreach device,$(call to-upper,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)), \ 989 $(eval BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE := $(strip $(BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE))) \ 990 $(if $(BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE),, \ 991 $(error BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE must not be empty)) \ 992 $(eval .KATI_READONLY := BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE)) 993 994endif # PRODUCT_BUILD_SUPER_PARTITION 995 996# ############################################################### 997# Set up final options. 998# ############################################################### 999 1000# We run gcc/clang with PWD=/proc/self/cwd to remove the $TOP 1001# from the debug output. That way two builds in two different 1002# directories will create the same output. 1003# /proc doesn't exist on Darwin. 1004ifeq ($(HOST_OS),linux) 1005RELATIVE_PWD := PWD=/proc/self/cwd 1006else 1007RELATIVE_PWD := 1008endif 1009 1010TARGET_PROJECT_INCLUDES := 1011TARGET_PROJECT_SYSTEM_INCLUDES := \ 1012 $(TARGET_DEVICE_KERNEL_HEADERS) $(TARGET_BOARD_KERNEL_HEADERS) \ 1013 $(TARGET_PRODUCT_KERNEL_HEADERS) 1014 1015ifdef TARGET_2ND_ARCH 1016$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_PROJECT_INCLUDES := $(TARGET_PROJECT_INCLUDES) 1017$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_PROJECT_SYSTEM_INCLUDES := $(TARGET_PROJECT_SYSTEM_INCLUDES) 1018endif 1019 1020# Flags for DEX2OAT 1021first_non_empty_of_three = $(if $(1),$(1),$(if $(2),$(2),$(3))) 1022DEX2OAT_TARGET_ARCH := $(TARGET_ARCH) 1023DEX2OAT_TARGET_CPU_VARIANT := $(call first_non_empty_of_three,$(TARGET_CPU_VARIANT),$(TARGET_ARCH_VARIANT),default) 1024DEX2OAT_TARGET_CPU_VARIANT_RUNTIME := $(call first_non_empty_of_three,$(TARGET_CPU_VARIANT_RUNTIME),$(TARGET_ARCH_VARIANT),default) 1025DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default 1026 1027ifdef TARGET_2ND_ARCH 1028$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH := $(TARGET_2ND_ARCH) 1029$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT := $(call first_non_empty_of_three,$(TARGET_2ND_CPU_VARIANT),$(TARGET_2ND_ARCH_VARIANT),default) 1030$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT_RUNTIME := $(call first_non_empty_of_three,$(TARGET_2ND_CPU_VARIANT_RUNTIME),$(TARGET_2ND_ARCH_VARIANT),default) 1031$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default 1032endif 1033 1034# ############################################################### 1035# Collect a list of the SDK versions that we could compile against 1036# For use with the LOCAL_SDK_VERSION variable for include $(BUILD_PACKAGE) 1037# ############################################################### 1038 1039HISTORICAL_SDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/sdk 1040HISTORICAL_NDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/ndk 1041 1042# The path where app can reference the support library resources. 1043ifdef TARGET_BUILD_APPS 1044SUPPORT_LIBRARY_ROOT := $(HISTORICAL_SDK_VERSIONS_ROOT)/current/support 1045else 1046SUPPORT_LIBRARY_ROOT := frameworks/support 1047endif 1048 1049get-sdk-version = $(if $(findstring _,$(1)),$(subst core_,,$(subst system_,,$(subst test_,,$(1)))),$(1)) 1050get-sdk-api = $(if $(findstring _,$(1)),$(patsubst %_$(call get-sdk-version,$(1)),%,$(1)),public) 1051get-prebuilt-sdk-dir = $(HISTORICAL_SDK_VERSIONS_ROOT)/$(call get-sdk-version,$(1))/$(call get-sdk-api,$(1)) 1052 1053# Resolve LOCAL_SDK_VERSION to prebuilt module name, e.g.: 1054# 23 -> sdk_public_23_android 1055# system_current -> sdk_system_current_android 1056# $(1): An sdk version (LOCAL_SDK_VERSION) 1057# $(2): optional library name (default: android) 1058define resolve-prebuilt-sdk-module 1059$(if $(findstring _,$(1)),\ 1060 sdk_$(1)_$(or $(2),android),\ 1061 sdk_public_$(1)_$(or $(2),android)) 1062endef 1063 1064# Resolve LOCAL_SDK_VERSION to prebuilt android.jar 1065# $(1): LOCAL_SDK_VERSION 1066resolve-prebuilt-sdk-jar-path = $(call get-prebuilt-sdk-dir,$(1))/android.jar 1067 1068# Resolve LOCAL_SDK_VERSION to prebuilt framework.aidl 1069# $(1): An sdk version (LOCAL_SDK_VERSION) 1070resolve-prebuilt-sdk-aidl-path = $(call get-prebuilt-sdk-dir,$(call get-sdk-version,$(1)))/framework.aidl 1071 1072# Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N. 1073# The 'current' version is whatever this source tree is. 1074# 1075# sgrax is the opposite of xargs. It takes the list of args and puts them 1076# on each line for sort to process. 1077# sort -g is a numeric sort, so 1 2 3 10 instead of 1 10 2 3. 1078 1079# Numerically sort a list of numbers 1080# $(1): the list of numbers to be sorted 1081define numerically_sort 1082$(shell function sgrax() { \ 1083 while [ -n "$$1" ] ; do echo $$1 ; shift ; done \ 1084 } ; \ 1085 ( sgrax $(1) | sort -g ) ) 1086endef 1087 1088# This produces a list like "current/core current/public current/system 4/public" 1089TARGET_AVAILABLE_SDK_VERSIONS := $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/*/android.jar) 1090TARGET_AVAILABLE_SDK_VERSIONS := $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/android.jar,%,$(TARGET_AVAILABLE_SDK_VERSIONS)) 1091# Strips and reorganizes the "public", "core" and "system" subdirs. 1092TARGET_AVAILABLE_SDK_VERSIONS := $(subst /public,,$(TARGET_AVAILABLE_SDK_VERSIONS)) 1093TARGET_AVAILABLE_SDK_VERSIONS := $(patsubst %/core,core_%,$(TARGET_AVAILABLE_SDK_VERSIONS)) 1094TARGET_AVAILABLE_SDK_VERSIONS := $(patsubst %/system,system_%,$(TARGET_AVAILABLE_SDK_VERSIONS)) 1095# No prebuilt for test_current. 1096TARGET_AVAILABLE_SDK_VERSIONS += test_current 1097TARGET_AVAIALBLE_SDK_VERSIONS := $(call numerically_sort,$(TARGET_AVAILABLE_SDK_VERSIONS)) 1098 1099TARGET_SDK_VERSIONS_WITHOUT_JAVA_18_SUPPORT := $(call numbers_less_than,24,$(TARGET_AVAILABLE_SDK_VERSIONS)) 1100TARGET_SDK_VERSIONS_WITHOUT_JAVA_19_SUPPORT := $(call numbers_less_than,27,$(TARGET_AVAILABLE_SDK_VERSIONS)) 1101 1102ifndef INTERNAL_PLATFORM_PRIVATE_API_FILE 1103INTERNAL_PLATFORM_PRIVATE_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/private.txt 1104endif 1105ifndef INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE 1106INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/private-dex.txt 1107endif 1108ifndef INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE 1109INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-private.txt 1110endif 1111ifndef INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE 1112INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-private-dex.txt 1113endif 1114 1115# Missing optional uses-libraries so that the platform doesn't create build rules that depend on 1116# them. See setup_one_odex.mk. 1117INTERNAL_PLATFORM_MISSING_USES_LIBRARIES := com.google.android.ble com.google.android.wearable 1118 1119# This is the standard way to name a directory containing prebuilt target 1120# objects. E.g., prebuilt/$(TARGET_PREBUILT_TAG)/libc.so 1121TARGET_PREBUILT_TAG := android-$(TARGET_ARCH) 1122ifdef TARGET_2ND_ARCH 1123TARGET_2ND_PREBUILT_TAG := android-$(TARGET_2ND_ARCH) 1124endif 1125 1126# Set up RS prebuilt variables for compatibility library 1127 1128RS_PREBUILT_CLCORE := prebuilts/sdk/renderscript/lib/$(TARGET_ARCH)/librsrt_$(TARGET_ARCH).bc 1129RS_PREBUILT_COMPILER_RT := prebuilts/sdk/renderscript/lib/$(TARGET_ARCH)/libcompiler_rt.a 1130 1131# API Level lists for Renderscript Compat lib. 1132RSCOMPAT_32BIT_ONLY_API_LEVELS := 8 9 10 11 12 13 14 15 16 17 18 19 20 1133RSCOMPAT_NO_USAGEIO_API_LEVELS := 8 9 10 11 12 13 1134 1135# Add BUILD_NUMBER to apps default version name if it's unbundled build. 1136ifdef TARGET_BUILD_APPS 1137TARGET_BUILD_WITH_APPS_VERSION_NAME := true 1138endif 1139 1140ifdef TARGET_BUILD_WITH_APPS_VERSION_NAME 1141APPS_DEFAULT_VERSION_NAME := $(PLATFORM_VERSION)-$(BUILD_NUMBER_FROM_FILE) 1142else 1143APPS_DEFAULT_VERSION_NAME := $(PLATFORM_VERSION) 1144endif 1145 1146# ANDROID_WARNING_ALLOWED_PROJECTS is generated by build/soong. 1147define find_warning_allowed_projects 1148 $(filter $(ANDROID_WARNING_ALLOWED_PROJECTS),$(1)/) 1149endef 1150 1151# These goals don't need to collect and include Android.mks/CleanSpec.mks 1152# in the source tree. 1153dont_bother_goals := out \ 1154 snod systemimage-nodeps \ 1155 stnod systemtarball-nodeps \ 1156 userdataimage-nodeps userdatatarball-nodeps \ 1157 cacheimage-nodeps \ 1158 bptimage-nodeps \ 1159 vnod vendorimage-nodeps \ 1160 pnod productimage-nodeps \ 1161 psnod productservicesimage-nodeps \ 1162 onod odmimage-nodeps \ 1163 systemotherimage-nodeps \ 1164 ramdisk-nodeps \ 1165 ramdisk_debug-nodeps \ 1166 bootimage-nodeps \ 1167 bootimage_debug-nodeps \ 1168 recoveryimage-nodeps \ 1169 vbmetaimage-nodeps \ 1170 product-graph dump-products 1171 1172ifeq ($(CALLED_FROM_SETUP),true) 1173include $(BUILD_SYSTEM)/ninja_config.mk 1174include $(BUILD_SYSTEM)/soong_config.mk 1175endif 1176 1177-include external/linux-kselftest/android/kselftest_test_list.mk 1178-include external/ltp/android/ltp_package_list.mk 1179DEFAULT_DATA_OUT_MODULES := ltp $(ltp_packages) $(kselftest_modules) 1180.KATI_READONLY := DEFAULT_DATA_OUT_MODULES 1181 1182include $(BUILD_SYSTEM)/dumpvar.mk 1183