2 # HOST_BUILD_TYPE = { release debug }
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
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.
14 # Set up version information.
15 include $(BUILD_SYSTEM)/version_defaults.mk
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.
23 CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 10
25 # ---------------------------------------------------------------
26 # The product defaults to generic on hardware
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),)
30 TARGET_PRODUCT := aosp_arm
34 # the variant -- the set of files that are included for a build
35 ifeq ($(strip $(TARGET_BUILD_VARIANT)),)
36 TARGET_BUILD_VARIANT := eng
39 # ---------------------------------------------------------------
40 # Set up configuration for host machine. We don't do cross-
41 # compiles except for arm/mips, so the HOST is whatever we are
44 UNAME := $(shell uname -sm)
47 ifneq (,$(findstring Linux,$(UNAME)))
50 ifneq (,$(findstring Darwin,$(UNAME)))
53 ifneq (,$(findstring Macintosh,$(UNAME)))
57 HOST_OS_EXTRA:=$(shell python -c "import platform; print(platform.platform())")
59 # BUILD_OS is the real host doing the build.
60 BUILD_OS := $(HOST_OS)
63 # We can cross-build Windows binaries on Linux
64 ifeq ($(HOST_OS),linux)
65 HOST_CROSS_OS := windows
66 HOST_CROSS_ARCH := x86
67 HOST_CROSS_2ND_ARCH := x86_64
71 $(error Unable to determine HOST_OS from uname -sm: $(UNAME)!)
75 ifneq (,$(findstring x86_64,$(UNAME)))
78 HOST_IS_64_BIT := true
80 ifneq (,$(findstring x86,$(UNAME)))
81 $(error Building on a 32-bit x86 host is not supported: $(UNAME)!)
85 BUILD_ARCH := $(HOST_ARCH)
86 BUILD_2ND_ARCH := $(HOST_2ND_ARCH)
89 $(error Unable to determine HOST_ARCH from uname -sm: $(UNAME)!)
92 # the host build defaults to release, and it must be release or debug
93 ifeq ($(HOST_BUILD_TYPE),)
94 HOST_BUILD_TYPE := release
97 ifneq ($(HOST_BUILD_TYPE),release)
98 ifneq ($(HOST_BUILD_TYPE),debug)
99 $(error HOST_BUILD_TYPE must be either release or debug, not '$(HOST_BUILD_TYPE)')
103 # We don't want to move all the prebuilt host tools to a $(HOST_OS)-x86_64 dir.
104 HOST_PREBUILT_ARCH := x86
105 # This is the standard way to name a directory containing prebuilt host
106 # objects. E.g., prebuilt/$(HOST_PREBUILT_TAG)/cc
107 HOST_PREBUILT_TAG := $(BUILD_OS)-$(HOST_PREBUILT_ARCH)
109 # TARGET_COPY_OUT_* are all relative to the staging directory, ie PRODUCT_OUT.
110 # Define them here so they can be used in product config files.
111 TARGET_COPY_OUT_SYSTEM := system
112 TARGET_COPY_OUT_SYSTEM_OTHER := system_other
113 TARGET_COPY_OUT_DATA := data
114 TARGET_COPY_OUT_OEM := oem
115 TARGET_COPY_OUT_ODM := odm
116 TARGET_COPY_OUT_ROOT := root
117 TARGET_COPY_OUT_RECOVERY := recovery
118 ###########################################
119 # Define TARGET_COPY_OUT_VENDOR to a placeholder, for at this point
120 # we don't know if the device wants to build a separate vendor.img
121 # or just build vendor stuff into system.img.
122 # A device can set up TARGET_COPY_OUT_VENDOR to "vendor" in its
124 # We'll substitute with the real value after loading BoardConfig.mk.
125 _vendor_path_placeholder := ||VENDOR-PATH-PH||
126 TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder)
127 ###########################################
129 # Read the product specs so we can get TARGET_DEVICE and other
130 # variables that we need in order to locate the output files.
131 include $(BUILD_SYSTEM)/product_config.mk
133 build_variant := $(filter-out eng user userdebug,$(TARGET_BUILD_VARIANT))
134 ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1)
135 $(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT))
136 $(error must be empty or one of: eng user userdebug)
141 # Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)
142 # or under vendor/*/$(TARGET_DEVICE). Search in both places, but
143 # make sure only one exists.
144 # Real boards should always be associated with an OEM vendor.
146 $(strip $(sort $(wildcard \
147 $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \
148 $(shell test -d device && find -L device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
149 $(shell test -d vendor && find -L vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
151 ifeq ($(board_config_mk),)
152 $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE))
154 ifneq ($(words $(board_config_mk)),1)
155 $(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk))
157 include $(board_config_mk)
158 ifeq ($(TARGET_ARCH),)
159 $(error TARGET_ARCH not defined by board config: $(board_config_mk))
161 ifneq ($(MALLOC_IMPL),)
162 $(warning *** Unsupported option MALLOC_IMPL defined by board config: $(board_config_mk).)
163 $(error Use `MALLOC_SVELTE := true` to configure jemalloc for low-memory)
165 TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
168 ###########################################
169 # Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR
170 ifeq ($(TARGET_COPY_OUT_VENDOR),$(_vendor_path_placeholder))
171 TARGET_COPY_OUT_VENDOR := system/vendor
172 else ifeq ($(filter vendor system/vendor,$(TARGET_COPY_OUT_VENDOR)),)
173 $(error TARGET_COPY_OUT_VENDOR must be either 'vendor' or 'system/vendor', seeing '$(TARGET_COPY_OUT_VENDOR)'.)
175 PRODUCT_COPY_FILES := $(subst $(_vendor_path_placeholder),$(TARGET_COPY_OUT_VENDOR),$(PRODUCT_COPY_FILES))
177 BOARD_USES_VENDORIMAGE :=
178 ifdef BOARD_PREBUILT_VENDORIMAGE
179 BOARD_USES_VENDORIMAGE := true
181 ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
182 BOARD_USES_VENDORIMAGE := true
184 ifeq ($(TARGET_COPY_OUT_VENDOR),vendor)
185 BOARD_USES_VENDORIMAGE := true
186 else ifdef BOARD_USES_VENDORIMAGE
187 $(error TARGET_COPY_OUT_VENDOR must be set to 'vendor' to use a vendor image)
189 ###########################################
192 # ---------------------------------------------------------------
193 # Set up configuration for target machine.
194 # The following must be set:
195 # TARGET_OS = { linux }
196 # TARGET_ARCH = { arm | x86 | mips }
199 # TARGET_ARCH should be set by BoardConfig.mk and will be checked later
200 ifneq ($(filter %64,$(TARGET_ARCH)),)
201 TARGET_IS_64_BIT := true
204 # the target build type defaults to release
205 ifneq ($(TARGET_BUILD_TYPE),debug)
206 TARGET_BUILD_TYPE := release
209 # ---------------------------------------------------------------
210 # figure out the output directories
212 ifeq (,$(strip $(OUT_DIR)))
213 ifeq (,$(strip $(OUT_DIR_COMMON_BASE)))
214 OUT_DIR := $(TOPDIR)out
216 OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD))
220 DEBUG_OUT_DIR := $(OUT_DIR)/debug
222 # Move the host or target under the debug/ directory
224 TARGET_OUT_ROOT_release := $(OUT_DIR)/target
225 TARGET_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/target
226 TARGET_OUT_ROOT := $(TARGET_OUT_ROOT_$(TARGET_BUILD_TYPE))
228 HOST_OUT_ROOT_release := $(OUT_DIR)/host
229 HOST_OUT_ROOT_debug := $(DEBUG_OUT_DIR)/host
230 HOST_OUT_ROOT := $(HOST_OUT_ROOT_$(HOST_BUILD_TYPE))
232 # We want to avoid two host bin directories in multilib build.
233 HOST_OUT_release := $(HOST_OUT_ROOT_release)/$(HOST_OS)-$(HOST_PREBUILT_ARCH)
234 HOST_OUT_debug := $(HOST_OUT_ROOT_debug)/$(HOST_OS)-$(HOST_PREBUILT_ARCH)
235 HOST_OUT := $(HOST_OUT_$(HOST_BUILD_TYPE))
237 BUILD_OUT := $(HOST_OUT)
239 HOST_CROSS_OUT_release := $(HOST_OUT_ROOT_release)/windows-$(HOST_PREBUILT_ARCH)
240 HOST_CROSS_OUT_debug := $(HOST_OUT_ROOT_debug)/windows-$(HOST_PREBUILT_ARCH)
241 HOST_CROSS_OUT := $(HOST_CROSS_OUT_$(HOST_BUILD_TYPE))
243 TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product
245 TARGET_COMMON_OUT_ROOT := $(TARGET_OUT_ROOT)/common
246 HOST_COMMON_OUT_ROOT := $(HOST_OUT_ROOT)/common
248 PRODUCT_OUT := $(TARGET_PRODUCT_OUT_ROOT)/$(TARGET_DEVICE)
250 OUT_DOCS := $(TARGET_COMMON_OUT_ROOT)/docs
252 BUILD_OUT_EXECUTABLES := $(BUILD_OUT)/bin
254 HOST_OUT_EXECUTABLES := $(HOST_OUT)/bin
255 HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib64
256 HOST_OUT_RENDERSCRIPT_BITCODE := $(HOST_OUT_SHARED_LIBRARIES)
257 HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT)/framework
258 HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon
260 HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT)/bin
261 HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib
263 HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj
264 HOST_OUT_HEADERS := $(HOST_OUT_INTERMEDIATES)/include
265 HOST_OUT_INTERMEDIATE_LIBRARIES := $(HOST_OUT_INTERMEDIATES)/lib
266 HOST_OUT_NOTICE_FILES := $(HOST_OUT_INTERMEDIATES)/NOTICE_FILES
267 HOST_OUT_COMMON_INTERMEDIATES := $(HOST_COMMON_OUT_ROOT)/obj
268 HOST_OUT_FAKE := $(HOST_OUT)/fake_packages
270 HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj
271 HOST_CROSS_OUT_HEADERS := $(HOST_CROSS_OUT_INTERMEDIATES)/include
272 HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES := $(HOST_CROSS_OUT_INTERMEDIATES)/lib
273 HOST_CROSS_OUT_NOTICE_FILES := $(HOST_CROSS_OUT_INTERMEDIATES)/NOTICE_FILES
275 HOST_OUT_GEN := $(HOST_OUT)/gen
276 HOST_OUT_COMMON_GEN := $(HOST_COMMON_OUT_ROOT)/gen
278 HOST_CROSS_OUT_GEN := $(HOST_CROSS_OUT)/gen
280 # Out for HOST_2ND_ARCH
281 HOST_2ND_ARCH_VAR_PREFIX := 2ND_
282 HOST_2ND_ARCH_MODULE_SUFFIX := _32
283 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj32
284 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES := $($(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES)/lib
285 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib
286 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES := $(HOST_OUT_EXECUTABLES)
287 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT_JAVA_LIBRARIES)
289 # The default host library path.
290 # It always points to the path where we build libraries in the default bitness.
291 ifeq ($(HOST_PREFER_32_BIT),true)
292 HOST_LIBRARY_PATH := $($(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES)
294 HOST_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES)
297 # Out for HOST_CROSS_2ND_ARCH
298 HOST_CROSS_2ND_ARCH_VAR_PREFIX := 2ND_
299 HOST_CROSS_2ND_ARCH_MODULE_SUFFIX := _64
300 $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES := $(HOST_CROSS_OUT)/obj64
301 $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES := $($(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATES)/lib
302 $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib64
303 $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT_EXECUTABLES)
305 TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj
306 TARGET_OUT_HEADERS := $(TARGET_OUT_INTERMEDIATES)/include
307 TARGET_OUT_INTERMEDIATE_LIBRARIES := $(TARGET_OUT_INTERMEDIATES)/lib
308 TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj
310 TARGET_OUT_GEN := $(PRODUCT_OUT)/gen
311 TARGET_OUT_COMMON_GEN := $(TARGET_COMMON_OUT_ROOT)/gen
313 TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM)
314 ifneq ($(filter address,$(SANITIZE_TARGET)),)
315 target_out_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)
317 target_out_shared_libraries_base := $(TARGET_OUT)
320 TARGET_OUT_EXECUTABLES := $(TARGET_OUT)/bin
321 TARGET_OUT_OPTIONAL_EXECUTABLES := $(TARGET_OUT)/xbin
322 ifeq ($(TARGET_IS_64_BIT),true)
323 # /system/lib always contains 32-bit libraries,
324 # and /system/lib64 (if present) always contains 64-bit libraries.
325 TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib64
327 TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib
329 TARGET_OUT_RENDERSCRIPT_BITCODE := $(TARGET_OUT_SHARED_LIBRARIES)
330 TARGET_OUT_JAVA_LIBRARIES := $(TARGET_OUT)/framework
331 TARGET_OUT_APPS := $(TARGET_OUT)/app
332 TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT)/priv-app
333 TARGET_OUT_KEYLAYOUT := $(TARGET_OUT)/usr/keylayout
334 TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars
335 TARGET_OUT_ETC := $(TARGET_OUT)/etc
336 TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES
337 TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages
339 TARGET_OUT_SYSTEM_OTHER := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_OTHER)
341 # Out for TARGET_2ND_ARCH
342 TARGET_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
343 TARGET_2ND_ARCH_MODULE_SUFFIX := $(HOST_2ND_ARCH_MODULE_SUFFIX)
344 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)
345 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES)/lib
346 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib
347 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES)
348 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES)
349 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS)
350 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT_APPS_PRIVILEGED)
352 TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)
353 TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_EXECUTABLES)
354 TARGET_OUT_DATA_SHARED_LIBRARIES := $(TARGET_OUT_SHARED_LIBRARIES)
355 TARGET_OUT_DATA_JAVA_LIBRARIES := $(TARGET_OUT_DATA)/framework
356 TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA)/app
357 TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT)
358 TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS)
359 TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC)
360 ifeq ($(TARGET_IS_64_BIT),true)
361 TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest64
362 TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest64
364 TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
365 TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest
367 TARGET_OUT_DATA_FAKE := $(TARGET_OUT_DATA)/fake_packages
369 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_DATA_EXECUTABLES)
370 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES)
371 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA_APPS)
372 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
373 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest
375 TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache
377 TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)
378 ifneq ($(filter address,$(SANITIZE_TARGET)),)
379 target_out_vendor_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)/vendor
381 target_out_vendor_shared_libraries_base := $(TARGET_OUT_VENDOR)
384 TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR)/bin
385 TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES := $(TARGET_OUT_VENDOR)/xbin
386 ifeq ($(TARGET_IS_64_BIT),true)
387 TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib64
389 TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib
391 TARGET_OUT_VENDOR_JAVA_LIBRARIES := $(TARGET_OUT_VENDOR)/framework
392 TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR)/app
393 TARGET_OUT_VENDOR_ETC := $(TARGET_OUT_VENDOR)/etc
395 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR_EXECUTABLES)
396 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib
397 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR_APPS)
399 TARGET_OUT_OEM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_OEM)
400 TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM)/bin
401 ifeq ($(TARGET_IS_64_BIT),true)
402 TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib64
404 TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib
406 # We don't expect Java libraries in the oem.img.
407 # TARGET_OUT_OEM_JAVA_LIBRARIES:= $(TARGET_OUT_OEM)/framework
408 TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM)/app
409 TARGET_OUT_OEM_ETC := $(TARGET_OUT_OEM)/etc
411 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM_EXECUTABLES)
412 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib
413 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM_APPS)
415 TARGET_OUT_ODM := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ODM)
416 TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM)/bin
417 ifeq ($(TARGET_IS_64_BIT),true)
418 TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib64
420 TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib
422 TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM)/app
423 TARGET_OUT_ODM_ETC := $(TARGET_OUT_ODM)/etc
425 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM_EXECUTABLES)
426 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(TARGET_OUT_ODM)/lib
427 $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM_APPS)
429 TARGET_OUT_BREAKPAD := $(PRODUCT_OUT)/breakpad
431 TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols
432 TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin
433 TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/lib
434 TARGET_OUT_VENDOR_SHARED_LIBRARIES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/$(TARGET_COPY_OUT_VENDOR)/lib
435 TARGET_ROOT_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)
436 TARGET_ROOT_OUT_SBIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/sbin
437 TARGET_ROOT_OUT_BIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/bin
439 TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT)
440 TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin
441 TARGET_ROOT_OUT_SBIN := $(TARGET_ROOT_OUT)/sbin
442 TARGET_ROOT_OUT_ETC := $(TARGET_ROOT_OUT)/etc
443 TARGET_ROOT_OUT_USR := $(TARGET_ROOT_OUT)/usr
445 TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RECOVERY)
446 TARGET_RECOVERY_ROOT_OUT := $(TARGET_RECOVERY_OUT)/root
448 TARGET_SYSLOADER_OUT := $(PRODUCT_OUT)/sysloader
449 TARGET_SYSLOADER_ROOT_OUT := $(TARGET_SYSLOADER_OUT)/root
450 TARGET_SYSLOADER_SYSTEM_OUT := $(TARGET_SYSLOADER_OUT)/root/system
452 TARGET_INSTALLER_OUT := $(PRODUCT_OUT)/installer
453 TARGET_INSTALLER_DATA_OUT := $(TARGET_INSTALLER_OUT)/data
454 TARGET_INSTALLER_ROOT_OUT := $(TARGET_INSTALLER_OUT)/root
455 TARGET_INSTALLER_SYSTEM_OUT := $(TARGET_INSTALLER_OUT)/root/system
457 COMMON_MODULE_CLASSES := TARGET-NOTICE_FILES HOST-NOTICE_FILES HOST-JAVA_LIBRARIES
458 PER_ARCH_MODULE_CLASSES := SHARED_LIBRARIES STATIC_LIBRARIES EXECUTABLES GYP RENDERSCRIPT_BITCODE
460 ifeq (,$(strip $(DIST_DIR)))
461 DIST_DIR := $(OUT_DIR)/dist
464 ifeq ($(PRINT_BUILD_CONFIG),)
465 PRINT_BUILD_CONFIG := true
468 ifeq ($(USE_CLANG_PLATFORM_BUILD),)
469 USE_CLANG_PLATFORM_BUILD := true