From 6c86a133c76aa0ff84f4a41113c5e0048131314c Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Mon, 25 Feb 2013 18:12:11 -0800 Subject: [PATCH] Use $(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES To disentangle the host/target shared library dependencies. Change-Id: I3122b370a7c24425861ab6dba91e6d8d84b27249 --- core/prebuilt.mk | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/prebuilt.mk b/core/prebuilt.mk index 46771e4d7..6b8e3f8c9 100644 --- a/core/prebuilt.mk +++ b/core/prebuilt.mk @@ -39,9 +39,6 @@ else prebuilt_module_is_a_library := endif -# Install the shared libraries if necessary -LOCAL_REQUIRED_MODULES += $(LOCAL_SHARED_LIBRARIES) - # Don't install static libraries by default. ifndef LOCAL_UNINSTALLABLE_MODULE ifeq (STATIC_LIBRARIES,$(LOCAL_MODULE_CLASS)) @@ -61,7 +58,7 @@ ifeq ($(LOCAL_STRIP_MODULE),true) endif include $(BUILD_SYSTEM)/dynamic_binary.mk built_module := $(linked_module) -else +else # LOCAL_STRIP_MODULE not true include $(BUILD_SYSTEM)/base_rules.mk built_module := $(LOCAL_BUILT_MODULE) @@ -81,7 +78,16 @@ endif $(LOCAL_BUILT_MODULE) : | $(intermediates)/export_includes endif # prebuilt_module_is_a_library + +# The real dependency will be added after all Android.mks are loaded and the install paths +# of the shared libraries are determined. +ifdef LOCAL_INSTALLED_MODULE +ifdef LOCAL_SHARED_LIBRARIES +$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += $(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(LOCAL_SHARED_LIBRARIES)) endif +endif + +endif # LOCAL_STRIP_MODULE not true PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))