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