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 | |
Joe Onorato | eefd021 | 2009-05-13 00:45:23 -0400 | [diff] [blame] | 14 | # Set up version information. |
| 15 | include $(BUILD_SYSTEM)/version_defaults.mk |
| 16 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 17 | # --------------------------------------------------------------- |
| 18 | # If you update the build system such that the environment setup |
| 19 | # or buildspec.mk need to be updated, increment this number, and |
| 20 | # people who haven't re-run those will have to do so before they |
| 21 | # can build. Make sure to also update the corresponding value in |
| 22 | # buildspec.mk.default and envsetup.sh. |
Dan Willemsen | 53e3899 | 2016-08-11 17:20:33 -0700 | [diff] [blame] | 23 | CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 12 |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 24 | |
| 25 | # --------------------------------------------------------------- |
Jeff Brown | e33ba4c | 2011-07-11 22:11:46 -0700 | [diff] [blame] | 26 | # The product defaults to generic on hardware |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 27 | # NOTE: This will be overridden in product_config.mk if make |
| 28 | # was invoked with a PRODUCT-xxx-yyy goal. |
| 29 | ifeq ($(TARGET_PRODUCT),) |
Ying Wang | 0a76df5 | 2015-06-08 11:57:26 -0700 | [diff] [blame] | 30 | TARGET_PRODUCT := aosp_arm |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 31 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 32 | |
| 33 | |
| 34 | # the variant -- the set of files that are included for a build |
| 35 | ifeq ($(strip $(TARGET_BUILD_VARIANT)),) |
| 36 | TARGET_BUILD_VARIANT := eng |
| 37 | endif |
| 38 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 39 | # --------------------------------------------------------------- |
| 40 | # Set up configuration for host machine. We don't do cross- |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 41 | # 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] | 42 | # running on |
| 43 | |
| 44 | UNAME := $(shell uname -sm) |
| 45 | |
| 46 | # HOST_OS |
| 47 | ifneq (,$(findstring Linux,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 48 | HOST_OS := linux |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 49 | endif |
| 50 | ifneq (,$(findstring Darwin,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 51 | HOST_OS := darwin |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 52 | endif |
| 53 | ifneq (,$(findstring Macintosh,$(UNAME))) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 54 | HOST_OS := darwin |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 55 | endif |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 56 | |
Ying Wang | 08800fd | 2016-03-03 20:57:21 -0800 | [diff] [blame] | 57 | HOST_OS_EXTRA:=$(shell python -c "import platform; print(platform.platform())") |
| 58 | |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 59 | # BUILD_OS is the real host doing the build. |
| 60 | BUILD_OS := $(HOST_OS) |
| 61 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 62 | HOST_CROSS_OS := |
| 63 | # We can cross-build Windows binaries on Linux |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 64 | ifeq ($(HOST_OS),linux) |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 65 | HOST_CROSS_OS := windows |
| 66 | HOST_CROSS_ARCH := x86 |
Dan Willemsen | 9ecbf83 | 2016-02-05 16:20:19 -0800 | [diff] [blame] | 67 | HOST_CROSS_2ND_ARCH := x86_64 |
Dan Willemsen | 056609c | 2016-05-16 22:07:31 -0700 | [diff] [blame] | 68 | 2ND_HOST_CROSS_IS_64_BIT := true |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 69 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 70 | |
| 71 | ifeq ($(HOST_OS),) |
| 72 | $(error Unable to determine HOST_OS from uname -sm: $(UNAME)!) |
| 73 | endif |
| 74 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 75 | # HOST_ARCH |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 76 | ifneq (,$(findstring x86_64,$(UNAME))) |
Ying Wang | 2713fce | 2014-06-09 12:31:12 -0700 | [diff] [blame] | 77 | HOST_ARCH := x86_64 |
| 78 | HOST_2ND_ARCH := x86 |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 79 | HOST_IS_64_BIT := true |
Brian Carlstrom | 2cd8a74 | 2015-03-20 11:39:00 -0700 | [diff] [blame] | 80 | else |
Dan Willemsen | 88225fd | 2016-06-29 12:26:53 -0700 | [diff] [blame] | 81 | ifneq (,$(findstring i686,$(UNAME))$(findstring x86,$(UNAME))) |
Brian Carlstrom | 2cd8a74 | 2015-03-20 11:39:00 -0700 | [diff] [blame] | 82 | $(error Building on a 32-bit x86 host is not supported: $(UNAME)!) |
| 83 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 84 | endif |
| 85 | |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 86 | BUILD_ARCH := $(HOST_ARCH) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 87 | BUILD_2ND_ARCH := $(HOST_2ND_ARCH) |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 88 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 89 | ifeq ($(HOST_ARCH),) |
| 90 | $(error Unable to determine HOST_ARCH from uname -sm: $(UNAME)!) |
| 91 | endif |
| 92 | |
| 93 | # the host build defaults to release, and it must be release or debug |
| 94 | ifeq ($(HOST_BUILD_TYPE),) |
| 95 | HOST_BUILD_TYPE := release |
| 96 | endif |
| 97 | |
| 98 | ifneq ($(HOST_BUILD_TYPE),release) |
| 99 | ifneq ($(HOST_BUILD_TYPE),debug) |
| 100 | $(error HOST_BUILD_TYPE must be either release or debug, not '$(HOST_BUILD_TYPE)') |
| 101 | endif |
| 102 | endif |
| 103 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 104 | # We don't want to move all the prebuilt host tools to a $(HOST_OS)-x86_64 dir. |
| 105 | HOST_PREBUILT_ARCH := x86 |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 106 | # This is the standard way to name a directory containing prebuilt host |
| 107 | # objects. E.g., prebuilt/$(HOST_PREBUILT_TAG)/cc |
Dan Albert | 216ecac | 2015-05-04 12:44:44 -0700 | [diff] [blame] | 108 | HOST_PREBUILT_TAG := $(BUILD_OS)-$(HOST_PREBUILT_ARCH) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 109 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 110 | # TARGET_COPY_OUT_* are all relative to the staging directory, ie PRODUCT_OUT. |
| 111 | # Define them here so they can be used in product config files. |
| 112 | TARGET_COPY_OUT_SYSTEM := system |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 113 | TARGET_COPY_OUT_SYSTEM_OTHER := system_other |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 114 | TARGET_COPY_OUT_DATA := data |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 115 | TARGET_COPY_OUT_OEM := oem |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 116 | TARGET_COPY_OUT_ODM := odm |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 117 | TARGET_COPY_OUT_ROOT := root |
| 118 | TARGET_COPY_OUT_RECOVERY := recovery |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 119 | ########################################### |
| 120 | # Define TARGET_COPY_OUT_VENDOR to a placeholder, for at this point |
| 121 | # we don't know if the device wants to build a separate vendor.img |
| 122 | # or just build vendor stuff into system.img. |
| 123 | # A device can set up TARGET_COPY_OUT_VENDOR to "vendor" in its |
| 124 | # BoardConfig.mk. |
| 125 | # We'll substitute with the real value after loading BoardConfig.mk. |
| 126 | _vendor_path_placeholder := ||VENDOR-PATH-PH|| |
| 127 | TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder) |
| 128 | ########################################### |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 129 | |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 130 | # Read the product specs so we can get TARGET_DEVICE and other |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 131 | # variables that we need in order to locate the output files. |
| 132 | include $(BUILD_SYSTEM)/product_config.mk |
Jesse Wilson | ce7d502 | 2010-09-22 10:59:10 -0700 | [diff] [blame] | 133 | |
Ying Wang | d0244b3 | 2011-11-17 14:51:12 -0800 | [diff] [blame] | 134 | build_variant := $(filter-out eng user userdebug,$(TARGET_BUILD_VARIANT)) |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 135 | ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1) |
| 136 | $(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT)) |
Ying Wang | d0244b3 | 2011-11-17 14:51:12 -0800 | [diff] [blame] | 137 | $(error must be empty or one of: eng user userdebug) |
Ryo Fujii | cbb3266 | 2011-06-16 16:58:11 -0700 | [diff] [blame] | 138 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 139 | |
Ying Wang | 7ba7d7f | 2014-09-02 15:11:20 -0700 | [diff] [blame] | 140 | SDK_HOST_ARCH := x86 |
| 141 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 142 | # Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE) |
| 143 | # or under vendor/*/$(TARGET_DEVICE). Search in both places, but |
| 144 | # make sure only one exists. |
| 145 | # Real boards should always be associated with an OEM vendor. |
| 146 | board_config_mk := \ |
Dan Willemsen | 7c3e3f8 | 2015-09-29 16:30:21 -0700 | [diff] [blame] | 147 | $(strip $(sort $(wildcard \ |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 148 | $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \ |
Will Drewry | c13f9c9 | 2015-10-06 19:40:11 -0700 | [diff] [blame] | 149 | $(shell test -d device && find -L device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ |
| 150 | $(shell test -d vendor && find -L vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ |
Dan Willemsen | 7c3e3f8 | 2015-09-29 16:30:21 -0700 | [diff] [blame] | 151 | ))) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 152 | ifeq ($(board_config_mk),) |
| 153 | $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE)) |
| 154 | endif |
| 155 | ifneq ($(words $(board_config_mk)),1) |
| 156 | $(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk)) |
| 157 | endif |
| 158 | include $(board_config_mk) |
| 159 | ifeq ($(TARGET_ARCH),) |
| 160 | $(error TARGET_ARCH not defined by board config: $(board_config_mk)) |
| 161 | endif |
Josh Gao | f3e7204 | 2016-01-22 11:24:59 -0800 | [diff] [blame] | 162 | ifneq ($(MALLOC_IMPL),) |
| 163 | $(warning *** Unsupported option MALLOC_IMPL defined by board config: $(board_config_mk).) |
| 164 | $(error Use `MALLOC_SVELTE := true` to configure jemalloc for low-memory) |
| 165 | endif |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 166 | TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk))) |
| 167 | board_config_mk := |
| 168 | |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 169 | ########################################### |
| 170 | # Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR |
| 171 | ifeq ($(TARGET_COPY_OUT_VENDOR),$(_vendor_path_placeholder)) |
| 172 | TARGET_COPY_OUT_VENDOR := system/vendor |
| 173 | else ifeq ($(filter vendor system/vendor,$(TARGET_COPY_OUT_VENDOR)),) |
| 174 | $(error TARGET_COPY_OUT_VENDOR must be either 'vendor' or 'system/vendor', seeing '$(TARGET_COPY_OUT_VENDOR)'.) |
| 175 | endif |
| 176 | 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] | 177 | |
| 178 | BOARD_USES_VENDORIMAGE := |
| 179 | ifdef BOARD_PREBUILT_VENDORIMAGE |
| 180 | BOARD_USES_VENDORIMAGE := true |
| 181 | endif |
| 182 | ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE |
| 183 | BOARD_USES_VENDORIMAGE := true |
| 184 | endif |
| 185 | ifeq ($(TARGET_COPY_OUT_VENDOR),vendor) |
| 186 | BOARD_USES_VENDORIMAGE := true |
| 187 | else ifdef BOARD_USES_VENDORIMAGE |
| 188 | $(error TARGET_COPY_OUT_VENDOR must be set to 'vendor' to use a vendor image) |
| 189 | endif |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 190 | ########################################### |
Dan Willemsen | 00cf767 | 2017-01-04 17:16:09 -0800 | [diff] [blame] | 191 | # Ensure that only TARGET_RECOVERY_UPDATER_LIBS *or* AB_OTA_UPDATER is set. |
| 192 | TARGET_RECOVERY_UPDATER_LIBS ?= |
| 193 | AB_OTA_UPDATER ?= |
| 194 | .KATI_READONLY := TARGET_RECOVERY_UPDATER_LIBS AB_OTA_UPDATER |
| 195 | ifeq ($(AB_OTA_UPDATER),true) |
| 196 | ifneq ($(strip $(TARGET_RECOVERY_UPDATER_LIBS)),) |
| 197 | $(error Do not use TARGET_RECOVERY_UPDATER_LIBS when using AB_OTA_UPDATER) |
| 198 | endif |
| 199 | endif |
Ying Wang | 6aef047 | 2014-07-23 20:20:49 -0700 | [diff] [blame] | 200 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 201 | # --------------------------------------------------------------- |
| 202 | # Set up configuration for target machine. |
| 203 | # The following must be set: |
| 204 | # TARGET_OS = { linux } |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 205 | # TARGET_ARCH = { arm | x86 | mips } |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 206 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 207 | TARGET_OS := linux |
Raghu Gandham | 8da4310 | 2012-07-25 19:57:22 -0700 | [diff] [blame] | 208 | # 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] | 209 | ifneq ($(filter %64,$(TARGET_ARCH)),) |
| 210 | TARGET_IS_64_BIT := true |
| 211 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 212 | |
| 213 | # the target build type defaults to release |
| 214 | ifneq ($(TARGET_BUILD_TYPE),debug) |
| 215 | TARGET_BUILD_TYPE := release |
| 216 | endif |
| 217 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 218 | # --------------------------------------------------------------- |
| 219 | # figure out the output directories |
| 220 | |
| 221 | ifeq (,$(strip $(OUT_DIR))) |
Jean-Baptiste Queru | ffe03c9 | 2011-12-06 10:29:46 -0800 | [diff] [blame] | 222 | ifeq (,$(strip $(OUT_DIR_COMMON_BASE))) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 223 | OUT_DIR := $(TOPDIR)out |
Jean-Baptiste Queru | ffe03c9 | 2011-12-06 10:29:46 -0800 | [diff] [blame] | 224 | else |
| 225 | OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD)) |
| 226 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 227 | endif |
| 228 | |
Dan Willemsen | 60d9c67 | 2016-05-27 15:15:47 -0700 | [diff] [blame] | 229 | SOONG_OUT_DIR := $(OUT_DIR)/soong |
| 230 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 231 | DEBUG_OUT_DIR := $(OUT_DIR)/debug |
| 232 | |
| 233 | # Move the host or target under the debug/ directory |
| 234 | # if necessary. |
| 235 | TARGET_OUT_ROOT_release := $(OUT_DIR)/target |
| 236 | TARGET_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/target |
| 237 | TARGET_OUT_ROOT := $(TARGET_OUT_ROOT_$(TARGET_BUILD_TYPE)) |
| 238 | |
| 239 | HOST_OUT_ROOT_release := $(OUT_DIR)/host |
| 240 | HOST_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/host |
| 241 | HOST_OUT_ROOT := $(HOST_OUT_ROOT_$(HOST_BUILD_TYPE)) |
| 242 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 243 | # We want to avoid two host bin directories in multilib build. |
| 244 | HOST_OUT_release := $(HOST_OUT_ROOT_release)/$(HOST_OS)-$(HOST_PREBUILT_ARCH) |
| 245 | HOST_OUT_debug := $(HOST_OUT_ROOT_debug)/$(HOST_OS)-$(HOST_PREBUILT_ARCH) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 246 | HOST_OUT := $(HOST_OUT_$(HOST_BUILD_TYPE)) |
Dan Willemsen | 60d9c67 | 2016-05-27 15:15:47 -0700 | [diff] [blame] | 247 | SOONG_HOST_OUT := $(SOONG_OUT_DIR)/host/$(HOST_OS)-$(HOST_PREBUILT_ARCH) |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 248 | # TODO: remove |
| 249 | BUILD_OUT := $(HOST_OUT) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 250 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 251 | HOST_CROSS_OUT_release := $(HOST_OUT_ROOT_release)/windows-$(HOST_PREBUILT_ARCH) |
| 252 | HOST_CROSS_OUT_debug := $(HOST_OUT_ROOT_debug)/windows-$(HOST_PREBUILT_ARCH) |
| 253 | HOST_CROSS_OUT := $(HOST_CROSS_OUT_$(HOST_BUILD_TYPE)) |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 254 | |
Jeff Brown | e33ba4c | 2011-07-11 22:11:46 -0700 | [diff] [blame] | 255 | TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 256 | |
| 257 | TARGET_COMMON_OUT_ROOT := $(TARGET_OUT_ROOT)/common |
| 258 | HOST_COMMON_OUT_ROOT := $(HOST_OUT_ROOT)/common |
| 259 | |
| 260 | PRODUCT_OUT := $(TARGET_PRODUCT_OUT_ROOT)/$(TARGET_DEVICE) |
| 261 | |
| 262 | OUT_DOCS := $(TARGET_COMMON_OUT_ROOT)/docs |
| 263 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 264 | BUILD_OUT_EXECUTABLES := $(BUILD_OUT)/bin |
Dan Willemsen | 60d9c67 | 2016-05-27 15:15:47 -0700 | [diff] [blame] | 265 | SOONG_HOST_OUT_EXECUTABLES := $(SOONG_HOST_OUT)/bin |
Raphael | 9ca1628 | 2010-04-16 17:50:09 -0700 | [diff] [blame] | 266 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 267 | HOST_OUT_EXECUTABLES := $(HOST_OUT)/bin |
Ying Wang | 36ef50f | 2014-06-30 17:06:21 -0700 | [diff] [blame] | 268 | HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib64 |
Dan Willemsen | c6e194f | 2016-02-13 00:19:40 -0800 | [diff] [blame] | 269 | HOST_OUT_RENDERSCRIPT_BITCODE := $(HOST_OUT_SHARED_LIBRARIES) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 270 | HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT)/framework |
Joe Onorato | 64d85d0 | 2009-04-09 19:31:12 -0700 | [diff] [blame] | 271 | HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 272 | HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest64 |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame] | 273 | HOST_OUT_COVERAGE := $(HOST_OUT)/coverage |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 274 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 275 | HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT)/bin |
| 276 | HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 277 | HOST_CROSS_OUT_NATIVE_TESTS := $(HOST_CROSS_OUT)/nativetest |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame] | 278 | HOST_CROSS_OUT_COVERAGE := $(HOST_CROSS_OUT)/coverage |
Simran Basi | 7166d1f | 2017-01-25 15:11:55 -0800 | [diff] [blame] | 279 | HOST_OUT_TESTCASES := $(HOST_OUT)/testcases |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 280 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 281 | HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 282 | HOST_OUT_INTERMEDIATE_LIBRARIES := $(HOST_OUT_INTERMEDIATES)/lib |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 283 | HOST_OUT_NOTICE_FILES := $(HOST_OUT_INTERMEDIATES)/NOTICE_FILES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 284 | HOST_OUT_COMMON_INTERMEDIATES := $(HOST_COMMON_OUT_ROOT)/obj |
Ying Wang | ec900ac | 2013-11-13 15:56:18 -0800 | [diff] [blame] | 285 | HOST_OUT_FAKE := $(HOST_OUT)/fake_packages |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 286 | |
Alexey Polyudov | ccdc311 | 2016-08-01 17:41:49 -0700 | [diff] [blame] | 287 | # Nano environment config |
| 288 | include $(BUILD_SYSTEM)/aux_config.mk |
| 289 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 290 | HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 291 | HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES := $(HOST_CROSS_OUT_INTERMEDIATES)/lib |
| 292 | HOST_CROSS_OUT_NOTICE_FILES := $(HOST_CROSS_OUT_INTERMEDIATES)/NOTICE_FILES |
| 293 | |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 294 | HOST_OUT_GEN := $(HOST_OUT)/gen |
| 295 | HOST_OUT_COMMON_GEN := $(HOST_COMMON_OUT_ROOT)/gen |
| 296 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 297 | HOST_CROSS_OUT_GEN := $(HOST_CROSS_OUT)/gen |
| 298 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 299 | # Out for HOST_2ND_ARCH |
| 300 | HOST_2ND_ARCH_VAR_PREFIX := 2ND_ |
| 301 | HOST_2ND_ARCH_MODULE_SUFFIX := _32 |
| 302 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj32 |
| 303 | $(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] | 304 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 305 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES := $(HOST_OUT_EXECUTABLES) |
Dan Albert | dc94137 | 2015-05-04 18:17:52 -0700 | [diff] [blame] | 306 | $(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] | 307 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest |
Simran Basi | 7166d1f | 2017-01-25 15:11:55 -0800 | [diff] [blame] | 308 | $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_TESTCASES := $(HOST_OUT_TESTCASES) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 309 | |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame] | 310 | # The default host library path. |
| 311 | # 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] | 312 | HOST_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES) |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 313 | |
Dan Willemsen | 9ecbf83 | 2016-02-05 16:20:19 -0800 | [diff] [blame] | 314 | # Out for HOST_CROSS_2ND_ARCH |
| 315 | HOST_CROSS_2ND_ARCH_VAR_PREFIX := 2ND_ |
| 316 | HOST_CROSS_2ND_ARCH_MODULE_SUFFIX := _64 |
| 317 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj64 |
| 318 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES := $($(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES)/lib |
| 319 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib64 |
| 320 | $(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] | 321 | $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_NATIVE_TESTS := $(HOST_CROSS_OUT)/nativetest64 |
Dan Willemsen | 9ecbf83 | 2016-02-05 16:20:19 -0800 | [diff] [blame] | 322 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 323 | TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 324 | TARGET_OUT_HEADERS := $(TARGET_OUT_INTERMEDIATES)/include |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 325 | TARGET_OUT_INTERMEDIATE_LIBRARIES := $(TARGET_OUT_INTERMEDIATES)/lib |
| 326 | TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj |
| 327 | |
Colin Cross | d826264 | 2014-01-24 23:17:21 -0800 | [diff] [blame] | 328 | TARGET_OUT_GEN := $(PRODUCT_OUT)/gen |
| 329 | TARGET_OUT_COMMON_GEN := $(TARGET_COMMON_OUT_ROOT)/gen |
| 330 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 331 | TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM) |
Ivan Krasin | 74b32b8 | 2015-09-18 11:54:43 -0700 | [diff] [blame] | 332 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 333 | target_out_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA) |
| 334 | else |
| 335 | target_out_shared_libraries_base := $(TARGET_OUT) |
| 336 | endif |
| 337 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 338 | TARGET_OUT_EXECUTABLES := $(TARGET_OUT)/bin |
| 339 | TARGET_OUT_OPTIONAL_EXECUTABLES := $(TARGET_OUT)/xbin |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 340 | ifeq ($(TARGET_IS_64_BIT),true) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 341 | # /system/lib always contains 32-bit libraries, |
| 342 | # and /system/lib64 (if present) always contains 64-bit libraries. |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 343 | TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib64 |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 344 | else |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 345 | TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 346 | endif |
Dan Willemsen | c6e194f | 2016-02-13 00:19:40 -0800 | [diff] [blame] | 347 | TARGET_OUT_RENDERSCRIPT_BITCODE := $(TARGET_OUT_SHARED_LIBRARIES) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 348 | TARGET_OUT_JAVA_LIBRARIES := $(TARGET_OUT)/framework |
| 349 | TARGET_OUT_APPS := $(TARGET_OUT)/app |
Ying Wang | 5338fbf | 2013-05-08 15:49:08 -0700 | [diff] [blame] | 350 | TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT)/priv-app |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 351 | TARGET_OUT_KEYLAYOUT := $(TARGET_OUT)/usr/keylayout |
| 352 | TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars |
| 353 | TARGET_OUT_ETC := $(TARGET_OUT)/etc |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 354 | TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES |
Dima Zavin | 531f524 | 2010-09-27 17:37:17 -0700 | [diff] [blame] | 355 | TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages |
Simran Basi | 7166d1f | 2017-01-25 15:11:55 -0800 | [diff] [blame] | 356 | TARGET_OUT_TESTCASES := $(PRODUCT_OUT)/testcases |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 357 | |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 358 | TARGET_OUT_SYSTEM_OTHER := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_OTHER) |
| 359 | |
Ying Wang | e1d44c3 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 360 | # Out for TARGET_2ND_ARCH |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame] | 361 | TARGET_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 362 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 363 | # With this you can reference the arm binary translation library with libfoo_arm in PRODUCT_PACKAGES. |
| 364 | TARGET_2ND_ARCH_MODULE_SUFFIX := _$(TARGET_2ND_ARCH) |
| 365 | else |
Ying Wang | c459586 | 2014-06-10 12:04:56 -0700 | [diff] [blame] | 366 | TARGET_2ND_ARCH_MODULE_SUFFIX := $(HOST_2ND_ARCH_MODULE_SUFFIX) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 367 | endif |
Ying Wang | e1d44c3 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 368 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH) |
| 369 | $(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] | 370 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 371 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) |
| 372 | else |
Evgenii Stepanov | 4d3d414 | 2015-06-11 17:32:31 -0700 | [diff] [blame] | 373 | $(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] | 374 | endif |
Dan Willemsen | c6e194f | 2016-02-13 00:19:40 -0800 | [diff] [blame] | 375 | $(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] | 376 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) |
Colin Cross | d957446 | 2014-01-24 13:37:07 -0800 | [diff] [blame] | 377 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS) |
| 378 | $(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] | 379 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_TESTCASES := $(TARGET_OUT_TESTCASES) |
Ying Wang | e1d44c3 | 2013-12-27 11:09:36 -0800 | [diff] [blame] | 380 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 381 | TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA) |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 382 | TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) |
| 383 | TARGET_OUT_DATA_SHARED_LIBRARIES := $(TARGET_OUT_SHARED_LIBRARIES) |
| 384 | TARGET_OUT_DATA_JAVA_LIBRARIES := $(TARGET_OUT_DATA)/framework |
| 385 | TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA)/app |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 386 | TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT) |
| 387 | TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS) |
| 388 | TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC) |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 389 | ifeq ($(TARGET_IS_64_BIT),true) |
| 390 | TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64 |
Julien Desprez | 188a1dd | 2016-04-12 10:22:06 +0100 | [diff] [blame] | 391 | TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest64 |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 392 | else |
Ying Wang | 4c68174 | 2010-07-20 11:08:47 -0700 | [diff] [blame] | 393 | TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest |
Julien Desprez | 188a1dd | 2016-04-12 10:22:06 +0100 | [diff] [blame] | 394 | TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 395 | endif |
Tsu Chiang Chuang | 40da883 | 2012-07-13 13:47:09 -0700 | [diff] [blame] | 396 | TARGET_OUT_DATA_FAKE := $(TARGET_OUT_DATA)/fake_packages |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 397 | |
Ying Wang | e3d0679 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 398 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_DATA_EXECUTABLES) |
| 399 | $(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] | 400 | $(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] | 401 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 402 | $(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] | 403 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest/$(TARGET_2ND_ARCH) |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 404 | else |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 405 | $(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] | 406 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest |
Ying Wang | 87538e4 | 2016-03-16 19:53:19 -0700 | [diff] [blame] | 407 | endif |
Ying Wang | e3d0679 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 408 | |
Ying Wang | 9f8e8db | 2011-11-04 11:37:01 -0700 | [diff] [blame] | 409 | TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache |
| 410 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 411 | TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR) |
Ivan Krasin | 74b32b8 | 2015-09-18 11:54:43 -0700 | [diff] [blame] | 412 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 413 | target_out_vendor_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)/vendor |
| 414 | else |
| 415 | target_out_vendor_shared_libraries_base := $(TARGET_OUT_VENDOR) |
| 416 | endif |
| 417 | |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 418 | TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR)/bin |
| 419 | TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES := $(TARGET_OUT_VENDOR)/xbin |
Ying Wang | 4b1c95d | 2014-07-08 17:07:36 -0700 | [diff] [blame] | 420 | ifeq ($(TARGET_IS_64_BIT),true) |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 421 | TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib64 |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 422 | else |
Evgenii Stepanov | bf14097 | 2015-06-30 14:02:02 -0700 | [diff] [blame] | 423 | TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib |
Ying Wang | c634974 | 2014-01-13 16:14:20 -0800 | [diff] [blame] | 424 | endif |
| 425 | TARGET_OUT_VENDOR_JAVA_LIBRARIES := $(TARGET_OUT_VENDOR)/framework |
| 426 | TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR)/app |
Benjamin Pujol | e68a277 | 2015-08-17 07:31:21 +0200 | [diff] [blame] | 427 | TARGET_OUT_VENDOR_APPS_PRIVILEGED := $(TARGET_OUT_VENDOR)/priv-app |
Ying Wang | 8f77936 | 2011-09-13 13:57:26 -0700 | [diff] [blame] | 428 | TARGET_OUT_VENDOR_ETC := $(TARGET_OUT_VENDOR)/etc |
| 429 | |
Ying Wang | e3d0679 | 2014-01-23 15:09:04 -0800 | [diff] [blame] | 430 | $(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] | 431 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
Andreas Gampe | cf6268f | 2016-06-30 20:20:38 -0700 | [diff] [blame] | 432 | $(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] | 433 | else |
Andreas Gampe | cf6268f | 2016-06-30 20:20:38 -0700 | [diff] [blame] | 434 | $(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] | 435 | endif |
Colin Cross | d957446 | 2014-01-24 13:37:07 -0800 | [diff] [blame] | 436 | $(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] | 437 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS_PRIVILEGED := $(TARGET_OUT_VENDOR_APPS_PRIVILEGED) |
Ying Wang | 61d499b | 2014-01-15 16:02:16 -0800 | [diff] [blame] | 438 | |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 439 | TARGET_OUT_OEM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_OEM) |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 440 | TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM)/bin |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 441 | ifeq ($(TARGET_IS_64_BIT),true) |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 442 | TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib64 |
| 443 | else |
| 444 | TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib |
| 445 | endif |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 446 | # We don't expect Java libraries in the oem.img. |
| 447 | # TARGET_OUT_OEM_JAVA_LIBRARIES:= $(TARGET_OUT_OEM)/framework |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 448 | TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM)/app |
Ying Wang | b888843 | 2014-03-11 17:13:27 -0700 | [diff] [blame] | 449 | TARGET_OUT_OEM_ETC := $(TARGET_OUT_OEM)/etc |
| 450 | |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 451 | $(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] | 452 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 453 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib/$(TARGET_2ND_ARCH) |
| 454 | else |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 455 | $(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] | 456 | endif |
Ying Wang | f15250e | 2014-06-26 14:12:35 -0700 | [diff] [blame] | 457 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM_APPS) |
| 458 | |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 459 | TARGET_OUT_ODM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ODM) |
| 460 | TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM)/bin |
| 461 | ifeq ($(TARGET_IS_64_BIT),true) |
| 462 | TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib64 |
| 463 | else |
| 464 | TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib |
| 465 | endif |
| 466 | TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM)/app |
| 467 | TARGET_OUT_ODM_ETC := $(TARGET_OUT_ODM)/etc |
| 468 | |
| 469 | $(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] | 470 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 471 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib/$(TARGET_2ND_ARCH) |
| 472 | else |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 473 | $(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] | 474 | endif |
Ying Wang | 4540a85 | 2015-03-12 18:30:39 -0700 | [diff] [blame] | 475 | $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM_APPS) |
| 476 | |
Steve Fung | dfbab49 | 2015-09-24 18:12:33 -0700 | [diff] [blame] | 477 | TARGET_OUT_BREAKPAD := $(PRODUCT_OUT)/breakpad |
| 478 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 479 | TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols |
| 480 | TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin |
| 481 | TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/lib |
Colin Cross | a58f8e0 | 2014-06-20 13:33:36 -0700 | [diff] [blame] | 482 | 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] | 483 | TARGET_ROOT_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED) |
| 484 | TARGET_ROOT_OUT_SBIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/sbin |
| 485 | TARGET_ROOT_OUT_BIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/bin |
Ryan Campbell | 737bc02 | 2016-09-15 17:32:13 -0700 | [diff] [blame] | 486 | TARGET_OUT_COVERAGE := $(PRODUCT_OUT)/coverage |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 487 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 488 | TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 489 | TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin |
| 490 | TARGET_ROOT_OUT_SBIN := $(TARGET_ROOT_OUT)/sbin |
| 491 | TARGET_ROOT_OUT_ETC := $(TARGET_ROOT_OUT)/etc |
| 492 | TARGET_ROOT_OUT_USR := $(TARGET_ROOT_OUT)/usr |
| 493 | |
Ying Wang | 2b6aaa3 | 2011-10-27 15:18:39 -0700 | [diff] [blame] | 494 | TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RECOVERY) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 495 | TARGET_RECOVERY_ROOT_OUT := $(TARGET_RECOVERY_OUT)/root |
| 496 | |
| 497 | TARGET_SYSLOADER_OUT := $(PRODUCT_OUT)/sysloader |
| 498 | TARGET_SYSLOADER_ROOT_OUT := $(TARGET_SYSLOADER_OUT)/root |
| 499 | TARGET_SYSLOADER_SYSTEM_OUT := $(TARGET_SYSLOADER_OUT)/root/system |
| 500 | |
| 501 | TARGET_INSTALLER_OUT := $(PRODUCT_OUT)/installer |
| 502 | TARGET_INSTALLER_DATA_OUT := $(TARGET_INSTALLER_OUT)/data |
| 503 | TARGET_INSTALLER_ROOT_OUT := $(TARGET_INSTALLER_OUT)/root |
| 504 | TARGET_INSTALLER_SYSTEM_OUT := $(TARGET_INSTALLER_OUT)/root/system |
| 505 | |
Ying Wang | a83940f | 2010-09-24 18:09:04 -0700 | [diff] [blame] | 506 | COMMON_MODULE_CLASSES := TARGET-NOTICE_FILES HOST-NOTICE_FILES HOST-JAVA_LIBRARIES |
Dan Willemsen | 8dae49c | 2017-02-15 15:48:11 -0800 | [diff] [blame^] | 507 | PER_ARCH_MODULE_CLASSES := SHARED_LIBRARIES STATIC_LIBRARIES EXECUTABLES GYP RENDERSCRIPT_BITCODE NATIVE_TESTS HEADER_LIBRARIES |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 508 | |
| 509 | ifeq (,$(strip $(DIST_DIR))) |
| 510 | DIST_DIR := $(OUT_DIR)/dist |
| 511 | endif |
| 512 | |
| 513 | ifeq ($(PRINT_BUILD_CONFIG),) |
| 514 | PRINT_BUILD_CONFIG := true |
| 515 | endif |
Chih-Hung Hsieh | 8dd69d9 | 2016-01-19 11:43:44 -0800 | [diff] [blame] | 516 | |
| 517 | ifeq ($(USE_CLANG_PLATFORM_BUILD),) |
| 518 | USE_CLANG_PLATFORM_BUILD := true |
| 519 | endif |
Colin Cross | b267cba | 2016-05-19 12:59:54 -0700 | [diff] [blame] | 520 | |
| 521 | ifneq ($(USE_CLANG_PLATFORM_BUILD),true) |
| 522 | ifneq ($(USE_CLANG_PLATFORM_BUILD),false) |
| 523 | $(error USE_CLANG_PLATFORM_BUILD must be true or false) |
| 524 | endif |
| 525 | endif |