• 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 APP-% PRODUCT-%
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	AUX-% \
19	boottarball-nodeps \
20	brillo_tests \
21	btnod \
22	build-art% \
23	build_kernel-nodeps \
24	clean-oat% \
25	continuous_instrumentation_tests \
26	continuous_native_tests \
27	cts \
28	custom_images \
29	deps-license \
30	dicttool_aosp \
31	dump-products \
32	eng \
33	fusion \
34	oem_image \
35	online-system-api-sdk-docs \
36	pdk \
37	platform \
38	platform-java \
39	product-graph \
40	samplecode \
41	sdk \
42	sdk_addon \
43	sdk_repo \
44	snod \
45	stnod \
46	systemimage-nodeps \
47	systemtarball-nodeps \
48	target-files-package \
49	test-art% \
50	user \
51	userdataimage \
52	userdebug \
53	vts \
54	win_sdk \
55	winsdk-tools
56
57include $(wildcard vendor/*/build/ninja_config.mk)
58
59# Any Android goals that need to be built.
60ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS) $(CKATI) $(MAKEPARALLEL),\
61    $(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS)))
62# Goals we need to pass to Ninja.
63NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS))
64ifndef NINJA_GOALS
65  NINJA_GOALS := droid
66endif
67# Goals we need to pass to Kati.
68KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS))
69