summaryrefslogtreecommitdiffstats
path: root/core/shared_library.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2013-01-15 15:28:08 -0800
committerYing Wang <wangying@google.com>2013-01-15 15:28:08 -0800
commit4c49372c53e398324ecd0e6afd4e82eb9117e7ff (patch)
tree50c90a6bf4bc400251a7eff628792caf3837c31c /core/shared_library.mk
parentb6fd569c0c644d40f733fa4700d6a98c8b1faf19 (diff)
downloadbuild-4c49372c53e398324ecd0e6afd4e82eb9117e7ff.zip
build-4c49372c53e398324ecd0e6afd4e82eb9117e7ff.tar.gz
build-4c49372c53e398324ecd0e6afd4e82eb9117e7ff.tar.bz2
Support to switch between prebuilt and buiding from source
For target shared library and executable. Change-Id: I40a4e4e0c971811ac60e9bd04206f2422387d3d0
Diffstat (limited to 'core/shared_library.mk')
-rw-r--r--core/shared_library.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/shared_library.mk b/core/shared_library.mk
index 97442f7..10012df 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -20,6 +20,17 @@ ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
$(error $(LOCAL_PATH): Cannot set module stem for a library)
endif
+$(call target-shared-library-hook)
+
+skip_build_from_source :=
+ifdef LOCAL_PREBUILT_MODULE_FILE
+ifeq (,$(call if-build-from-source,$(LOCAL_MODULE),$(LOCAL_PATH)))
+include $(BUILD_PREBUILT)
+skip_build_from_source := true
+endif
+endif
+
+ifndef skip_build_from_source
####################################################
## Add profiling libraries if aprof is turned
####################################################
@@ -68,3 +79,5 @@ $(linked_module): $(all_objects) $(all_libraries) \
$(LOCAL_ADDITIONAL_DEPENDENCIES) \
$(my_target_crtbegin_so_o) $(my_target_crtend_so_o)
$(transform-o-to-shared-lib)
+
+endif # skip_build_from_source