Home | History | Annotate | Download | only in core
      1 ###########################################################
      2 ## Standard rules for building a normal shared library.
      3 ##
      4 ## Additional inputs from base_rules.make:
      5 ## None.
      6 ##
      7 ## LOCAL_MODULE_SUFFIX will be set for you.
      8 ###########################################################
      9 
     10 ifeq ($(strip $(LOCAL_MODULE_CLASS)),)
     11 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     12 endif
     13 ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),)
     14 LOCAL_MODULE_SUFFIX := $($(my_prefix)SHLIB_SUFFIX)
     15 endif
     16 ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
     17 $(error $(LOCAL_PATH): Cannot set module stem for a library)
     18 endif
     19 
     20 ifdef host-shared-library-hook
     21 $(call host-shared-library-hook)
     22 endif
     23 
     24 skip_build_from_source :=
     25 ifdef LOCAL_PREBUILT_MODULE_FILE
     26 ifeq (,$(call if-build-from-source,$(LOCAL_MODULE),$(LOCAL_PATH)))
     27 include $(BUILD_SYSTEM)/prebuilt_internal.mk
     28 skip_build_from_source := true
     29 endif
     30 endif
     31 
     32 ifndef skip_build_from_source
     33 
     34 include $(BUILD_SYSTEM)/binary.mk
     35 
     36 my_host_libprofile_rt := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)LIBPROFILE_RT)
     37 $(LOCAL_BUILT_MODULE): PRIVATE_HOST_LIBPROFILE_RT := $(my_host_libprofile_rt)
     38 
     39 $(LOCAL_BUILT_MODULE): \
     40         $(all_objects) \
     41         $(all_libraries) \
     42         $(LOCAL_ADDITIONAL_DEPENDENCIES)
     43 	$(transform-host-o-to-shared-lib)
     44 
     45 endif  # skip_build_from_source
     46