blob: 2b5ceee7964db4c8fa69a81e87a24cd153f41568 [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 Willemsen8a5d5972019-07-29 14:22:05 -070010NINJA_EXCLUDE_GOALS := all
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 brillo_tests \
19 btnod \
Roland Levillain209b96e2018-03-07 16:24:54 +000020 build-art% \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080021 build_kernel-nodeps \
Roland Levillain209b96e2018-03-07 16:24:54 +000022 clean-oat% \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080023 continuous_instrumentation_tests \
24 continuous_native_tests \
25 cts \
26 custom_images \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080027 dicttool_aosp \
Anton Hansson7b2b0b22022-10-07 16:21:04 +000028 docs \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080029 eng \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080030 oem_image \
31 online-system-api-sdk-docs \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080032 product-graph \
33 samplecode \
34 sdk \
35 sdk_addon \
36 sdk_repo \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080037 stnod \
Roland Levillain209b96e2018-03-07 16:24:54 +000038 test-art% \
Dan Willemsen04f53ed2016-11-09 17:22:15 -080039 user \
40 userdataimage \
Dan Willemsen39b81cd2021-09-16 14:23:07 -070041 userdebug
Dan Willemsen04f53ed2016-11-09 17:22:15 -080042
Dan Willemsen1ff5fa12016-11-10 19:41:27 -080043include $(wildcard vendor/*/build/ninja_config.mk)
44
Dan Willemsen04f53ed2016-11-09 17:22:15 -080045# Any Android goals that need to be built.
Dan Willemsen89394892019-07-29 22:39:08 -070046ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS),\
Dan Willemsen04f53ed2016-11-09 17:22:15 -080047 $(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS)))
Dan Willemsen39b81cd2021-09-16 14:23:07 -070048# Temporary compatibility support until the build server configs are updated
49ANDROID_GOALS := $(patsubst win_sdk,sdk,$(ANDROID_GOALS))
50ifneq ($(HOST_OS),linux)
51 ANDROID_GOALS := $(filter-out sdk,$(ANDROID_GOALS))
52 ANDROID_GOALS := $(patsubst sdk_repo,sdk-repo-build-tools sdk-repo-platform-tools,$(ANDROID_GOALS))
53endif
Dan Willemsen04f53ed2016-11-09 17:22:15 -080054# Goals we need to pass to Ninja.
55NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS))
Dan Willemsen9bfcbc82017-05-25 21:25:24 -070056ifndef NINJA_GOALS
57 NINJA_GOALS := droid
58endif
Dan Willemsen04f53ed2016-11-09 17:22:15 -080059# Goals we need to pass to Kati.
Dan Willemsen9bfcbc82017-05-25 21:25:24 -070060KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS))