blob: f456b8b161c506eb0e36c99a3bc326d5d65f17ba [file] [log] [blame]
Dan Willemsen04f53ed2016-11-09 17:22:15 -08001ifeq ($(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 := showcommands all dist
11.PHONY : $(NINJA_EXCLUDE_GOALS)
12
13# A list of goals which affect parsing of makefiles and we need to pass to Kati.
14PARSE_TIME_MAKE_GOALS := \
15 $(PARSE_TIME_MAKE_GOALS) \
16 $(dont_bother_goals) \
17 all \
18 APP-% \
19 DUMP_% \
20 ECLIPSE-% \
21 PRODUCT-% \
22 AUX-% \
23 boottarball-nodeps \
24 brillo_tests \
25 btnod \
26 build-art% \
27 build_kernel-nodeps \
28 clean-oat% \
29 continuous_instrumentation_tests \
30 continuous_native_tests \
31 cts \
32 custom_images \
33 deps-license \
34 dicttool_aosp \
35 dist \
36 dump-products \
37 eng \
38 fusion \
39 oem_image \
40 online-system-api-sdk-docs \
41 pdk \
42 platform \
43 platform-java \
44 product-graph \
45 samplecode \
46 sdk \
47 sdk_addon \
48 sdk_repo \
49 snod \
50 stnod \
51 systemimage-nodeps \
52 systemtarball-nodeps \
53 target-files-package \
54 test-art% \
55 user \
56 userdataimage \
57 userdebug \
58 valgrind-test-art% \
59 vts \
60 win_sdk \
61 winsdk-tools
62
Dan Willemsen1ff5fa12016-11-10 19:41:27 -080063include $(wildcard vendor/*/build/ninja_config.mk)
64
Dan Willemsen04f53ed2016-11-09 17:22:15 -080065# Any Android goals that need to be built.
66ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS) $(CKATI) $(MAKEPARALLEL),\
67 $(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS)))
68# Goals we need to pass to Ninja.
69NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS))
70# Goals we need to pass to Kati.
71KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS))