aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2019-10-03 15:55:57 -0700
committerDan Albert <danalbert@google.com>2019-10-03 16:27:03 -0700
commitbe4034163b8c0a325b42070c9260a8f205efb2ea (patch)
tree93fd7e0d524298a3f650cfbb64dc8c5bebf46e56 /build
parentd68585a19358d55940bd974e012784f8593eada5 (diff)
downloadndk-be4034163b8c0a325b42070c9260a8f205efb2ea.tar.gz
Add ndk-major-at-least API to ndk-build.
Gives apps a standard way to check if their NDK is at least a certain version from ndk-build. CMake has had this for quite some time. Test: manual Bug: None Change-Id: I02bb2a141ede2270c71f0044e6c432097ebda4e0
Diffstat (limited to 'build')
-rw-r--r--build/core/definitions.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/build/core/definitions.mk b/build/core/definitions.mk
index 243a66f79..71dcd237c 100644
--- a/build/core/definitions.mk
+++ b/build/core/definitions.mk
@@ -23,6 +23,10 @@ include $(BUILD_SYSTEM)/definitions-utils.mk
include $(BUILD_SYSTEM)/definitions-host.mk
include $(BUILD_SYSTEM)/definitions-graph.mk
+include $(BUILD_SYSTEM)/version.mk
+
+ndk-major-at-least = $(if $(filter $(true),$(call gte,$(NDK_MAJOR),$1)),true,false)
+
# -----------------------------------------------------------------------------
# Macro : this-makefile
# Returns : the name of the current Makefile in the inclusion stack