• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1ifeq ($(filter address,$(SANITIZE_HOST)),)
2NINJA ?= prebuilts/build-tools/$(HOST_PREBUILT_TAG)/bin/ninja
3else
4NINJA ?= prebuilts/build-tools/$(HOST_PREBUILT_TAG)/asan/bin/ninja
5endif
6
7KATI_OUTPUT_PATTERNS := $(OUT_DIR)/build%.ninja $(OUT_DIR)/ninja%.sh
8
9# Modifier goals we don't need to pass to Ninja.
10NINJA_EXCLUDE_GOALS := all
11
12# A list of goals which affect parsing of makefiles and we need to pass to Kati.
13PARSE_TIME_MAKE_GOALS := \
14	$(PARSE_TIME_MAKE_GOALS) \
15	$(dont_bother_goals) \
16	all \
17	ECLIPSE-% \
18	brillo_tests \
19	btnod \
20	build-art% \
21	build_kernel-nodeps \
22	clean-oat% \
23	continuous_instrumentation_tests \
24	continuous_native_tests \
25	cts \
26	custom_images \
27	dicttool_aosp \
28	dump-products \
29	eng \
30	oem_image \
31	online-system-api-sdk-docs \
32	product-graph \
33	samplecode \
34	sdk \
35	sdk_addon \
36	sdk_repo \
37	stnod \
38	test-art% \
39	user \
40	userdataimage \
41	userdebug \
42	win_sdk \
43	winsdk-tools
44
45include $(wildcard vendor/*/build/ninja_config.mk)
46
47# Any Android goals that need to be built.
48ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS),\
49    $(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS)))
50# Goals we need to pass to Ninja.
51NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS))
52ifndef NINJA_GOALS
53  NINJA_GOALS := droid
54endif
55# Goals we need to pass to Kati.
56KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS))
57