github.com/westcoastroms/westcoastroms-build@v0.0.0-20190928114312-2350e5a73030/build/make/core/host_shared_library_internal.mk (about)

     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 $(OVERRIDE_BUILT_MODULE_PATH)),)
    17  $(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
    18  endif
    19  ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
    20  $(error $(LOCAL_PATH): Cannot set module stem for a library)
    21  endif
    22  
    23  ifdef host-shared-library-hook
    24  $(call host-shared-library-hook)
    25  endif
    26  
    27  skip_build_from_source :=
    28  ifdef LOCAL_PREBUILT_MODULE_FILE
    29  ifeq (,$(call if-build-from-source,$(LOCAL_MODULE),$(LOCAL_PATH)))
    30  include $(BUILD_SYSTEM)/prebuilt_internal.mk
    31  skip_build_from_source := true
    32  endif
    33  endif
    34  
    35  ifndef skip_build_from_source
    36  
    37  # Put the built modules of all shared libraries in a common directory
    38  # to simplify the link line.
    39  OVERRIDE_BUILT_MODULE_PATH := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_INTERMEDIATE_LIBRARIES)
    40  
    41  include $(BUILD_SYSTEM)/binary.mk
    42  
    43  my_host_libprofile_rt := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)LIBPROFILE_RT)
    44  $(LOCAL_BUILT_MODULE): PRIVATE_HOST_LIBPROFILE_RT := $(my_host_libprofile_rt)
    45  
    46  $(LOCAL_BUILT_MODULE): \
    47          $(all_objects) \
    48          $(all_libraries) \
    49          $(LOCAL_ADDITIONAL_DEPENDENCIES)
    50  	$(transform-host-o-to-shared-lib)
    51  
    52  endif  # skip_build_from_source