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 | |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 150 | BUILD_ARCH := $(HOST_ARCH) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 151 | BUILD_2ND_ARCH := $(HOST_2ND_ARCH) |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 152 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 153 | ifeq ($(HOST_ARCH),) |
| 154 | $(error Unable to determine HOST_ARCH from uname -sm: $(UNAME)!) |
| 155 | endif |
| 156 | |
| 157 | # the host build defaults to release, and it must be release or debug |
| 158 | ifeq ($(HOST_BUILD_TYPE),) |
| 159 | HOST_BUILD_TYPE := release |
| 160 | endif |
| 161 | |
| 162 | ifneq ($(HOST_BUILD_TYPE),release) |
| 163 | ifneq ($(HOST_BUILD_TYPE),debug) |
| 164 | $(error HOST_BUILD_TYPE must be either release or debug, not '$(HOST_BUILD_TYPE)') |
| 165 | endif |
| 166 | endif |
| 167 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 168 | # We don't want to move all the prebuilt host tools to a $(HOST_OS)-x86_64 dir. |
| 169 | HOST_PREBUILT_ARCH := x86 |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 170 | # This is the standard way to name a directory containing prebuilt host |
| 171 | # objects. E.g., prebuilt/$(HOST_PREBUILT_TAG)/cc |
Dan Albert | 216ecac | 2015-05-04 12:44:44 -0700 | [diff] [blame] | 172 | HOST_PREBUILT_TAG := $(BUILD_OS)-$(HOST_PREBUILT_ARCH) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 173 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 174 | # TARGET_COPY_OUT_* are all relative to the staging directory, ie PRODUCT_OUT. |
| 175 | # Define them here so they can be used in product config files. |
| 176 | TARGET_COPY_OUT_SYSTEM := system |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 177 | TARGET_COPY_OUT_SYSTEM_OTHER := system_other |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 178 | TARGET_COPY_OUT_DATA := data |
Vishwath Mohan | b285c46 | 2017-03-29 15:32:04 -0700 | [diff] [blame] | 179 | TARGET_COPY_OUT_ASAN := $(TARGET_COPY_OUT_DATA)/asan |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 180 | TARGET_COPY_OUT_OEM := oem |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 181 | TARGET_COPY_OUT_ODM := odm |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 182 | TARGET_COPY_OUT_PRODUCT := product |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 183 | TARGET_COPY_OUT_ROOT := root |
| 184 | TARGET_COPY_OUT_RECOVERY := recovery |
Vishwath Mohan | d4dbf79 | 2017-05-16 14:27:34 -0700 | [diff] [blame] | 185 | |
| 186 | # Returns the non-sanitized version of the path provided in $1. |
| 187 | define get_non_asan_path |
| 188 | $(patsubst $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/%,$(PRODUCT_OUT)/%,$1) |
| 189 | endef |
| 190 | |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 191 | ########################################### |
| 192 | # Define TARGET_COPY_OUT_VENDOR to a placeholder, for at this point |
| 193 | # we don't know if the device wants to build a separate vendor.img |
| 194 | # or just build vendor stuff into system.img. |
| 195 | # A device can set up TARGET_COPY_OUT_VENDOR to "vendor" in its |
| 196 | # BoardConfig.mk. |
| 197 | # We'll substitute with the real value after loading BoardConfig.mk. |
| 198 | _vendor_path_placeholder := ||VENDOR-PATH-PH|| |
| 199 | TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder) |
| 200 | ########################################### |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 201 | |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 202 | ########################################### |
| 203 | # Define TARGET_COPY_OUT_PRODUCT to a placeholder, for at this point |
| 204 | # we don't know if the device wants to build a separate product.img |
| 205 | # or just build product stuff into system.img. |
| 206 | # A device can set up TARGET_COPY_OUT_PRODUCT to "product" in its |
| 207 | # BoardConfig.mk. |
| 208 | # We'll substitute with the real value after loading BoardConfig.mk. |
| 209 | _product_path_placeholder := ||PRODUCT-PATH-PH|| |
| 210 | TARGET_COPY_OUT_PRODUCT := $(_product_path_placeholder) |
| 211 | ########################################### |
| 212 | |
Igor Murashkin | 9d4639c | 2017-06-15 10:41:02 -0700 | [diff] [blame] | 213 | ################################################################# |
| 214 | # Set up minimal BOOTCLASSPATH list of jars to build/execute |
| 215 | # java code with dalvikvm/art. |
| 216 | TARGET_CORE_JARS := core-oj core-libart conscrypt okhttp bouncycastle apache-xml |
Colin Cross | 69b7f3f | 2017-09-14 14:58:02 -0700 | [diff] [blame] | 217 | ifeq ($(EMMA_INSTRUMENT),true) |
| 218 | ifneq ($(EMMA_INSTRUMENT_STATIC),true) |
| 219 | # For instrumented build, if Jacoco is not being included statically |
| 220 | # in instrumented packages then include Jacoco classes into the |
| 221 | # bootclasspath. |
| 222 | TARGET_CORE_JARS += jacocoagent |
| 223 | endif # EMMA_INSTRUMENT_STATIC |
| 224 | endif # EMMA_INSTRUMENT |
Igor Murashkin | 9d4639c | 2017-06-15 10:41:02 -0700 | [diff] [blame] | 225 | HOST_CORE_JARS := $(addsuffix -hostdex,$(TARGET_CORE_JARS)) |
| 226 | ################################################################# |
| 227 | |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 228 | # Read the product specs so we can get TARGET_DEVICE and other |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 229 | # variables that we need in order to locate the output files. |
| 230 | include $(BUILD_SYSTEM)/product_config.mk |
Jesse Wilson | ce7d502 | 2010-09-22 10:59:10 -0700 | [diff] [blame] | 231 | |
Ying Wang | d0244b3 | 2011-11-17 14:51:12 -0800 | [diff] [blame] | 232 | build_variant := $(filter-out eng user userdebug,$(TARGET_BUILD_VARIANT)) |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 233 | ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1) |
| 234 | $(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT)) |
Ying Wang | d0244b3 | 2011-11-17 14:51:12 -0800 | [diff] [blame] | 235 | $(error must be empty or one of: eng user userdebug) |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 236 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 237 | |
Ying Wang | 7ba7d7f | 2014-09-02 15:11:20 -0700 | [diff] [blame] | 238 | SDK_HOST_ARCH := x86 |
| 239 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 240 | # Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE) |
| 241 | # or under vendor/*/$(TARGET_DEVICE). Search in both places, but |
| 242 | # make sure only one exists. |
| 243 | # Real boards should always be associated with an OEM vendor. |
Dan Willemsen | 92afd7d | 2018-05-02 00:15:41 -0700 | [diff] [blame] | 244 | ifdef TARGET_DEVICE_DIR |
| 245 | ifneq ($(origin TARGET_DEVICE_DIR),command line) |
| 246 | $(error TARGET_DEVICE_DIR may not be set manually) |
| 247 | endif |
| 248 | board_config_mk := $(TARGET_DEVICE_DIR)/BoardConfig.mk |
| 249 | else |
| 250 | board_config_mk := \ |
| 251 | $(strip $(sort $(wildcard \ |
| 252 | $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \ |
| 253 | $(shell test -d device && find -L device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ |
| 254 | $(shell test -d vendor && find -L vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ |
| 255 | ))) |
| 256 | ifeq ($(board_config_mk),) |
| 257 | $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE)) |
| 258 | endif |
| 259 | ifneq ($(words $(board_config_mk)),1) |
| 260 | $(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk)) |
| 261 | endif |
| 262 | TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk))) |
| 263 | .KATI_READONLY := TARGET_DEVICE_DIR |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 264 | endif |
| 265 | include $(board_config_mk) |
| 266 | ifeq ($(TARGET_ARCH),) |
| 267 | $(error TARGET_ARCH not defined by board config: $(board_config_mk)) |
| 268 | endif |
Josh Gao | f3e7204 | 2016-01-22 11:24:59 -0800 | [diff] [blame] | 269 | ifneq ($(MALLOC_IMPL),) |
| 270 | $(warning *** Unsupported option MALLOC_IMPL defined by board config: $(board_config_mk).) |
| 271 | $(error Use `MALLOC_SVELTE := true` to configure jemalloc for low-memory) |
| 272 | endif |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 273 | board_config_mk := |
| 274 | |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 275 | ########################################### |
| 276 | # Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR |
| 277 | ifeq ($(TARGET_COPY_OUT_VENDOR),$(_vendor_path_placeholder)) |
| 278 | TARGET_COPY_OUT_VENDOR := system/vendor |
| 279 | else ifeq ($(filter vendor system/vendor,$(TARGET_COPY_OUT_VENDOR)),) |
| 280 | $(error TARGET_COPY_OUT_VENDOR must be either 'vendor' or 'system/vendor', seeing '$(TARGET_COPY_OUT_VENDOR)'.) |
| 281 | endif |
| 282 | 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] | 283 | |
| 284 | BOARD_USES_VENDORIMAGE := |
| 285 | ifdef BOARD_PREBUILT_VENDORIMAGE |
| 286 | BOARD_USES_VENDORIMAGE := true |
| 287 | endif |
| 288 | ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE |
| 289 | BOARD_USES_VENDORIMAGE := true |
| 290 | endif |
| 291 | ifeq ($(TARGET_COPY_OUT_VENDOR),vendor) |
| 292 | BOARD_USES_VENDORIMAGE := true |
| 293 | else ifdef BOARD_USES_VENDORIMAGE |
| 294 | $(error TARGET_COPY_OUT_VENDOR must be set to 'vendor' to use a vendor image) |
| 295 | endif |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 296 | |
| 297 | ########################################### |
| 298 | # Now we can substitute with the real value of TARGET_COPY_OUT_PRODUCT |
| 299 | ifeq ($(TARGET_COPY_OUT_PRODUCT),$(_product_path_placeholder)) |
| 300 | TARGET_COPY_OUT_PRODUCT := system/product |
| 301 | else ifeq ($(filter product system/product,$(TARGET_COPY_OUT_PRODUCT)),) |
| 302 | $(error TARGET_COPY_OUT_PRODUCT must be either 'product' or 'system/product', seeing '$(TARGET_COPY_OUT_PRODUCT)'.) |
| 303 | endif |
| 304 | PRODUCT_COPY_FILES := $(subst $(_product_path_placeholder),$(TARGET_COPY_OUT_PRODUCT),$(PRODUCT_COPY_FILES)) |
| 305 | |
| 306 | BOARD_USES_PRODUCTIMAGE := |
| 307 | ifdef BOARD_PREBUILT_PRODUCTIMAGE |
| 308 | BOARD_USES_PRODUCTIMAGE := true |
| 309 | endif |
| 310 | ifdef BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE |
| 311 | BOARD_USES_PRODUCTIMAGE := true |
| 312 | endif |
| 313 | ifeq ($(TARGET_COPY_OUT_PRODUCT),product) |
| 314 | BOARD_USES_PRODUCTIMAGE := true |
| 315 | else ifdef BOARD_USES_PRODUCTIMAGE |
| 316 | $(error TARGET_COPY_OUT_PRODUCT must be set to 'product' to use a product image) |
| 317 | endif |
| 318 | |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 319 | ########################################### |
Dan Willemsen | 00cf767 | 2017-01-04 17:16:09 -0800 | [diff] [blame] | 320 | # Ensure that only TARGET_RECOVERY_UPDATER_LIBS *or* AB_OTA_UPDATER is set. |
| 321 | TARGET_RECOVERY_UPDATER_LIBS ?= |
| 322 | AB_OTA_UPDATER ?= |
| 323 | .KATI_READONLY := TARGET_RECOVERY_UPDATER_LIBS AB_OTA_UPDATER |
| 324 | ifeq ($(AB_OTA_UPDATER),true) |
| 325 | ifneq ($(strip $(TARGET_RECOVERY_UPDATER_LIBS)),) |
| 326 | $(error Do not use TARGET_RECOVERY_UPDATER_LIBS when using AB_OTA_UPDATER) |
| 327 | endif |
| 328 | endif |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 329 | |
Dan Willemsen | 2c3289b | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 330 | # Check BOARD_VNDK_VERSION |
Justin Yun | 9272ef8 | 2017-11-17 16:09:17 +0900 | [diff] [blame] | 331 | define check_vndk_version |
| 332 | $(eval vndk_path := prebuilts/vndk/v$(1)) \ |
Jae Shin | 240d97a | 2017-12-29 15:21:14 +0900 | [diff] [blame] | 333 | $(if $(wildcard $(vndk_path)/*/Android.bp),,$(error VNDK version $(1) not found)) |
Justin Yun | 9272ef8 | 2017-11-17 16:09:17 +0900 | [diff] [blame] | 334 | endef |
| 335 | |
Dan Willemsen | 2c3289b | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 336 | ifdef BOARD_VNDK_VERSION |
| 337 | ifneq ($(BOARD_VNDK_VERSION),current) |
Justin Yun | 2a233b3 | 2017-12-07 17:08:19 +0900 | [diff] [blame] | 338 | $(error BOARD_VNDK_VERSION: Only "current" is implemented) |
Dan Willemsen | 2c3289b | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 339 | endif |
Steven Moreland | cbfba70 | 2017-07-11 14:59:30 -0700 | [diff] [blame] | 340 | |
| 341 | TARGET_VENDOR_TEST_SUFFIX := /vendor |
| 342 | else |
| 343 | TARGET_VENDOR_TEST_SUFFIX := |
Dan Willemsen | 2c3289b | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 344 | endif |
| 345 | |
Justin Yun | 9272ef8 | 2017-11-17 16:09:17 +0900 | [diff] [blame] | 346 | ifdef PRODUCT_EXTRA_VNDK_VERSIONS |
| 347 | $(foreach v,$(PRODUCT_EXTRA_VNDK_VERSIONS),$(call check_vndk_version,$(v))) |
| 348 | endif |
| 349 | |
Jiyong Park | 641b6cc | 2018-01-15 14:48:40 +0900 | [diff] [blame] | 350 | # Ensure that BOARD_SYSTEMSDK_VERSIONS are all within PLATFORM_SYSTEMSDK_VERSIONS |
| 351 | _unsupported_systemsdk_versions := $(filter-out $(PLATFORM_SYSTEMSDK_VERSIONS),$(BOARD_SYSTEMSDK_VERSIONS)) |
| 352 | ifneq (,$(_unsupported_systemsdk_versions)) |
| 353 | $(error System SDK versions '$(_unsupported_systemsdk_versions)' in BOARD_SYSTEMSDK_VERSIONS are not supported.\ |
| 354 | Supported versions are $(PLATFORM_SYSTEMSDK_VERSIONS)) |
| 355 | endif |
| 356 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 357 | # --------------------------------------------------------------- |
| 358 | # Set up configuration for target machine. |
| 359 | # The following must be set: |
| 360 | # TARGET_OS = { linux } |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 361 | # TARGET_ARCH = { arm | x86 | mips } |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 362 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 363 | TARGET_OS := linux |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 364 | # 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] | 365 | ifneq ($(filter %64,$(TARGET_ARCH)),) |
| 366 | TARGET_IS_64_BIT := true |
| 367 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 368 | |
| 369 | # the target build type defaults to release |
| 370 | ifneq ($(TARGET_BUILD_TYPE),debug) |
| 371 | TARGET_BUILD_TYPE := release |
| 372 | endif |
| 373 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 374 | # --------------------------------------------------------------- |
| 375 | # figure out the output directories |
| 376 | |
Dan Willemsen | 60d9c67 | 2016-05-27 15:15:47 -0700 | [diff] [blame] | 377 | SOONG_OUT_DIR := $(OUT_DIR)/soong |
| 378 | |
Dan Willemsen | d6ed368 | 2017-09-08 14:29:51 -0700 | [diff] [blame] | 379 | TARGET_OUT_ROOT := $(OUT_DIR)/target |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 380 | |
Dan Willemsen | d6ed368 | 2017-09-08 14:29:51 -0700 | [diff] [blame] | 381 | HOST_OUT_ROOT := $(OUT_DIR)/host |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 382 | |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 383 | .KATI_READONLY := SOONG_OUT_DIR TARGET_OUT_ROOT HOST_OUT_ROOT |
| 384 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 385 | # We want to avoid two host bin directories in multilib build. |
Dan Willemsen | d6ed368 | 2017-09-08 14:29:51 -0700 | [diff] [blame] | 386 | HOST_OUT := $(HOST_OUT_ROOT)/$(HOST_OS)-$(HOST_PREBUILT_ARCH) |
Dan Willemsen | 60d9c67 | 2016-05-27 15:15:47 -0700 | [diff] [blame] | 387 | 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] | 388 | |
Dan Willemsen | d6ed368 | 2017-09-08 14:29:51 -0700 | [diff] [blame] | 389 | HOST_CROSS_OUT := $(HOST_OUT_ROOT)/windows-$(HOST_PREBUILT_ARCH) |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 390 | |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 391 | .KATI_READONLY := HOST_OUT SOONG_HOST_OUT HOST_CROSS_OUT |
| 392 | |
Jeff Brown | e33ba4c | 2011-07-11 22:11:46 -0700 | [diff] [blame] | 393 | TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 394 | |
| 395 | TARGET_COMMON_OUT_ROOT := $(TARGET_OUT_ROOT)/common |
| 396 | HOST_COMMON_OUT_ROOT := $(HOST_OUT_ROOT)/common |
| 397 | |
| 398 | PRODUCT_OUT := $(TARGET_PRODUCT_OUT_ROOT)/$(TARGET_DEVICE) |
| 399 | |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 400 | .KATI_READONLY := TARGET_PRODUCT_OUT_ROOT TARGET_COMMON_OUT_ROOT HOST_COMMON_OUT_ROOT PRODUCT_OUT |
| 401 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 402 | OUT_DOCS := $(TARGET_COMMON_OUT_ROOT)/docs |
Dan Albert | 303e603 | 2017-10-04 10:20:20 -0700 | [diff] [blame] | 403 | OUT_NDK_DOCS := $(TARGET_COMMON_OUT_ROOT)/ndk-docs |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 404 | .KATI_READONLY := OUT_DOCS OUT_NDK_DOCS |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 405 | |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 406 | $(call KATI_obsolete,BUILD_OUT,Use HOST_OUT instead) |
| 407 | |
| 408 | BUILD_OUT_EXECUTABLES := $(HOST_OUT)/bin |
Dan Willemsen | 60d9c67 | 2016-05-27 15:15:47 -0700 | [diff] [blame] | 409 | SOONG_HOST_OUT_EXECUTABLES := $(SOONG_HOST_OUT)/bin |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 410 | .KATI_READONLY := BUILD_OUT_EXECUTABLES SOONG_HOST_OUT_EXECUTABLES |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 411 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 412 | HOST_OUT_EXECUTABLES := $(HOST_OUT)/bin |
Ying Wang | 36ef50f | 2014-06-30 17:06:21 -0700 | [diff] [blame] | 413 | HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib64 |
Dan Willemsen | c6e194f | 2016-02-13 00:19:40 -0800 | [diff] [blame] | 414 | HOST_OUT_RENDERSCRIPT_BITCODE := $(HOST_OUT_SHARED_LIBRARIES) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 415 | HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT)/framework |
Joe Onorato | 64d85d0 | 2009-04-09 19:31:12 -0700 | [diff] [blame] | 416 | HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 417 | HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest64 |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame] | 418 | HOST_OUT_COVERAGE := $(HOST_OUT)/coverage |
Colin Cross | e887ccb | 2018-03-16 22:09:50 -0700 | [diff] [blame] | 419 | HOST_OUT_TESTCASES := $(HOST_OUT)/testcases |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 420 | .KATI_READONLY := \ |
| 421 | HOST_OUT_EXECUTABLES \ |
| 422 | HOST_OUT_SHARED_LIBRARIES \ |
| 423 | HOST_OUT_RENDERSCRIPT_BITCODE \ |
| 424 | HOST_OUT_JAVA_LIBRARIES \ |
| 425 | HOST_OUT_SDK_ADDON \ |
| 426 | HOST_OUT_NATIVE_TESTS \ |
| 427 | HOST_OUT_COVERAGE \ |
| 428 | HOST_OUT_TESTCASES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 429 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 430 | HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT)/bin |
| 431 | HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 432 | HOST_CROSS_OUT_NATIVE_TESTS := $(HOST_CROSS_OUT)/nativetest |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame] | 433 | HOST_CROSS_OUT_COVERAGE := $(HOST_CROSS_OUT)/coverage |
Colin Cross | e887ccb | 2018-03-16 22:09:50 -0700 | [diff] [blame] | 434 | HOST_CROSS_OUT_TESTCASES := $(HOST_CROSS_OUT)/testcases |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 435 | .KATI_READONLY := \ |
| 436 | HOST_CROSS_OUT_EXECUTABLES \ |
| 437 | HOST_CROSS_OUT_SHARED_LIBRARIES \ |
| 438 | HOST_CROSS_OUT_NATIVE_TESTS \ |
| 439 | HOST_CROSS_OUT_COVERAGE \ |
| 440 | HOST_CROSS_OUT_TESTCASES |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 441 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 442 | HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 443 | HOST_OUT_INTERMEDIATE_LIBRARIES := $(HOST_OUT_INTERMEDIATES)/lib |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 444 | HOST_OUT_NOTICE_FILES := $(HOST_OUT_INTERMEDIATES)/NOTICE_FILES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 445 | HOST_OUT_COMMON_INTERMEDIATES := $(HOST_COMMON_OUT_ROOT)/obj |
Ying Wang | ec900ac | 2013-11-13 15:56:18 -0800 | [diff] [blame] | 446 | HOST_OUT_FAKE := $(HOST_OUT)/fake_packages |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 447 | .KATI_READONLY := \ |
| 448 | HOST_OUT_INTERMEDIATES \ |
| 449 | HOST_OUT_INTERMEDIATE_LIBRARIES \ |
| 450 | HOST_OUT_NOTICE_FILES \ |
| 451 | HOST_OUT_COMMON_INTERMEDIATES \ |
| 452 | HOST_OUT_FAKE |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 453 | |
Alexey Polyudov | ccdc311 | 2016-08-01 17:41:49 -0700 | [diff] [blame] | 454 | # Nano environment config |
| 455 | include $(BUILD_SYSTEM)/aux_config.mk |
| 456 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 457 | HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 458 | HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES := $(HOST_CROSS_OUT_INTERMEDIATES)/lib |
| 459 | HOST_CROSS_OUT_NOTICE_FILES := $(HOST_CROSS_OUT_INTERMEDIATES)/NOTICE_FILES |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 460 | .KATI_READONLY := \ |
| 461 | HOST_CROSS_OUT_INTERMEDIATES \ |
| 462 | HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES \ |
| 463 | HOST_CROSS_OUT_NOTICE_FILES |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 464 | |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 465 | HOST_OUT_GEN := $(HOST_OUT)/gen |
| 466 | HOST_OUT_COMMON_GEN := $(HOST_COMMON_OUT_ROOT)/gen |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 467 | .KATI_READONLY := \ |
| 468 | HOST_OUT_GEN \ |
| 469 | HOST_OUT_COMMON_GEN |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 470 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 471 | HOST_CROSS_OUT_GEN := $(HOST_CROSS_OUT)/gen |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 472 | .KATI_READONLY := HOST_CROSS_OUT_GEN |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 473 | |
Dan Shi | 26efd3a | 2017-11-13 13:38:17 -0800 | [diff] [blame] | 474 | HOST_OUT_TEST_CONFIG := $(HOST_OUT)/test_config |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 475 | .KATI_READONLY := HOST_OUT_TEST_CONFIG |
Dan Shi | 26efd3a | 2017-11-13 13:38:17 -0800 | [diff] [blame] | 476 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 477 | # Out for HOST_2ND_ARCH |
| 478 | HOST_2ND_ARCH_VAR_PREFIX := 2ND_ |
| 479 | HOST_2ND_ARCH_MODULE_SUFFIX := _32 |
| 480 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj32 |
| 481 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES := $($(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES)/lib |
Ying Wang | 966c1e0 | 2014-05-20 14:43:51 -0700 | [diff] [blame] | 482 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 483 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES := $(HOST_OUT_EXECUTABLES) |
Dan Albert | dc94137 | 2015-05-04 18:17:52 -0700 | [diff] [blame] | 484 | $(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] | 485 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest |
Simran Basi | 7166d1f | 2017-01-25 15:11:55 -0800 | [diff] [blame] | 486 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_TESTCASES := $(HOST_OUT_TESTCASES) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 487 | .KATI_READONLY := \ |
| 488 | HOST_2ND_ARCH_VAR_PREFIX \ |
| 489 | HOST_2ND_ARCH_MODULE_SUFFIX \ |
| 490 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES \ |
| 491 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES \ |
| 492 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES \ |
| 493 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES \ |
| 494 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_JAVA_LIBRARIES \ |
| 495 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_NATIVE_TESTS \ |
| 496 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_TESTCASES |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 497 | |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame] | 498 | # The default host library path. |
| 499 | # 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] | 500 | HOST_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 501 | .KATI_READONLY := HOST_LIBRARY_PATH |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 502 | |
Dan Willemsen | 9ecbf83 | 2016-02-05 16:20:19 -0800 | [diff] [blame] | 503 | # Out for HOST_CROSS_2ND_ARCH |
| 504 | HOST_CROSS_2ND_ARCH_VAR_PREFIX := 2ND_ |
| 505 | HOST_CROSS_2ND_ARCH_MODULE_SUFFIX := _64 |
| 506 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj64 |
| 507 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES := $($(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES)/lib |
| 508 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib64 |
| 509 | $(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] | 510 | $(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] | 511 | .KATI_READONLY := \ |
| 512 | HOST_CROSS_2ND_ARCH_VAR_PREFIX \ |
| 513 | HOST_CROSS_2ND_ARCH_MODULE_SUFFIX \ |
| 514 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES \ |
| 515 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES \ |
| 516 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_SHARED_LIBRARIES \ |
| 517 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_EXECUTABLES \ |
| 518 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_NATIVE_TESTS |
Dan Willemsen | 9ecbf83 | 2016-02-05 16:20:19 -0800 | [diff] [blame] | 519 | |
Vishwath Mohan | d8eabaa | 2017-05-09 19:36:54 -0700 | [diff] [blame] | 520 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
| 521 | TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_asan |
| 522 | else |
| 523 | TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj |
| 524 | endif |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 525 | TARGET_OUT_HEADERS := $(TARGET_OUT_INTERMEDIATES)/include |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 526 | TARGET_OUT_INTERMEDIATE_LIBRARIES := $(TARGET_OUT_INTERMEDIATES)/lib |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 527 | .KATI_READONLY := TARGET_OUT_INTERMEDIATES TARGET_OUT_HEADERS TARGET_OUT_INTERMEDIATE_LIBRARIES |
Vishwath Mohan | d8eabaa | 2017-05-09 19:36:54 -0700 | [diff] [blame] | 528 | |
| 529 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
| 530 | TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj_asan |
| 531 | else |
| 532 | TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj |
| 533 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 534 | .KATI_READONLY := TARGET_OUT_COMMON_INTERMEDIATES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 535 | |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 536 | TARGET_OUT_GEN := $(PRODUCT_OUT)/gen |
| 537 | TARGET_OUT_COMMON_GEN := $(TARGET_COMMON_OUT_ROOT)/gen |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 538 | .KATI_READONLY := TARGET_OUT_GEN TARGET_OUT_COMMON_GEN |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 539 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 540 | TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 541 | .KATI_READONLY := TARGET_OUT |
Ivan Krasin | 74b32b8 | 2015-09-18 11:54:43 -0700 | [diff] [blame] | 542 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Vishwath Mohan | b285c46 | 2017-03-29 15:32:04 -0700 | [diff] [blame] | 543 | target_out_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/system |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 544 | ifeq ($(SANITIZE_LITE),true) |
| 545 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 546 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
| 547 | target_out_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/system |
| 548 | else |
| 549 | target_out_app_base := $(TARGET_OUT) |
| 550 | endif |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 551 | else |
| 552 | target_out_shared_libraries_base := $(TARGET_OUT) |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 553 | target_out_app_base := $(TARGET_OUT) |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 554 | endif |
| 555 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 556 | TARGET_OUT_EXECUTABLES := $(TARGET_OUT)/bin |
| 557 | TARGET_OUT_OPTIONAL_EXECUTABLES := $(TARGET_OUT)/xbin |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 558 | ifeq ($(TARGET_IS_64_BIT),true) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 559 | # /system/lib always contains 32-bit libraries, |
| 560 | # and /system/lib64 (if present) always contains 64-bit libraries. |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 561 | TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib64 |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 562 | else |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 563 | TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 564 | endif |
Dan Willemsen | c6e194f | 2016-02-13 00:19:40 -0800 | [diff] [blame] | 565 | TARGET_OUT_RENDERSCRIPT_BITCODE := $(TARGET_OUT_SHARED_LIBRARIES) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 566 | TARGET_OUT_JAVA_LIBRARIES := $(TARGET_OUT)/framework |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 567 | TARGET_OUT_APPS := $(target_out_app_base)/app |
| 568 | 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] | 569 | TARGET_OUT_KEYLAYOUT := $(TARGET_OUT)/usr/keylayout |
| 570 | TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars |
| 571 | TARGET_OUT_ETC := $(TARGET_OUT)/etc |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 572 | TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES |
Dima Zavin | 531f524 | 2010-09-27 17:37:17 -0700 | [diff] [blame] | 573 | TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages |
Simran Basi | 7166d1f | 2017-01-25 15:11:55 -0800 | [diff] [blame] | 574 | TARGET_OUT_TESTCASES := $(PRODUCT_OUT)/testcases |
Dan Shi | 26efd3a | 2017-11-13 13:38:17 -0800 | [diff] [blame] | 575 | TARGET_OUT_TEST_CONFIG := $(PRODUCT_OUT)/test_config |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 576 | .KATI_READONLY := \ |
| 577 | TARGET_OUT_EXECUTABLES \ |
| 578 | TARGET_OUT_OPTIONAL_EXECUTABLES \ |
| 579 | TARGET_OUT_SHARED_LIBRARIES \ |
| 580 | TARGET_OUT_RENDERSCRIPT_BITCODE \ |
| 581 | TARGET_OUT_JAVA_LIBRARIES \ |
| 582 | TARGET_OUT_APPS \ |
| 583 | TARGET_OUT_APPS_PRIVILEGED \ |
| 584 | TARGET_OUT_KEYLAYOUT \ |
| 585 | TARGET_OUT_KEYCHARS \ |
| 586 | TARGET_OUT_ETC \ |
| 587 | TARGET_OUT_NOTICE_FILES \ |
| 588 | TARGET_OUT_FAKE \ |
| 589 | TARGET_OUT_TESTCASES \ |
| 590 | TARGET_OUT_TEST_CONFIG |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 591 | |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 592 | ifeq ($(SANITIZE_LITE),true) |
| 593 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 594 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
| 595 | TARGET_OUT_SYSTEM_OTHER := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_SYSTEM_OTHER) |
| 596 | else |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 597 | TARGET_OUT_SYSTEM_OTHER := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_OTHER) |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 598 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 599 | .KATI_READONLY := TARGET_OUT_SYSTEM_OTHER |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 600 | |
Ying Wang | e1d44c3 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 601 | # Out for TARGET_2ND_ARCH |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame] | 602 | TARGET_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 603 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 604 | # With this you can reference the arm binary translation library with libfoo_arm in PRODUCT_PACKAGES. |
| 605 | TARGET_2ND_ARCH_MODULE_SUFFIX := _$(TARGET_2ND_ARCH) |
| 606 | else |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame] | 607 | TARGET_2ND_ARCH_MODULE_SUFFIX := $(HOST_2ND_ARCH_MODULE_SUFFIX) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 608 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 609 | .KATI_READONLY := TARGET_2ND_ARCH_VAR_PREFIX TARGET_2ND_ARCH_MODULE_SUFFIX |
Vishwath Mohan | d8eabaa | 2017-05-09 19:36:54 -0700 | [diff] [blame] | 610 | |
| 611 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
| 612 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)_asan |
| 613 | else |
| 614 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH) |
| 615 | endif |
Ying Wang | e1d44c3 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 616 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES)/lib |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 617 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 618 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) |
| 619 | else |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 620 | $(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] | 621 | endif |
Dan Willemsen | c6e194f | 2016-02-13 00:19:40 -0800 | [diff] [blame] | 622 | $(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] | 623 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) |
Colin Cross | d957446 | 2014-01-24 13:37:07 -0800 | [diff] [blame] | 624 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS) |
| 625 | $(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] | 626 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_TESTCASES := $(TARGET_OUT_TESTCASES) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 627 | .KATI_READONLY := \ |
| 628 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES \ |
| 629 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES \ |
| 630 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES \ |
| 631 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_RENDERSCRIPT_BITCODE \ |
| 632 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES \ |
| 633 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS \ |
| 634 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED \ |
| 635 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_TESTCASES |
Ying Wang | e1d44c3 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 636 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 637 | TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 638 | TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) |
| 639 | TARGET_OUT_DATA_SHARED_LIBRARIES := $(TARGET_OUT_SHARED_LIBRARIES) |
| 640 | TARGET_OUT_DATA_JAVA_LIBRARIES := $(TARGET_OUT_DATA)/framework |
| 641 | TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA)/app |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 642 | TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT) |
| 643 | TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS) |
| 644 | TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC) |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 645 | ifeq ($(TARGET_IS_64_BIT),true) |
| 646 | TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64 |
Julien Desprez | 188a1dd | 2016-04-12 10:22:06 +0100 | [diff] [blame] | 647 | TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest64 |
Steven Moreland | cbfba70 | 2017-07-11 14:59:30 -0700 | [diff] [blame] | 648 | TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64$(TARGET_VENDOR_TEST_SUFFIX) |
| 649 | 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] | 650 | else |
Ying Wang | 4c68174 | 2010-07-20 11:08:47 -0700 | [diff] [blame] | 651 | TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest |
Julien Desprez | 188a1dd | 2016-04-12 10:22:06 +0100 | [diff] [blame] | 652 | TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest |
Steven Moreland | cbfba70 | 2017-07-11 14:59:30 -0700 | [diff] [blame] | 653 | TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest$(TARGET_VENDOR_TEST_SUFFIX) |
| 654 | 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] | 655 | endif |
Tsu Chiang Chuang | 40da883 | 2012-07-13 13:47:09 -0700 | [diff] [blame] | 656 | TARGET_OUT_DATA_FAKE := $(TARGET_OUT_DATA)/fake_packages |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 657 | .KATI_READONLY := \ |
| 658 | TARGET_OUT_DATA \ |
| 659 | TARGET_OUT_DATA_EXECUTABLES \ |
| 660 | TARGET_OUT_DATA_SHARED_LIBRARIES \ |
| 661 | TARGET_OUT_DATA_JAVA_LIBRARIES \ |
| 662 | TARGET_OUT_DATA_APPS \ |
| 663 | TARGET_OUT_DATA_KEYLAYOUT \ |
| 664 | TARGET_OUT_DATA_KEYCHARS \ |
| 665 | TARGET_OUT_DATA_ETC \ |
| 666 | TARGET_OUT_DATA_NATIVE_TESTS \ |
| 667 | TARGET_OUT_DATA_METRIC_TESTS \ |
| 668 | TARGET_OUT_VENDOR_NATIVE_TESTS \ |
| 669 | TARGET_OUT_VENDOR_METRIC_TESTS \ |
| 670 | TARGET_OUT_DATA_FAKE |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 671 | |
Ying Wang | e3d0679 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 672 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_DATA_EXECUTABLES) |
| 673 | $(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] | 674 | $(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] | 675 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 676 | $(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] | 677 | $(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] | 678 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest/$(TARGET_2ND_ARCH)$(TARGET_VENDOR_TEST_SUFFIX) |
| 679 | $(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] | 680 | else |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 681 | $(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] | 682 | $(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] | 683 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest$(TARGET_VENDOR_TEST_SUFFIX) |
| 684 | $(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] | 685 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 686 | .KATI_READONLY := \ |
| 687 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES \ |
| 688 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES \ |
| 689 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS \ |
| 690 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS \ |
| 691 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS \ |
| 692 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS \ |
| 693 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_METRIC_TESTS \ |
Ying Wang | e3d0679 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 694 | |
Ying Wang | 9f8e8db | 2011-11-04 11:37:01 -0700 | [diff] [blame] | 695 | TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 696 | .KATI_READONLY := TARGET_OUT_CACHE |
Ying Wang | 9f8e8db | 2011-11-04 11:37:01 -0700 | [diff] [blame] | 697 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 698 | TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 699 | .KATI_READONLY := TARGET_OUT_VENDOR |
Ivan Krasin | 74b32b8 | 2015-09-18 11:54:43 -0700 | [diff] [blame] | 700 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Vishwath Mohan | b285c46 | 2017-03-29 15:32:04 -0700 | [diff] [blame] | 701 | target_out_vendor_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/vendor |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 702 | ifeq ($(SANITIZE_LITE),true) |
| 703 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 704 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
| 705 | target_out_vendor_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/vendor |
| 706 | else |
| 707 | target_out_vendor_app_base := $(TARGET_OUT_VENDOR) |
| 708 | endif |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 709 | else |
| 710 | target_out_vendor_shared_libraries_base := $(TARGET_OUT_VENDOR) |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 711 | target_out_vendor_app_base := $(TARGET_OUT_VENDOR) |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 712 | endif |
| 713 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 714 | TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR)/bin |
| 715 | TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES := $(TARGET_OUT_VENDOR)/xbin |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 716 | ifeq ($(TARGET_IS_64_BIT),true) |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 717 | TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib64 |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 718 | else |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 719 | TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 720 | endif |
Miao Wang | 57be564 | 2017-03-01 19:39:19 -0800 | [diff] [blame] | 721 | TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE := $(TARGET_OUT_VENDOR_SHARED_LIBRARIES) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 722 | TARGET_OUT_VENDOR_JAVA_LIBRARIES := $(TARGET_OUT_VENDOR)/framework |
Andreas Gampe | 4ed21d1 | 2017-06-16 10:24:54 -0700 | [diff] [blame] | 723 | TARGET_OUT_VENDOR_APPS := $(target_out_vendor_app_base)/app |
| 724 | TARGET_OUT_VENDOR_APPS_PRIVILEGED := $(target_out_vendor_app_base)/priv-app |
Ying Wang | 8f77936 | 2011-09-13 13:57:26 -0700 | [diff] [blame] | 725 | TARGET_OUT_VENDOR_ETC := $(TARGET_OUT_VENDOR)/etc |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 726 | .KATI_READONLY := \ |
| 727 | TARGET_OUT_VENDOR_EXECUTABLES \ |
| 728 | TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES \ |
| 729 | TARGET_OUT_VENDOR_SHARED_LIBRARIES \ |
| 730 | TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE \ |
| 731 | TARGET_OUT_VENDOR_JAVA_LIBRARIES \ |
| 732 | TARGET_OUT_VENDOR_APPS \ |
| 733 | TARGET_OUT_VENDOR_APPS_PRIVILEGED \ |
| 734 | TARGET_OUT_VENDOR_ETC |
Ying Wang | 8f77936 | 2011-09-13 13:57:26 -0700 | [diff] [blame] | 735 | |
Ying Wang | e3d0679 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 736 | $(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] | 737 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
Andreas Gampe | cf6268f | 2016-06-30 20:20:38 -0700 | [diff] [blame] | 738 | $(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] | 739 | else |
Andreas Gampe | cf6268f | 2016-06-30 20:20:38 -0700 | [diff] [blame] | 740 | $(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] | 741 | endif |
Miao Wang | 57be564 | 2017-03-01 19:39:19 -0800 | [diff] [blame] | 742 | $(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] | 743 | $(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] | 744 | $(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] | 745 | .KATI_READONLY := \ |
| 746 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES \ |
| 747 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES \ |
| 748 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE \ |
| 749 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS \ |
| 750 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS_PRIVILEGED |
Ying Wang | 61d499b | 2014-01-15 16:02:16 -0800 | [diff] [blame] | 751 | |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 752 | TARGET_OUT_OEM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_OEM) |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 753 | TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM)/bin |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 754 | ifeq ($(TARGET_IS_64_BIT),true) |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 755 | TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib64 |
| 756 | else |
| 757 | TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib |
| 758 | endif |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 759 | # We don't expect Java libraries in the oem.img. |
| 760 | # TARGET_OUT_OEM_JAVA_LIBRARIES:= $(TARGET_OUT_OEM)/framework |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 761 | TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM)/app |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 762 | TARGET_OUT_OEM_ETC := $(TARGET_OUT_OEM)/etc |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 763 | .KATI_READONLY := \ |
| 764 | TARGET_OUT_OEM \ |
| 765 | TARGET_OUT_OEM_EXECUTABLES \ |
| 766 | TARGET_OUT_OEM_SHARED_LIBRARIES \ |
| 767 | TARGET_OUT_OEM_APPS \ |
| 768 | TARGET_OUT_OEM_ETC |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 769 | |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 770 | $(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] | 771 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 772 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib/$(TARGET_2ND_ARCH) |
| 773 | else |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 774 | $(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] | 775 | endif |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 776 | $(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] | 777 | .KATI_READONLY := \ |
| 778 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES \ |
| 779 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES \ |
| 780 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS \ |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 781 | |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 782 | TARGET_OUT_ODM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ODM) |
| 783 | TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM)/bin |
| 784 | ifeq ($(TARGET_IS_64_BIT),true) |
| 785 | TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib64 |
| 786 | else |
| 787 | TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib |
| 788 | endif |
| 789 | TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM)/app |
| 790 | TARGET_OUT_ODM_ETC := $(TARGET_OUT_ODM)/etc |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 791 | .KATI_READONLY := \ |
| 792 | TARGET_OUT_ODM \ |
| 793 | TARGET_OUT_ODM_EXECUTABLES \ |
| 794 | TARGET_OUT_ODM_SHARED_LIBRARIES \ |
| 795 | TARGET_OUT_ODM_APPS \ |
| 796 | TARGET_OUT_ODM_ETC |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 797 | |
| 798 | $(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] | 799 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 800 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib/$(TARGET_2ND_ARCH) |
| 801 | else |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 802 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 803 | endif |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 804 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM_APPS) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 805 | .KATI_READONLY := \ |
| 806 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_EXECUTABLES \ |
| 807 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES \ |
| 808 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 809 | |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 810 | TARGET_OUT_PRODUCT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_PRODUCT) |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 811 | .KATI_READONLY := TARGET_OUT_PRODUCT |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 812 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Inseob Kim | 47c1352 | 2018-05-04 11:20:43 +0900 | [diff] [blame] | 813 | target_out_product_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/product |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 814 | ifeq ($(SANITIZE_LITE),true) |
| 815 | # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not |
| 816 | # work with unsanitized app_process. For simplicity, generate APKs into /data/asan/. |
| 817 | target_out_product_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/product |
| 818 | else |
| 819 | target_out_product_app_base := $(TARGET_OUT_PRODUCT) |
| 820 | endif |
| 821 | else |
Inseob Kim | 47c1352 | 2018-05-04 11:20:43 +0900 | [diff] [blame] | 822 | target_out_product_shared_libraries_base := $(TARGET_OUT_PRODUCT) |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 823 | target_out_product_app_base := $(TARGET_OUT_PRODUCT) |
| 824 | endif |
| 825 | |
| 826 | ifeq ($(TARGET_IS_64_BIT),true) |
| 827 | TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib64 |
| 828 | else |
| 829 | TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib |
| 830 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 831 | TARGET_OUT_PRODUCT_JAVA_LIBRARIES := $(TARGET_OUT_PRODUCT)/framework |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 832 | TARGET_OUT_PRODUCT_APPS := $(target_out_product_app_base)/app |
| 833 | TARGET_OUT_PRODUCT_APPS_PRIVILEGED := $(target_out_product_app_base)/priv-app |
| 834 | TARGET_OUT_PRODUCT_ETC := $(TARGET_OUT_PRODUCT)/etc |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 835 | .KATI_READONLY := \ |
| 836 | TARGET_OUT_PRODUCT_SHARED_LIBRARIES \ |
| 837 | TARGET_OUT_PRODUCT_JAVA_LIBRARIES \ |
| 838 | TARGET_OUT_PRODUCT_APPS \ |
| 839 | TARGET_OUT_PRODUCT_APPS_PRIVILEGED \ |
| 840 | TARGET_OUT_PRODUCT_ETC |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 841 | |
| 842 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 843 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) |
| 844 | else |
| 845 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib |
| 846 | endif |
| 847 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS := $(TARGET_OUT_PRODUCT_APPS) |
| 848 | $(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] | 849 | .KATI_READONLY := \ |
| 850 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES \ |
| 851 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS \ |
| 852 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS_PRIVILEGED |
Jaekyun Seok | b7735d8 | 2017-11-27 17:04:47 +0900 | [diff] [blame] | 853 | |
Steve Fung | dfbab49 | 2015-09-24 18:12:33 -0700 | [diff] [blame] | 854 | TARGET_OUT_BREAKPAD := $(PRODUCT_OUT)/breakpad |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 855 | .KATI_READONLY := TARGET_OUT_BREAKPAD |
Steve Fung | dfbab49 | 2015-09-24 18:12:33 -0700 | [diff] [blame] | 856 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 857 | TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols |
| 858 | TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin |
| 859 | TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/lib |
Colin Cross | a58f8e0 | 2014-06-20 13:33:36 -0700 | [diff] [blame] | 860 | 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] | 861 | TARGET_ROOT_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED) |
| 862 | TARGET_ROOT_OUT_SBIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/sbin |
| 863 | TARGET_ROOT_OUT_BIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/bin |
Ryan Campbell | 737bc02 | 2016-09-15 17:32:13 -0700 | [diff] [blame] | 864 | TARGET_OUT_COVERAGE := $(PRODUCT_OUT)/coverage |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 865 | .KATI_READONLY := \ |
| 866 | TARGET_OUT_UNSTRIPPED \ |
| 867 | TARGET_OUT_EXECUTABLES_UNSTRIPPED \ |
| 868 | TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED \ |
| 869 | TARGET_OUT_VENDOR_SHARED_LIBRARIES_UNSTRIPPED \ |
| 870 | TARGET_ROOT_OUT_UNSTRIPPED \ |
| 871 | TARGET_ROOT_OUT_SBIN_UNSTRIPPED \ |
| 872 | TARGET_ROOT_OUT_BIN_UNSTRIPPED \ |
| 873 | TARGET_OUT_COVERAGE |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 874 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 875 | TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 876 | TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin |
| 877 | TARGET_ROOT_OUT_SBIN := $(TARGET_ROOT_OUT)/sbin |
| 878 | TARGET_ROOT_OUT_ETC := $(TARGET_ROOT_OUT)/etc |
| 879 | TARGET_ROOT_OUT_USR := $(TARGET_ROOT_OUT)/usr |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 880 | .KATI_READONLY := \ |
| 881 | TARGET_ROOT_OUT \ |
| 882 | TARGET_ROOT_OUT_BIN \ |
| 883 | TARGET_ROOT_OUT_SBIN \ |
| 884 | TARGET_ROOT_OUT_ETC \ |
| 885 | TARGET_ROOT_OUT_USR |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 886 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 887 | TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RECOVERY) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 888 | TARGET_RECOVERY_ROOT_OUT := $(TARGET_RECOVERY_OUT)/root |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 889 | .KATI_READONLY := \ |
| 890 | TARGET_RECOVERY_OUT \ |
| 891 | TARGET_RECOVERY_ROOT_OUT |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 892 | |
| 893 | TARGET_SYSLOADER_OUT := $(PRODUCT_OUT)/sysloader |
| 894 | TARGET_SYSLOADER_ROOT_OUT := $(TARGET_SYSLOADER_OUT)/root |
| 895 | TARGET_SYSLOADER_SYSTEM_OUT := $(TARGET_SYSLOADER_OUT)/root/system |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 896 | .KATI_READONLY := \ |
| 897 | TARGET_SYSLOADER_OUT \ |
| 898 | TARGET_SYSLOADER_ROOT_OUT \ |
| 899 | TARGET_SYSLOADER_SYSTEM_OUT |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 900 | |
| 901 | TARGET_INSTALLER_OUT := $(PRODUCT_OUT)/installer |
| 902 | TARGET_INSTALLER_DATA_OUT := $(TARGET_INSTALLER_OUT)/data |
| 903 | TARGET_INSTALLER_ROOT_OUT := $(TARGET_INSTALLER_OUT)/root |
| 904 | TARGET_INSTALLER_SYSTEM_OUT := $(TARGET_INSTALLER_OUT)/root/system |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 905 | .KATI_READONLY := \ |
| 906 | TARGET_INSTALLER_OUT \ |
| 907 | TARGET_INSTALLER_DATA_OUT \ |
| 908 | TARGET_INSTALLER_ROOT_OUT \ |
| 909 | TARGET_INSTALLER_SYSTEM_OUT |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 910 | |
Ying Wang | a83940f | 2010-09-24 18:09:04 -0700 | [diff] [blame] | 911 | COMMON_MODULE_CLASSES := TARGET-NOTICE_FILES HOST-NOTICE_FILES HOST-JAVA_LIBRARIES |
Dan Willemsen | 8dae49c | 2017-02-15 15:48:11 -0800 | [diff] [blame] | 912 | 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] | 913 | .KATI_READONLY := COMMON_MODULE_CLASSES PER_ARCH_MODULE_CLASSES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 914 | |
| 915 | ifeq (,$(strip $(DIST_DIR))) |
| 916 | DIST_DIR := $(OUT_DIR)/dist |
| 917 | endif |
Dan Willemsen | 11677ed | 2018-03-28 14:33:10 -0700 | [diff] [blame] | 918 | .KATI_READONLY := DIST_DIR |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 919 | |
Dan Willemsen | 20f99a6 | 2017-10-12 01:35:14 -0700 | [diff] [blame] | 920 | ifeq ($(CALLED_FROM_SETUP),true) |
Dan Willemsen | 0d25529 | 2017-02-18 10:32:13 -0800 | [diff] [blame] | 921 | PRINT_BUILD_CONFIG ?= true |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 922 | endif |