blob: ca2dceecec45c74f0e44afe16fa8f6a62645e5d7 [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.
Dan Willemsen9bfcbc82017-05-25 21:25:24 -070010NINJA_EXCLUDE_GOALS := all dist APP-% PRODUCT-%
Dan Willemsen04f53ed2016-11-09 17:22:15 -080011
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 \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080017 ECLIPSE-% \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080018 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 dist \
32 dump-products \
33 eng \
34 fusion \
35 oem_image \
36 online-system-api-sdk-docs \
37 pdk \
38 platform \
39 platform-java \
40 product-graph \
41 samplecode \
42 sdk \
43 sdk_addon \
44 sdk_repo \
45 snod \
46 stnod \
47 systemimage-nodeps \
48 systemtarball-nodeps \
49 target-files-package \
50 test-art% \
51 user \
52 userdataimage \
53 userdebug \
54 valgrind-test-art% \
55 vts \
56 win_sdk \
57 winsdk-tools
58
Dan Willemsen1ff5fa12016-11-10 19:41:27 -080059include $(wildcard vendor/*/build/ninja_config.mk)
60
Dan Willemsen04f53ed2016-11-09 17:22:15 -080061# Any Android goals that need to be built.
62ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS) $(CKATI) $(MAKEPARALLEL),\
63 $(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS)))
64# Goals we need to pass to Ninja.
65NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS))
Dan Willemsen9bfcbc82017-05-25 21:25:24 -070066ifndef NINJA_GOALS
67 NINJA_GOALS := droid
68endif
Dan Willemsen04f53ed2016-11-09 17:22:15 -080069# Goals we need to pass to Kati.
Dan Willemsen9bfcbc82017-05-25 21:25:24 -070070KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS))