Consolidate the logic for the sdk prebuilt module names.
I'm making some changes to it, and found the names are scattered
in various places. Make a macro and re-use the logic instead.
Bug: 77525052
Test: make droid
Change-Id: I0f2da80b8b4d427353509b27ec720d024eee7a6e
diff --git a/core/config.mk b/core/config.mk
index b3f3d36..0029792 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -956,6 +956,15 @@
SUPPORT_LIBRARY_ROOT := frameworks/support
endif
+# Resolve LOCAL_SDK_VERSION to prebuilt module name, e.g.:
+# 23 -> sdk_v23
+# system_current -> sdk_vsystem_current
+# Note: this also replaces core_X with X (to be removed as there are prebuilts for core now).
+# $(1): An sdk version (LOCAL_SDK_VERSION)
+define resolve-prebuilt-sdk-module
+ sdk_v$(patsubst core_%,%,$(1))
+endef
+
# Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N.
# The 'current' version is whatever this source tree is.
#