2016-11-10 02:22:15 +01:00
|
|
|
ifeq ($(filter address,$(SANITIZE_HOST)),)
|
|
|
|
NINJA ?= prebuilts/build-tools/$(HOST_PREBUILT_TAG)/bin/ninja
|
|
|
|
else
|
|
|
|
NINJA ?= prebuilts/build-tools/$(HOST_PREBUILT_TAG)/asan/bin/ninja
|
|
|
|
endif
|
|
|
|
|
|
|
|
KATI_OUTPUT_PATTERNS := $(OUT_DIR)/build%.ninja $(OUT_DIR)/ninja%.sh
|
|
|
|
|
|
|
|
# Modifier goals we don't need to pass to Ninja.
|
2018-10-21 06:37:44 +02:00
|
|
|
NINJA_EXCLUDE_GOALS := all APP-% PRODUCT-%
|
2016-11-10 02:22:15 +01:00
|
|
|
|
|
|
|
# A list of goals which affect parsing of makefiles and we need to pass to Kati.
|
|
|
|
PARSE_TIME_MAKE_GOALS := \
|
|
|
|
$(PARSE_TIME_MAKE_GOALS) \
|
|
|
|
$(dont_bother_goals) \
|
|
|
|
all \
|
|
|
|
ECLIPSE-% \
|
|
|
|
AUX-% \
|
|
|
|
boottarball-nodeps \
|
|
|
|
brillo_tests \
|
|
|
|
btnod \
|
2018-03-07 17:24:54 +01:00
|
|
|
build-art% \
|
2016-11-10 02:22:15 +01:00
|
|
|
build_kernel-nodeps \
|
2018-03-07 17:24:54 +01:00
|
|
|
clean-oat% \
|
2016-11-10 02:22:15 +01:00
|
|
|
continuous_instrumentation_tests \
|
|
|
|
continuous_native_tests \
|
|
|
|
cts \
|
|
|
|
custom_images \
|
|
|
|
deps-license \
|
|
|
|
dicttool_aosp \
|
|
|
|
dump-products \
|
|
|
|
eng \
|
|
|
|
fusion \
|
|
|
|
oem_image \
|
|
|
|
online-system-api-sdk-docs \
|
|
|
|
pdk \
|
|
|
|
platform \
|
|
|
|
platform-java \
|
|
|
|
product-graph \
|
|
|
|
samplecode \
|
|
|
|
sdk \
|
|
|
|
sdk_addon \
|
|
|
|
sdk_repo \
|
|
|
|
snod \
|
|
|
|
stnod \
|
|
|
|
systemimage-nodeps \
|
|
|
|
systemtarball-nodeps \
|
|
|
|
target-files-package \
|
2018-03-07 17:24:54 +01:00
|
|
|
test-art% \
|
2016-11-10 02:22:15 +01:00
|
|
|
user \
|
|
|
|
userdataimage \
|
|
|
|
userdebug \
|
2018-03-07 17:24:54 +01:00
|
|
|
valgrind-test-art% \
|
2016-11-10 02:22:15 +01:00
|
|
|
vts \
|
|
|
|
win_sdk \
|
|
|
|
winsdk-tools
|
|
|
|
|
2016-11-11 04:41:27 +01:00
|
|
|
include $(wildcard vendor/*/build/ninja_config.mk)
|
|
|
|
|
2016-11-10 02:22:15 +01:00
|
|
|
# Any Android goals that need to be built.
|
|
|
|
ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS) $(CKATI) $(MAKEPARALLEL),\
|
|
|
|
$(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS)))
|
|
|
|
# Goals we need to pass to Ninja.
|
|
|
|
NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS))
|
2017-05-26 06:25:24 +02:00
|
|
|
ifndef NINJA_GOALS
|
|
|
|
NINJA_GOALS := droid
|
|
|
|
endif
|
2016-11-10 02:22:15 +01:00
|
|
|
# Goals we need to pass to Kati.
|
2017-05-26 06:25:24 +02:00
|
|
|
KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS))
|