1$(call record-module-type,SHARED_LIBRARY) 2ifdef LOCAL_IS_HOST_MODULE 3 $(call pretty-error,BUILD_SHARED_LIBRARY is incompatible with LOCAL_IS_HOST_MODULE. Use BUILD_HOST_SHARED_LIBRARY instead.) 4endif 5my_prefix := TARGET_ 6include $(BUILD_SYSTEM)/multilib.mk 7 8ifndef my_module_multilib 9# libraries default to building for both architecturess 10my_module_multilib := both 11endif 12 13ifeq ($(my_module_multilib),both) 14ifneq ($(LOCAL_MODULE_PATH),) 15ifneq ($(TARGET_2ND_ARCH),) 16$(error $(LOCAL_MODULE): LOCAL_MODULE_PATH for shared libraries is unsupported in multiarch builds, use LOCAL_MODULE_RELATIVE_PATH instead) 17endif 18endif 19 20ifneq ($(LOCAL_UNSTRIPPED_PATH),) 21ifneq ($(TARGET_2ND_ARCH),) 22$(error $(LOCAL_MODULE): LOCAL_UNSTRIPPED_PATH for shared libraries is unsupported in multiarch builds) 23endif 24endif 25endif # my_module_multilib == both 26 27 28LOCAL_2ND_ARCH_VAR_PREFIX := 29include $(BUILD_SYSTEM)/module_arch_supported.mk 30 31ifeq ($(my_module_arch_supported),true) 32include $(BUILD_SYSTEM)/shared_library_internal.mk 33endif 34 35ifdef TARGET_2ND_ARCH 36 37LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) 38include $(BUILD_SYSTEM)/module_arch_supported.mk 39 40ifeq ($(my_module_arch_supported),true) 41# Build for TARGET_2ND_ARCH 42LOCAL_BUILT_MODULE := 43LOCAL_INSTALLED_MODULE := 44LOCAL_INTERMEDIATE_TARGETS := 45 46include $(BUILD_SYSTEM)/shared_library_internal.mk 47 48endif 49 50LOCAL_2ND_ARCH_VAR_PREFIX := 51 52endif # TARGET_2ND_ARCH 53 54my_module_arch_supported := 55 56########################################################### 57## Copy headers to the install tree 58########################################################### 59ifdef LOCAL_COPY_HEADERS 60$(if $(filter true,$(BUILD_BROKEN_USES_BUILD_COPY_HEADERS)),\ 61 $(call pretty-warning,LOCAL_COPY_HEADERS is deprecated. See $(CHANGES_URL)#copy_headers),\ 62 $(call pretty-error,LOCAL_COPY_HEADERS is obsolete. See $(CHANGES_URL)#copy_headers)) 63include $(BUILD_SYSTEM)/copy_headers.mk 64endif 65