blob: c32d380b0bf707747916a12fc73f525ec63caf05 [file] [log] [blame]
The Android Open Source Project88b60792009-03-03 19:28:42 -08001# Variables we check:
2# HOST_BUILD_TYPE = { release debug }
The Android Open Source Project88b60792009-03-03 19:28:42 -08003# 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 Youngcf469982015-06-09 12:35:45 -05008# 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 Project88b60792009-03-03 19:28:42 -080013
Colin Crossc9016592017-03-28 13:07:56 -070014# Returns all words in $1 up to and including $2
15define 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)))))
20endef
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
27define version-list
Ian Pedowitz0604ae42019-04-09 12:19:55 -070028$(1)P1A $(1)P1B $(1)P2A $(1)P2B $(1)D1A $(1)D1B $(1)D2A $(1)D2B $(1)Q1A $(1)Q1B $(1)Q2A $(1)Q2B $(1)Q3A $(1)Q3B
Colin Crossc9016592017-03-28 13:07:56 -070029endef
30
Ian Pedowitz0604ae42019-04-09 12:19:55 -070031PREV_VERSIONS := OPR1 OPD1 OPD2 OPM1 OPM2 PPR1 PPD1 PPD2 PPM1 PPM2 QPR1
32ALL_VERSIONS := Q R S T U V W X Y Z
33ALL_VERSIONS := $(PREV_VERSIONS) $(foreach v,$(ALL_VERSIONS),$(call version-list,$(v)))
34PREV_VERSIONS :=
Colin Crossc9016592017-03-28 13:07:56 -070035
36# Filters ALL_VERSIONS down to the range [$1, $2], and errors if $1 > $2 or $3 is
37# not in [$1, $2]
38# $(1): min platform version
39# $(2): max platform version
40# $(3): default platform version
41define allowed-platform-versions
42$(strip \
43 $(if $(filter $(ALL_VERSIONS),$(1)),,
44 $(error Invalid MIN_PLATFORM_VERSION '$(1)'))
45 $(if $(filter $(ALL_VERSIONS),$(2)),,
46 $(error Invalid MAX_PLATFORM_VERSION '$(2)'))
47 $(if $(filter $(ALL_VERSIONS),$(3)),,
48 $(error Invalid DEFAULT_PLATFORM_VERSION '$(3)'))
49
50 $(eval allowed_versions_ := $(call find_and_earlier,$(ALL_VERSIONS),$(2)))
51
52 $(if $(filter $(allowed_versions_),$(1)),,
53 $(error MIN_PLATFORM_VERSION '$(1)' must be before MAX_PLATFORM_VERSION '$(2)'))
54
55 $(eval allowed_versions_ := $(1) \
56 $(filter-out $(call find_and_earlier,$(allowed_versions_),$(1)),$(allowed_versions_)))
57
58 $(if $(filter $(allowed_versions_),$(3)),,
59 $(error DEFAULT_PLATFORM_VERSION '$(3)' must be between MIN_PLATFORM_VERSION '$(1)' and MAX_PLATFORM_VERSION '$(2)'))
60
61 $(allowed_versions_))
62endef
63
64#$(warning $(call allowed-platform-versions,OPR1,PPR1,OPR1))
65#$(warning $(call allowed-platform-versions,OPM1,PPR1,OPR1))
66
Joe Onoratoeefd0212009-05-13 00:45:23 -040067# Set up version information.
68include $(BUILD_SYSTEM)/version_defaults.mk
69
Colin Crossc9016592017-03-28 13:07:56 -070070ENABLED_VERSIONS := $(call find_and_earlier,$(ALL_VERSIONS),$(TARGET_PLATFORM_VERSION))
71
72$(foreach v,$(ENABLED_VERSIONS), \
73 $(eval IS_AT_LEAST_$(v) := true))
74
The Android Open Source Project88b60792009-03-03 19:28:42 -080075# ---------------------------------------------------------------
76# If you update the build system such that the environment setup
77# or buildspec.mk need to be updated, increment this number, and
78# people who haven't re-run those will have to do so before they
79# can build. Make sure to also update the corresponding value in
80# buildspec.mk.default and envsetup.sh.
Colin Cross88737132017-03-21 17:41:03 -070081CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 13
The Android Open Source Project88b60792009-03-03 19:28:42 -080082
83# ---------------------------------------------------------------
Jeff Browne33ba4c2011-07-11 22:11:46 -070084# The product defaults to generic on hardware
The Android Open Source Project88b60792009-03-03 19:28:42 -080085ifeq ($(TARGET_PRODUCT),)
Ying Wang0a76df52015-06-08 11:57:26 -070086TARGET_PRODUCT := aosp_arm
The Android Open Source Project88b60792009-03-03 19:28:42 -080087endif
The Android Open Source Project88b60792009-03-03 19:28:42 -080088
89
90# the variant -- the set of files that are included for a build
91ifeq ($(strip $(TARGET_BUILD_VARIANT)),)
92TARGET_BUILD_VARIANT := eng
93endif
94
Dan Willemsen8a5d5972019-07-29 14:22:05 -070095TARGET_BUILD_APPS ?=
Jeongik Chad05b57a2020-07-08 18:10:38 +090096TARGET_BUILD_UNBUNDLED_IMAGE ?=
Dan Willemsen8a5d5972019-07-29 14:22:05 -070097
Martin Stjernholm7a430fd2020-06-04 15:16:39 +010098# Set to true for an unbundled build, i.e. a build without
99# support for platform targets like the system image. This also
100# disables consistency checks that only apply to full platform
101# builds.
102TARGET_BUILD_UNBUNDLED ?=
103
104# TARGET_BUILD_APPS implies unbundled build, otherwise we default
105# to bundled (i.e. platform targets such as the system image are
106# included).
107ifneq ($(TARGET_BUILD_APPS),)
108 TARGET_BUILD_UNBUNDLED := true
109endif
110
Jeongik Chad05b57a2020-07-08 18:10:38 +0900111# TARGET_BUILD_UNBUNDLED_IMAGE also implies unbundled build.
112# (i.e. it targets to only unbundled image, such as the vendor image,
113# ,or the product image).
114ifneq ($(TARGET_BUILD_UNBUNDLED_IMAGE),)
115 TARGET_BUILD_UNBUNDLED := true
116endif
117
Dan Willemsen8a5d5972019-07-29 14:22:05 -0700118.KATI_READONLY := \
119 TARGET_PRODUCT \
120 TARGET_BUILD_VARIANT \
Martin Stjernholm7a430fd2020-06-04 15:16:39 +0100121 TARGET_BUILD_APPS \
122 TARGET_BUILD_UNBUNDLED \
Jeongik Chad05b57a2020-07-08 18:10:38 +0900123 TARGET_BUILD_UNBUNDLED_IMAGE \
Dan Willemsen8a5d5972019-07-29 14:22:05 -0700124
The Android Open Source Project88b60792009-03-03 19:28:42 -0800125# ---------------------------------------------------------------
126# Set up configuration for host machine. We don't do cross-
Elliott Hughesf71c05a2020-03-06 16:46:59 -0800127# compiles except for arm, so the HOST is whatever we are
The Android Open Source Project88b60792009-03-03 19:28:42 -0800128# running on
129
The Android Open Source Project88b60792009-03-03 19:28:42 -0800130# HOST_OS
131ifneq (,$(findstring Linux,$(UNAME)))
Ying Wang6feb6d52014-04-17 10:03:35 -0700132 HOST_OS := linux
The Android Open Source Project88b60792009-03-03 19:28:42 -0800133endif
134ifneq (,$(findstring Darwin,$(UNAME)))
Ying Wang6feb6d52014-04-17 10:03:35 -0700135 HOST_OS := darwin
The Android Open Source Project88b60792009-03-03 19:28:42 -0800136endif
Raphael9ca16282010-04-16 17:50:09 -0700137
Dan Willemsence7f8dd2017-07-25 00:57:38 -0700138HOST_OS_EXTRA := $(shell uname -rsm)
139ifeq ($(HOST_OS),linux)
140 ifneq ($(wildcard /etc/os-release),)
141 HOST_OS_EXTRA += $(shell source /etc/os-release; echo $$PRETTY_NAME)
142 endif
143else ifeq ($(HOST_OS),darwin)
144 HOST_OS_EXTRA += $(shell sw_vers -productVersion)
145endif
146HOST_OS_EXTRA := $(subst $(space),-,$(HOST_OS_EXTRA))
Ying Wang08800fd2016-03-03 20:57:21 -0800147
Raphael9ca16282010-04-16 17:50:09 -0700148# BUILD_OS is the real host doing the build.
149BUILD_OS := $(HOST_OS)
150
Jiyong Parke80c45f2020-07-13 13:53:52 +0900151# We can do the cross-build only on Linux
Raphael9ca16282010-04-16 17:50:09 -0700152ifeq ($(HOST_OS),linux)
Jiyong Parke80c45f2020-07-13 13:53:52 +0900153 # Windows has been the default host_cross OS
154 ifeq (,$(filter-out windows,$(HOST_CROSS_OS)))
155 # We can only create static host binaries for Linux, so if static host
156 # binaries are requested, turn off Windows cross-builds.
157 ifeq ($(BUILD_HOST_static),)
158 HOST_CROSS_OS := windows
159 HOST_CROSS_ARCH := x86
160 HOST_CROSS_2ND_ARCH := x86_64
161 2ND_HOST_CROSS_IS_64_BIT := true
162 endif
163 else ifeq ($(HOST_CROSS_OS),linux_bionic)
164 ifeq (,$(HOST_CROSS_ARCH))
165 $(error HOST_CROSS_ARCH missing.)
166 endif
167 else
168 $(error Unsupported HOST_CROSS_OS $(HOST_CROSS_OS))
169 endif
Dan Willemsen88208402021-10-19 00:30:37 -0700170else ifeq ($(HOST_OS),darwin)
171 HOST_CROSS_OS := darwin
172 HOST_CROSS_ARCH := arm64
173 HOST_CROSS_2ND_ARCH :=
Dan Willemsen2a6e3b02017-11-06 11:03:28 -0800174endif
The Android Open Source Project88b60792009-03-03 19:28:42 -0800175
176ifeq ($(HOST_OS),)
177$(error Unable to determine HOST_OS from uname -sm: $(UNAME)!)
178endif
179
The Android Open Source Project88b60792009-03-03 19:28:42 -0800180# HOST_ARCH
Ying Wang6feb6d52014-04-17 10:03:35 -0700181ifneq (,$(findstring x86_64,$(UNAME)))
Ying Wang2713fce2014-06-09 12:31:12 -0700182 HOST_ARCH := x86_64
183 HOST_2ND_ARCH := x86
Ying Wang4b1c95d2014-07-08 17:07:36 -0700184 HOST_IS_64_BIT := true
Brian Carlstrom2cd8a742015-03-20 11:39:00 -0700185else
Dan Willemsen88225fd2016-06-29 12:26:53 -0700186ifneq (,$(findstring i686,$(UNAME))$(findstring x86,$(UNAME)))
Brian Carlstrom2cd8a742015-03-20 11:39:00 -0700187$(error Building on a 32-bit x86 host is not supported: $(UNAME)!)
188endif
The Android Open Source Project88b60792009-03-03 19:28:42 -0800189endif
190
Dan Willemsen1d090fc2018-08-28 01:51:25 -0700191ifeq ($(HOST_OS),darwin)
192 # Mac no longer supports 32-bit executables
193 HOST_2ND_ARCH :=
194endif
195
Anton Hansson19279852019-02-28 17:15:57 +0000196HOST_2ND_ARCH_VAR_PREFIX := 2ND_
197HOST_2ND_ARCH_MODULE_SUFFIX := _32
198HOST_CROSS_2ND_ARCH_VAR_PREFIX := 2ND_
199HOST_CROSS_2ND_ARCH_MODULE_SUFFIX := _64
200TARGET_2ND_ARCH_VAR_PREFIX := 2ND_
201.KATI_READONLY := \
202 HOST_ARCH \
203 HOST_2ND_ARCH \
204 HOST_IS_64_BIT \
205 HOST_2ND_ARCH_VAR_PREFIX \
206 HOST_2ND_ARCH_MODULE_SUFFIX \
207 HOST_CROSS_2ND_ARCH_VAR_PREFIX \
208 HOST_CROSS_2ND_ARCH_MODULE_SUFFIX \
209 TARGET_2ND_ARCH_VAR_PREFIX \
210
211combo_target := HOST_
212combo_2nd_arch_prefix :=
213include $(BUILD_COMBOS)/select.mk
214
215ifdef HOST_2ND_ARCH
216 combo_2nd_arch_prefix := $(HOST_2ND_ARCH_VAR_PREFIX)
217 include $(BUILD_SYSTEM)/combo/select.mk
218endif
219
220# Load the windows cross compiler under Linux
221ifdef HOST_CROSS_OS
222 combo_target := HOST_CROSS_
223 combo_2nd_arch_prefix :=
224 include $(BUILD_SYSTEM)/combo/select.mk
225
226 ifdef HOST_CROSS_2ND_ARCH
227 combo_2nd_arch_prefix := $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)
228 include $(BUILD_SYSTEM)/combo/select.mk
229 endif
230endif
231
232# on windows, the tools have .exe at the end, and we depend on the
233# host config stuff being done first
234
Raphael9ca16282010-04-16 17:50:09 -0700235BUILD_ARCH := $(HOST_ARCH)
Ying Wang6feb6d52014-04-17 10:03:35 -0700236BUILD_2ND_ARCH := $(HOST_2ND_ARCH)
Raphael9ca16282010-04-16 17:50:09 -0700237
The Android Open Source Project88b60792009-03-03 19:28:42 -0800238ifeq ($(HOST_ARCH),)
239$(error Unable to determine HOST_ARCH from uname -sm: $(UNAME)!)
240endif
241
242# the host build defaults to release, and it must be release or debug
243ifeq ($(HOST_BUILD_TYPE),)
244HOST_BUILD_TYPE := release
245endif
246
247ifneq ($(HOST_BUILD_TYPE),release)
248ifneq ($(HOST_BUILD_TYPE),debug)
249$(error HOST_BUILD_TYPE must be either release or debug, not '$(HOST_BUILD_TYPE)')
250endif
251endif
252
Ying Wang6feb6d52014-04-17 10:03:35 -0700253# We don't want to move all the prebuilt host tools to a $(HOST_OS)-x86_64 dir.
254HOST_PREBUILT_ARCH := x86
The Android Open Source Project88b60792009-03-03 19:28:42 -0800255# This is the standard way to name a directory containing prebuilt host
256# objects. E.g., prebuilt/$(HOST_PREBUILT_TAG)/cc
Dan Albert216ecac2015-05-04 12:44:44 -0700257HOST_PREBUILT_TAG := $(BUILD_OS)-$(HOST_PREBUILT_ARCH)
The Android Open Source Project88b60792009-03-03 19:28:42 -0800258
Ying Wang2b6aaa32011-10-27 15:18:39 -0700259# TARGET_COPY_OUT_* are all relative to the staging directory, ie PRODUCT_OUT.
260# Define them here so they can be used in product config files.
261TARGET_COPY_OUT_SYSTEM := system
Ramji Jiyani10655232022-01-20 06:43:09 +0000262TARGET_COPY_OUT_SYSTEM_DLKM := system_dlkm
Alex Light4e358ab2016-06-16 14:47:10 -0700263TARGET_COPY_OUT_SYSTEM_OTHER := system_other
Ying Wang2b6aaa32011-10-27 15:18:39 -0700264TARGET_COPY_OUT_DATA := data
Vishwath Mohanb285c462017-03-29 15:32:04 -0700265TARGET_COPY_OUT_ASAN := $(TARGET_COPY_OUT_DATA)/asan
Ying Wangb8888432014-03-11 17:13:27 -0700266TARGET_COPY_OUT_OEM := oem
Tom Cherryd14b8952018-08-09 14:26:00 -0700267TARGET_COPY_OUT_RAMDISK := ramdisk
Bowgo Tsai0013f552019-03-20 17:59:52 +0800268TARGET_COPY_OUT_DEBUG_RAMDISK := debug_ramdisk
Bowgo Tsai6a683672020-02-14 19:00:15 +0800269TARGET_COPY_OUT_VENDOR_DEBUG_RAMDISK := vendor_debug_ramdisk
Bowgo Tsai5c40c712019-10-08 10:22:19 +0800270TARGET_COPY_OUT_TEST_HARNESS_RAMDISK := test_harness_ramdisk
Ying Wang2b6aaa32011-10-27 15:18:39 -0700271TARGET_COPY_OUT_ROOT := root
272TARGET_COPY_OUT_RECOVERY := recovery
Anton Hansson379b2ba2018-10-02 14:10:16 +0100273# The directory used for optional partitions depend on the BoardConfig, so
274# they're defined to placeholder values here and swapped after reading the
275# BoardConfig, to be either the partition dir, or a subdir within 'system'.
276_vendor_path_placeholder := ||VENDOR-PATH-PH||
277_product_path_placeholder := ||PRODUCT-PATH-PH||
Justin Yun6151e3f2019-06-25 15:58:13 +0900278_system_ext_path_placeholder := ||SYSTEM_EXT-PATH-PH||
Anton Hansson379b2ba2018-10-02 14:10:16 +0100279_odm_path_placeholder := ||ODM-PATH-PH||
Yifan Hongcfb917a2020-05-07 14:58:20 -0700280_vendor_dlkm_path_placeholder := ||VENDOR_DLKM-PATH-PH||
Yifan Hongf496f1b2020-07-15 16:52:59 -0700281_odm_dlkm_path_placeholder := ||ODM_DLKM-PATH-PH||
Ramji Jiyani13a41372022-01-27 07:05:08 +0000282_system_dlkm_path_placeholder := ||SYSTEM_DLKM-PATH-PH||
Anton Hansson379b2ba2018-10-02 14:10:16 +0100283TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder)
Petri Gyntherdc24d882021-03-02 23:54:08 -0800284TARGET_COPY_OUT_VENDOR_RAMDISK := vendor_ramdisk
Lucas Weif57333f2022-02-24 10:30:15 +0800285TARGET_COPY_OUT_VENDOR_KERNEL_RAMDISK := vendor_kernel_ramdisk
Anton Hansson379b2ba2018-10-02 14:10:16 +0100286TARGET_COPY_OUT_PRODUCT := $(_product_path_placeholder)
Justin Yun6151e3f2019-06-25 15:58:13 +0900287# TODO(b/135957588) TARGET_COPY_OUT_PRODUCT_SERVICES will copy the target to
288# product
289TARGET_COPY_OUT_PRODUCT_SERVICES := $(_product_path_placeholder)
290TARGET_COPY_OUT_SYSTEM_EXT := $(_system_ext_path_placeholder)
Anton Hansson379b2ba2018-10-02 14:10:16 +0100291TARGET_COPY_OUT_ODM := $(_odm_path_placeholder)
Yifan Hongcfb917a2020-05-07 14:58:20 -0700292TARGET_COPY_OUT_VENDOR_DLKM := $(_vendor_dlkm_path_placeholder)
Yifan Hongf496f1b2020-07-15 16:52:59 -0700293TARGET_COPY_OUT_ODM_DLKM := $(_odm_dlkm_path_placeholder)
Ramji Jiyani13a41372022-01-27 07:05:08 +0000294TARGET_COPY_OUT_SYSTEM_DLKM := $(_system_dlkm_path_placeholder)
Vishwath Mohand4dbf792017-05-16 14:27:34 -0700295
296# Returns the non-sanitized version of the path provided in $1.
297define get_non_asan_path
298$(patsubst $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/%,$(PRODUCT_OUT)/%,$1)
299endef
300
Igor Murashkin9d4639c2017-06-15 10:41:02 -0700301#################################################################
302# Set up minimal BOOTCLASSPATH list of jars to build/execute
303# java code with dalvikvm/art.
Martin Stjernholm743513c2021-07-05 20:53:57 +0100304# Jars present in the ART apex. These should match exactly the list of Java
305# libraries in art-bootclasspath-fragment. The APEX variant name
306# (com.android.art) is the same regardless which Soong module provides the ART
307# APEX. See the long comment in build/soong/java/dexprepopt_bootjars.go for
308# details.
Ulya Trafimovich4c69c2f2020-04-30 10:59:48 +0100309ART_APEX_JARS := \
310 com.android.art:core-oj \
311 com.android.art:core-libart \
Ulya Trafimovich4c69c2f2020-04-30 10:59:48 +0100312 com.android.art:okhttp \
313 com.android.art:bouncycastle \
314 com.android.art:apache-xml
Martin Stjernholmfa832282021-02-17 12:26:19 +0000315# With EMMA_INSTRUMENT_FRAMEWORK=true the Core libraries depend on jacoco.
316ifeq (true,$(EMMA_INSTRUMENT_FRAMEWORK))
317 ART_APEX_JARS += com.android.art:jacocoagent
318endif
Igor Murashkin9d4639c2017-06-15 10:41:02 -0700319#################################################################
320
Cole Faustf1f49bb2021-12-01 13:49:12 -0800321# Dumps all variables that match [A-Z][A-Z0-9_]* (with a few exceptions)
322# to the file at $(1). It is used to print only the variables that are
323# likely to be relevant to the product or board configuration.
Cole Faustc7226592022-01-12 21:20:07 -0800324# Soong config variables are dumped as $(call soong_config_set) calls
325# instead of the raw variable values, because mk2rbc can't read the
326# raw ones.
Cole Faustf1f49bb2021-12-01 13:49:12 -0800327define dump-variables-rbc
Cole Faust0a746002022-03-24 12:21:55 -0700328$(eval _dump_variables_rbc_excluded := \
Cole Faustec8316d2022-04-04 11:52:52 -0700329 BOARD_PLAT_PRIVATE_SEPOLICY_DIR \
330 BOARD_PLAT_PUBLIC_SEPOLICY_DIR \
331 BUILD_NUMBER \
332 DATE \
Cole Faust0a746002022-03-24 12:21:55 -0700333 LOCAL_PATH \
Cole Faustec8316d2022-04-04 11:52:52 -0700334 MAKEFILE_LIST \
335 PRODUCTS \
336 PRODUCT_COPY_OUT_% \
337 RBC_PRODUCT_CONFIG \
338 RBC_BOARD_CONFIG \
339 SOONG_% \
Cole Faust0a746002022-03-24 12:21:55 -0700340 TOPDIR \
341 TRACE_BEGIN_SOONG \
Cole Faustec8316d2022-04-04 11:52:52 -0700342 USER)
343$(file >$(OUT_DIR)/dump-variables-rbc-temp.txt,$(subst $(space),$(newline),$(sort $(filter-out $(_dump_variables_rbc_excluded),$(.VARIABLES)))))
Cole Faustf1f49bb2021-12-01 13:49:12 -0800344$(file >$(1),\
Cole Faust971ef8e2022-04-06 11:58:37 -0700345$(foreach v, $(shell grep -he "^[A-Z][A-Z0-9_]*$$" $(OUT_DIR)/dump-variables-rbc-temp.txt),\
Cole Faustc7226592022-01-12 21:20:07 -0800346$(v) := $(strip $($(v)))$(newline))\
Cole Faustec8316d2022-04-04 11:52:52 -0700347$(foreach ns,$(sort $(SOONG_CONFIG_NAMESPACES)),\
348$(foreach v,$(sort $(SOONG_CONFIG_$(ns))),\
Cole Faustc7226592022-01-12 21:20:07 -0800349$$(call soong_config_set,$(ns),$(v),$(SOONG_CONFIG_$(ns)_$(v)))$(newline))))
Cole Faustf1f49bb2021-12-01 13:49:12 -0800350endef
351
Ying Wang6aef0472014-07-23 20:20:49 -0700352# Read the product specs so we can get TARGET_DEVICE and other
Ryo Fujiicbb32662011-06-16 16:58:11 -0700353# variables that we need in order to locate the output files.
354include $(BUILD_SYSTEM)/product_config.mk
Jesse Wilsonce7d5022010-09-22 10:59:10 -0700355
Ying Wangd0244b32011-11-17 14:51:12 -0800356build_variant := $(filter-out eng user userdebug,$(TARGET_BUILD_VARIANT))
Ryo Fujiicbb32662011-06-16 16:58:11 -0700357ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1)
358$(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT))
Ying Wangd0244b32011-11-17 14:51:12 -0800359$(error must be empty or one of: eng user userdebug)
Ryo Fujiicbb32662011-06-16 16:58:11 -0700360endif
The Android Open Source Project88b60792009-03-03 19:28:42 -0800361
Ying Wang7ba7d7f2014-09-02 15:11:20 -0700362SDK_HOST_ARCH := x86
Anton Hansson19279852019-02-28 17:15:57 +0000363TARGET_OS := linux
Ying Wang7ba7d7f2014-09-02 15:11:20 -0700364
Cole Faust52e5d9c2021-11-30 11:24:33 -0800365# Some board configuration files use $(PRODUCT_OUT)
366TARGET_OUT_ROOT := $(OUT_DIR)/target
367TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product
368PRODUCT_OUT := $(TARGET_PRODUCT_OUT_ROOT)/$(TARGET_DEVICE)
369.KATI_READONLY := TARGET_OUT_ROOT TARGET_PRODUCT_OUT_ROOT PRODUCT_OUT
370
Anton Hanssonbb76ce82019-02-26 12:34:03 +0000371include $(BUILD_SYSTEM)/board_config.mk
Jiyong Park641b6cc2018-01-15 14:48:40 +0900372
The Android Open Source Project88b60792009-03-03 19:28:42 -0800373# the target build type defaults to release
374ifneq ($(TARGET_BUILD_TYPE),debug)
375TARGET_BUILD_TYPE := release
376endif
377
The Android Open Source Project88b60792009-03-03 19:28:42 -0800378# ---------------------------------------------------------------
379# figure out the output directories
380
Dan Willemsen60d9c672016-05-27 15:15:47 -0700381SOONG_OUT_DIR := $(OUT_DIR)/soong
382
Dan Willemsend6ed3682017-09-08 14:29:51 -0700383HOST_OUT_ROOT := $(OUT_DIR)/host
The Android Open Source Project88b60792009-03-03 19:28:42 -0800384
Cole Faust52e5d9c2021-11-30 11:24:33 -0800385.KATI_READONLY := SOONG_OUT_DIR HOST_OUT_ROOT
Dan Willemsen11677ed2018-03-28 14:33:10 -0700386
Ying Wang6feb6d52014-04-17 10:03:35 -0700387# We want to avoid two host bin directories in multilib build.
Dan Willemsend6ed3682017-09-08 14:29:51 -0700388HOST_OUT := $(HOST_OUT_ROOT)/$(HOST_OS)-$(HOST_PREBUILT_ARCH)
Colin Crossda166c52021-11-18 15:42:19 -0800389
390# Soong now installs to the same directory as Make.
391SOONG_HOST_OUT := $(HOST_OUT)
The Android Open Source Project88b60792009-03-03 19:28:42 -0800392
Jiyong Parkeccc4612020-07-13 19:19:27 +0900393HOST_CROSS_OUT := $(HOST_OUT_ROOT)/$(HOST_CROSS_OS)-$(HOST_CROSS_ARCH)
Raphael9ca16282010-04-16 17:50:09 -0700394
Dan Willemsen11677ed2018-03-28 14:33:10 -0700395.KATI_READONLY := HOST_OUT SOONG_HOST_OUT HOST_CROSS_OUT
396
The Android Open Source Project88b60792009-03-03 19:28:42 -0800397TARGET_COMMON_OUT_ROOT := $(TARGET_OUT_ROOT)/common
398HOST_COMMON_OUT_ROOT := $(HOST_OUT_ROOT)/common
399
Cole Faust52e5d9c2021-11-30 11:24:33 -0800400.KATI_READONLY := TARGET_COMMON_OUT_ROOT HOST_COMMON_OUT_ROOT
Dan Willemsen11677ed2018-03-28 14:33:10 -0700401
The Android Open Source Project88b60792009-03-03 19:28:42 -0800402OUT_DOCS := $(TARGET_COMMON_OUT_ROOT)/docs
Dan Albert303e6032017-10-04 10:20:20 -0700403OUT_NDK_DOCS := $(TARGET_COMMON_OUT_ROOT)/ndk-docs
Dan Willemsen11677ed2018-03-28 14:33:10 -0700404.KATI_READONLY := OUT_DOCS OUT_NDK_DOCS
The Android Open Source Project88b60792009-03-03 19:28:42 -0800405
Dan Willemsen11677ed2018-03-28 14:33:10 -0700406$(call KATI_obsolete,BUILD_OUT,Use HOST_OUT instead)
407
408BUILD_OUT_EXECUTABLES := $(HOST_OUT)/bin
Dan Willemsen60d9c672016-05-27 15:15:47 -0700409SOONG_HOST_OUT_EXECUTABLES := $(SOONG_HOST_OUT)/bin
Dan Willemsen11677ed2018-03-28 14:33:10 -0700410.KATI_READONLY := BUILD_OUT_EXECUTABLES SOONG_HOST_OUT_EXECUTABLES
Raphael9ca16282010-04-16 17:50:09 -0700411
Ying Wangc6349742014-01-13 16:14:20 -0800412HOST_OUT_EXECUTABLES := $(HOST_OUT)/bin
Ying Wang36ef50f2014-06-30 17:06:21 -0700413HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib64
Ivan Lozanod62e7122019-08-27 11:23:35 -0700414HOST_OUT_DYLIB_LIBRARIES := $(HOST_OUT)/lib64
Dan Willemsenc6e194f2016-02-13 00:19:40 -0800415HOST_OUT_RENDERSCRIPT_BITCODE := $(HOST_OUT_SHARED_LIBRARIES)
Ying Wangc6349742014-01-13 16:14:20 -0800416HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT)/framework
Joe Onorato64d85d02009-04-09 19:31:12 -0700417HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon
Dan Willemsen7fe992c2016-03-02 13:54:51 -0800418HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest64
Ryan Campbell81c9d292016-09-12 13:56:50 -0700419HOST_OUT_COVERAGE := $(HOST_OUT)/coverage
Colin Crosse887ccb2018-03-16 22:09:50 -0700420HOST_OUT_TESTCASES := $(HOST_OUT)/testcases
Dan Willemsen11677ed2018-03-28 14:33:10 -0700421.KATI_READONLY := \
422 HOST_OUT_EXECUTABLES \
423 HOST_OUT_SHARED_LIBRARIES \
424 HOST_OUT_RENDERSCRIPT_BITCODE \
425 HOST_OUT_JAVA_LIBRARIES \
426 HOST_OUT_SDK_ADDON \
427 HOST_OUT_NATIVE_TESTS \
428 HOST_OUT_COVERAGE \
429 HOST_OUT_TESTCASES
The Android Open Source Project88b60792009-03-03 19:28:42 -0800430
Dan Willemsen057aaea2015-08-14 12:59:50 -0700431HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT)/bin
432HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib
Dan Willemsen7fe992c2016-03-02 13:54:51 -0800433HOST_CROSS_OUT_NATIVE_TESTS := $(HOST_CROSS_OUT)/nativetest
Ryan Campbell81c9d292016-09-12 13:56:50 -0700434HOST_CROSS_OUT_COVERAGE := $(HOST_CROSS_OUT)/coverage
Colin Crosse887ccb2018-03-16 22:09:50 -0700435HOST_CROSS_OUT_TESTCASES := $(HOST_CROSS_OUT)/testcases
Dan Willemsen11677ed2018-03-28 14:33:10 -0700436.KATI_READONLY := \
437 HOST_CROSS_OUT_EXECUTABLES \
438 HOST_CROSS_OUT_SHARED_LIBRARIES \
439 HOST_CROSS_OUT_NATIVE_TESTS \
440 HOST_CROSS_OUT_COVERAGE \
441 HOST_CROSS_OUT_TESTCASES
Dan Willemsen057aaea2015-08-14 12:59:50 -0700442
The Android Open Source Project88b60792009-03-03 19:28:42 -0800443HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj
Ying Wangc6349742014-01-13 16:14:20 -0800444HOST_OUT_NOTICE_FILES := $(HOST_OUT_INTERMEDIATES)/NOTICE_FILES
The Android Open Source Project88b60792009-03-03 19:28:42 -0800445HOST_OUT_COMMON_INTERMEDIATES := $(HOST_COMMON_OUT_ROOT)/obj
Ying Wangec900ac2013-11-13 15:56:18 -0800446HOST_OUT_FAKE := $(HOST_OUT)/fake_packages
Dan Willemsen11677ed2018-03-28 14:33:10 -0700447.KATI_READONLY := \
448 HOST_OUT_INTERMEDIATES \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700449 HOST_OUT_NOTICE_FILES \
450 HOST_OUT_COMMON_INTERMEDIATES \
451 HOST_OUT_FAKE
The Android Open Source Project88b60792009-03-03 19:28:42 -0800452
Dan Willemsen057aaea2015-08-14 12:59:50 -0700453HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj
Dan Willemsen057aaea2015-08-14 12:59:50 -0700454HOST_CROSS_OUT_NOTICE_FILES := $(HOST_CROSS_OUT_INTERMEDIATES)/NOTICE_FILES
Dan Willemsen11677ed2018-03-28 14:33:10 -0700455.KATI_READONLY := \
456 HOST_CROSS_OUT_INTERMEDIATES \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700457 HOST_CROSS_OUT_NOTICE_FILES
Dan Willemsen057aaea2015-08-14 12:59:50 -0700458
Colin Crossd8262642014-01-24 23:17:21 -0800459HOST_OUT_GEN := $(HOST_OUT)/gen
460HOST_OUT_COMMON_GEN := $(HOST_COMMON_OUT_ROOT)/gen
Dan Willemsen11677ed2018-03-28 14:33:10 -0700461.KATI_READONLY := \
462 HOST_OUT_GEN \
463 HOST_OUT_COMMON_GEN
Colin Crossd8262642014-01-24 23:17:21 -0800464
Dan Willemsen057aaea2015-08-14 12:59:50 -0700465HOST_CROSS_OUT_GEN := $(HOST_CROSS_OUT)/gen
Dan Willemsen11677ed2018-03-28 14:33:10 -0700466.KATI_READONLY := HOST_CROSS_OUT_GEN
Dan Willemsen057aaea2015-08-14 12:59:50 -0700467
Ying Wang6feb6d52014-04-17 10:03:35 -0700468# Out for HOST_2ND_ARCH
Ying Wang6feb6d52014-04-17 10:03:35 -0700469$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj32
Ying Wang966c1e02014-05-20 14:43:51 -0700470$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib
Ying Wang6feb6d52014-04-17 10:03:35 -0700471$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES := $(HOST_OUT_EXECUTABLES)
Dan Albertdc941372015-05-04 18:17:52 -0700472$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT_JAVA_LIBRARIES)
Dan Willemsen7fe992c2016-03-02 13:54:51 -0800473$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest
Simran Basi7166d1f2017-01-25 15:11:55 -0800474$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_TESTCASES := $(HOST_OUT_TESTCASES)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700475.KATI_READONLY := \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700476 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700477 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES \
478 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES \
479 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_JAVA_LIBRARIES \
480 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_NATIVE_TESTS \
481 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_TESTCASES
Ying Wang6feb6d52014-04-17 10:03:35 -0700482
Ying Wangc4595862014-06-10 12:04:56 -0700483# The default host library path.
484# It always points to the path where we build libraries in the default bitness.
Ying Wang5bac9622014-08-14 11:03:56 -0700485HOST_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700486.KATI_READONLY := HOST_LIBRARY_PATH
Ying Wang6feb6d52014-04-17 10:03:35 -0700487
Dan Willemsen9ecbf832016-02-05 16:20:19 -0800488# Out for HOST_CROSS_2ND_ARCH
Dan Willemsen9ecbf832016-02-05 16:20:19 -0800489$(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj64
Dan Willemsen9ecbf832016-02-05 16:20:19 -0800490$(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib64
491$(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT_EXECUTABLES)
Dan Willemsen7fe992c2016-03-02 13:54:51 -0800492$(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_NATIVE_TESTS := $(HOST_CROSS_OUT)/nativetest64
Dan Willemsen11677ed2018-03-28 14:33:10 -0700493.KATI_READONLY := \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700494 $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700495 $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_SHARED_LIBRARIES \
496 $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_EXECUTABLES \
497 $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_NATIVE_TESTS
Dan Willemsen9ecbf832016-02-05 16:20:19 -0800498
Vishwath Mohand8eabaa2017-05-09 19:36:54 -0700499ifneq ($(filter address,$(SANITIZE_TARGET)),)
500 TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_asan
501else
502 TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj
503endif
Ying Wangc6349742014-01-13 16:14:20 -0800504TARGET_OUT_HEADERS := $(TARGET_OUT_INTERMEDIATES)/include
Dan Willemsen8cf6b652018-09-05 11:01:12 -0700505.KATI_READONLY := TARGET_OUT_INTERMEDIATES TARGET_OUT_HEADERS
Vishwath Mohand8eabaa2017-05-09 19:36:54 -0700506
507ifneq ($(filter address,$(SANITIZE_TARGET)),)
508 TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj_asan
509else
510 TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj
511endif
Dan Willemsen11677ed2018-03-28 14:33:10 -0700512.KATI_READONLY := TARGET_OUT_COMMON_INTERMEDIATES
The Android Open Source Project88b60792009-03-03 19:28:42 -0800513
Colin Crossd8262642014-01-24 23:17:21 -0800514TARGET_OUT_GEN := $(PRODUCT_OUT)/gen
515TARGET_OUT_COMMON_GEN := $(TARGET_COMMON_OUT_ROOT)/gen
Dan Willemsen11677ed2018-03-28 14:33:10 -0700516.KATI_READONLY := TARGET_OUT_GEN TARGET_OUT_COMMON_GEN
Colin Crossd8262642014-01-24 23:17:21 -0800517
Ying Wang2b6aaa32011-10-27 15:18:39 -0700518TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700519.KATI_READONLY := TARGET_OUT
Ivan Krasin74b32b82015-09-18 11:54:43 -0700520ifneq ($(filter address,$(SANITIZE_TARGET)),)
Vishwath Mohanb285c462017-03-29 15:32:04 -0700521target_out_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/system
Andreas Gampe4ed21d12017-06-16 10:24:54 -0700522ifeq ($(SANITIZE_LITE),true)
523# When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not
524# work with unsanitized app_process. For simplicity, generate APKs into /data/asan/.
525target_out_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/system
526else
527target_out_app_base := $(TARGET_OUT)
528endif
Evgenii Stepanov4d3d4142015-06-11 17:32:31 -0700529else
530target_out_shared_libraries_base := $(TARGET_OUT)
Andreas Gampe4ed21d12017-06-16 10:24:54 -0700531target_out_app_base := $(TARGET_OUT)
Evgenii Stepanov4d3d4142015-06-11 17:32:31 -0700532endif
533
Ying Wangc6349742014-01-13 16:14:20 -0800534TARGET_OUT_EXECUTABLES := $(TARGET_OUT)/bin
535TARGET_OUT_OPTIONAL_EXECUTABLES := $(TARGET_OUT)/xbin
Ying Wang4b1c95d2014-07-08 17:07:36 -0700536ifeq ($(TARGET_IS_64_BIT),true)
Ying Wangc6349742014-01-13 16:14:20 -0800537# /system/lib always contains 32-bit libraries,
538# and /system/lib64 (if present) always contains 64-bit libraries.
Evgenii Stepanov4d3d4142015-06-11 17:32:31 -0700539TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib64
Ying Wangc6349742014-01-13 16:14:20 -0800540else
Evgenii Stepanov4d3d4142015-06-11 17:32:31 -0700541TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib
Ying Wangc6349742014-01-13 16:14:20 -0800542endif
Dan Willemsenc6e194f2016-02-13 00:19:40 -0800543TARGET_OUT_RENDERSCRIPT_BITCODE := $(TARGET_OUT_SHARED_LIBRARIES)
Ying Wangc6349742014-01-13 16:14:20 -0800544TARGET_OUT_JAVA_LIBRARIES := $(TARGET_OUT)/framework
Andreas Gampe4ed21d12017-06-16 10:24:54 -0700545TARGET_OUT_APPS := $(target_out_app_base)/app
546TARGET_OUT_APPS_PRIVILEGED := $(target_out_app_base)/priv-app
The Android Open Source Project88b60792009-03-03 19:28:42 -0800547TARGET_OUT_KEYLAYOUT := $(TARGET_OUT)/usr/keylayout
548TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars
549TARGET_OUT_ETC := $(TARGET_OUT)/etc
Ying Wangc6349742014-01-13 16:14:20 -0800550TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES
Dima Zavin531f5242010-09-27 17:37:17 -0700551TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages
Simran Basi7166d1f2017-01-25 15:11:55 -0800552TARGET_OUT_TESTCASES := $(PRODUCT_OUT)/testcases
Dan Willemsen11677ed2018-03-28 14:33:10 -0700553.KATI_READONLY := \
554 TARGET_OUT_EXECUTABLES \
555 TARGET_OUT_OPTIONAL_EXECUTABLES \
556 TARGET_OUT_SHARED_LIBRARIES \
557 TARGET_OUT_RENDERSCRIPT_BITCODE \
558 TARGET_OUT_JAVA_LIBRARIES \
559 TARGET_OUT_APPS \
560 TARGET_OUT_APPS_PRIVILEGED \
561 TARGET_OUT_KEYLAYOUT \
562 TARGET_OUT_KEYCHARS \
563 TARGET_OUT_ETC \
564 TARGET_OUT_NOTICE_FILES \
565 TARGET_OUT_FAKE \
Dan Willemsenefee0692020-03-06 18:27:52 -0800566 TARGET_OUT_TESTCASES
The Android Open Source Project88b60792009-03-03 19:28:42 -0800567
Andreas Gampe4ed21d12017-06-16 10:24:54 -0700568ifeq ($(SANITIZE_LITE),true)
569# When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not
570# work with unsanitized app_process. For simplicity, generate APKs into /data/asan/.
571TARGET_OUT_SYSTEM_OTHER := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_SYSTEM_OTHER)
572else
Alex Light4e358ab2016-06-16 14:47:10 -0700573TARGET_OUT_SYSTEM_OTHER := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_OTHER)
Andreas Gampe4ed21d12017-06-16 10:24:54 -0700574endif
Dan Willemsen11677ed2018-03-28 14:33:10 -0700575.KATI_READONLY := TARGET_OUT_SYSTEM_OTHER
Alex Light4e358ab2016-06-16 14:47:10 -0700576
Ying Wange1d44c32013-12-27 11:09:36 -0800577# Out for TARGET_2ND_ARCH
Ying Wangc4595862014-06-10 12:04:56 -0700578TARGET_2ND_ARCH_MODULE_SUFFIX := $(HOST_2ND_ARCH_MODULE_SUFFIX)
Anton Hansson19279852019-02-28 17:15:57 +0000579.KATI_READONLY := TARGET_2ND_ARCH_MODULE_SUFFIX
Vishwath Mohand8eabaa2017-05-09 19:36:54 -0700580
581ifneq ($(filter address,$(SANITIZE_TARGET)),)
582 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)_asan
583else
584 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)
585endif
Evgenii Stepanov4d3d4142015-06-11 17:32:31 -0700586$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib
Dan Willemsenc6e194f2016-02-13 00:19:40 -0800587$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES)
Ying Wang72b01d62014-01-17 16:17:28 -0800588$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES)
Colin Crossd9574462014-01-24 13:37:07 -0800589$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS)
590$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT_APPS_PRIVILEGED)
Simran Basi7166d1f2017-01-25 15:11:55 -0800591$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_TESTCASES := $(TARGET_OUT_TESTCASES)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700592.KATI_READONLY := \
593 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700594 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES \
595 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_RENDERSCRIPT_BITCODE \
596 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES \
597 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS \
598 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED \
599 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_TESTCASES
Ying Wange1d44c32013-12-27 11:09:36 -0800600
Nelson Li1f8357f2019-03-14 01:04:05 +0000601MODULE_CLASS_APPS := app
602MODULE_CLASS_EXECUTABLES := bin
603MODULE_CLASS_JAVA_LIBRARIES := framework
604MODULE_CLASS_NATIVE_TESTS := nativetest
605MODULE_CLASS_METRIC_TESTS := benchmarktest
Ying Wang2b6aaa32011-10-27 15:18:39 -0700606TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)
Ying Wangc6349742014-01-13 16:14:20 -0800607TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_EXECUTABLES)
608TARGET_OUT_DATA_SHARED_LIBRARIES := $(TARGET_OUT_SHARED_LIBRARIES)
609TARGET_OUT_DATA_JAVA_LIBRARIES := $(TARGET_OUT_DATA)/framework
610TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA)/app
The Android Open Source Project88b60792009-03-03 19:28:42 -0800611TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT)
612TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS)
613TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC)
Ying Wang4b1c95d2014-07-08 17:07:36 -0700614ifeq ($(TARGET_IS_64_BIT),true)
615TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64
Julien Desprez188a1dd2016-04-12 10:22:06 +0100616TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest64
Steven Morelandcbfba702017-07-11 14:59:30 -0700617TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64$(TARGET_VENDOR_TEST_SUFFIX)
618TARGET_OUT_VENDOR_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest64$(TARGET_VENDOR_TEST_SUFFIX)
Ying Wang4b1c95d2014-07-08 17:07:36 -0700619else
Ying Wang4c681742010-07-20 11:08:47 -0700620TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
Julien Desprez188a1dd2016-04-12 10:22:06 +0100621TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest
Steven Morelandcbfba702017-07-11 14:59:30 -0700622TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest$(TARGET_VENDOR_TEST_SUFFIX)
623TARGET_OUT_VENDOR_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest$(TARGET_VENDOR_TEST_SUFFIX)
Ying Wang4b1c95d2014-07-08 17:07:36 -0700624endif
Nelson Li1f8357f2019-03-14 01:04:05 +0000625MODULE_CLASS_FAKE := fake_packages
Tsu Chiang Chuang40da8832012-07-13 13:47:09 -0700626TARGET_OUT_DATA_FAKE := $(TARGET_OUT_DATA)/fake_packages
Dan Willemsen11677ed2018-03-28 14:33:10 -0700627.KATI_READONLY := \
628 TARGET_OUT_DATA \
629 TARGET_OUT_DATA_EXECUTABLES \
630 TARGET_OUT_DATA_SHARED_LIBRARIES \
631 TARGET_OUT_DATA_JAVA_LIBRARIES \
632 TARGET_OUT_DATA_APPS \
633 TARGET_OUT_DATA_KEYLAYOUT \
634 TARGET_OUT_DATA_KEYCHARS \
635 TARGET_OUT_DATA_ETC \
636 TARGET_OUT_DATA_NATIVE_TESTS \
637 TARGET_OUT_DATA_METRIC_TESTS \
638 TARGET_OUT_VENDOR_NATIVE_TESTS \
639 TARGET_OUT_VENDOR_METRIC_TESTS \
Nelson Li1f8357f2019-03-14 01:04:05 +0000640 TARGET_OUT_DATA_FAKE \
641 MODULE_CLASS_APPS \
642 MODULE_CLASS_EXECUTABLES \
643 MODULE_CLASS_JAVA_LIBRARIES \
644 MODULE_CLASS_NATIVE_TESTS \
645 MODULE_CLASS_METRIC_TESTS \
646 MODULE_CLASS_FAKE
The Android Open Source Project88b60792009-03-03 19:28:42 -0800647
Ying Wange3d06792014-01-23 15:09:04 -0800648$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_DATA_EXECUTABLES)
649$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES)
Colin Crossd9574462014-01-24 13:37:07 -0800650$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA_APPS)
Ying Wang4b1c95d2014-07-08 17:07:36 -0700651$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
Julien Desprez188a1dd2016-04-12 10:22:06 +0100652$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest
Steven Morelandcbfba702017-07-11 14:59:30 -0700653$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest$(TARGET_VENDOR_TEST_SUFFIX)
654$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest$(TARGET_VENDOR_TEST_SUFFIX)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700655.KATI_READONLY := \
656 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES \
657 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES \
658 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS \
659 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS \
660 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS \
661 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS \
662 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_METRIC_TESTS \
Ying Wange3d06792014-01-23 15:09:04 -0800663
Ying Wang9f8e8db2011-11-04 11:37:01 -0700664TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache
Dan Willemsen11677ed2018-03-28 14:33:10 -0700665.KATI_READONLY := TARGET_OUT_CACHE
Ying Wang9f8e8db2011-11-04 11:37:01 -0700666
Ying Wang2b6aaa32011-10-27 15:18:39 -0700667TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700668.KATI_READONLY := TARGET_OUT_VENDOR
Ivan Krasin74b32b82015-09-18 11:54:43 -0700669ifneq ($(filter address,$(SANITIZE_TARGET)),)
Anton Hanssonae9f1052018-10-02 13:16:05 +0100670target_out_vendor_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_VENDOR)
Andreas Gampe4ed21d12017-06-16 10:24:54 -0700671ifeq ($(SANITIZE_LITE),true)
672# When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not
673# work with unsanitized app_process. For simplicity, generate APKs into /data/asan/.
Anton Hanssonae9f1052018-10-02 13:16:05 +0100674target_out_vendor_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_VENDOR)
Andreas Gampe4ed21d12017-06-16 10:24:54 -0700675else
676target_out_vendor_app_base := $(TARGET_OUT_VENDOR)
677endif
Evgenii Stepanovbf140972015-06-30 14:02:02 -0700678else
679target_out_vendor_shared_libraries_base := $(TARGET_OUT_VENDOR)
Andreas Gampe4ed21d12017-06-16 10:24:54 -0700680target_out_vendor_app_base := $(TARGET_OUT_VENDOR)
Evgenii Stepanovbf140972015-06-30 14:02:02 -0700681endif
682
Ying Wangc6349742014-01-13 16:14:20 -0800683TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR)/bin
684TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES := $(TARGET_OUT_VENDOR)/xbin
Ying Wang4b1c95d2014-07-08 17:07:36 -0700685ifeq ($(TARGET_IS_64_BIT),true)
Evgenii Stepanovbf140972015-06-30 14:02:02 -0700686TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib64
Ying Wangc6349742014-01-13 16:14:20 -0800687else
Evgenii Stepanovbf140972015-06-30 14:02:02 -0700688TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib
Ying Wangc6349742014-01-13 16:14:20 -0800689endif
Miao Wang57be5642017-03-01 19:39:19 -0800690TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE := $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)
Ying Wangc6349742014-01-13 16:14:20 -0800691TARGET_OUT_VENDOR_JAVA_LIBRARIES := $(TARGET_OUT_VENDOR)/framework
Andreas Gampe4ed21d12017-06-16 10:24:54 -0700692TARGET_OUT_VENDOR_APPS := $(target_out_vendor_app_base)/app
693TARGET_OUT_VENDOR_APPS_PRIVILEGED := $(target_out_vendor_app_base)/priv-app
Ying Wang8f779362011-09-13 13:57:26 -0700694TARGET_OUT_VENDOR_ETC := $(TARGET_OUT_VENDOR)/etc
Dan Willemsen11677ed2018-03-28 14:33:10 -0700695.KATI_READONLY := \
696 TARGET_OUT_VENDOR_EXECUTABLES \
697 TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES \
698 TARGET_OUT_VENDOR_SHARED_LIBRARIES \
699 TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE \
700 TARGET_OUT_VENDOR_JAVA_LIBRARIES \
701 TARGET_OUT_VENDOR_APPS \
702 TARGET_OUT_VENDOR_APPS_PRIVILEGED \
703 TARGET_OUT_VENDOR_ETC
Ying Wang8f779362011-09-13 13:57:26 -0700704
Ying Wange3d06792014-01-23 15:09:04 -0800705$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR_EXECUTABLES)
Andreas Gampecf6268f2016-06-30 20:20:38 -0700706$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib
Miao Wang57be5642017-03-01 19:39:19 -0800707$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)
Colin Crossd9574462014-01-24 13:37:07 -0800708$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR_APPS)
Hung-ying Tyan665e7402016-07-20 17:51:56 +0800709$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS_PRIVILEGED := $(TARGET_OUT_VENDOR_APPS_PRIVILEGED)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700710.KATI_READONLY := \
711 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES \
712 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES \
713 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE \
714 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS \
715 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS_PRIVILEGED
Ying Wang61d499b2014-01-15 16:02:16 -0800716
Ying Wangb8888432014-03-11 17:13:27 -0700717TARGET_OUT_OEM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_OEM)
Ying Wangf15250e2014-06-26 14:12:35 -0700718TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM)/bin
Ying Wang4540a852015-03-12 18:30:39 -0700719ifeq ($(TARGET_IS_64_BIT),true)
Ying Wangf15250e2014-06-26 14:12:35 -0700720TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib64
721else
722TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib
723endif
Ying Wangb8888432014-03-11 17:13:27 -0700724# We don't expect Java libraries in the oem.img.
725# TARGET_OUT_OEM_JAVA_LIBRARIES:= $(TARGET_OUT_OEM)/framework
Ying Wangf15250e2014-06-26 14:12:35 -0700726TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM)/app
Ying Wangb8888432014-03-11 17:13:27 -0700727TARGET_OUT_OEM_ETC := $(TARGET_OUT_OEM)/etc
Dan Willemsen11677ed2018-03-28 14:33:10 -0700728.KATI_READONLY := \
729 TARGET_OUT_OEM \
730 TARGET_OUT_OEM_EXECUTABLES \
731 TARGET_OUT_OEM_SHARED_LIBRARIES \
732 TARGET_OUT_OEM_APPS \
733 TARGET_OUT_OEM_ETC
Ying Wangb8888432014-03-11 17:13:27 -0700734
Ying Wangf15250e2014-06-26 14:12:35 -0700735$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM_EXECUTABLES)
736$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib
737$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM_APPS)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700738.KATI_READONLY := \
739 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES \
740 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES \
741 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS \
Ying Wangf15250e2014-06-26 14:12:35 -0700742
Ying Wang4540a852015-03-12 18:30:39 -0700743TARGET_OUT_ODM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ODM)
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800744ifneq ($(filter address,$(SANITIZE_TARGET)),)
Anton Hanssonae9f1052018-10-02 13:16:05 +0100745target_out_odm_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_OEM)
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800746ifeq ($(SANITIZE_LITE),true)
747# When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not
748# work with unsanitized app_process. For simplicity, generate APKs into /data/asan/.
Anton Hanssonae9f1052018-10-02 13:16:05 +0100749target_out_odm_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_OEM)
Ying Wang4540a852015-03-12 18:30:39 -0700750else
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800751target_out_odm_app_base := $(TARGET_OUT_ODM)
Ying Wang4540a852015-03-12 18:30:39 -0700752endif
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800753else
754target_out_odm_shared_libraries_base := $(TARGET_OUT_ODM)
755target_out_odm_app_base := $(TARGET_OUT_ODM)
756endif
757
758TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM)/bin
759TARGET_OUT_ODM_OPTIONAL_EXECUTABLES := $(TARGET_OUT_ODM)/xbin
760ifeq ($(TARGET_IS_64_BIT),true)
761TARGET_OUT_ODM_SHARED_LIBRARIES := $(target_out_odm_shared_libraries_base)/lib64
762else
763TARGET_OUT_ODM_SHARED_LIBRARIES := $(target_out_odm_shared_libraries_base)/lib
764endif
765TARGET_OUT_ODM_RENDERSCRIPT_BITCODE := $(TARGET_OUT_ODM_SHARED_LIBRARIES)
766TARGET_OUT_ODM_JAVA_LIBRARIES := $(TARGET_OUT_ODM)/framework
767TARGET_OUT_ODM_APPS := $(target_out_odm_app_base)/app
768TARGET_OUT_ODM_APPS_PRIVILEGED := $(target_out_odm_app_base)/priv-app
Ying Wang4540a852015-03-12 18:30:39 -0700769TARGET_OUT_ODM_ETC := $(TARGET_OUT_ODM)/etc
Dan Willemsen11677ed2018-03-28 14:33:10 -0700770.KATI_READONLY := \
771 TARGET_OUT_ODM \
772 TARGET_OUT_ODM_EXECUTABLES \
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800773 TARGET_OUT_ODM_OPTIONAL_EXECUTABLES \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700774 TARGET_OUT_ODM_SHARED_LIBRARIES \
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800775 TARGET_OUT_ODM_RENDERSCRIPT_BITCODE \
776 TARGET_OUT_ODM_JAVA_LIBRARIES \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700777 TARGET_OUT_ODM_APPS \
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800778 TARGET_OUT_ODM_APPS_PRIVILEGED \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700779 TARGET_OUT_ODM_ETC
Ying Wang4540a852015-03-12 18:30:39 -0700780
781$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM_EXECUTABLES)
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800782$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(target_out_odm_shared_libraries_base)/lib
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800783$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES)
Ying Wang4540a852015-03-12 18:30:39 -0700784$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM_APPS)
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800785$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS_PRIVILEGED := $(TARGET_OUT_ODM_APPS_PRIVILEGED)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700786.KATI_READONLY := \
787 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_EXECUTABLES \
788 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES \
Bowgo Tsaid624fa62017-11-14 23:42:30 +0800789 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_RENDERSCRIPT_BITCODE \
790 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS \
791 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS_PRIVILEGED
Ying Wang4540a852015-03-12 18:30:39 -0700792
Yifan Hongcfb917a2020-05-07 14:58:20 -0700793TARGET_OUT_VENDOR_DLKM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR_DLKM)
794
795TARGET_OUT_VENDOR_DLKM_ETC := $(TARGET_OUT_VENDOR_DLKM)/etc
796.KATI_READONLY := \
797 TARGET_OUT_VENDOR_DLKM_ETC
798
799# Unlike other partitions, vendor_dlkm should only contain kernel modules.
800TARGET_OUT_VENDOR_DLKM_EXECUTABLES :=
801TARGET_OUT_VENDOR_DLKM_OPTIONAL_EXECUTABLES :=
802TARGET_OUT_VENDOR_DLKM_SHARED_LIBRARIES :=
803TARGET_OUT_VENDOR_DLKM_RENDERSCRIPT_BITCODE :=
804TARGET_OUT_VENDOR_DLKM_JAVA_LIBRARIES :=
805TARGET_OUT_VENDOR_DLKM_APPS :=
806TARGET_OUT_VENDOR_DLKM_APPS_PRIVILEGED :=
807$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_EXECUTABLES :=
808$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_SHARED_LIBRARIES :=
809$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_RENDERSCRIPT_BITCODE :=
810$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_APPS :=
811$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_APPS_PRIVILEGED :=
812$(KATI_obsolete_var \
813 TARGET_OUT_VENDOR_DLKM_EXECUTABLES \
814 TARGET_OUT_VENDOR_DLKM_OPTIONAL_EXECUTABLES \
815 TARGET_OUT_VENDOR_DLKM_SHARED_LIBRARIES \
816 TARGET_OUT_VENDOR_DLKM_RENDERSCRIPT_BITCODE \
817 TARGET_OUT_VENDOR_DLKM_JAVA_LIBRARIES \
818 TARGET_OUT_VENDOR_DLKM_APPS \
819 TARGET_OUT_VENDOR_DLKM_APPS_PRIVILEGED \
820 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_EXECUTABLES \
821 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_SHARED_LIBRARIES \
822 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_RENDERSCRIPT_BITCODE \
823 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_APPS \
824 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_DLKM_APPS_PRIVILEGED \
825 , vendor_dlkm should not contain any executables, libraries, or apps)
826
Yifan Hongf496f1b2020-07-15 16:52:59 -0700827TARGET_OUT_ODM_DLKM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ODM_DLKM)
828
829TARGET_OUT_ODM_DLKM_ETC := $(TARGET_OUT_ODM_DLKM)/etc
830.KATI_READONLY := \
831 TARGET_OUT_ODM_DLKM_ETC
832
833# Unlike other partitions, odm_dlkm should only contain kernel modules.
834TARGET_OUT_ODM_DLKM_EXECUTABLES :=
835TARGET_OUT_ODM_DLKM_OPTIONAL_EXECUTABLES :=
836TARGET_OUT_ODM_DLKM_SHARED_LIBRARIES :=
837TARGET_OUT_ODM_DLKM_RENDERSCRIPT_BITCODE :=
838TARGET_OUT_ODM_DLKM_JAVA_LIBRARIES :=
839TARGET_OUT_ODM_DLKM_APPS :=
840TARGET_OUT_ODM_DLKM_APPS_PRIVILEGED :=
841$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_EXECUTABLES :=
842$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_SHARED_LIBRARIES :=
843$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_RENDERSCRIPT_BITCODE :=
844$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_APPS :=
845$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_APPS_PRIVILEGED :=
846$(KATI_obsolete_var \
847 TARGET_OUT_ODM_DLKM_EXECUTABLES \
848 TARGET_OUT_ODM_DLKM_OPTIONAL_EXECUTABLES \
849 TARGET_OUT_ODM_DLKM_SHARED_LIBRARIES \
850 TARGET_OUT_ODM_DLKM_RENDERSCRIPT_BITCODE \
851 TARGET_OUT_ODM_DLKM_JAVA_LIBRARIES \
852 TARGET_OUT_ODM_DLKM_APPS \
853 TARGET_OUT_ODM_DLKM_APPS_PRIVILEGED \
854 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_EXECUTABLES \
855 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_SHARED_LIBRARIES \
856 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_RENDERSCRIPT_BITCODE \
857 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_APPS \
858 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_DLKM_APPS_PRIVILEGED \
859 , odm_dlkm should not contain any executables, libraries, or apps)
860
Ramji Jiyani13a41372022-01-27 07:05:08 +0000861TARGET_OUT_SYSTEM_DLKM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_DLKM)
862
863# Unlike other partitions, system_dlkm should only contain kernel modules.
864TARGET_OUT_SYSTEM_DLKM_EXECUTABLES :=
865TARGET_OUT_SYSTEM_DLKM_OPTIONAL_EXECUTABLES :=
866TARGET_OUT_SYSTEM_DLKM_SHARED_LIBRARIES :=
867TARGET_OUT_SYSTEM_DLKM_RENDERSCRIPT_BITCODE :=
868TARGET_OUT_SYSTEM_DLKM_JAVA_LIBRARIES :=
869TARGET_OUT_SYSTEM_DLKM_APPS :=
870TARGET_OUT_SYSTEM_DLKM_APPS_PRIVILEGED :=
871$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_EXECUTABLES :=
872$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_SHARED_LIBRARIES :=
873$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_RENDERSCRIPT_BITCODE :=
874$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_APPS :=
875$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_APPS_PRIVILEGED :=
876$(KATI_obsolete_var \
877 TARGET_OUT_SYSTEM_DLKM_EXECUTABLES \
878 TARGET_OUT_SYSTEM_DLKM_OPTIONAL_EXECUTABLES \
879 TARGET_OUT_SYSTEM_DLKM_SHARED_LIBRARIES \
880 TARGET_OUT_SYSTEM_DLKM_RENDERSCRIPT_BITCODE \
881 TARGET_OUT_SYSTEM_DLKM_JAVA_LIBRARIES \
882 TARGET_OUT_SYSTEM_DLKM_APPS \
883 TARGET_OUT_SYSTEM_DLKM_APPS_PRIVILEGED \
884 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_EXECUTABLES \
885 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_SHARED_LIBRARIES \
886 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_RENDERSCRIPT_BITCODE \
887 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_APPS \
888 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_DLKM_APPS_PRIVILEGED \
889 , system_dlkm should not contain any executables, libraries, or apps)
890
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900891TARGET_OUT_PRODUCT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_PRODUCT)
Doheon Lee09d9b902018-06-25 10:56:01 +0900892TARGET_OUT_PRODUCT_EXECUTABLES := $(TARGET_OUT_PRODUCT)/bin
Dan Willemsen11677ed2018-03-28 14:33:10 -0700893.KATI_READONLY := TARGET_OUT_PRODUCT
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900894ifneq ($(filter address,$(SANITIZE_TARGET)),)
Anton Hanssonae9f1052018-10-02 13:16:05 +0100895target_out_product_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_PRODUCT)
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900896ifeq ($(SANITIZE_LITE),true)
897# When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not
898# work with unsanitized app_process. For simplicity, generate APKs into /data/asan/.
Anton Hanssonae9f1052018-10-02 13:16:05 +0100899target_out_product_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_PRODUCT)
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900900else
901target_out_product_app_base := $(TARGET_OUT_PRODUCT)
902endif
903else
Inseob Kim47c13522018-05-04 11:20:43 +0900904target_out_product_shared_libraries_base := $(TARGET_OUT_PRODUCT)
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900905target_out_product_app_base := $(TARGET_OUT_PRODUCT)
906endif
907
908ifeq ($(TARGET_IS_64_BIT),true)
909TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib64
910else
911TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib
912endif
Dan Willemsen11677ed2018-03-28 14:33:10 -0700913TARGET_OUT_PRODUCT_JAVA_LIBRARIES := $(TARGET_OUT_PRODUCT)/framework
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900914TARGET_OUT_PRODUCT_APPS := $(target_out_product_app_base)/app
915TARGET_OUT_PRODUCT_APPS_PRIVILEGED := $(target_out_product_app_base)/priv-app
916TARGET_OUT_PRODUCT_ETC := $(TARGET_OUT_PRODUCT)/etc
Dan Willemsen11677ed2018-03-28 14:33:10 -0700917.KATI_READONLY := \
Doheon Lee09d9b902018-06-25 10:56:01 +0900918 TARGET_OUT_PRODUCT_EXECUTABLES \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700919 TARGET_OUT_PRODUCT_SHARED_LIBRARIES \
920 TARGET_OUT_PRODUCT_JAVA_LIBRARIES \
921 TARGET_OUT_PRODUCT_APPS \
922 TARGET_OUT_PRODUCT_APPS_PRIVILEGED \
923 TARGET_OUT_PRODUCT_ETC
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900924
Doheon Lee09d9b902018-06-25 10:56:01 +0900925$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_EXECUTABLES := $(TARGET_OUT_PRODUCT_EXECUTABLES)
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900926$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900927$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS := $(TARGET_OUT_PRODUCT_APPS)
928$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS_PRIVILEGED := $(TARGET_OUT_PRODUCT_APPS_PRIVILEGED)
Dan Willemsen11677ed2018-03-28 14:33:10 -0700929.KATI_READONLY := \
Doheon Lee09d9b902018-06-25 10:56:01 +0900930 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_EXECUTABLES \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700931 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES \
932 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS \
933 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS_PRIVILEGED
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900934
Justin Yun6151e3f2019-06-25 15:58:13 +0900935TARGET_OUT_SYSTEM_EXT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_EXT)
Dario Freni5f681e12018-05-29 13:09:01 +0100936ifneq ($(filter address,$(SANITIZE_TARGET)),)
Justin Yun6151e3f2019-06-25 15:58:13 +0900937target_out_system_ext_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_SYSTEM_EXT)
Dario Freni5f681e12018-05-29 13:09:01 +0100938ifeq ($(SANITIZE_LITE),true)
939# When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not
940# work with unsanitized app_process. For simplicity, generate APKs into /data/asan/.
Justin Yun6151e3f2019-06-25 15:58:13 +0900941target_out_system_ext_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_SYSTEM_EXT)
Dario Freni5f681e12018-05-29 13:09:01 +0100942else
Justin Yun6151e3f2019-06-25 15:58:13 +0900943target_out_system_ext_app_base := $(TARGET_OUT_SYSTEM_EXT)
Dario Freni5f681e12018-05-29 13:09:01 +0100944endif
945else
Justin Yun6151e3f2019-06-25 15:58:13 +0900946target_out_system_ext_shared_libraries_base := $(TARGET_OUT_SYSTEM_EXT)
947target_out_system_ext_app_base := $(TARGET_OUT_SYSTEM_EXT)
Dario Freni5f681e12018-05-29 13:09:01 +0100948endif
949
950ifeq ($(TARGET_IS_64_BIT),true)
Justin Yun6151e3f2019-06-25 15:58:13 +0900951TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES := $(target_out_system_ext_shared_libraries_base)/lib64
Dario Freni5f681e12018-05-29 13:09:01 +0100952else
Justin Yun6151e3f2019-06-25 15:58:13 +0900953TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES := $(target_out_system_ext_shared_libraries_base)/lib
Dario Freni5f681e12018-05-29 13:09:01 +0100954endif
Justin Yun6151e3f2019-06-25 15:58:13 +0900955TARGET_OUT_SYSTEM_EXT_JAVA_LIBRARIES:= $(TARGET_OUT_SYSTEM_EXT)/framework
956TARGET_OUT_SYSTEM_EXT_APPS := $(target_out_system_ext_app_base)/app
957TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED := $(target_out_system_ext_app_base)/priv-app
958TARGET_OUT_SYSTEM_EXT_ETC := $(TARGET_OUT_SYSTEM_EXT)/etc
Jeongik Cha6a5e9a22019-08-20 19:24:43 +0900959TARGET_OUT_SYSTEM_EXT_EXECUTABLES := $(TARGET_OUT_SYSTEM_EXT)/bin
960.KATI_READONLY := \
961 TARGET_OUT_SYSTEM_EXT_EXECUTABLES \
962 TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES \
963 TARGET_OUT_SYSTEM_EXT_JAVA_LIBRARIES \
964 TARGET_OUT_SYSTEM_EXT_APPS \
965 TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED \
966 TARGET_OUT_SYSTEM_EXT_ETC
Dario Freni5f681e12018-05-29 13:09:01 +0100967
Jeongik Cha6a5e9a22019-08-20 19:24:43 +0900968$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_EXECUTABLES := $(TARGET_OUT_SYSTEM_EXT_EXECUTABLES)
Justin Yun6151e3f2019-06-25 15:58:13 +0900969$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES := $(target_out_system_ext_shared_libraries_base)/lib
Justin Yun6151e3f2019-06-25 15:58:13 +0900970$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_APPS := $(TARGET_OUT_SYSTEM_EXT_APPS)
971$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED := $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)
Jeongik Cha6a5e9a22019-08-20 19:24:43 +0900972.KATI_READONLY := \
973 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_EXECUTABLES \
974 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES \
975 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_APPS \
976 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED
Dario Freni5f681e12018-05-29 13:09:01 +0100977
Steve Fungdfbab492015-09-24 18:12:33 -0700978TARGET_OUT_BREAKPAD := $(PRODUCT_OUT)/breakpad
Dan Willemsen11677ed2018-03-28 14:33:10 -0700979.KATI_READONLY := TARGET_OUT_BREAKPAD
Steve Fungdfbab492015-09-24 18:12:33 -0700980
The Android Open Source Project88b60792009-03-03 19:28:42 -0800981TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols
982TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin
983TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/lib
Colin Crossa58f8e02014-06-20 13:33:36 -0700984TARGET_OUT_VENDOR_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/$(TARGET_COPY_OUT_VENDOR)/lib
The Android Open Source Project88b60792009-03-03 19:28:42 -0800985TARGET_ROOT_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)
The Android Open Source Project88b60792009-03-03 19:28:42 -0800986TARGET_ROOT_OUT_BIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/bin
Ryan Campbell737bc022016-09-15 17:32:13 -0700987TARGET_OUT_COVERAGE := $(PRODUCT_OUT)/coverage
Dan Willemsen11677ed2018-03-28 14:33:10 -0700988.KATI_READONLY := \
989 TARGET_OUT_UNSTRIPPED \
990 TARGET_OUT_EXECUTABLES_UNSTRIPPED \
991 TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED \
992 TARGET_OUT_VENDOR_SHARED_LIBRARIES_UNSTRIPPED \
993 TARGET_ROOT_OUT_UNSTRIPPED \
Dan Willemsen11677ed2018-03-28 14:33:10 -0700994 TARGET_ROOT_OUT_BIN_UNSTRIPPED \
995 TARGET_OUT_COVERAGE
The Android Open Source Project88b60792009-03-03 19:28:42 -0800996
Tom Cherryd14b8952018-08-09 14:26:00 -0700997TARGET_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RAMDISK)
998TARGET_RAMDISK_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)
Bowgo Tsai0013f552019-03-20 17:59:52 +0800999TARGET_DEBUG_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DEBUG_RAMDISK)
Bowgo Tsai6a683672020-02-14 19:00:15 +08001000TARGET_VENDOR_DEBUG_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR_DEBUG_RAMDISK)
Bowgo Tsai5c40c712019-10-08 10:22:19 +08001001TARGET_TEST_HARNESS_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_TEST_HARNESS_RAMDISK)
Tom Cherryd14b8952018-08-09 14:26:00 -07001002
Ramji Jiyani10655232022-01-20 06:43:09 +00001003TARGET_SYSTEM_DLKM_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_DLKM)
1004.KATI_READONLY := TARGET_SYSTEM_DLKM_OUT
1005
Steve Mucklee1b10862019-07-10 10:49:37 -07001006TARGET_VENDOR_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR_RAMDISK)
Lucas Weif57333f2022-02-24 10:30:15 +08001007TARGET_VENDOR_KERNEL_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR_KERNEL_RAMDISK)
Steve Mucklee1b10862019-07-10 10:49:37 -07001008
Ying Wang2b6aaa32011-10-27 15:18:39 -07001009TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT)
The Android Open Source Project88b60792009-03-03 19:28:42 -08001010TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin
The Android Open Source Project88b60792009-03-03 19:28:42 -08001011TARGET_ROOT_OUT_ETC := $(TARGET_ROOT_OUT)/etc
1012TARGET_ROOT_OUT_USR := $(TARGET_ROOT_OUT)/usr
Dan Willemsen11677ed2018-03-28 14:33:10 -07001013.KATI_READONLY := \
1014 TARGET_ROOT_OUT \
1015 TARGET_ROOT_OUT_BIN \
Dan Willemsen11677ed2018-03-28 14:33:10 -07001016 TARGET_ROOT_OUT_ETC \
1017 TARGET_ROOT_OUT_USR
The Android Open Source Project88b60792009-03-03 19:28:42 -08001018
Ying Wang2b6aaa32011-10-27 15:18:39 -07001019TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RECOVERY)
The Android Open Source Project88b60792009-03-03 19:28:42 -08001020TARGET_RECOVERY_ROOT_OUT := $(TARGET_RECOVERY_OUT)/root
Dan Willemsen11677ed2018-03-28 14:33:10 -07001021.KATI_READONLY := \
1022 TARGET_RECOVERY_OUT \
1023 TARGET_RECOVERY_ROOT_OUT
The Android Open Source Project88b60792009-03-03 19:28:42 -08001024
1025TARGET_SYSLOADER_OUT := $(PRODUCT_OUT)/sysloader
1026TARGET_SYSLOADER_ROOT_OUT := $(TARGET_SYSLOADER_OUT)/root
1027TARGET_SYSLOADER_SYSTEM_OUT := $(TARGET_SYSLOADER_OUT)/root/system
Dan Willemsen11677ed2018-03-28 14:33:10 -07001028.KATI_READONLY := \
1029 TARGET_SYSLOADER_OUT \
1030 TARGET_SYSLOADER_ROOT_OUT \
1031 TARGET_SYSLOADER_SYSTEM_OUT
The Android Open Source Project88b60792009-03-03 19:28:42 -08001032
1033TARGET_INSTALLER_OUT := $(PRODUCT_OUT)/installer
1034TARGET_INSTALLER_DATA_OUT := $(TARGET_INSTALLER_OUT)/data
1035TARGET_INSTALLER_ROOT_OUT := $(TARGET_INSTALLER_OUT)/root
1036TARGET_INSTALLER_SYSTEM_OUT := $(TARGET_INSTALLER_OUT)/root/system
Dan Willemsen11677ed2018-03-28 14:33:10 -07001037.KATI_READONLY := \
1038 TARGET_INSTALLER_OUT \
1039 TARGET_INSTALLER_DATA_OUT \
1040 TARGET_INSTALLER_ROOT_OUT \
1041 TARGET_INSTALLER_SYSTEM_OUT
The Android Open Source Project88b60792009-03-03 19:28:42 -08001042
Dan Willemsen8447b812020-06-08 21:00:18 -07001043COMMON_MODULE_CLASSES := TARGET_NOTICE_FILES HOST_NOTICE_FILES HOST_JAVA_LIBRARIES
Ivan Lozanod62e7122019-08-27 11:23:35 -07001044PER_ARCH_MODULE_CLASSES := SHARED_LIBRARIES STATIC_LIBRARIES EXECUTABLES GYP RENDERSCRIPT_BITCODE NATIVE_TESTS HEADER_LIBRARIES RLIB_LIBRARIES DYLIB_LIBRARIES
Dan Willemsen11677ed2018-03-28 14:33:10 -07001045.KATI_READONLY := COMMON_MODULE_CLASSES PER_ARCH_MODULE_CLASSES
The Android Open Source Project88b60792009-03-03 19:28:42 -08001046
Dan Willemsen20f99a62017-10-12 01:35:14 -07001047ifeq ($(CALLED_FROM_SETUP),true)
Dan Willemsen0d255292017-02-18 10:32:13 -08001048PRINT_BUILD_CONFIG ?= true
The Android Open Source Project88b60792009-03-03 19:28:42 -08001049endif