1# This is included by the top-level Makefile.
2# It sets up standard variables based on the
3# current configuration and platform, which
4# are not specific to what is being built.
5
6# Only use ANDROID_BUILD_SHELL to wrap around bash.
7# DO NOT use other shells such as zsh.
8ifdef ANDROID_BUILD_SHELL
9SHELL := $(ANDROID_BUILD_SHELL)
10else
11# Use bash, not whatever shell somebody has installed as /bin/sh
12# This is repeated from main.mk, since envsetup.sh runs this file
13# directly.
14SHELL := /bin/bash
15endif
16
17# Utility variables.
18empty :=
19space := $(empty) $(empty)
20comma := ,
21# Note that make will eat the newline just before endef.
22define newline
23
24
25endef
26# The pound character "#"
27define pound
28#
29endef
30# Unfortunately you can't simply define backslash as \ or \\.
31backslash := \a
32backslash := $(patsubst %a,%,$(backslash))
33
34# this turns off the suffix rules built into make
35.SUFFIXES:
36
37# this turns off the RCS / SCCS implicit rules of GNU Make
38% : RCS/%,v
39% : RCS/%
40% : %,v
41% : s.%
42% : SCCS/s.%
43
44# If a rule fails, delete $@.
45.DELETE_ON_ERROR:
46
47# Check for broken versions of make.
48ifndef KATI
49ifneq (1,$(strip $(shell expr $(MAKE_VERSION) \>= 3.81)))
50$(warning ********************************************************************************)
51$(warning *  You are using version $(MAKE_VERSION) of make.)
52$(warning *  Android can only be built by versions 3.81 and higher.)
53$(warning *  see https://source.android.com/source/download.html)
54$(warning ********************************************************************************)
55$(error stopping)
56endif
57endif
58
59# Used to force goals to build.  Only use for conditionally defined goals.
60.PHONY: FORCE
61FORCE:
62
63ORIGINAL_MAKECMDGOALS := $(MAKECMDGOALS)
64
65# Tell python not to spam the source tree with .pyc files.  This
66# only has an effect on python 2.6 and above.
67export PYTHONDONTWRITEBYTECODE := 1
68
69ifneq ($(filter --color=always, $(GREP_OPTIONS)),)
70$(warning The build system needs unmodified output of grep.)
71$(error Please remove --color=always from your  $$GREP_OPTIONS)
72endif
73
74SRC_TARGET_DIR := $(TOPDIR)build/target
75SRC_API_DIR := $(TOPDIR)prebuilts/sdk/api
76SRC_SYSTEM_API_DIR := $(TOPDIR)prebuilts/sdk/system-api
77SRC_TEST_API_DIR := $(TOPDIR)prebuilts/sdk/test-api
78
79# Some specific paths to tools
80SRC_DROIDDOC_DIR := $(TOPDIR)build/tools/droiddoc
81
82# Set up efficient math functions which are used in make.
83# Here since this file is included by envsetup as well as during build.
84include $(BUILD_SYSTEM)/math.mk
85
86# Various mappings to avoid hard-coding paths all over the place
87include $(BUILD_SYSTEM)/pathmap.mk
88
89# ###############################################################
90# Build system internal files
91# ###############################################################
92
93BUILD_COMBOS:= $(BUILD_SYSTEM)/combo
94
95CLEAR_VARS:= $(BUILD_SYSTEM)/clear_vars.mk
96BUILD_HOST_STATIC_LIBRARY:= $(BUILD_SYSTEM)/host_static_library.mk
97BUILD_HOST_SHARED_LIBRARY:= $(BUILD_SYSTEM)/host_shared_library.mk
98BUILD_STATIC_LIBRARY:= $(BUILD_SYSTEM)/static_library.mk
99BUILD_HEADER_LIBRARY:= $(BUILD_SYSTEM)/header_library.mk
100BUILD_AUX_STATIC_LIBRARY:= $(BUILD_SYSTEM)/aux_static_library.mk
101BUILD_AUX_EXECUTABLE:= $(BUILD_SYSTEM)/aux_executable.mk
102BUILD_SHARED_LIBRARY:= $(BUILD_SYSTEM)/shared_library.mk
103BUILD_EXECUTABLE:= $(BUILD_SYSTEM)/executable.mk
104BUILD_HOST_EXECUTABLE:= $(BUILD_SYSTEM)/host_executable.mk
105BUILD_PACKAGE:= $(BUILD_SYSTEM)/package.mk
106BUILD_PHONY_PACKAGE:= $(BUILD_SYSTEM)/phony_package.mk
107BUILD_RRO_PACKAGE:= $(BUILD_SYSTEM)/build_rro_package.mk
108BUILD_HOST_PREBUILT:= $(BUILD_SYSTEM)/host_prebuilt.mk
109BUILD_PREBUILT:= $(BUILD_SYSTEM)/prebuilt.mk
110BUILD_MULTI_PREBUILT:= $(BUILD_SYSTEM)/multi_prebuilt.mk
111BUILD_JAVA_LIBRARY:= $(BUILD_SYSTEM)/java_library.mk
112BUILD_STATIC_JAVA_LIBRARY:= $(BUILD_SYSTEM)/static_java_library.mk
113BUILD_HOST_JAVA_LIBRARY:= $(BUILD_SYSTEM)/host_java_library.mk
114BUILD_DROIDDOC:= $(BUILD_SYSTEM)/droiddoc.mk
115BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk
116BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk
117BUILD_NATIVE_BENCHMARK := $(BUILD_SYSTEM)/native_benchmark.mk
118BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk
119BUILD_FUZZ_TEST := $(BUILD_SYSTEM)/fuzz_test.mk
120BUILD_HOST_FUZZ_TEST := $(BUILD_SYSTEM)/host_fuzz_test.mk
121
122BUILD_SHARED_TEST_LIBRARY := $(BUILD_SYSTEM)/shared_test_lib.mk
123BUILD_HOST_SHARED_TEST_LIBRARY := $(BUILD_SYSTEM)/host_shared_test_lib.mk
124BUILD_STATIC_TEST_LIBRARY := $(BUILD_SYSTEM)/static_test_lib.mk
125BUILD_HOST_STATIC_TEST_LIBRARY := $(BUILD_SYSTEM)/host_static_test_lib.mk
126
127BUILD_NOTICE_FILE := $(BUILD_SYSTEM)/notice_files.mk
128BUILD_HOST_DALVIK_JAVA_LIBRARY := $(BUILD_SYSTEM)/host_dalvik_java_library.mk
129BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY := $(BUILD_SYSTEM)/host_dalvik_static_java_library.mk
130
131
132# ###############################################################
133# Parse out any modifier targets.
134# ###############################################################
135
136# The 'showcommands' goal says to show the full command
137# lines being executed, instead of a short message about
138# the kind of operation being done.
139SHOW_COMMANDS:= $(filter showcommands,$(MAKECMDGOALS))
140hide := $(if $(SHOW_COMMANDS),,@)
141
142################################################################
143# Tools needed in product configuration makefiles.
144################################################################
145NORMALIZE_PATH := build/tools/normalize_path.py
146
147# $(1): the paths to be normalized
148define normalize-paths
149$(if $(1),$(shell $(NORMALIZE_PATH) $(1)))
150endef
151
152# ###############################################################
153# Set common values
154# ###############################################################
155
156# Set the extensions used for various packages
157COMMON_PACKAGE_SUFFIX := .zip
158COMMON_JAVA_PACKAGE_SUFFIX := .jar
159COMMON_ANDROID_PACKAGE_SUFFIX := .apk
160
161ifdef TMPDIR
162JAVA_TMPDIR_ARG := -Djava.io.tmpdir=$(TMPDIR)
163else
164JAVA_TMPDIR_ARG :=
165endif
166
167# ###############################################################
168# Include sub-configuration files
169# ###############################################################
170
171# ---------------------------------------------------------------
172# Try to include buildspec.mk, which will try to set stuff up.
173# If this file doesn't exist, the environment variables will
174# be used, and if that doesn't work, then the default is an
175# arm build
176ifndef ANDROID_BUILDSPEC
177ANDROID_BUILDSPEC := $(TOPDIR)buildspec.mk
178endif
179-include $(ANDROID_BUILDSPEC)
180
181# ---------------------------------------------------------------
182# Define most of the global variables.  These are the ones that
183# are specific to the user's build configuration.
184include $(BUILD_SYSTEM)/envsetup.mk
185
186# Pruned directory options used when using findleaves.py
187# See envsetup.mk for a description of SCAN_EXCLUDE_DIRS
188FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(SCAN_EXCLUDE_DIRS) .repo .git)
189
190# The build system exposes several variables for where to find the kernel
191# headers:
192#   TARGET_DEVICE_KERNEL_HEADERS is automatically created for the current
193#       device being built. It is set as $(TARGET_DEVICE_DIR)/kernel-headers,
194#       e.g. device/samsung/tuna/kernel-headers. This directory is not
195#       explicitly set by anyone, the build system always adds this subdir.
196#
197#   TARGET_BOARD_KERNEL_HEADERS is specified by the BoardConfig.mk file
198#       to allow other directories to be included. This is useful if there's
199#       some common place where a few headers are being kept for a group
200#       of devices. For example, device/<vendor>/common/kernel-headers could
201#       contain some headers for several of <vendor>'s devices.
202#
203#   TARGET_PRODUCT_KERNEL_HEADERS is generated by the product inheritance
204#       graph. This allows architecture products to provide headers for the
205#       devices using that architecture. For example,
206#       hardware/ti/omap4xxx/omap4.mk will specify
207#       PRODUCT_VENDOR_KERNEL_HEADERS variable that specify where the omap4
208#       specific headers are, e.g. hardware/ti/omap4xxx/kernel-headers.
209#       The build system then combines all the values specified by all the
210#       PRODUCT_VENDOR_KERNEL_HEADERS directives in the product inheritance
211#       tree and then exports a TARGET_PRODUCT_KERNEL_HEADERS variable.
212#
213# The layout of subdirs in any of the kernel-headers dir should mirror the
214# layout of the kernel include/ directory. For example,
215#     device/samsung/tuna/kernel-headers/linux/,
216#     hardware/ti/omap4xxx/kernel-headers/media/,
217#     etc.
218#
219# NOTE: These directories MUST contain post-processed headers using the
220# bionic/libc/kernel/tools/clean_header.py tool. Additionally, the original
221# kernel headers must also be checked in, but in a different subdirectory. By
222# convention, the originals should be checked into original-kernel-headers
223# directory of the same parent dir. For example,
224#     device/samsung/tuna/kernel-headers            <----- post-processed
225#     device/samsung/tuna/original-kernel-headers   <----- originals
226#
227TARGET_DEVICE_KERNEL_HEADERS := $(strip $(wildcard $(TARGET_DEVICE_DIR)/kernel-headers))
228
229define validate-kernel-headers
230$(if $(firstword $(foreach hdr_dir,$(1),\
231         $(filter-out kernel-headers,$(notdir $(hdr_dir))))),\
232     $(error Kernel header dirs must be end in kernel-headers: $(1)))
233endef
234# also allow the board config to provide additional directories since
235# there could be device/oem/base_hw and device/oem/derived_hw
236# that both are valid devices but derived_hw needs to use kernel headers
237# from base_hw.
238TARGET_BOARD_KERNEL_HEADERS := $(strip $(wildcard $(TARGET_BOARD_KERNEL_HEADERS)))
239TARGET_BOARD_KERNEL_HEADERS := $(patsubst %/,%,$(TARGET_BOARD_KERNEL_HEADERS))
240$(call validate-kernel-headers,$(TARGET_BOARD_KERNEL_HEADERS))
241
242# then add product-inherited includes, to allow for
243# hardware/sivendor/chip/chip.mk to include their own headers
244TARGET_PRODUCT_KERNEL_HEADERS := $(strip $(wildcard $(PRODUCT_VENDOR_KERNEL_HEADERS)))
245TARGET_PRODUCT_KERNEL_HEADERS := $(patsubst %/,%,$(TARGET_PRODUCT_KERNEL_HEADERS))
246$(call validate-kernel-headers,$(TARGET_PRODUCT_KERNEL_HEADERS))
247
248# Clean up/verify variables defined by the board config file.
249TARGET_BOOTLOADER_BOARD_NAME := $(strip $(TARGET_BOOTLOADER_BOARD_NAME))
250TARGET_CPU_ABI := $(strip $(TARGET_CPU_ABI))
251ifeq ($(TARGET_CPU_ABI),)
252  $(error No TARGET_CPU_ABI defined by board config: $(board_config_mk))
253endif
254TARGET_CPU_ABI2 := $(strip $(TARGET_CPU_ABI2))
255
256BOARD_KERNEL_BASE := $(strip $(BOARD_KERNEL_BASE))
257BOARD_KERNEL_PAGESIZE := $(strip $(BOARD_KERNEL_PAGESIZE))
258
259# Commands to generate .toc file common to ELF .so files.
260define _gen_toc_command_for_elf
261$(hide) ($($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)READELF) -d $(1) | grep SONAME || echo "No SONAME for $1") > $(2)
262$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)READELF) --dyn-syms $(1) | awk '{$$2=""; $$3=""; print}' >> $(2)
263endef
264
265# Commands to generate .toc file from Darwin dynamic library.
266define _gen_toc_command_for_macho
267$(hide) otool -l $(1) | grep LC_ID_DYLIB -A 5 > $(2)
268$(hide) nm -gP $(1) | cut -f1-2 -d" " | (grep -v U$$ >> $(2) || true)
269endef
270
271combo_target := HOST_
272combo_2nd_arch_prefix :=
273include $(BUILD_SYSTEM)/combo/select.mk
274
275# Load the 2nd host arch if it's needed.
276ifdef HOST_2ND_ARCH
277combo_target := HOST_
278combo_2nd_arch_prefix := $(HOST_2ND_ARCH_VAR_PREFIX)
279include $(BUILD_SYSTEM)/combo/select.mk
280endif
281
282# Load the windows cross compiler under Linux
283ifdef HOST_CROSS_OS
284combo_target := HOST_CROSS_
285combo_2nd_arch_prefix :=
286include $(BUILD_SYSTEM)/combo/select.mk
287
288ifdef HOST_CROSS_2ND_ARCH
289combo_target := HOST_CROSS_
290combo_2nd_arch_prefix := $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)
291include $(BUILD_SYSTEM)/combo/select.mk
292endif
293endif
294
295# on windows, the tools have .exe at the end, and we depend on the
296# host config stuff being done first
297
298combo_target := TARGET_
299combo_2nd_arch_prefix :=
300include $(BUILD_SYSTEM)/combo/select.mk
301
302# Load the 2nd target arch if it's needed.
303ifdef TARGET_2ND_ARCH
304combo_target := TARGET_
305combo_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
306include $(BUILD_SYSTEM)/combo/select.mk
307endif
308
309ifndef KATI
310include $(BUILD_SYSTEM)/ccache.mk
311include $(BUILD_SYSTEM)/goma.mk
312
313export CC_WRAPPER
314export CXX_WRAPPER
315endif
316
317ifdef TARGET_PREFER_32_BIT
318TARGET_PREFER_32_BIT_APPS := true
319TARGET_PREFER_32_BIT_EXECUTABLES := true
320endif
321
322ifeq (,$(TARGET_SUPPORTS_32_BIT_APPS)$(TARGET_SUPPORTS_64_BIT_APPS))
323  TARGET_SUPPORTS_32_BIT_APPS := true
324endif
325
326# "ro.product.cpu.abilist32" and "ro.product.cpu.abilist64" are
327# comma separated lists of the 32 and 64 bit ABIs (in order of
328# preference) that the target supports. If TARGET_CPU_ABI_LIST_{32,64}_BIT
329# are defined by the board config, we use them. Else, we construct
330# these lists based on whether TARGET_IS_64_BIT is set.
331#
332# Note that this assumes that the 2ND_CPU_ABI for a 64 bit target
333# is always 32 bits. If this isn't the case, these variables should
334# be overriden in the board configuration.
335ifeq (,$(TARGET_CPU_ABI_LIST_64_BIT))
336  ifeq (true|true,$(TARGET_IS_64_BIT)|$(TARGET_SUPPORTS_64_BIT_APPS))
337    TARGET_CPU_ABI_LIST_64_BIT := $(TARGET_CPU_ABI) $(TARGET_CPU_ABI2)
338  endif
339endif
340
341ifeq (,$(TARGET_CPU_ABI_LIST_32_BIT))
342  ifneq (true,$(TARGET_IS_64_BIT))
343    TARGET_CPU_ABI_LIST_32_BIT := $(TARGET_CPU_ABI) $(TARGET_CPU_ABI2)
344  else
345    ifeq (true,$(TARGET_SUPPORTS_32_BIT_APPS))
346      # For a 64 bit target, assume that the 2ND_CPU_ABI
347      # is a 32 bit ABI.
348      TARGET_CPU_ABI_LIST_32_BIT := $(TARGET_2ND_CPU_ABI) $(TARGET_2ND_CPU_ABI2)
349    endif
350  endif
351endif
352
353# "ro.product.cpu.abilist" is a comma separated list of ABIs (in order
354# of preference) that the target supports. If a TARGET_CPU_ABI_LIST
355# is specified by the board configuration, we use that. If not, we
356# build a list out of the TARGET_CPU_ABIs specified by the config.
357ifeq (,$(TARGET_CPU_ABI_LIST))
358  ifeq ($(TARGET_IS_64_BIT)|$(TARGET_PREFER_32_BIT_APPS),true|true)
359    TARGET_CPU_ABI_LIST := $(TARGET_CPU_ABI_LIST_32_BIT) $(TARGET_CPU_ABI_LIST_64_BIT)
360  else
361    TARGET_CPU_ABI_LIST := $(TARGET_CPU_ABI_LIST_64_BIT) $(TARGET_CPU_ABI_LIST_32_BIT)
362  endif
363endif
364
365# Strip whitespace from the ABI list string.
366TARGET_CPU_ABI_LIST := $(subst $(space),$(comma),$(strip $(TARGET_CPU_ABI_LIST)))
367TARGET_CPU_ABI_LIST_32_BIT := $(subst $(space),$(comma),$(strip $(TARGET_CPU_ABI_LIST_32_BIT)))
368TARGET_CPU_ABI_LIST_64_BIT := $(subst $(space),$(comma),$(strip $(TARGET_CPU_ABI_LIST_64_BIT)))
369
370# GCC version selection
371TARGET_GCC_VERSION := 4.9
372ifdef TARGET_2ND_ARCH
3732ND_TARGET_GCC_VERSION := 4.9
374endif
375
376# Normalize WITH_STATIC_ANALYZER
377ifeq ($(strip $(WITH_STATIC_ANALYZER)),0)
378  WITH_STATIC_ANALYZER :=
379endif
380
381# define clang/llvm versions and base directory.
382include $(BUILD_SYSTEM)/clang/versions.mk
383
384# Unset WITH_TIDY_ONLY if global WITH_TIDY_ONLY is not true nor 1.
385ifeq (,$(filter 1 true,$(WITH_TIDY_ONLY)))
386  WITH_TIDY_ONLY :=
387endif
388
389PATH_TO_CLANG_TIDY := \
390    $(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/$(LLVM_PREBUILTS_VERSION)/bin/clang-tidy
391ifeq ($(wildcard $(PATH_TO_CLANG_TIDY)),)
392  ifneq (,$(filter 1 true,$(WITH_TIDY)))
393    $(warning *** Disable WITH_TIDY because $(PATH_TO_CLANG_TIDY) does not exist)
394  endif
395  PATH_TO_CLANG_TIDY :=
396endif
397
398# Disable WITH_STATIC_ANALYZER if tool can't be found
399SYNTAX_TOOLS_PREFIX := \
400    $(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/$(LLVM_PREBUILTS_VERSION)/tools/scan-build/libexec
401ifneq ($(strip $(WITH_STATIC_ANALYZER)),)
402  ifeq ($(wildcard $(SYNTAX_TOOLS_PREFIX)/ccc-analyzer),)
403    $(warning *** Disable WITH_STATIC_ANALYZER because $(SYNTAX_TOOLS_PREFIX)/ccc-analyzer does not exist)
404    WITH_STATIC_ANALYZER :=
405  endif
406endif
407
408# Pick a Java compiler.
409include $(BUILD_SYSTEM)/combo/javac.mk
410
411# ---------------------------------------------------------------
412# Check that the configuration is current.  We check that
413# BUILD_ENV_SEQUENCE_NUMBER is current against this value.
414# Don't fail if we're called from envsetup, so they have a
415# chance to update their environment.
416
417ifeq (,$(strip $(CALLED_FROM_SETUP)))
418ifneq (,$(strip $(BUILD_ENV_SEQUENCE_NUMBER)))
419ifneq ($(BUILD_ENV_SEQUENCE_NUMBER),$(CORRECT_BUILD_ENV_SEQUENCE_NUMBER))
420$(warning BUILD_ENV_SEQUENCE_NUMBER is set incorrectly.)
421$(info *** If you use envsetup/lunch/choosecombo:)
422$(info ***   - Re-execute envsetup (". envsetup.sh"))
423$(info ***   - Re-run lunch or choosecombo)
424$(info *** If you use buildspec.mk:)
425$(info ***   - Look at buildspec.mk.default to see what has changed)
426$(info ***   - Update BUILD_ENV_SEQUENCE_NUMBER to "$(CORRECT_BUILD_ENV_SEQUENCE_NUMBER)")
427$(error bailing..)
428endif
429endif
430endif
431
432# Set up PDK so we can use TARGET_BUILD_PDK to select prebuilt tools below
433.PHONY: pdk fusion
434pdk fusion: $(DEFAULT_GOAL)
435
436# What to build:
437# pdk fusion if:
438# 1) PDK_FUSION_PLATFORM_ZIP is passed in from the environment
439# or
440# 2) the platform.zip exists in the default location
441# or
442# 3) fusion is a command line build goal,
443#    PDK_FUSION_PLATFORM_ZIP is needed anyway, then do we need the 'fusion' goal?
444# otherwise pdk only if:
445# 1) pdk is a command line build goal
446# or
447# 2) TARGET_BUILD_PDK is passed in from the environment
448
449# if PDK_FUSION_PLATFORM_ZIP is specified, do not override.
450ifndef PDK_FUSION_PLATFORM_ZIP
451# Most PDK project paths should be using vendor/pdk/TARGET_DEVICE
452# but some legacy ones (e.g. mini_armv7a_neon generic PDK) were setup
453# with vendor/pdk/TARGET_PRODUCT.
454_pdk_fusion_default_platform_zip = $(strip \
455  $(wildcard vendor/pdk/$(TARGET_DEVICE)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform/platform.zip) \
456  $(wildcard vendor/pdk/$(TARGET_DEVICE)/$(patsubst aosp_%,full_%,$(TARGET_PRODUCT))-$(TARGET_BUILD_VARIANT)/platform/platform.zip) \
457  $(wildcard vendor/pdk/$(TARGET_PRODUCT)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform/platform.zip) \
458  $(wildcard vendor/pdk/$(TARGET_PRODUCT)/$(patsubst aosp_%,full_%,$(TARGET_PRODUCT))-$(TARGET_BUILD_VARIANT)/platform/platform.zip))
459ifneq (,$(_pdk_fusion_default_platform_zip))
460PDK_FUSION_PLATFORM_ZIP := $(word 1, $(_pdk_fusion_default_platform_zip))
461TARGET_BUILD_PDK := true
462endif # _pdk_fusion_default_platform_zip
463endif # !PDK_FUSION_PLATFORM_ZIP
464
465ifneq (,$(filter pdk fusion, $(MAKECMDGOALS)))
466TARGET_BUILD_PDK := true
467ifneq (,$(filter fusion, $(MAKECMDGOALS)))
468ifndef PDK_FUSION_PLATFORM_ZIP
469  $(error Specify PDK_FUSION_PLATFORM_ZIP to do a PDK fusion.)
470endif
471endif  # fusion
472endif  # pdk or fusion
473
474ifdef PDK_FUSION_PLATFORM_ZIP
475TARGET_BUILD_PDK := true
476ifeq (,$(wildcard $(PDK_FUSION_PLATFORM_ZIP)))
477  $(error Cannot find file $(PDK_FUSION_PLATFORM_ZIP).)
478endif
479endif
480
481BUILD_PLATFORM_ZIP := $(filter platform platform-java,$(MAKECMDGOALS))
482
483#
484# Tools that are prebuilts for TARGET_BUILD_APPS
485#
486prebuilt_sdk_tools := prebuilts/sdk/tools
487prebuilt_sdk_tools_bin := $(prebuilt_sdk_tools)/$(HOST_OS)/bin
488
489AIDL := $(HOST_OUT_EXECUTABLES)/aidl
490AAPT := $(HOST_OUT_EXECUTABLES)/aapt
491AAPT2 := $(HOST_OUT_EXECUTABLES)/aapt2
492ZIPALIGN := $(HOST_OUT_EXECUTABLES)/zipalign
493SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
494SIGNAPK_JNI_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES)
495LLVM_RS_CC := $(HOST_OUT_EXECUTABLES)/llvm-rs-cc
496BCC_COMPAT := $(HOST_OUT_EXECUTABLES)/bcc_compat
497DEPMOD := $(HOST_OUT_EXECUTABLES)/depmod
498
499DX := $(HOST_OUT_EXECUTABLES)/dx
500MAINDEXCLASSES := $(HOST_OUT_EXECUTABLES)/mainDexClasses
501
502SOONG_ZIP := $(SOONG_HOST_OUT_EXECUTABLES)/soong_zip
503ZIP2ZIP := $(SOONG_HOST_OUT_EXECUTABLES)/zip2zip
504FILESLIST := $(SOONG_HOST_OUT_EXECUTABLES)/fileslist
505
506# Always use prebuilts for ckati and makeparallel
507prebuilt_build_tools := prebuilts/build-tools
508ifeq ($(filter address,$(SANITIZE_HOST)),)
509prebuilt_build_tools_bin := $(prebuilt_build_tools)/$(HOST_PREBUILT_TAG)/bin
510else
511prebuilt_build_tools_bin := $(prebuilt_build_tools)/$(HOST_PREBUILT_TAG)/asan/bin
512endif
513ACP := $(prebuilt_build_tools_bin)/acp
514CKATI := $(prebuilt_build_tools_bin)/ckati
515IJAR := $(prebuilt_build_tools_bin)/ijar
516MAKEPARALLEL := $(prebuilt_build_tools_bin)/makeparallel
517ZIPTIME := $(prebuilt_build_tools_bin)/ziptime
518
519USE_PREBUILT_SDK_TOOLS_IN_PLACE := true
520
521# Override the definitions above for unbundled and PDK builds
522ifneq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
523AIDL := $(prebuilt_sdk_tools_bin)/aidl
524AAPT := $(prebuilt_sdk_tools_bin)/aapt
525AAPT2 := $(prebuilt_sdk_tools_bin)/aapt2
526ZIPALIGN := $(prebuilt_sdk_tools_bin)/zipalign
527SIGNAPK_JAR := $(prebuilt_sdk_tools)/lib/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
528# Use 64-bit libraries unconditionally because 32-bit JVMs are no longer supported
529SIGNAPK_JNI_LIBRARY_PATH := $(prebuilt_sdk_tools)/$(HOST_OS)/lib64
530
531DX := $(prebuilt_sdk_tools)/dx
532MAINDEXCLASSES := $(prebuilt_sdk_tools)/mainDexClasses
533
534# Don't use prebuilts in PDK
535ifneq ($(TARGET_BUILD_PDK),true)
536LLVM_RS_CC := $(prebuilt_sdk_tools_bin)/llvm-rs-cc
537BCC_COMPAT := $(prebuilt_sdk_tools_bin)/bcc_compat
538endif # TARGET_BUILD_PDK
539endif # TARGET_BUILD_APPS || TARGET_BUILD_PDK
540prebuilt_sdk_tools :=
541prebuilt_sdk_tools_bin :=
542
543
544# ---------------------------------------------------------------
545# Generic tools.
546JACK := $(HOST_OUT_EXECUTABLES)/jack
547
548LEX := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/flex/flex-2.5.39
549# The default PKGDATADIR built in the prebuilt bison is a relative path
550# external/bison/data.
551# To run bison from elsewhere you need to set up enviromental variable
552# BISON_PKGDATADIR.
553BISON_PKGDATADIR := $(PWD)/external/bison/data
554BISON := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/bison/bison
555YACC := $(BISON) -d
556BISON_DATA := $(wildcard external/bison/data/* external/bison/data/*/*)
557
558YASM := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/yasm/yasm
559
560DOXYGEN:= doxygen
561ifeq ($(HOST_OS),linux)
562BREAKPAD_DUMP_SYMS := $(HOST_OUT_EXECUTABLES)/dump_syms
563else
564# For non-supported hosts, do not generate breakpad symbols.
565BREAKPAD_GENERATE_SYMBOLS := false
566endif
567PROTOC := $(HOST_OUT_EXECUTABLES)/aprotoc$(HOST_EXECUTABLE_SUFFIX)
568NANOPB_SRCS := external/nanopb-c/generator/protoc-gen-nanopb \
569    $(wildcard external/nanopb-c/generator/*.py \
570               external/nanopb-c/generator/google/*.py \
571               external/nanopb-c/generator/proto/*.py)
572VTSC := $(HOST_OUT_EXECUTABLES)/vtsc$(HOST_EXECUTABLE_SUFFIX)
573MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX)
574MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX)
575ifeq (,$(strip $(BOARD_CUSTOM_MKBOOTIMG)))
576MKBOOTIMG := $(HOST_OUT_EXECUTABLES)/mkbootimg$(HOST_EXECUTABLE_SUFFIX)
577else
578MKBOOTIMG := $(BOARD_CUSTOM_MKBOOTIMG)
579endif
580ifeq (,$(strip $(BOARD_CUSTOM_BPTTOOL)))
581BPTTOOL := $(HOST_OUT_EXECUTABLES)/bpttool$(HOST_EXECUTABLE_SUFFIX)
582else
583BPTTOOL := $(BOARD_CUSTOM_BPTTOOL)
584endif
585ifeq (,$(strip $(BOARD_CUSTOM_AVBTOOL)))
586AVBTOOL := $(HOST_OUT_EXECUTABLES)/avbtool$(HOST_EXECUTABLE_SUFFIX)
587else
588AVBTOOL := $(BOARD_CUSTOM_AVBTOOL)
589endif
590APICHECK := $(HOST_OUT_EXECUTABLES)/apicheck$(HOST_EXECUTABLE_SUFFIX)
591FS_GET_STATS := $(HOST_OUT_EXECUTABLES)/fs_get_stats$(HOST_EXECUTABLE_SUFFIX)
592ifeq ($(TARGET_USES_MKE2FS),true)
593MAKE_EXT4FS := $(HOST_OUT_EXECUTABLES)/mke2fs$(HOST_EXECUTABLE_SUFFIX)
594MKEXTUSERIMG := $(HOST_OUT_EXECUTABLES)/mkuserimg_mke2fs.sh
595MKE2FS_CONF := system/extras/ext4_utils/mke2fs.conf
596else
597MAKE_EXT4FS := $(HOST_OUT_EXECUTABLES)/make_ext4fs$(HOST_EXECUTABLE_SUFFIX)
598MKEXTUSERIMG := $(HOST_OUT_EXECUTABLES)/mkuserimg.sh
599MKE2FS_CONF :=
600endif
601BLK_ALLOC_TO_BASE_FS := $(HOST_OUT_EXECUTABLES)/blk_alloc_to_base_fs$(HOST_EXECUTABLE_SUFFIX)
602MAKE_SQUASHFS := $(HOST_OUT_EXECUTABLES)/mksquashfs$(HOST_EXECUTABLE_SUFFIX)
603MKSQUASHFSUSERIMG := $(HOST_OUT_EXECUTABLES)/mksquashfsimage.sh
604MAKE_F2FS := $(HOST_OUT_EXECUTABLES)/make_f2fs$(HOST_EXECUTABLE_SUFFIX)
605MKF2FSUSERIMG := $(HOST_OUT_EXECUTABLES)/mkf2fsuserimg.sh
606SIMG2IMG := $(HOST_OUT_EXECUTABLES)/simg2img$(HOST_EXECUTABLE_SUFFIX)
607IMG2SIMG := $(HOST_OUT_EXECUTABLES)/img2simg$(HOST_EXECUTABLE_SUFFIX)
608E2FSCK := $(HOST_OUT_EXECUTABLES)/e2fsck$(HOST_EXECUTABLE_SUFFIX)
609MKTARBALL := build/tools/mktarball.sh
610TUNE2FS := $(HOST_OUT_EXECUTABLES)/tune2fs$(HOST_EXECUTABLE_SUFFIX)
611JARJAR := $(HOST_OUT_JAVA_LIBRARIES)/jarjar.jar
612DESUGAR := $(HOST_OUT_JAVA_LIBRARIES)/desugar.jar
613DATA_BINDING_COMPILER := $(HOST_OUT_JAVA_LIBRARIES)/databinding-compiler.jar
614FAT16COPY := build/tools/fat16copy.py
615CHECK_LINK_TYPE := build/tools/check_link_type.py
616
617ifeq ($(ANDROID_COMPILE_WITH_JACK),true)
618DEFAULT_JACK_ENABLED:=full
619else
620DEFAULT_JACK_ENABLED:=
621endif
622ifneq ($(ANDROID_JACK_EXTRA_ARGS),)
623JACK_DEFAULT_ARGS :=
624DEFAULT_JACK_EXTRA_ARGS := $(ANDROID_JACK_EXTRA_ARGS)
625else
626JACK_DEFAULT_ARGS := $(BUILD_SYSTEM)/jack-default.args
627DEFAULT_JACK_EXTRA_ARGS := @$(JACK_DEFAULT_ARGS)
628endif
629
630PROGUARD := external/proguard/bin/proguard.sh
631JAVATAGS := build/tools/java-event-log-tags.py
632MERGETAGS := build/tools/merge-event-log-tags.py
633BUILD_IMAGE_SRCS := $(wildcard build/tools/releasetools/*.py)
634APPEND2SIMG := $(HOST_OUT_EXECUTABLES)/append2simg
635VERITY_SIGNER := $(HOST_OUT_EXECUTABLES)/verity_signer
636BUILD_VERITY_TREE := $(HOST_OUT_EXECUTABLES)/build_verity_tree
637BOOT_SIGNER := $(HOST_OUT_EXECUTABLES)/boot_signer
638FUTILITY := $(HOST_OUT_EXECUTABLES)/futility-host
639VBOOT_SIGNER := prebuilts/misc/scripts/vboot_signer/vboot_signer.sh
640FEC := $(HOST_OUT_EXECUTABLES)/fec
641
642DEXDUMP := $(HOST_OUT_EXECUTABLES)/dexdump2$(BUILD_EXECUTABLE_SUFFIX)
643PROFMAN := $(HOST_OUT_EXECUTABLES)/profman
644
645# relocation packer
646RELOCATION_PACKER := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/relocation_packer/relocation_packer
647
648FINDBUGS_DIR := external/owasp/sanitizer/tools/findbugs/bin
649FINDBUGS := $(FINDBUGS_DIR)/findbugs
650EMMA_JAR := external/emma/lib/emma$(COMMON_JAVA_PACKAGE_SUFFIX)
651
652# Tool to merge AndroidManifest.xmls
653ANDROID_MANIFEST_MERGER := java -classpath prebuilts/devtools/tools/lib/manifest-merger.jar com.android.manifmerger.Main merge
654
655COLUMN:= column
656
657# We may not have the right JAVA_HOME/PATH set up yet when this is run from envsetup.sh.
658ifneq ($(CALLED_FROM_SETUP),true)
659HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh)
660
661ifneq ($(HOST_JDK_TOOLS_JAR),)
662ifeq ($(wildcard $(HOST_JDK_TOOLS_JAR)),)
663$(error Error: could not find jdk tools.jar at $(HOST_JDK_TOOLS_JAR), please check if your JDK was installed correctly)
664endif
665endif
666
667# Is the host JDK 64-bit version?
668HOST_JDK_IS_64BIT_VERSION :=
669ifneq ($(filter 64-Bit, $(shell java -version 2>&1)),)
670HOST_JDK_IS_64BIT_VERSION := true
671endif
672endif  # CALLED_FROM_SETUP not true
673
674# It's called md5 on Mac OS and md5sum on Linux
675ifeq ($(HOST_OS),darwin)
676MD5SUM:=md5 -q
677else
678MD5SUM:=md5sum
679endif
680
681APICHECK_CLASSPATH := $(HOST_JDK_TOOLS_JAR)
682APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
683APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX)
684APICHECK_COMMAND := $(APICHECK) -JXmx1024m -J"classpath $(APICHECK_CLASSPATH)"
685
686# Boolean variable determining if Treble is fully enabled
687PRODUCT_FULL_TREBLE := false
688ifneq ($(PRODUCT_FULL_TREBLE_OVERRIDE),)
689  PRODUCT_FULL_TREBLE := $(PRODUCT_FULL_TREBLE_OVERRIDE)
690else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),)
691  #$(warning no product shipping level defined)
692else ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),26),)
693  PRODUCT_FULL_TREBLE := true
694endif
695
696# The default key if not set as LOCAL_CERTIFICATE
697ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE
698  DEFAULT_SYSTEM_DEV_CERTIFICATE := $(PRODUCT_DEFAULT_DEV_CERTIFICATE)
699else
700  DEFAULT_SYSTEM_DEV_CERTIFICATE := build/target/product/security/testkey
701endif
702
703FRAMEWORK_MANIFEST_FILE := system/libhidl/manifest.xml
704FRAMEWORK_COMPATIBILITY_MATRIX_FILE := hardware/interfaces/compatibility_matrix.xml
705
706# ###############################################################
707# Set up final options.
708# ###############################################################
709
710# We run gcc/clang with PWD=/proc/self/cwd to remove the $TOP
711# from the debug output. That way two builds in two different
712# directories will create the same output.
713# /proc doesn't exist on Darwin.
714ifeq ($(HOST_OS),linux)
715RELATIVE_PWD := PWD=/proc/self/cwd
716else
717RELATIVE_PWD :=
718endif
719
720TARGET_PROJECT_INCLUDES :=
721TARGET_PROJECT_SYSTEM_INCLUDES := \
722		$(TARGET_DEVICE_KERNEL_HEADERS) $(TARGET_BOARD_KERNEL_HEADERS) \
723		$(TARGET_PRODUCT_KERNEL_HEADERS)
724
725ifdef TARGET_2ND_ARCH
726$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_PROJECT_INCLUDES := $(TARGET_PROJECT_INCLUDES)
727$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_PROJECT_SYSTEM_INCLUDES := $(TARGET_PROJECT_SYSTEM_INCLUDES)
728endif
729
730# allow overriding default Java libraries on a per-target basis
731ifeq ($(TARGET_DEFAULT_JAVA_LIBRARIES),)
732  TARGET_DEFAULT_JAVA_LIBRARIES := core-oj core-libart ext framework okhttp
733endif
734
735# Flags for DEX2OAT
736first_non_empty_of_three = $(if $(1),$(1),$(if $(2),$(2),$(3)))
737DEX2OAT_TARGET_ARCH := $(TARGET_ARCH)
738DEX2OAT_TARGET_CPU_VARIANT := $(call first_non_empty_of_three,$(TARGET_CPU_VARIANT),$(TARGET_ARCH_VARIANT),default)
739DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default
740
741ifdef TARGET_2ND_ARCH
742$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH := $(TARGET_2ND_ARCH)
743$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT := $(call first_non_empty_of_three,$(TARGET_2ND_CPU_VARIANT),$(TARGET_2ND_ARCH_VARIANT),default)
744$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default
745endif
746
747# These will come from Soong, drop the environment versions
748unexport CLANG
749unexport CLANG_CXX
750unexport CCC_CC
751unexport CCC_CXX
752
753# ###############################################################
754# Collect a list of the SDK versions that we could compile against
755# For use with the LOCAL_SDK_VERSION variable for include $(BUILD_PACKAGE)
756# ###############################################################
757
758HISTORICAL_SDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/sdk
759HISTORICAL_NDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/ndk
760
761# The path where app can reference the support library resources.
762ifdef TARGET_BUILD_APPS
763SUPPORT_LIBRARY_ROOT := $(HISTORICAL_SDK_VERSIONS_ROOT)/current/support
764else
765SUPPORT_LIBRARY_ROOT := frameworks/support
766endif
767
768# Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N.
769# The 'current' version is whatever this source tree is.
770#
771# sgrax     is the opposite of xargs.  It takes the list of args and puts them
772#           on each line for sort to process.
773# sort -g   is a numeric sort, so 1 2 3 10 instead of 1 10 2 3.
774
775# Numerically sort a list of numbers
776# $(1): the list of numbers to be sorted
777define numerically_sort
778$(shell function sgrax() { \
779    while [ -n "$$1" ] ; do echo $$1 ; shift ; done \
780    } ; \
781    ( sgrax $(1) | sort -g ) )
782endef
783
784TARGET_AVAILABLE_SDK_VERSIONS := $(call numerically_sort,\
785    $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/android.jar,%, \
786    $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/android.jar)))
787
788# We don't have prebuilt test_current SDK yet.
789TARGET_AVAILABLE_SDK_VERSIONS := test_current $(TARGET_AVAILABLE_SDK_VERSIONS)
790
791INTERNAL_PLATFORM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/public_api.txt
792INTERNAL_PLATFORM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/removed.txt
793INTERNAL_PLATFORM_SYSTEM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-api.txt
794INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-removed.txt
795INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-exact.txt
796INTERNAL_PLATFORM_TEST_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/test-api.txt
797INTERNAL_PLATFORM_TEST_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/test-removed.txt
798INTERNAL_PLATFORM_TEST_EXACT_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/test-exact.txt
799
800# This is the standard way to name a directory containing prebuilt target
801# objects. E.g., prebuilt/$(TARGET_PREBUILT_TAG)/libc.so
802TARGET_PREBUILT_TAG := android-$(TARGET_ARCH)
803ifdef TARGET_2ND_ARCH
804TARGET_2ND_PREBUILT_TAG := android-$(TARGET_2ND_ARCH)
805endif
806
807# Set up RS prebuilt variables for compatibility library
808
809RS_PREBUILT_CLCORE := prebuilts/sdk/renderscript/lib/$(TARGET_ARCH)/librsrt_$(TARGET_ARCH).bc
810RS_PREBUILT_COMPILER_RT := prebuilts/sdk/renderscript/lib/$(TARGET_ARCH)/libcompiler_rt.a
811ifeq (true,$(TARGET_IS_64_BIT))
812RS_PREBUILT_LIBPATH := -L prebuilts/ndk/current/platforms/android-21/arch-$(TARGET_ARCH)/usr/lib64 \
813                       -L prebuilts/ndk/current/platforms/android-21/arch-$(TARGET_ARCH)/usr/lib
814else
815RS_PREBUILT_LIBPATH := -L prebuilts/ndk/current/platforms/android-9/arch-$(TARGET_ARCH)/usr/lib
816endif
817
818# API Level lists for Renderscript Compat lib.
819RSCOMPAT_32BIT_ONLY_API_LEVELS := 8 9 10 11 12 13 14 15 16 17 18 19 20
820RSCOMPAT_NO_USAGEIO_API_LEVELS := 8 9 10 11 12 13
821
822ifeq ($(JAVA_NOT_REQUIRED),true)
823# Remove java and tools from our path so that we make sure nobody uses them.
824unexport ANDROID_JAVA_HOME
825unexport JAVA_HOME
826export ANDROID_BUILD_PATHS:=$(abspath $(BUILD_SYSTEM)/no_java_path):$(ANDROID_BUILD_PATHS)
827export PATH:=$(abspath $(BUILD_SYSTEM)/no_java_path):$(PATH)
828endif
829
830# Projects clean of compiler warnings should be compiled with -Werror.
831# If most modules in a directory such as external/ have warnings,
832# the directory should be in ANDROID_WARNING_ALLOWED_PROJECTS list.
833# When some of its subdirectories are cleaned up, the subdirectories
834# can be added into ANDROID_WARNING_DISALLOWED_PROJECTS list, e.g.
835# external/fio/.
836ANDROID_WARNING_DISALLOWED_PROJECTS := \
837    art/% \
838    bionic/% \
839    external/fio/% \
840    hardware/interfaces/% \
841
842define find_warning_disallowed_projects
843    $(filter $(ANDROID_WARNING_DISALLOWED_PROJECTS),$(1)/)
844endef
845
846# Projects with compiler warnings are compiled without -Werror.
847ANDROID_WARNING_ALLOWED_PROJECTS := \
848    bootable/% \
849    cts/% \
850    dalvik/% \
851    development/% \
852    device/% \
853    external/% \
854    frameworks/% \
855    hardware/% \
856    packages/% \
857    system/% \
858    test/vts/% \
859    tools/adt/idea/android/ultimate/get_modification_time/jni/% \
860    vendor/% \
861
862define find_warning_allowed_projects
863    $(filter $(ANDROID_WARNING_ALLOWED_PROJECTS),$(1)/)
864endef
865
866# These goals don't need to collect and include Android.mks/CleanSpec.mks
867# in the source tree.
868dont_bother_goals := clean clobber dataclean installclean \
869    help out \
870    snod systemimage-nodeps \
871    stnod systemtarball-nodeps \
872    userdataimage-nodeps userdatatarball-nodeps \
873    cacheimage-nodeps \
874    bptimage-nodeps \
875    vnod vendorimage-nodeps \
876    systemotherimage-nodeps \
877    ramdisk-nodeps \
878    bootimage-nodeps \
879    recoveryimage-nodeps \
880    vbmetaimage-nodeps \
881    product-graph dump-products
882
883ifndef KATI
884include $(BUILD_SYSTEM)/ninja_config.mk
885include $(BUILD_SYSTEM)/soong_config.mk
886endif
887
888include $(BUILD_SYSTEM)/dumpvar.mk
889