16feb6d5607ce86a446645564212043964628f540Ying Wang########################################################### 26feb6d5607ce86a446645564212043964628f540Ying Wang## Standard rules for building a normal shared library. 36feb6d5607ce86a446645564212043964628f540Ying Wang## 46feb6d5607ce86a446645564212043964628f540Ying Wang## Additional inputs from base_rules.make: 56feb6d5607ce86a446645564212043964628f540Ying Wang## None. 66feb6d5607ce86a446645564212043964628f540Ying Wang## 76feb6d5607ce86a446645564212043964628f540Ying Wang## LOCAL_MODULE_SUFFIX will be set for you. 86feb6d5607ce86a446645564212043964628f540Ying Wang########################################################### 96feb6d5607ce86a446645564212043964628f540Ying Wang 106feb6d5607ce86a446645564212043964628f540Ying WangLOCAL_IS_HOST_MODULE := true 116feb6d5607ce86a446645564212043964628f540Ying Wang 126feb6d5607ce86a446645564212043964628f540Ying Wangifeq ($(strip $(LOCAL_MODULE_CLASS)),) 136feb6d5607ce86a446645564212043964628f540Ying WangLOCAL_MODULE_CLASS := SHARED_LIBRARIES 146feb6d5607ce86a446645564212043964628f540Ying Wangendif 156feb6d5607ce86a446645564212043964628f540Ying Wangifeq ($(strip $(LOCAL_MODULE_SUFFIX)),) 166feb6d5607ce86a446645564212043964628f540Ying WangLOCAL_MODULE_SUFFIX := $(HOST_SHLIB_SUFFIX) 176feb6d5607ce86a446645564212043964628f540Ying Wangendif 186feb6d5607ce86a446645564212043964628f540Ying Wangifneq ($(strip $(OVERRIDE_BUILT_MODULE_PATH)),) 196feb6d5607ce86a446645564212043964628f540Ying Wang$(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH) 206feb6d5607ce86a446645564212043964628f540Ying Wangendif 216feb6d5607ce86a446645564212043964628f540Ying Wangifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),) 226feb6d5607ce86a446645564212043964628f540Ying Wang$(error $(LOCAL_PATH): Cannot set module stem for a library) 236feb6d5607ce86a446645564212043964628f540Ying Wangendif 246feb6d5607ce86a446645564212043964628f540Ying Wang 256feb6d5607ce86a446645564212043964628f540Ying Wang$(call host-shared-library-hook) 266feb6d5607ce86a446645564212043964628f540Ying Wang 276feb6d5607ce86a446645564212043964628f540Ying Wangskip_build_from_source := 286feb6d5607ce86a446645564212043964628f540Ying Wangifdef LOCAL_PREBUILT_MODULE_FILE 296feb6d5607ce86a446645564212043964628f540Ying Wangifeq (,$(call if-build-from-source,$(LOCAL_MODULE),$(LOCAL_PATH))) 306feb6d5607ce86a446645564212043964628f540Ying Wanginclude $(BUILD_SYSTEM)/prebuilt_internal.mk 316feb6d5607ce86a446645564212043964628f540Ying Wangskip_build_from_source := true 326feb6d5607ce86a446645564212043964628f540Ying Wangendif 336feb6d5607ce86a446645564212043964628f540Ying Wangendif 346feb6d5607ce86a446645564212043964628f540Ying Wang 356feb6d5607ce86a446645564212043964628f540Ying Wangifndef skip_build_from_source 366feb6d5607ce86a446645564212043964628f540Ying Wang 376feb6d5607ce86a446645564212043964628f540Ying Wang# Put the built modules of all shared libraries in a common directory 386feb6d5607ce86a446645564212043964628f540Ying Wang# to simplify the link line. 396feb6d5607ce86a446645564212043964628f540Ying WangOVERRIDE_BUILT_MODULE_PATH := $($(LOCAL_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES) 406feb6d5607ce86a446645564212043964628f540Ying Wang 416feb6d5607ce86a446645564212043964628f540Ying Wanginclude $(BUILD_SYSTEM)/binary.mk 426feb6d5607ce86a446645564212043964628f540Ying Wang 436feb6d5607ce86a446645564212043964628f540Ying Wang$(LOCAL_BUILT_MODULE): $(all_objects) $(all_libraries) $(LOCAL_ADDITIONAL_DEPENDENCIES) 446feb6d5607ce86a446645564212043964628f540Ying Wang $(transform-host-o-to-shared-lib) 456feb6d5607ce86a446645564212043964628f540Ying Wang 466feb6d5607ce86a446645564212043964628f540Ying Wangendif # skip_build_from_source 47