The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | # Variables we check: |
| 2 | # HOST_BUILD_TYPE = { release debug } |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 3 | # TARGET_BUILD_TYPE = { release debug } |
| 4 | # and we output a bunch of variables, see the case statement at |
| 5 | # the bottom for the full list |
| 6 | # OUT_DIR is also set to "out" if it's not already set. |
| 7 | # this allows you to set it to somewhere else if you like |
C. Sean Young | cf46998 | 2015-06-09 12:35:45 -0500 | [diff] [blame] | 8 | # SCAN_EXCLUDE_DIRS is an optional, whitespace separated list of |
| 9 | # directories that will also be excluded from full checkout tree |
| 10 | # searches for source or make files, in addition to OUT_DIR. |
| 11 | # This can be useful if you set OUT_DIR to be a different directory |
| 12 | # than other outputs of your build system. |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 13 | |
Colin Cross | c901659 | 2017-03-28 13:07:56 -0700 | [diff] [blame] | 14 | # Returns all words in $1 up to and including $2 |
| 15 | define find_and_earlier |
| 16 | $(strip $(if $(1), |
| 17 | $(firstword $(1)) |
| 18 | $(if $(filter $(firstword $(1)),$(2)),, |
| 19 | $(call find_and_earlier,$(wordlist 2,$(words $(1)),$(1)),$(2))))) |
| 20 | endef |
| 21 | |
| 22 | #$(warning $(call find_and_earlier,A B C,A)) |
| 23 | #$(warning $(call find_and_earlier,A B C,B)) |
| 24 | #$(warning $(call find_and_earlier,A B C,C)) |
| 25 | #$(warning $(call find_and_earlier,A B C,D)) |
| 26 | |
| 27 | define version-list |
| 28 | $(1)PR1 $(1)PD1 $(1)PD2 $(1)PM1 $(1)PM2 |
| 29 | endef |
| 30 | |
| 31 | ALL_VERSIONS := O P Q R S T U V W X Y Z |
| 32 | ALL_VERSIONS := $(foreach v,$(ALL_VERSIONS),$(call version-list,$(v))) |
| 33 | |
| 34 | # Filters ALL_VERSIONS down to the range [$1, $2], and errors if $1 > $2 or $3 is |
| 35 | # not in [$1, $2] |
| 36 | # $(1): min platform version |
| 37 | # $(2): max platform version |
| 38 | # $(3): default platform version |
| 39 | define allowed-platform-versions |
| 40 | $(strip \ |
| 41 | $(if $(filter $(ALL_VERSIONS),$(1)),, |
| 42 | $(error Invalid MIN_PLATFORM_VERSION '$(1)')) |
| 43 | $(if $(filter $(ALL_VERSIONS),$(2)),, |
| 44 | $(error Invalid MAX_PLATFORM_VERSION '$(2)')) |
| 45 | $(if $(filter $(ALL_VERSIONS),$(3)),, |
| 46 | $(error Invalid DEFAULT_PLATFORM_VERSION '$(3)')) |
| 47 | |
| 48 | $(eval allowed_versions_ := $(call find_and_earlier,$(ALL_VERSIONS),$(2))) |
| 49 | |
| 50 | $(if $(filter $(allowed_versions_),$(1)),, |
| 51 | $(error MIN_PLATFORM_VERSION '$(1)' must be before MAX_PLATFORM_VERSION '$(2)')) |
| 52 | |
| 53 | $(eval allowed_versions_ := $(1) \ |
| 54 | $(filter-out $(call find_and_earlier,$(allowed_versions_),$(1)),$(allowed_versions_))) |
| 55 | |
| 56 | $(if $(filter $(allowed_versions_),$(3)),, |
| 57 | $(error DEFAULT_PLATFORM_VERSION '$(3)' must be between MIN_PLATFORM_VERSION '$(1)' and MAX_PLATFORM_VERSION '$(2)')) |
| 58 | |
| 59 | $(allowed_versions_)) |
| 60 | endef |
| 61 | |
| 62 | #$(warning $(call allowed-platform-versions,OPR1,PPR1,OPR1)) |
| 63 | #$(warning $(call allowed-platform-versions,OPM1,PPR1,OPR1)) |
| 64 | |
Joe Onorato | eefd021 | 2009-05-13 00:45:23 -0400 | [diff] [blame] | 65 | # Set up version information. |
| 66 | include $(BUILD_SYSTEM)/version_defaults.mk |
| 67 | |
Colin Cross | c901659 | 2017-03-28 13:07:56 -0700 | [diff] [blame] | 68 | ENABLED_VERSIONS := $(call find_and_earlier,$(ALL_VERSIONS),$(TARGET_PLATFORM_VERSION)) |
| 69 | |
| 70 | $(foreach v,$(ENABLED_VERSIONS), \ |
| 71 | $(eval IS_AT_LEAST_$(v) := true)) |
| 72 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 73 | # --------------------------------------------------------------- |
| 74 | # If you update the build system such that the environment setup |
| 75 | # or buildspec.mk need to be updated, increment this number, and |
| 76 | # people who haven't re-run those will have to do so before they |
| 77 | # can build. Make sure to also update the corresponding value in |
| 78 | # buildspec.mk.default and envsetup.sh. |
Colin Cross | 8873713 | 2017-03-21 17:41:03 -0700 | [diff] [blame] | 79 | CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 13 |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 80 | |
| 81 | # --------------------------------------------------------------- |
Jeff Brown | e33ba4c | 2011-07-11 22:11:46 -0700 | [diff] [blame] | 82 | # The product defaults to generic on hardware |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 83 | # NOTE: This will be overridden in product_config.mk if make |
| 84 | # was invoked with a PRODUCT-xxx-yyy goal. |
| 85 | ifeq ($(TARGET_PRODUCT),) |
Ying Wang | 0a76df5 | 2015-06-08 11:57:26 -0700 | [diff] [blame] | 86 | TARGET_PRODUCT := aosp_arm |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 87 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 88 | |
| 89 | |
| 90 | # the variant -- the set of files that are included for a build |
| 91 | ifeq ($(strip $(TARGET_BUILD_VARIANT)),) |
| 92 | TARGET_BUILD_VARIANT := eng |
| 93 | endif |
| 94 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 95 | # --------------------------------------------------------------- |
| 96 | # Set up configuration for host machine. We don't do cross- |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 97 | # compiles except for arm/mips, so the HOST is whatever we are |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 98 | # running on |
| 99 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 100 | # HOST_OS |
| 101 | ifneq (,$(findstring Linux,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 102 | HOST_OS := linux |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 103 | endif |
| 104 | ifneq (,$(findstring Darwin,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 105 | HOST_OS := darwin |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 106 | endif |
| 107 | ifneq (,$(findstring Macintosh,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 108 | HOST_OS := darwin |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 109 | endif |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 110 | |
Dan Willemsen | ce7f8dd | 2017-07-25 00:57:38 -0700 | [diff] [blame] | 111 | HOST_OS_EXTRA := $(shell uname -rsm) |
| 112 | ifeq ($(HOST_OS),linux) |
| 113 | ifneq ($(wildcard /etc/os-release),) |
| 114 | HOST_OS_EXTRA += $(shell source /etc/os-release; echo $$PRETTY_NAME) |
| 115 | endif |
| 116 | else ifeq ($(HOST_OS),darwin) |
| 117 | HOST_OS_EXTRA += $(shell sw_vers -productVersion) |
| 118 | endif |
| 119 | HOST_OS_EXTRA := $(subst $(space),-,$(HOST_OS_EXTRA)) |
Ying Wang | 08800fd | 2016-03-03 20:57:21 -0800 | [diff] [blame] | 120 | |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 121 | # BUILD_OS is the real host doing the build. |
| 122 | BUILD_OS := $(HOST_OS) |
| 123 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 124 | HOST_CROSS_OS := |
| 125 | # We can cross-build Windows binaries on Linux |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 126 | ifeq ($(HOST_OS),linux) |
Dan Willemsen | 2a6e3b0 | 2017-11-06 11:03:28 -0800 | [diff] [blame] | 127 | ifeq ($(BUILD_HOST_static),) |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 128 | HOST_CROSS_OS := windows |
| 129 | HOST_CROSS_ARCH := x86 |
Dan Willemsen | 9ecbf83 | 2016-02-05 16:20:19 -0800 | [diff] [blame] | 130 | HOST_CROSS_2ND_ARCH := x86_64 |
Dan Willemsen | 056609c | 2016-05-16 22:07:31 -0700 | [diff] [blame] | 131 | 2ND_HOST_CROSS_IS_64_BIT := true |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 132 | endif |
Dan Willemsen | 2a6e3b0 | 2017-11-06 11:03:28 -0800 | [diff] [blame] | 133 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 134 | |
| 135 | ifeq ($(HOST_OS),) |
| 136 | $(error Unable to determine HOST_OS from uname -sm: $(UNAME)!) |
| 137 | endif |
| 138 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 139 | # HOST_ARCH |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 140 | ifneq (,$(findstring x86_64,$(UNAME))) |
Ying Wang | 2713fce | 2014-06-09 12:31:12 -0700 | [diff] [blame] | 141 | HOST_ARCH := x86_64 |
| 142 | HOST_2ND_ARCH := x86 |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 143 | HOST_IS_64_BIT := true |
Brian Carlstrom | 2cd8a74 | 2015-03-20 11:39:00 -0700 | [diff] [blame] | 144 | else |
Dan Willemsen | 88225fd | 2016-06-29 12:26:53 -0700 | [diff] [blame] | 145 | ifneq (,$(findstring i686,$(UNAME))$(findstring x86,$(UNAME))) |
Brian Carlstrom | 2cd8a74 | 2015-03-20 11:39:00 -0700 | [diff] [blame] | 146 | $(error Building on a 32-bit x86 host is not supported: $(UNAME)!) |
| 147 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 148 | endif |
| 149 | |
Dan Willemsen | 1d090fc | 2018-08-28 01:51:25 -0700 | [diff] [blame] | 150 | ifeq ($(HOST_OS),darwin) |
| 151 | # Mac no longer supports 32-bit executables |
| 152 | HOST_2ND_ARCH := |
| 153 | endif |
| 154 | |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 155 | BUILD_ARCH := $(HOST_ARCH) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 156 | BUILD_2ND_ARCH := $(HOST_2ND_ARCH) |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 157 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 158 | ifeq ($(HOST_ARCH),) |
| 159 | $(error Unable to determine HOST_ARCH from uname -sm: $(UNAME)!) |
| 160 | endif |
| 161 | |
| 162 | # the host build defaults to release, and it must be release or debug |
| 163 | ifeq ($(HOST_BUILD_TYPE),) |
| 164 | HOST_BUILD_TYPE := release |
| 165 | endif |
| 166 | |
| 167 | ifneq ($(HOST_BUILD_TYPE),release) |
| 168 | ifneq ($(HOST_BUILD_TYPE),debug) |
| 169 | $(error HOST_BUILD_TYPE must be either release or debug, not '$(HOST_BUILD_TYPE)') |
| 170 | endif |
| 171 | endif |
| 172 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 173 | # We don't want to move all the prebuilt host tools to a $(HOST_OS)-x86_64 dir. |
| 174 | HOST_PREBUILT_ARCH := x86 |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 175 | # This is the standard way to name a directory containing prebuilt host |
| 176 | # objects. E.g., prebuilt/$(HOST_PREBUILT_TAG)/cc |
Dan Albert | 216ecac | 2015-05-04 12:44:44 -0700 | [diff] [blame] | 177 | HOST_PREBUILT_TAG := $(BUILD_OS)-$(HOST_PREBUILT_ARCH) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 178 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 179 | # TARGET_COPY_OUT_* are all relative to the staging directory, ie PRODUCT_OUT. |
| 180 | # Define them here so they can be used in product config files. |
| 181 | TARGET_COPY_OUT_SYSTEM := system |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 182 | TARGET_COPY_OUT_SYSTEM_OTHER := system_other |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 183 | TARGET_COPY_OUT_DATA := data |
Vishwath Mohan | b285c46 | 2017-03-29 15:32:04 -0700 | [diff] [blame] | 184 | TARGET_COPY_OUT_ASAN := $(TARGET_COPY_OUT_DATA)/asan |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 185 | TARGET_COPY_OUT_OEM := oem |
Tom Cherry | d14b895 | 2018-08-09 14:26:00 -0700 | [diff] [blame] | 186 | TARGET_COPY_OUT_RAMDISK := ramdisk |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 187 | TARGET_COPY_OUT_ROOT := root |
| 188 | TARGET_COPY_OUT_RECOVERY := recovery |
Anton Hansson | 379b2ba | 2018-10-02 14:10:16 +0100 | [diff] [blame] | 189 | # The directory used for optional partitions depend on the BoardConfig, so |
| 190 | # they're defined to placeholder values here and swapped after reading the |
| 191 | # BoardConfig, to be either the partition dir, or a subdir within 'system'. |
| 192 | _vendor_path_placeholder := ||VENDOR-PATH-PH|| |
| 193 | _product_path_placeholder := ||PRODUCT-PATH-PH|| |
| 194 | _product_services_path_placeholder := ||PRODUCT_SERVICES-PATH-PH|| |
| 195 | _odm_path_placeholder := ||ODM-PATH-PH|| |
| 196 | TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder) |
| 197 | TARGET_COPY_OUT_PRODUCT := $(_product_path_placeholder) |
| 198 | TARGET_COPY_OUT_PRODUCT_SERVICES := $(_product_services_path_placeholder) |
| 199 | TARGET_COPY_OUT_ODM := $(_odm_path_placeholder) |
Vishwath Mohan | d4dbf79 | 2017-05-16 14:27:34 -0700 | [diff] [blame] | 200 | |
| 201 | # Returns the non-sanitized version of the path provided in $1. |
| 202 | define get_non_asan_path |
| 203 | $(patsubst $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/%,$(PRODUCT_OUT)/%,$1) |
| 204 | endef |
| 205 | |
Igor Murashkin | 9d4639c | 2017-06-15 10:41:02 -0700 | [diff] [blame] | 206 | ################################################################# |
| 207 | # Set up minimal BOOTCLASSPATH list of jars to build/execute |
| 208 | # java code with dalvikvm/art. |
Neil Fuller | c69129b | 2018-11-09 15:57:35 +0000 | [diff] [blame] | 209 | TARGET_CORE_JARS := core-oj core-libart conscrypt okhttp bouncycastle apache-xml |
Colin Cross | 69b7f3f | 2017-09-14 14:58:02 -0700 | [diff] [blame] | 210 | ifeq ($(EMMA_INSTRUMENT),true) |
| 211 | ifneq ($(EMMA_INSTRUMENT_STATIC),true) |
| 212 | # For instrumented build, if Jacoco is not being included statically |
| 213 | # in instrumented packages then include Jacoco classes into the |
| 214 | # bootclasspath. |
| 215 | TARGET_CORE_JARS += jacocoagent |
| 216 | endif # EMMA_INSTRUMENT_STATIC |
| 217 | endif # EMMA_INSTRUMENT |
Igor Murashkin | 9d4639c | 2017-06-15 10:41:02 -0700 | [diff] [blame] | 218 | HOST_CORE_JARS := $(addsuffix -hostdex,$(TARGET_CORE_JARS)) |
| 219 | ################################################################# |
| 220 | |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 221 | # Read the product specs so we can get TARGET_DEVICE and other |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 222 | # variables that we need in order to locate the output files. |
| 223 | include $(BUILD_SYSTEM)/product_config.mk |
Jesse Wilson | ce7d502 | 2010-09-22 10:59:10 -0700 | [diff] [blame] | 224 | |
Ying Wang | d0244b3 | 2011-11-17 14:51:12 -0800 | [diff] [blame] | 225 | build_variant := $(filter-out eng user userdebug,$(TARGET_BUILD_VARIANT)) |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 226 | ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1) |
| 227 | $(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT)) |
Ying Wang | d0244b3 | 2011-11-17 14:51:12 -0800 | [diff] [blame] | 228 | $(error must be empty or one of: eng user userdebug) |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 229 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 230 | |
Ying Wang | 7ba7d7f | 2014-09-02 15:11:20 -0700 | [diff] [blame] | 231 | SDK_HOST_ARCH := x86 |
| 232 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 233 | # Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE) |
| 234 | # or under vendor/*/$(TARGET_DEVICE). Search in both places, but |
| 235 | # make sure only one exists. |
| 236 | # Real boards should always be associated with an OEM vendor. |
Dan Willemsen | 92afd7d | 2018-05-02 00:15:41 -0700 | [diff] [blame] | 237 | ifdef TARGET_DEVICE_DIR |
| 238 | ifneq ($(origin TARGET_DEVICE_DIR),command line) |
| 239 | $(error TARGET_DEVICE_DIR may not be set manually) |
| 240 | endif |
| 241 | board_config_mk := $(TARGET_DEVICE_DIR)/BoardConfig.mk |
| 242 | else |
| 243 | board_config_mk := \ |
| 244 | $(strip $(sort $(wildcard \ |
| 245 | $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \ |
| 246 | $(shell test -d device && find -L device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ |
| 247 | $(shell test -d vendor && find -L vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ |
| 248 | ))) |
| 249 | ifeq ($(board_config_mk),) |
| 250 | $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE)) |
| 251 | endif |
| 252 | ifneq ($(words $(board_config_mk)),1) |
| 253 | $(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk)) |
| 254 | endif |
| 255 | TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk))) |
| 256 | .KATI_READONLY := TARGET_DEVICE_DIR |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 257 | endif |
| 258 | include $(board_config_mk) |
| 259 | ifeq ($(TARGET_ARCH),) |
| 260 | $(error TARGET_ARCH not defined by board config: $(board_config_mk)) |
| 261 | endif |
Josh Gao | f3e7204 | 2016-01-22 11:24:59 -0800 | [diff] [blame] | 262 | ifneq ($(MALLOC_IMPL),) |
| 263 | $(warning *** Unsupported option MALLOC_IMPL defined by board config: $(board_config_mk).) |
| 264 | $(error Use `MALLOC_SVELTE := true` to configure jemalloc for low-memory) |
| 265 | endif |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 266 | board_config_mk := |
| 267 | |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 268 | ########################################### |
Dan Willemsen | 94bff7a | 2018-06-21 09:46:01 -0700 | [diff] [blame] | 269 | # Handle BUILD_BROKEN_* settings |
| 270 | vars := \ |
| 271 | BUILD_BROKEN_ANDROIDMK_EXPORTS \ |
| 272 | BUILD_BROKEN_DUP_COPY_HEADERS \ |
| 273 | BUILD_BROKEN_DUP_RULES \ |
| 274 | BUILD_BROKEN_PHONY_TARGETS |
| 275 | |
| 276 | $(foreach var,$(vars),$(eval $(var) := $$(strip $$($(var))))) |
| 277 | |
| 278 | $(foreach var,$(vars), \ |
| 279 | $(if $(filter-out true false,$($(var))), \ |
| 280 | $(error Valid values of $(var) are "true", "false", and "". Not "$($(var))"))) |
| 281 | |
| 282 | .KATI_READONLY := $(vars) |
| 283 | |
Dan Willemsen | 8b9c3cc | 2018-02-27 02:15:32 -0800 | [diff] [blame] | 284 | CHANGES_URL := https://android.googlesource.com/platform/build/+/master/Changes.md |
| 285 | |
Dan Willemsen | 738368d | 2018-07-23 22:19:40 -0700 | [diff] [blame] | 286 | ifneq ($(BUILD_BROKEN_ANDROIDMK_EXPORTS),true) |
Dan Willemsen | 8b9c3cc | 2018-02-27 02:15:32 -0800 | [diff] [blame] | 287 | $(KATI_obsolete_export It is a global setting. See $(CHANGES_URL)#export_keyword) |
| 288 | endif |
| 289 | |
| 290 | CHANGES_URL := |
Dan Willemsen | 94bff7a | 2018-06-21 09:46:01 -0700 | [diff] [blame] | 291 | |
| 292 | ########################################### |
Tom Cherry | d14b895 | 2018-08-09 14:26:00 -0700 | [diff] [blame] | 293 | # Now we can substitute with the real value of TARGET_COPY_OUT_RAMDISK |
| 294 | ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) |
| 295 | TARGET_COPY_OUT_RAMDISK := $(TARGET_COPY_OUT_ROOT) |
| 296 | endif |
| 297 | |
| 298 | ########################################### |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 299 | # Configure whether we're building the system image |
| 300 | BUILDING_SYSTEM_IMAGE := true |
| 301 | ifeq ($(PRODUCT_BUILD_SYSTEM_IMAGE),) |
| 302 | ifndef PRODUCT_USE_DYNAMIC_PARTITION_SIZE |
| 303 | ifndef BOARD_SYSTEMIMAGE_PARTITION_SIZE |
| 304 | BUILDING_SYSTEM_IMAGE := |
| 305 | endif |
| 306 | endif |
| 307 | else ifeq ($(PRODUCT_BUILD_SYSTEM_IMAGE),false) |
| 308 | BUILDING_SYSTEM_IMAGE := |
| 309 | endif |
| 310 | .KATI_READONLY := BUILDING_SYSTEM_IMAGE |
| 311 | |
| 312 | # Are we building a system_other image |
| 313 | BUILDING_SYSTEM_OTHER_IMAGE := |
| 314 | ifeq ($(PRODUCT_BUILD_SYSTEM_OTHER_IMAGE),) |
| 315 | ifdef BUILDING_SYSTEM_IMAGE |
| 316 | ifeq ($(BOARD_USES_SYSTEM_OTHER_ODEX),true) |
| 317 | BUILDING_SYSTEM_OTHER_IMAGE := true |
| 318 | endif |
| 319 | endif |
| 320 | else ifeq ($(PRODUCT_BUILD_SYSTEM_OTHER_IMAGE),true) |
| 321 | BUILDING_SYSTEM_OTHER_IMAGE := true |
| 322 | ifndef BUILDING_SYSTEM_IMAGE |
| 323 | $(error PRODUCT_BUILD_SYSTEM_OTHER_IMAGE = true requires building the system image) |
| 324 | endif |
| 325 | endif |
| 326 | .KATI_READONLY := BUILDING_SYSTEM_OTHER_IMAGE |
| 327 | |
| 328 | # Are we building a cache image |
| 329 | BUILDING_CACHE_IMAGE := |
| 330 | ifeq ($(PRODUCT_BUILD_CACHE_IMAGE),) |
| 331 | ifdef BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE |
| 332 | BUILDING_CACHE_IMAGE := true |
| 333 | endif |
| 334 | else ifeq ($(PRODUCT_BUILD_CACHE_IMAGE),true) |
| 335 | BUILDING_CACHE_IMAGE := true |
| 336 | ifndef BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE |
| 337 | $(error PRODUCT_BUILD_CACHE_IMAGE set to true, but BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE not defined) |
| 338 | endif |
| 339 | endif |
| 340 | .KATI_READONLY := BUILDING_CACHE_IMAGE |
| 341 | |
| 342 | # TODO: Add BUILDING_BOOT_IMAGE / BUILDING_RECOVERY_IMAGE |
| 343 | # This gets complicated with BOARD_USES_RECOVERY_AS_BOOT, so skipping for now. |
| 344 | |
| 345 | # Are we building a ramdisk image |
| 346 | BUILDING_RAMDISK_IMAGE := true |
| 347 | ifeq ($(PRODUCT_BUILD_RAMDISK_IMAGE),) |
| 348 | # TODO: Be smarter about this. This probably only needs to happen when one of the follow is true: |
| 349 | # BUILDING_BOOT_IMAGE |
| 350 | # BUILDING_RECOVERY_IMAGE |
| 351 | else ifeq ($(PRODUCT_BUILD_RAMDISK_IMAGE),false) |
| 352 | BUILDING_RAMDISK_IMAGE := |
| 353 | endif |
| 354 | .KATI_READONLY := BUILDING_RAMDISK_IMAGE |
| 355 | |
| 356 | # Are we building a userdata image |
| 357 | BUILDING_USERDATA_IMAGE := |
| 358 | ifeq ($(PRODUCT_BUILD_USERDATA_IMAGE),) |
| 359 | ifdef BOARD_USERDATAIMAGE_PARTITION_SIZE |
| 360 | BUILDING_USERDATA_IMAGE := true |
| 361 | endif |
| 362 | else ifeq ($(PRODUCT_BUILD_USERDATA_IMAGE),true) |
| 363 | BUILDING_USERDATA_IMAGE := true |
| 364 | endif |
| 365 | .KATI_READONLY := BUILDING_USERDATA_IMAGE |
| 366 | |
| 367 | ########################################### |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 368 | # Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR |
| 369 | ifeq ($(TARGET_COPY_OUT_VENDOR),$(_vendor_path_placeholder)) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 370 | TARGET_COPY_OUT_VENDOR := system/vendor |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 371 | else ifeq ($(filter vendor system/vendor,$(TARGET_COPY_OUT_VENDOR)),) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 372 | $(error TARGET_COPY_OUT_VENDOR must be either 'vendor' or 'system/vendor', seeing '$(TARGET_COPY_OUT_VENDOR)'.) |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 373 | endif |
| 374 | PRODUCT_COPY_FILES := $(subst $(_vendor_path_placeholder),$(TARGET_COPY_OUT_VENDOR),$(PRODUCT_COPY_FILES)) |
Dan Willemsen | 6c3e79b | 2016-06-17 14:07:37 -0700 | [diff] [blame] | 375 | |
| 376 | BOARD_USES_VENDORIMAGE := |
| 377 | ifdef BOARD_PREBUILT_VENDORIMAGE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 378 | BOARD_USES_VENDORIMAGE := true |
Dan Willemsen | 6c3e79b | 2016-06-17 14:07:37 -0700 | [diff] [blame] | 379 | endif |
| 380 | ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 381 | BOARD_USES_VENDORIMAGE := true |
Dan Willemsen | 6c3e79b | 2016-06-17 14:07:37 -0700 | [diff] [blame] | 382 | endif |
| 383 | ifeq ($(TARGET_COPY_OUT_VENDOR),vendor) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 384 | BOARD_USES_VENDORIMAGE := true |
Dan Willemsen | 6c3e79b | 2016-06-17 14:07:37 -0700 | [diff] [blame] | 385 | else ifdef BOARD_USES_VENDORIMAGE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 386 | $(error TARGET_COPY_OUT_VENDOR must be set to 'vendor' to use a vendor image) |
Dan Willemsen | 6c3e79b | 2016-06-17 14:07:37 -0700 | [diff] [blame] | 387 | endif |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 388 | .KATI_READONLY := BOARD_USES_VENDORIMAGE |
| 389 | |
| 390 | BUILDING_VENDOR_IMAGE := |
| 391 | ifeq ($(PRODUCT_BUILD_VENDOR_IMAGE),) |
| 392 | ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE |
| 393 | BUILDING_VENDOR_IMAGE := true |
| 394 | endif |
| 395 | else ifeq ($(PRODUCT_BUILD_VENDOR_IMAGE),true) |
| 396 | BUILDING_VENDOR_IMAGE := true |
| 397 | ifndef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE |
| 398 | $(error PRODUCT_BUILD_VENDOR_IMAGE set to true, but BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE not defined) |
| 399 | endif |
| 400 | endif |
| 401 | ifdef BOARD_PREBUILT_VENDORIMAGE |
| 402 | BUILDING_VENDOR_IMAGE := |
| 403 | endif |
| 404 | .KATI_READONLY := BUILDING_VENDOR_IMAGE |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 405 | |
| 406 | ########################################### |
| 407 | # Now we can substitute with the real value of TARGET_COPY_OUT_PRODUCT |
| 408 | ifeq ($(TARGET_COPY_OUT_PRODUCT),$(_product_path_placeholder)) |
| 409 | TARGET_COPY_OUT_PRODUCT := system/product |
| 410 | else ifeq ($(filter product system/product,$(TARGET_COPY_OUT_PRODUCT)),) |
| 411 | $(error TARGET_COPY_OUT_PRODUCT must be either 'product' or 'system/product', seeing '$(TARGET_COPY_OUT_PRODUCT)'.) |
| 412 | endif |
| 413 | PRODUCT_COPY_FILES := $(subst $(_product_path_placeholder),$(TARGET_COPY_OUT_PRODUCT),$(PRODUCT_COPY_FILES)) |
| 414 | |
| 415 | BOARD_USES_PRODUCTIMAGE := |
| 416 | ifdef BOARD_PREBUILT_PRODUCTIMAGE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 417 | BOARD_USES_PRODUCTIMAGE := true |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 418 | endif |
| 419 | ifdef BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 420 | BOARD_USES_PRODUCTIMAGE := true |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 421 | endif |
| 422 | ifeq ($(TARGET_COPY_OUT_PRODUCT),product) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 423 | BOARD_USES_PRODUCTIMAGE := true |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 424 | else ifdef BOARD_USES_PRODUCTIMAGE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 425 | $(error TARGET_COPY_OUT_PRODUCT must be set to 'product' to use a product image) |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 426 | endif |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 427 | .KATI_READONLY := BOARD_USES_PRODUCTIMAGE |
| 428 | |
| 429 | BUILDING_PRODUCT_IMAGE := |
| 430 | ifeq ($(PRODUCT_BUILD_PRODUCT_IMAGE),) |
| 431 | ifdef BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE |
| 432 | BUILDING_PRODUCT_IMAGE := true |
| 433 | endif |
| 434 | else ifeq ($(PRODUCT_BUILD_PRODUCT_IMAGE),true) |
| 435 | BUILDING_PRODUCT_IMAGE := true |
| 436 | ifndef BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE |
| 437 | $(error PRODUCT_BUILD_PRODUCT_IMAGE set to true, but BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE not defined) |
| 438 | endif |
| 439 | endif |
| 440 | ifdef BOARD_PREBUILT_PRODUCTIMAGE |
| 441 | BUILDING_PRODUCT_IMAGE := |
| 442 | endif |
| 443 | .KATI_READONLY := BUILDING_PRODUCT_IMAGE |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 444 | |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 445 | ########################################### |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 446 | # Now we can substitute with the real value of TARGET_COPY_OUT_PRODUCT_SERVICES |
Yifan Hong | ebc041a | 2018-07-26 16:02:52 -0700 | [diff] [blame] | 447 | ifeq ($(TARGET_COPY_OUT_PRODUCT_SERVICES),$(_product_services_path_placeholder)) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 448 | TARGET_COPY_OUT_PRODUCT_SERVICES := system/product_services |
Dario Freni | 924af7d | 2018-08-17 00:56:14 +0100 | [diff] [blame] | 449 | else ifeq ($(filter product_services system/product_services,$(TARGET_COPY_OUT_PRODUCT_SERVICES)),) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 450 | $(error TARGET_COPY_OUT_PRODUCT_SERVICES must be either 'product_services' or 'system/product_services', seeing '$(TARGET_COPY_OUT_PRODUCT_SERVICES)'.) |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 451 | endif |
Bowgo Tsai | d241226 | 2018-08-23 15:54:34 +0800 | [diff] [blame] | 452 | PRODUCT_COPY_FILES := $(subst $(_product_services_path_placeholder),$(TARGET_COPY_OUT_PRODUCT_SERVICES),$(PRODUCT_COPY_FILES)) |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 453 | |
| 454 | BOARD_USES_PRODUCT_SERVICESIMAGE := |
| 455 | ifdef BOARD_PREBUILT_PRODUCT_SERVICESIMAGE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 456 | BOARD_USES_PRODUCT_SERVICESIMAGE := true |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 457 | endif |
| 458 | ifdef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 459 | BOARD_USES_PRODUCT_SERVICESIMAGE := true |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 460 | endif |
Dario Freni | 924af7d | 2018-08-17 00:56:14 +0100 | [diff] [blame] | 461 | ifeq ($(TARGET_COPY_OUT_PRODUCT_SERVICES),product_services) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 462 | BOARD_USES_PRODUCT_SERVICESIMAGE := true |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 463 | else ifdef BOARD_USES_PRODUCT_SERVICESIMAGE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 464 | $(error TARGET_COPY_OUT_PRODUCT_SERVICES must be set to 'product_services' to use a product_services image) |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 465 | endif |
| 466 | |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 467 | BUILDING_PRODUCT_SERVICES_IMAGE := |
Anton Hansson | 9bab4c2 | 2019-01-25 10:15:22 +0000 | [diff] [blame] | 468 | ifeq ($(PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE),) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 469 | ifdef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE |
| 470 | BUILDING_PRODUCT_SERVICES_IMAGE := true |
| 471 | endif |
| 472 | else ifeq ($(PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE),true) |
| 473 | BUILDING_PRODUCT_SERVICES_IMAGE := true |
| 474 | ifndef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE |
| 475 | $(error PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE set to true, but BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE not defined) |
| 476 | endif |
| 477 | endif |
| 478 | ifdef BOARD_PREBUILT_PRODUCT_SERVICESIMAGE |
| 479 | BUILDING_PRODUCT_SERVICES_IMAGE := |
| 480 | endif |
| 481 | .KATI_READONLY := BUILDING_PRODUCT_SERVICES_IMAGE |
| 482 | |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 483 | ########################################### |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 484 | # Now we can substitute with the real value of TARGET_COPY_OUT_ODM |
| 485 | ifeq ($(TARGET_COPY_OUT_ODM),$(_odm_path_placeholder)) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 486 | TARGET_COPY_OUT_ODM := vendor/odm |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 487 | else ifeq ($(filter odm vendor/odm,$(TARGET_COPY_OUT_ODM)),) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 488 | $(error TARGET_COPY_OUT_ODM must be either 'odm' or 'vendor/odm', seeing '$(TARGET_COPY_OUT_ODM)'.) |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 489 | endif |
| 490 | PRODUCT_COPY_FILES := $(subst $(_odm_path_placeholder),$(TARGET_COPY_OUT_ODM),$(PRODUCT_COPY_FILES)) |
| 491 | |
| 492 | BOARD_USES_ODMIMAGE := |
| 493 | ifdef BOARD_PREBUILT_ODMIMAGE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 494 | BOARD_USES_ODMIMAGE := true |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 495 | endif |
| 496 | ifdef BOARD_ODMIMAGE_FILE_SYSTEM_TYPE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 497 | BOARD_USES_ODMIMAGE := true |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 498 | endif |
| 499 | ifeq ($(TARGET_COPY_OUT_ODM),odm) |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 500 | BOARD_USES_ODMIMAGE := true |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 501 | else ifdef BOARD_USES_ODMIMAGE |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 502 | $(error TARGET_COPY_OUT_ODM must be set to 'odm' to use an odm image) |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 503 | endif |
| 504 | |
Dan Willemsen | 6749520 | 2019-01-16 12:42:05 -0800 | [diff] [blame] | 505 | BUILDING_ODM_IMAGE := |
| 506 | ifeq ($(ODM_BUILD_ODM_IMAGE),) |
| 507 | ifdef BOARD_ODMIMAGE_FILE_SYSTEM_TYPE |
| 508 | BUILDING_ODM_IMAGE := true |
| 509 | endif |
| 510 | else ifeq ($(PRODUCT_BUILD_ODM_IMAGE),true) |
| 511 | BUILDING_ODM_IMAGE := true |
| 512 | ifndef BOARD_ODMIMAGE_FILE_SYSTEM_TYPE |
| 513 | $(error PRODUCT_BUILD_ODM_IMAGE set to true, but BOARD_ODMIMAGE_FILE_SYSTEM_TYPE not defined) |
| 514 | endif |
| 515 | endif |
| 516 | ifdef BOARD_PREBUILT_ODMIMAGE |
| 517 | BUILDING_ODM_IMAGE := |
| 518 | endif |
| 519 | .KATI_READONLY := BUILDING_ODM_IMAGE |
| 520 | |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 521 | ########################################### |
Dan Willemsen | 00cf767 | 2017-01-04 17:16:09 -0800 | [diff] [blame] | 522 | # Ensure that only TARGET_RECOVERY_UPDATER_LIBS *or* AB_OTA_UPDATER is set. |
| 523 | TARGET_RECOVERY_UPDATER_LIBS ?= |
| 524 | AB_OTA_UPDATER ?= |
| 525 | .KATI_READONLY := TARGET_RECOVERY_UPDATER_LIBS AB_OTA_UPDATER |
| 526 | ifeq ($(AB_OTA_UPDATER),true) |
| 527 | ifneq ($(strip $(TARGET_RECOVERY_UPDATER_LIBS)),) |
| 528 | $(error Do not use TARGET_RECOVERY_UPDATER_LIBS when using AB_OTA_UPDATER) |
| 529 | endif |
| 530 | endif |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 531 | |
Dan Willemsen | 2c3289b | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 532 | # Check BOARD_VNDK_VERSION |
Justin Yun | 9272ef8 | 2017-11-17 16:09:17 +0900 | [diff] [blame] | 533 | define check_vndk_version |
| 534 | $(eval vndk_path := prebuilts/vndk/v$(1)) \ |
Jae Shin | 240d97a | 2017-12-29 15:21:14 +0900 | [diff] [blame] | 535 | $(if $(wildcard $(vndk_path)/*/Android.bp),,$(error VNDK version $(1) not found)) |
Justin Yun | 9272ef8 | 2017-11-17 16:09:17 +0900 | [diff] [blame] | 536 | endef |
| 537 | |
Dan Willemsen | 2c3289b | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 538 | ifdef BOARD_VNDK_VERSION |
| 539 | ifneq ($(BOARD_VNDK_VERSION),current) |
Justin Yun | 2a233b3 | 2017-12-07 17:08:19 +0900 | [diff] [blame] | 540 | $(error BOARD_VNDK_VERSION: Only "current" is implemented) |
Dan Willemsen | 2c3289b | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 541 | endif |
Steven Moreland | cbfba70 | 2017-07-11 14:59:30 -0700 | [diff] [blame] | 542 | |
| 543 | TARGET_VENDOR_TEST_SUFFIX := /vendor |
| 544 | else |
| 545 | TARGET_VENDOR_TEST_SUFFIX := |
Dan Willemsen | 2c3289b | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 546 | endif |
| 547 | |
Hung-ying Tyan | 924d2d9 | 2018-09-19 16:52:58 +0800 | [diff] [blame] | 548 | ifeq (,$(TARGET_BUILD_APPS)) |
Justin Yun | 9272ef8 | 2017-11-17 16:09:17 +0900 | [diff] [blame] | 549 | ifdef PRODUCT_EXTRA_VNDK_VERSIONS |
| 550 | $(foreach v,$(PRODUCT_EXTRA_VNDK_VERSIONS),$(call check_vndk_version,$(v))) |
| 551 | endif |
Hung-ying Tyan | 924d2d9 | 2018-09-19 16:52:58 +0800 | [diff] [blame] | 552 | endif |
Justin Yun | 9272ef8 | 2017-11-17 16:09:17 +0900 | [diff] [blame] | 553 | |
Jiyong Park | 641b6cc | 2018-01-15 14:48:40 +0900 | [diff] [blame] | 554 | # Ensure that BOARD_SYSTEMSDK_VERSIONS are all within PLATFORM_SYSTEMSDK_VERSIONS |
| 555 | _unsupported_systemsdk_versions := $(filter-out $(PLATFORM_SYSTEMSDK_VERSIONS),$(BOARD_SYSTEMSDK_VERSIONS)) |
| 556 | ifneq (,$(_unsupported_systemsdk_versions)) |
| 557 | $(error System SDK versions '$(_unsupported_systemsdk_versions)' in BOARD_SYSTEMSDK_VERSIONS are not supported.\ |
| 558 | Supported versions are $(PLATFORM_SYSTEMSDK_VERSIONS)) |
| 559 | endif |
| 560 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 561 | # --------------------------------------------------------------- |
| 562 | # Set up configuration for target machine. |
| 563 | # The following must be set: |
| 564 | # TARGET_OS = { linux } |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 565 | # TARGET_ARCH = { arm | x86 | mips } |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 566 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 567 | TARGET_OS := linux |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 568 | # TARGET_ARCH should be set by BoardConfig.mk and will be checked later |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 569 | ifneq ($(filter %64,$(TARGET_ARCH)),) |
| 570 | TARGET_IS_64_BIT := true |
| 571 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 572 | |
| 573 | # the target build type defaults to release |
| 574 | ifneq ($(TARGET_BUILD_TYPE),debug) |
| 575 | TARGET_BUILD_TYPE := release |
| 576 | endif |
| 577 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 578 | # --------------------------------------------------------------- |
| 579 | # figure out the output directories |
| 580 | |
Dan Willemsen | 60d9c67 | 2016-05-27 15:15:47 -0700 | [diff] [blame] | 581 | SOONG_OUT_DIR := $(OUT_DIR)/soong |
| 582 | |
Dan Willemsen | d6ed368 | 2017-09-08 14:29:51 -0700 | [diff] [blame] | 583 | TARGET_OUT_ROOT := $(OUT_DIR)/target |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 584 | |
Dan Willemsen | d6ed368 | 2017-09-08 14:29:51 -0700 | [diff] [blame] | 585 | HOST_OUT_ROOT := $(OUT_DIR)/host |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 586 | |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 587 | .KATI_READONLY := SOONG_OUT_DIR TARGET_OUT_ROOT HOST_OUT_ROOT |
| 588 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 589 | # We want to avoid two host bin directories in multilib build. |
Dan Willemsen | d6ed368 | 2017-09-08 14:29:51 -0700 | [diff] [blame] | 590 | HOST_OUT := $(HOST_OUT_ROOT)/$(HOST_OS)-$(HOST_PREBUILT_ARCH) |
Dan Willemsen | 60d9c67 | 2016-05-27 15:15:47 -0700 | [diff] [blame] | 591 | SOONG_HOST_OUT := $(SOONG_OUT_DIR)/host/$(HOST_OS)-$(HOST_PREBUILT_ARCH) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 592 | |
Dan Willemsen | d6ed368 | 2017-09-08 14:29:51 -0700 | [diff] [blame] | 593 | HOST_CROSS_OUT := $(HOST_OUT_ROOT)/windows-$(HOST_PREBUILT_ARCH) |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 594 | |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 595 | .KATI_READONLY := HOST_OUT SOONG_HOST_OUT HOST_CROSS_OUT |
| 596 | |
Jeff Brown | e33ba4c | 2011-07-11 22:11:46 -0700 | [diff] [blame] | 597 | TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 598 | |
| 599 | TARGET_COMMON_OUT_ROOT := $(TARGET_OUT_ROOT)/common |
| 600 | HOST_COMMON_OUT_ROOT := $(HOST_OUT_ROOT)/common |
| 601 | |
| 602 | PRODUCT_OUT := $(TARGET_PRODUCT_OUT_ROOT)/$(TARGET_DEVICE) |
| 603 | |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 604 | .KATI_READONLY := TARGET_PRODUCT_OUT_ROOT TARGET_COMMON_OUT_ROOT HOST_COMMON_OUT_ROOT PRODUCT_OUT |
| 605 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 606 | OUT_DOCS := $(TARGET_COMMON_OUT_ROOT)/docs |
Dan Albert | 303e603 | 2017-10-04 10:20:20 -0700 | [diff] [blame] | 607 | OUT_NDK_DOCS := $(TARGET_COMMON_OUT_ROOT)/ndk-docs |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 608 | .KATI_READONLY := OUT_DOCS OUT_NDK_DOCS |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 609 | |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 610 | $(call KATI_obsolete,BUILD_OUT,Use HOST_OUT instead) |
| 611 | |
| 612 | BUILD_OUT_EXECUTABLES := $(HOST_OUT)/bin |
Dan Willemsen | 60d9c67 | 2016-05-27 15:15:47 -0700 | [diff] [blame] | 613 | SOONG_HOST_OUT_EXECUTABLES := $(SOONG_HOST_OUT)/bin |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 614 | .KATI_READONLY := BUILD_OUT_EXECUTABLES SOONG_HOST_OUT_EXECUTABLES |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 615 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 616 | HOST_OUT_EXECUTABLES := $(HOST_OUT)/bin |
Ying Wang | 36ef50f | 2014-06-30 17:06:21 -0700 | [diff] [blame] | 617 | HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib64 |
Dan Willemsen | c6e194f | 2016-02-13 00:19:40 -0800 | [diff] [blame] | 618 | HOST_OUT_RENDERSCRIPT_BITCODE := $(HOST_OUT_SHARED_LIBRARIES) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 619 | HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT)/framework |
Joe Onorato | 64d85d0 | 2009-04-09 19:31:12 -0700 | [diff] [blame] | 620 | HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 621 | HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest64 |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame] | 622 | HOST_OUT_COVERAGE := $(HOST_OUT)/coverage |
Colin Cross | e887ccb | 2018-03-16 22:09:50 -0700 | [diff] [blame] | 623 | HOST_OUT_TESTCASES := $(HOST_OUT)/testcases |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 624 | .KATI_READONLY := \ |
| 625 | HOST_OUT_EXECUTABLES \ |
| 626 | HOST_OUT_SHARED_LIBRARIES \ |
| 627 | HOST_OUT_RENDERSCRIPT_BITCODE \ |
| 628 | HOST_OUT_JAVA_LIBRARIES \ |
| 629 | HOST_OUT_SDK_ADDON \ |
| 630 | HOST_OUT_NATIVE_TESTS \ |
| 631 | HOST_OUT_COVERAGE \ |
| 632 | HOST_OUT_TESTCASES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 633 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 634 | HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT)/bin |
| 635 | HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 636 | HOST_CROSS_OUT_NATIVE_TESTS := $(HOST_CROSS_OUT)/nativetest |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame] | 637 | HOST_CROSS_OUT_COVERAGE := $(HOST_CROSS_OUT)/coverage |
Colin Cross | e887ccb | 2018-03-16 22:09:50 -0700 | [diff] [blame] | 638 | HOST_CROSS_OUT_TESTCASES := $(HOST_CROSS_OUT)/testcases |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 639 | .KATI_READONLY := \ |
| 640 | HOST_CROSS_OUT_EXECUTABLES \ |
| 641 | HOST_CROSS_OUT_SHARED_LIBRARIES \ |
| 642 | HOST_CROSS_OUT_NATIVE_TESTS \ |
| 643 | HOST_CROSS_OUT_COVERAGE \ |
| 644 | HOST_CROSS_OUT_TESTCASES |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 645 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 646 | HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 647 | HOST_OUT_NOTICE_FILES := $(HOST_OUT_INTERMEDIATES)/NOTICE_FILES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 648 | HOST_OUT_COMMON_INTERMEDIATES := $(HOST_COMMON_OUT_ROOT)/obj |
Ying Wang | ec900ac | 2013-11-13 15:56:18 -0800 | [diff] [blame] | 649 | HOST_OUT_FAKE := $(HOST_OUT)/fake_packages |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 650 | .KATI_READONLY := \ |
| 651 | HOST_OUT_INTERMEDIATES \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 652 | HOST_OUT_NOTICE_FILES \ |
| 653 | HOST_OUT_COMMON_INTERMEDIATES \ |
| 654 | HOST_OUT_FAKE |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 655 | |
Alexey Polyudov | ccdc311 | 2016-08-01 17:41:49 -0700 | [diff] [blame] | 656 | # Nano environment config |
| 657 | include $(BUILD_SYSTEM)/aux_config.mk |
| 658 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 659 | HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 660 | HOST_CROSS_OUT_NOTICE_FILES := $(HOST_CROSS_OUT_INTERMEDIATES)/NOTICE_FILES |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 661 | .KATI_READONLY := \ |
| 662 | HOST_CROSS_OUT_INTERMEDIATES \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 663 | HOST_CROSS_OUT_NOTICE_FILES |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 664 | |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 665 | HOST_OUT_GEN := $(HOST_OUT)/gen |
| 666 | HOST_OUT_COMMON_GEN := $(HOST_COMMON_OUT_ROOT)/gen |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 667 | .KATI_READONLY := \ |
| 668 | HOST_OUT_GEN \ |
| 669 | HOST_OUT_COMMON_GEN |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 670 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 671 | HOST_CROSS_OUT_GEN := $(HOST_CROSS_OUT)/gen |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 672 | .KATI_READONLY := HOST_CROSS_OUT_GEN |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 673 | |
Dan Shi | 26efd3a | 2017-11-13 13:38:17 -0800 | [diff] [blame] | 674 | HOST_OUT_TEST_CONFIG := $(HOST_OUT)/test_config |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 675 | .KATI_READONLY := HOST_OUT_TEST_CONFIG |
Dan Shi | 26efd3a | 2017-11-13 13:38:17 -0800 | [diff] [blame] | 676 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 677 | # Out for HOST_2ND_ARCH |
| 678 | HOST_2ND_ARCH_VAR_PREFIX := 2ND_ |
| 679 | HOST_2ND_ARCH_MODULE_SUFFIX := _32 |
| 680 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj32 |
Ying Wang | 966c1e0 | 2014-05-20 14:43:51 -0700 | [diff] [blame] | 681 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 682 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES := $(HOST_OUT_EXECUTABLES) |
Dan Albert | dc94137 | 2015-05-04 18:17:52 -0700 | [diff] [blame] | 683 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT_JAVA_LIBRARIES) |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 684 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest |
Simran Basi | 7166d1f | 2017-01-25 15:11:55 -0800 | [diff] [blame] | 685 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_TESTCASES := $(HOST_OUT_TESTCASES) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 686 | .KATI_READONLY := \ |
| 687 | HOST_2ND_ARCH_VAR_PREFIX \ |
| 688 | HOST_2ND_ARCH_MODULE_SUFFIX \ |
| 689 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 690 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES \ |
| 691 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES \ |
| 692 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_JAVA_LIBRARIES \ |
| 693 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_NATIVE_TESTS \ |
| 694 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_TESTCASES |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 695 | |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame] | 696 | # The default host library path. |
| 697 | # It always points to the path where we build libraries in the default bitness. |
Ying Wang | 5bac962 | 2014-08-14 11:03:56 -0700 | [diff] [blame] | 698 | HOST_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 699 | .KATI_READONLY := HOST_LIBRARY_PATH |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 700 | |
Dan Willemsen | 9ecbf83 | 2016-02-05 16:20:19 -0800 | [diff] [blame] | 701 | # Out for HOST_CROSS_2ND_ARCH |
| 702 | HOST_CROSS_2ND_ARCH_VAR_PREFIX := 2ND_ |
| 703 | HOST_CROSS_2ND_ARCH_MODULE_SUFFIX := _64 |
| 704 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj64 |
Dan Willemsen | 9ecbf83 | 2016-02-05 16:20:19 -0800 | [diff] [blame] | 705 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib64 |
| 706 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT_EXECUTABLES) |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 707 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_NATIVE_TESTS := $(HOST_CROSS_OUT)/nativetest64 |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 708 | .KATI_READONLY := \ |
| 709 | HOST_CROSS_2ND_ARCH_VAR_PREFIX \ |
| 710 | HOST_CROSS_2ND_ARCH_MODULE_SUFFIX \ |
| 711 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 712 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_SHARED_LIBRARIES \ |
| 713 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_EXECUTABLES \ |
| 714 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_NATIVE_TESTS |
Dan Willemsen | 9ecbf83 | 2016-02-05 16:20:19 -0800 | [diff] [blame] | 715 | |
Vishwath Mohan | d8eabaa | 2017-05-09 19:36:54 -0700 | [diff] [blame] | 716 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
| 717 | TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_asan |
| 718 | else |
| 719 | TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj |
| 720 | endif |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 721 | TARGET_OUT_HEADERS := $(TARGET_OUT_INTERMEDIATES)/include |
Dan Willemsen | 8cf6b65 | 2018-09-05 11:01:12 -0700 | [diff] [blame] | 722 | .KATI_READONLY := TARGET_OUT_INTERMEDIATES TARGET_OUT_HEADERS |
Vishwath Mohan | d8eabaa | 2017-05-09 19:36:54 -0700 | [diff] [blame] | 723 | |
| 724 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
| 725 | TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj_asan |
| 726 | else |
| 727 | TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj |
| 728 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 729 | .KATI_READONLY := TARGET_OUT_COMMON_INTERMEDIATES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 730 | |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 731 | TARGET_OUT_GEN := $(PRODUCT_OUT)/gen |
| 732 | TARGET_OUT_COMMON_GEN := $(TARGET_COMMON_OUT_ROOT)/gen |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 733 | .KATI_READONLY := TARGET_OUT_GEN TARGET_OUT_COMMON_GEN |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 734 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 735 | TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 736 | .KATI_READONLY := TARGET_OUT |
Ivan Krasin | 74b32b8 | 2015-09-18 11:54:43 -0700 | [diff] [blame] | 737 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Vishwath Mohan | b285c46 | 2017-03-29 15:32:04 -0700 | [diff] [blame] | 738 | target_out_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/system |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 739 | ifeq ($(SANITIZE_LITE),true) |
| 740 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 741 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
| 742 | target_out_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/system |
| 743 | else |
| 744 | target_out_app_base := $(TARGET_OUT) |
| 745 | endif |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 746 | else |
| 747 | target_out_shared_libraries_base := $(TARGET_OUT) |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 748 | target_out_app_base := $(TARGET_OUT) |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 749 | endif |
| 750 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 751 | TARGET_OUT_EXECUTABLES := $(TARGET_OUT)/bin |
| 752 | TARGET_OUT_OPTIONAL_EXECUTABLES := $(TARGET_OUT)/xbin |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 753 | ifeq ($(TARGET_IS_64_BIT),true) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 754 | # /system/lib always contains 32-bit libraries, |
| 755 | # and /system/lib64 (if present) always contains 64-bit libraries. |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 756 | TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib64 |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 757 | else |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 758 | TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 759 | endif |
Dan Willemsen | c6e194f | 2016-02-13 00:19:40 -0800 | [diff] [blame] | 760 | TARGET_OUT_RENDERSCRIPT_BITCODE := $(TARGET_OUT_SHARED_LIBRARIES) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 761 | TARGET_OUT_JAVA_LIBRARIES := $(TARGET_OUT)/framework |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 762 | TARGET_OUT_APPS := $(target_out_app_base)/app |
| 763 | TARGET_OUT_APPS_PRIVILEGED := $(target_out_app_base)/priv-app |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 764 | TARGET_OUT_KEYLAYOUT := $(TARGET_OUT)/usr/keylayout |
| 765 | TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars |
| 766 | TARGET_OUT_ETC := $(TARGET_OUT)/etc |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 767 | TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES |
Dima Zavin | 531f524 | 2010-09-27 17:37:17 -0700 | [diff] [blame] | 768 | TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages |
Simran Basi | 7166d1f | 2017-01-25 15:11:55 -0800 | [diff] [blame] | 769 | TARGET_OUT_TESTCASES := $(PRODUCT_OUT)/testcases |
Dan Shi | 26efd3a | 2017-11-13 13:38:17 -0800 | [diff] [blame] | 770 | TARGET_OUT_TEST_CONFIG := $(PRODUCT_OUT)/test_config |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 771 | .KATI_READONLY := \ |
| 772 | TARGET_OUT_EXECUTABLES \ |
| 773 | TARGET_OUT_OPTIONAL_EXECUTABLES \ |
| 774 | TARGET_OUT_SHARED_LIBRARIES \ |
| 775 | TARGET_OUT_RENDERSCRIPT_BITCODE \ |
| 776 | TARGET_OUT_JAVA_LIBRARIES \ |
| 777 | TARGET_OUT_APPS \ |
| 778 | TARGET_OUT_APPS_PRIVILEGED \ |
| 779 | TARGET_OUT_KEYLAYOUT \ |
| 780 | TARGET_OUT_KEYCHARS \ |
| 781 | TARGET_OUT_ETC \ |
| 782 | TARGET_OUT_NOTICE_FILES \ |
| 783 | TARGET_OUT_FAKE \ |
| 784 | TARGET_OUT_TESTCASES \ |
| 785 | TARGET_OUT_TEST_CONFIG |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 786 | |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 787 | ifeq ($(SANITIZE_LITE),true) |
| 788 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 789 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
| 790 | TARGET_OUT_SYSTEM_OTHER := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_SYSTEM_OTHER) |
| 791 | else |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 792 | TARGET_OUT_SYSTEM_OTHER := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_OTHER) |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 793 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 794 | .KATI_READONLY := TARGET_OUT_SYSTEM_OTHER |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 795 | |
Ying Wang | e1d44c3 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 796 | # Out for TARGET_2ND_ARCH |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame] | 797 | TARGET_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 798 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 799 | # With this you can reference the arm binary translation library with libfoo_arm in PRODUCT_PACKAGES. |
| 800 | TARGET_2ND_ARCH_MODULE_SUFFIX := _$(TARGET_2ND_ARCH) |
| 801 | else |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame] | 802 | TARGET_2ND_ARCH_MODULE_SUFFIX := $(HOST_2ND_ARCH_MODULE_SUFFIX) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 803 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 804 | .KATI_READONLY := TARGET_2ND_ARCH_VAR_PREFIX TARGET_2ND_ARCH_MODULE_SUFFIX |
Vishwath Mohan | d8eabaa | 2017-05-09 19:36:54 -0700 | [diff] [blame] | 805 | |
| 806 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
| 807 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)_asan |
| 808 | else |
| 809 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH) |
| 810 | endif |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 811 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 812 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) |
| 813 | else |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 814 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 815 | endif |
Dan Willemsen | c6e194f | 2016-02-13 00:19:40 -0800 | [diff] [blame] | 816 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES) |
Ying Wang | 72b01d6 | 2014-01-17 16:17:28 -0800 | [diff] [blame] | 817 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) |
Colin Cross | d957446 | 2014-01-24 13:37:07 -0800 | [diff] [blame] | 818 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS) |
| 819 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT_APPS_PRIVILEGED) |
Simran Basi | 7166d1f | 2017-01-25 15:11:55 -0800 | [diff] [blame] | 820 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_TESTCASES := $(TARGET_OUT_TESTCASES) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 821 | .KATI_READONLY := \ |
| 822 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 823 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES \ |
| 824 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_RENDERSCRIPT_BITCODE \ |
| 825 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES \ |
| 826 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS \ |
| 827 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED \ |
| 828 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_TESTCASES |
Ying Wang | e1d44c3 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 829 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 830 | TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 831 | TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) |
| 832 | TARGET_OUT_DATA_SHARED_LIBRARIES := $(TARGET_OUT_SHARED_LIBRARIES) |
| 833 | TARGET_OUT_DATA_JAVA_LIBRARIES := $(TARGET_OUT_DATA)/framework |
| 834 | TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA)/app |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 835 | TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT) |
| 836 | TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS) |
| 837 | TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC) |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 838 | ifeq ($(TARGET_IS_64_BIT),true) |
| 839 | TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64 |
Julien Desprez | 188a1dd | 2016-04-12 10:22:06 +0100 | [diff] [blame] | 840 | TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest64 |
Steven Moreland | cbfba70 | 2017-07-11 14:59:30 -0700 | [diff] [blame] | 841 | TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64$(TARGET_VENDOR_TEST_SUFFIX) |
| 842 | TARGET_OUT_VENDOR_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest64$(TARGET_VENDOR_TEST_SUFFIX) |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 843 | else |
Ying Wang | 4c68174 | 2010-07-20 11:08:47 -0700 | [diff] [blame] | 844 | TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest |
Julien Desprez | 188a1dd | 2016-04-12 10:22:06 +0100 | [diff] [blame] | 845 | TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest |
Steven Moreland | cbfba70 | 2017-07-11 14:59:30 -0700 | [diff] [blame] | 846 | TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest$(TARGET_VENDOR_TEST_SUFFIX) |
| 847 | TARGET_OUT_VENDOR_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest$(TARGET_VENDOR_TEST_SUFFIX) |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 848 | endif |
Tsu Chiang Chuang | 40da883 | 2012-07-13 13:47:09 -0700 | [diff] [blame] | 849 | TARGET_OUT_DATA_FAKE := $(TARGET_OUT_DATA)/fake_packages |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 850 | .KATI_READONLY := \ |
| 851 | TARGET_OUT_DATA \ |
| 852 | TARGET_OUT_DATA_EXECUTABLES \ |
| 853 | TARGET_OUT_DATA_SHARED_LIBRARIES \ |
| 854 | TARGET_OUT_DATA_JAVA_LIBRARIES \ |
| 855 | TARGET_OUT_DATA_APPS \ |
| 856 | TARGET_OUT_DATA_KEYLAYOUT \ |
| 857 | TARGET_OUT_DATA_KEYCHARS \ |
| 858 | TARGET_OUT_DATA_ETC \ |
| 859 | TARGET_OUT_DATA_NATIVE_TESTS \ |
| 860 | TARGET_OUT_DATA_METRIC_TESTS \ |
| 861 | TARGET_OUT_VENDOR_NATIVE_TESTS \ |
| 862 | TARGET_OUT_VENDOR_METRIC_TESTS \ |
| 863 | TARGET_OUT_DATA_FAKE |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 864 | |
Ying Wang | e3d0679 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 865 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_DATA_EXECUTABLES) |
| 866 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES) |
Colin Cross | d957446 | 2014-01-24 13:37:07 -0800 | [diff] [blame] | 867 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA_APPS) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 868 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 869 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest/$(TARGET_2ND_ARCH) |
Guang Zhu | 97069b0 | 2016-04-12 13:06:20 -0700 | [diff] [blame] | 870 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest/$(TARGET_2ND_ARCH) |
Steven Moreland | cbfba70 | 2017-07-11 14:59:30 -0700 | [diff] [blame] | 871 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest/$(TARGET_2ND_ARCH)$(TARGET_VENDOR_TEST_SUFFIX) |
| 872 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest/$(TARGET_2ND_ARCH)$(TARGET_VENDOR_TEST_SUFFIX) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 873 | else |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 874 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest |
Julien Desprez | 188a1dd | 2016-04-12 10:22:06 +0100 | [diff] [blame] | 875 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest |
Steven Moreland | cbfba70 | 2017-07-11 14:59:30 -0700 | [diff] [blame] | 876 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest$(TARGET_VENDOR_TEST_SUFFIX) |
| 877 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest$(TARGET_VENDOR_TEST_SUFFIX) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 878 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 879 | .KATI_READONLY := \ |
| 880 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES \ |
| 881 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES \ |
| 882 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS \ |
| 883 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS \ |
| 884 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS \ |
| 885 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS \ |
| 886 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_METRIC_TESTS \ |
Ying Wang | e3d0679 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 887 | |
Ying Wang | 9f8e8db | 2011-11-04 11:37:01 -0700 | [diff] [blame] | 888 | TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 889 | .KATI_READONLY := TARGET_OUT_CACHE |
Ying Wang | 9f8e8db | 2011-11-04 11:37:01 -0700 | [diff] [blame] | 890 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 891 | TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 892 | .KATI_READONLY := TARGET_OUT_VENDOR |
Ivan Krasin | 74b32b8 | 2015-09-18 11:54:43 -0700 | [diff] [blame] | 893 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Anton Hansson | ae9f105 | 2018-10-02 13:16:05 +0100 | [diff] [blame] | 894 | target_out_vendor_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_VENDOR) |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 895 | ifeq ($(SANITIZE_LITE),true) |
| 896 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 897 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
Anton Hansson | ae9f105 | 2018-10-02 13:16:05 +0100 | [diff] [blame] | 898 | target_out_vendor_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_VENDOR) |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 899 | else |
| 900 | target_out_vendor_app_base := $(TARGET_OUT_VENDOR) |
| 901 | endif |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 902 | else |
| 903 | target_out_vendor_shared_libraries_base := $(TARGET_OUT_VENDOR) |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 904 | target_out_vendor_app_base := $(TARGET_OUT_VENDOR) |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 905 | endif |
| 906 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 907 | TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR)/bin |
| 908 | TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES := $(TARGET_OUT_VENDOR)/xbin |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 909 | ifeq ($(TARGET_IS_64_BIT),true) |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 910 | TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib64 |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 911 | else |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 912 | TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 913 | endif |
Miao Wang | 57be564 | 2017-03-01 19:39:19 -0800 | [diff] [blame] | 914 | TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE := $(TARGET_OUT_VENDOR_SHARED_LIBRARIES) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 915 | TARGET_OUT_VENDOR_JAVA_LIBRARIES := $(TARGET_OUT_VENDOR)/framework |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 916 | TARGET_OUT_VENDOR_APPS := $(target_out_vendor_app_base)/app |
| 917 | TARGET_OUT_VENDOR_APPS_PRIVILEGED := $(target_out_vendor_app_base)/priv-app |
Ying Wang | 8f77936 | 2011-09-13 13:57:26 -0700 | [diff] [blame] | 918 | TARGET_OUT_VENDOR_ETC := $(TARGET_OUT_VENDOR)/etc |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 919 | .KATI_READONLY := \ |
| 920 | TARGET_OUT_VENDOR_EXECUTABLES \ |
| 921 | TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES \ |
| 922 | TARGET_OUT_VENDOR_SHARED_LIBRARIES \ |
| 923 | TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE \ |
| 924 | TARGET_OUT_VENDOR_JAVA_LIBRARIES \ |
| 925 | TARGET_OUT_VENDOR_APPS \ |
| 926 | TARGET_OUT_VENDOR_APPS_PRIVILEGED \ |
| 927 | TARGET_OUT_VENDOR_ETC |
Ying Wang | 8f77936 | 2011-09-13 13:57:26 -0700 | [diff] [blame] | 928 | |
Ying Wang | e3d0679 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 929 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR_EXECUTABLES) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 930 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
Andreas Gampe | cf6268f | 2016-06-30 20:20:38 -0700 | [diff] [blame] | 931 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 932 | else |
Andreas Gampe | cf6268f | 2016-06-30 20:20:38 -0700 | [diff] [blame] | 933 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 934 | endif |
Miao Wang | 57be564 | 2017-03-01 19:39:19 -0800 | [diff] [blame] | 935 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES) |
Colin Cross | d957446 | 2014-01-24 13:37:07 -0800 | [diff] [blame] | 936 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR_APPS) |
Hung-ying Tyan | 665e740 | 2016-07-20 17:51:56 +0800 | [diff] [blame] | 937 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS_PRIVILEGED := $(TARGET_OUT_VENDOR_APPS_PRIVILEGED) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 938 | .KATI_READONLY := \ |
| 939 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES \ |
| 940 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES \ |
| 941 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE \ |
| 942 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS \ |
| 943 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS_PRIVILEGED |
Ying Wang | 61d499b | 2014-01-15 16:02:16 -0800 | [diff] [blame] | 944 | |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 945 | TARGET_OUT_OEM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_OEM) |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 946 | TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM)/bin |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 947 | ifeq ($(TARGET_IS_64_BIT),true) |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 948 | TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib64 |
| 949 | else |
| 950 | TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib |
| 951 | endif |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 952 | # We don't expect Java libraries in the oem.img. |
| 953 | # TARGET_OUT_OEM_JAVA_LIBRARIES:= $(TARGET_OUT_OEM)/framework |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 954 | TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM)/app |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 955 | TARGET_OUT_OEM_ETC := $(TARGET_OUT_OEM)/etc |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 956 | .KATI_READONLY := \ |
| 957 | TARGET_OUT_OEM \ |
| 958 | TARGET_OUT_OEM_EXECUTABLES \ |
| 959 | TARGET_OUT_OEM_SHARED_LIBRARIES \ |
| 960 | TARGET_OUT_OEM_APPS \ |
| 961 | TARGET_OUT_OEM_ETC |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 962 | |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 963 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM_EXECUTABLES) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 964 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 965 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib/$(TARGET_2ND_ARCH) |
| 966 | else |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 967 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 968 | endif |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 969 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM_APPS) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 970 | .KATI_READONLY := \ |
| 971 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES \ |
| 972 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES \ |
| 973 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS \ |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 974 | |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 975 | TARGET_OUT_ODM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ODM) |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 976 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Anton Hansson | ae9f105 | 2018-10-02 13:16:05 +0100 | [diff] [blame] | 977 | target_out_odm_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_OEM) |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 978 | ifeq ($(SANITIZE_LITE),true) |
| 979 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 980 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
Anton Hansson | ae9f105 | 2018-10-02 13:16:05 +0100 | [diff] [blame] | 981 | target_out_odm_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_OEM) |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 982 | else |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 983 | target_out_odm_app_base := $(TARGET_OUT_ODM) |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 984 | endif |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 985 | else |
| 986 | target_out_odm_shared_libraries_base := $(TARGET_OUT_ODM) |
| 987 | target_out_odm_app_base := $(TARGET_OUT_ODM) |
| 988 | endif |
| 989 | |
| 990 | TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM)/bin |
| 991 | TARGET_OUT_ODM_OPTIONAL_EXECUTABLES := $(TARGET_OUT_ODM)/xbin |
| 992 | ifeq ($(TARGET_IS_64_BIT),true) |
| 993 | TARGET_OUT_ODM_SHARED_LIBRARIES := $(target_out_odm_shared_libraries_base)/lib64 |
| 994 | else |
| 995 | TARGET_OUT_ODM_SHARED_LIBRARIES := $(target_out_odm_shared_libraries_base)/lib |
| 996 | endif |
| 997 | TARGET_OUT_ODM_RENDERSCRIPT_BITCODE := $(TARGET_OUT_ODM_SHARED_LIBRARIES) |
| 998 | TARGET_OUT_ODM_JAVA_LIBRARIES := $(TARGET_OUT_ODM)/framework |
| 999 | TARGET_OUT_ODM_APPS := $(target_out_odm_app_base)/app |
| 1000 | TARGET_OUT_ODM_APPS_PRIVILEGED := $(target_out_odm_app_base)/priv-app |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 1001 | TARGET_OUT_ODM_ETC := $(TARGET_OUT_ODM)/etc |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1002 | .KATI_READONLY := \ |
| 1003 | TARGET_OUT_ODM \ |
| 1004 | TARGET_OUT_ODM_EXECUTABLES \ |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 1005 | TARGET_OUT_ODM_OPTIONAL_EXECUTABLES \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1006 | TARGET_OUT_ODM_SHARED_LIBRARIES \ |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 1007 | TARGET_OUT_ODM_RENDERSCRIPT_BITCODE \ |
| 1008 | TARGET_OUT_ODM_JAVA_LIBRARIES \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1009 | TARGET_OUT_ODM_APPS \ |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 1010 | TARGET_OUT_ODM_APPS_PRIVILEGED \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1011 | TARGET_OUT_ODM_ETC |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 1012 | |
| 1013 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM_EXECUTABLES) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 1014 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 1015 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(target_out_odm_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 1016 | else |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 1017 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(target_out_odm_shared_libraries_base)/lib |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 1018 | endif |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 1019 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES) |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 1020 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM_APPS) |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 1021 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS_PRIVILEGED := $(TARGET_OUT_ODM_APPS_PRIVILEGED) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1022 | .KATI_READONLY := \ |
| 1023 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_EXECUTABLES \ |
| 1024 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES \ |
Bowgo Tsai | d624fa6 | 2017-11-14 23:42:30 +0800 | [diff] [blame] | 1025 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_RENDERSCRIPT_BITCODE \ |
| 1026 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS \ |
| 1027 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS_PRIVILEGED |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 1028 | |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 1029 | TARGET_OUT_PRODUCT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_PRODUCT) |
Doheon Lee | 09d9b90 | 2018-06-25 10:56:01 +0900 | [diff] [blame] | 1030 | TARGET_OUT_PRODUCT_EXECUTABLES := $(TARGET_OUT_PRODUCT)/bin |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1031 | .KATI_READONLY := TARGET_OUT_PRODUCT |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 1032 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Anton Hansson | ae9f105 | 2018-10-02 13:16:05 +0100 | [diff] [blame] | 1033 | target_out_product_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_PRODUCT) |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 1034 | ifeq ($(SANITIZE_LITE),true) |
| 1035 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 1036 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
Anton Hansson | ae9f105 | 2018-10-02 13:16:05 +0100 | [diff] [blame] | 1037 | target_out_product_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_PRODUCT) |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 1038 | else |
| 1039 | target_out_product_app_base := $(TARGET_OUT_PRODUCT) |
| 1040 | endif |
| 1041 | else |
Inseob Kim | 47c1352 | 2018-05-04 11:20:43 +0900 | [diff] [blame] | 1042 | target_out_product_shared_libraries_base := $(TARGET_OUT_PRODUCT) |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 1043 | target_out_product_app_base := $(TARGET_OUT_PRODUCT) |
| 1044 | endif |
| 1045 | |
| 1046 | ifeq ($(TARGET_IS_64_BIT),true) |
| 1047 | TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib64 |
| 1048 | else |
| 1049 | TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib |
| 1050 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1051 | TARGET_OUT_PRODUCT_JAVA_LIBRARIES := $(TARGET_OUT_PRODUCT)/framework |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 1052 | TARGET_OUT_PRODUCT_APPS := $(target_out_product_app_base)/app |
| 1053 | TARGET_OUT_PRODUCT_APPS_PRIVILEGED := $(target_out_product_app_base)/priv-app |
| 1054 | TARGET_OUT_PRODUCT_ETC := $(TARGET_OUT_PRODUCT)/etc |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1055 | .KATI_READONLY := \ |
Doheon Lee | 09d9b90 | 2018-06-25 10:56:01 +0900 | [diff] [blame] | 1056 | TARGET_OUT_PRODUCT_EXECUTABLES \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1057 | TARGET_OUT_PRODUCT_SHARED_LIBRARIES \ |
| 1058 | TARGET_OUT_PRODUCT_JAVA_LIBRARIES \ |
| 1059 | TARGET_OUT_PRODUCT_APPS \ |
| 1060 | TARGET_OUT_PRODUCT_APPS_PRIVILEGED \ |
| 1061 | TARGET_OUT_PRODUCT_ETC |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 1062 | |
Doheon Lee | 09d9b90 | 2018-06-25 10:56:01 +0900 | [diff] [blame] | 1063 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_EXECUTABLES := $(TARGET_OUT_PRODUCT_EXECUTABLES) |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 1064 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 1065 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) |
| 1066 | else |
| 1067 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib |
| 1068 | endif |
| 1069 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS := $(TARGET_OUT_PRODUCT_APPS) |
| 1070 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS_PRIVILEGED := $(TARGET_OUT_PRODUCT_APPS_PRIVILEGED) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1071 | .KATI_READONLY := \ |
Doheon Lee | 09d9b90 | 2018-06-25 10:56:01 +0900 | [diff] [blame] | 1072 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_EXECUTABLES \ |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1073 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES \ |
| 1074 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS \ |
| 1075 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS_PRIVILEGED |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 1076 | |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1077 | TARGET_OUT_PRODUCT_SERVICES := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_PRODUCT_SERVICES) |
| 1078 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Anton Hansson | ae9f105 | 2018-10-02 13:16:05 +0100 | [diff] [blame] | 1079 | target_out_product_services_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_PRODUCT_SERVICES) |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1080 | ifeq ($(SANITIZE_LITE),true) |
| 1081 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 1082 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
Anton Hansson | ae9f105 | 2018-10-02 13:16:05 +0100 | [diff] [blame] | 1083 | target_out_product_services_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_PRODUCT_SERVICES) |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1084 | else |
Yifan Hong | ebc041a | 2018-07-26 16:02:52 -0700 | [diff] [blame] | 1085 | target_out_product_services_app_base := $(TARGET_OUT_PRODUCT_SERVICES) |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1086 | endif |
| 1087 | else |
Yifan Hong | ebc041a | 2018-07-26 16:02:52 -0700 | [diff] [blame] | 1088 | target_out_product_services_shared_libraries_base := $(TARGET_OUT_PRODUCT_SERVICES) |
| 1089 | target_out_product_services_app_base := $(TARGET_OUT_PRODUCT_SERVICES) |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1090 | endif |
| 1091 | |
| 1092 | ifeq ($(TARGET_IS_64_BIT),true) |
Yifan Hong | ebc041a | 2018-07-26 16:02:52 -0700 | [diff] [blame] | 1093 | TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_product_services_shared_libraries_base)/lib64 |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1094 | else |
Yifan Hong | ebc041a | 2018-07-26 16:02:52 -0700 | [diff] [blame] | 1095 | TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_product_services_shared_libraries_base)/lib |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1096 | endif |
| 1097 | TARGET_OUT_PRODUCT_SERVICES_JAVA_LIBRARIES:= $(TARGET_OUT_PRODUCT_SERVICES)/framework |
Yifan Hong | ebc041a | 2018-07-26 16:02:52 -0700 | [diff] [blame] | 1098 | TARGET_OUT_PRODUCT_SERVICES_APPS := $(target_out_product_services_app_base)/app |
| 1099 | TARGET_OUT_PRODUCT_SERVICES_APPS_PRIVILEGED := $(target_out_product_services_app_base)/priv-app |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1100 | TARGET_OUT_PRODUCT_SERVICES_ETC := $(TARGET_OUT_PRODUCT_SERVICES)/etc |
| 1101 | |
| 1102 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
Yifan Hong | ebc041a | 2018-07-26 16:02:52 -0700 | [diff] [blame] | 1103 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_product_services_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1104 | else |
Yifan Hong | ebc041a | 2018-07-26 16:02:52 -0700 | [diff] [blame] | 1105 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_product_services_shared_libraries_base)/lib |
Dario Freni | 5f681e1 | 2018-05-29 13:09:01 +0100 | [diff] [blame] | 1106 | endif |
| 1107 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_APPS := $(TARGET_OUT_PRODUCT_SERVICES_APPS) |
| 1108 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_APPS_PRIVILEGED := $(TARGET_OUT_PRODUCT_SERVICES_APPS_PRIVILEGED) |
| 1109 | |
Steve Fung | dfbab49 | 2015-09-24 18:12:33 -0700 | [diff] [blame] | 1110 | TARGET_OUT_BREAKPAD := $(PRODUCT_OUT)/breakpad |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1111 | .KATI_READONLY := TARGET_OUT_BREAKPAD |
Steve Fung | dfbab49 | 2015-09-24 18:12:33 -0700 | [diff] [blame] | 1112 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1113 | TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols |
| 1114 | TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin |
| 1115 | TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/lib |
Colin Cross | a58f8e0 | 2014-06-20 13:33:36 -0700 | [diff] [blame] | 1116 | TARGET_OUT_VENDOR_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/$(TARGET_COPY_OUT_VENDOR)/lib |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1117 | TARGET_ROOT_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED) |
| 1118 | TARGET_ROOT_OUT_SBIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/sbin |
| 1119 | TARGET_ROOT_OUT_BIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/bin |
Ryan Campbell | 737bc02 | 2016-09-15 17:32:13 -0700 | [diff] [blame] | 1120 | TARGET_OUT_COVERAGE := $(PRODUCT_OUT)/coverage |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1121 | .KATI_READONLY := \ |
| 1122 | TARGET_OUT_UNSTRIPPED \ |
| 1123 | TARGET_OUT_EXECUTABLES_UNSTRIPPED \ |
| 1124 | TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED \ |
| 1125 | TARGET_OUT_VENDOR_SHARED_LIBRARIES_UNSTRIPPED \ |
| 1126 | TARGET_ROOT_OUT_UNSTRIPPED \ |
| 1127 | TARGET_ROOT_OUT_SBIN_UNSTRIPPED \ |
| 1128 | TARGET_ROOT_OUT_BIN_UNSTRIPPED \ |
| 1129 | TARGET_OUT_COVERAGE |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1130 | |
Tom Cherry | d14b895 | 2018-08-09 14:26:00 -0700 | [diff] [blame] | 1131 | TARGET_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RAMDISK) |
| 1132 | TARGET_RAMDISK_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED) |
| 1133 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 1134 | TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1135 | TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin |
| 1136 | TARGET_ROOT_OUT_SBIN := $(TARGET_ROOT_OUT)/sbin |
| 1137 | TARGET_ROOT_OUT_ETC := $(TARGET_ROOT_OUT)/etc |
| 1138 | TARGET_ROOT_OUT_USR := $(TARGET_ROOT_OUT)/usr |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1139 | .KATI_READONLY := \ |
| 1140 | TARGET_ROOT_OUT \ |
| 1141 | TARGET_ROOT_OUT_BIN \ |
| 1142 | TARGET_ROOT_OUT_SBIN \ |
| 1143 | TARGET_ROOT_OUT_ETC \ |
| 1144 | TARGET_ROOT_OUT_USR |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1145 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 1146 | TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RECOVERY) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1147 | TARGET_RECOVERY_ROOT_OUT := $(TARGET_RECOVERY_OUT)/root |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1148 | .KATI_READONLY := \ |
| 1149 | TARGET_RECOVERY_OUT \ |
| 1150 | TARGET_RECOVERY_ROOT_OUT |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1151 | |
| 1152 | TARGET_SYSLOADER_OUT := $(PRODUCT_OUT)/sysloader |
| 1153 | TARGET_SYSLOADER_ROOT_OUT := $(TARGET_SYSLOADER_OUT)/root |
| 1154 | TARGET_SYSLOADER_SYSTEM_OUT := $(TARGET_SYSLOADER_OUT)/root/system |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1155 | .KATI_READONLY := \ |
| 1156 | TARGET_SYSLOADER_OUT \ |
| 1157 | TARGET_SYSLOADER_ROOT_OUT \ |
| 1158 | TARGET_SYSLOADER_SYSTEM_OUT |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1159 | |
| 1160 | TARGET_INSTALLER_OUT := $(PRODUCT_OUT)/installer |
| 1161 | TARGET_INSTALLER_DATA_OUT := $(TARGET_INSTALLER_OUT)/data |
| 1162 | TARGET_INSTALLER_ROOT_OUT := $(TARGET_INSTALLER_OUT)/root |
| 1163 | TARGET_INSTALLER_SYSTEM_OUT := $(TARGET_INSTALLER_OUT)/root/system |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1164 | .KATI_READONLY := \ |
| 1165 | TARGET_INSTALLER_OUT \ |
| 1166 | TARGET_INSTALLER_DATA_OUT \ |
| 1167 | TARGET_INSTALLER_ROOT_OUT \ |
| 1168 | TARGET_INSTALLER_SYSTEM_OUT |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1169 | |
Ying Wang | a83940f | 2010-09-24 18:09:04 -0700 | [diff] [blame] | 1170 | COMMON_MODULE_CLASSES := TARGET-NOTICE_FILES HOST-NOTICE_FILES HOST-JAVA_LIBRARIES |
Dan Willemsen | 8dae49c | 2017-02-15 15:48:11 -0800 | [diff] [blame] | 1171 | PER_ARCH_MODULE_CLASSES := SHARED_LIBRARIES STATIC_LIBRARIES EXECUTABLES GYP RENDERSCRIPT_BITCODE NATIVE_TESTS HEADER_LIBRARIES |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 1172 | .KATI_READONLY := COMMON_MODULE_CLASSES PER_ARCH_MODULE_CLASSES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1173 | |
Dan Willemsen | 20f99a6 | 2017-10-12 01:35:14 -0700 | [diff] [blame] | 1174 | ifeq ($(CALLED_FROM_SETUP),true) |
Dan Willemsen | 0d25529 | 2017-02-18 10:32:13 -0800 | [diff] [blame] | 1175 | PRINT_BUILD_CONFIG ?= true |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1176 | endif |