forked from openkylin/platform_build
Support to switch between prebuilt and buiding from source
For target shared library and executable. Change-Id: I40a4e4e0c971811ac60e9bd04206f2422387d3d0
This commit is contained in:
parent
b6fd569c0c
commit
4c49372c53
|
@ -12,6 +12,17 @@ ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),)
|
|||
LOCAL_MODULE_SUFFIX := $(TARGET_EXECUTABLE_SUFFIX)
|
||||
endif
|
||||
|
||||
$(call target-executable-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
|
||||
####################################################
|
||||
|
@ -61,3 +72,5 @@ else
|
|||
$(linked_module): $(my_target_crtbegin_dynamic_o) $(all_objects) $(all_libraries) $(my_target_crtend_o)
|
||||
$(transform-o-to-executable)
|
||||
endif
|
||||
|
||||
endif # skip_build_from_source
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue