Home | History | Annotate | Download | only in core
      1 ###########################################################
      2 ## Standard rules for building an executable file.
      3 ##
      4 ## Additional inputs from base_rules.make:
      5 ## None.
      6 ###########################################################
      7 
      8 ifeq ($(strip $(LOCAL_MODULE_CLASS)),)
      9 LOCAL_MODULE_CLASS := EXECUTABLES
     10 endif
     11 ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),)
     12 LOCAL_MODULE_SUFFIX := $($(my_prefix)EXECUTABLE_SUFFIX)
     13 endif
     14 
     15 ifdef host-executable-hook
     16 $(call host-executable-hook)
     17 endif
     18 
     19 skip_build_from_source :=
     20 ifdef LOCAL_PREBUILT_MODULE_FILE
     21 ifeq (,$(call if-build-from-source,$(LOCAL_MODULE),$(LOCAL_PATH)))
     22 include $(BUILD_SYSTEM)/prebuilt_internal.mk
     23 skip_build_from_source := true
     24 endif
     25 endif
     26 
     27 ifndef skip_build_from_source
     28 
     29 include $(BUILD_SYSTEM)/binary.mk
     30 
     31 my_host_libprofile_rt := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)LIBPROFILE_RT)
     32 $(LOCAL_BUILT_MODULE): PRIVATE_HOST_LIBPROFILE_RT := $(my_host_libprofile_rt)
     33 
     34 my_libdir := $(notdir $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_SHARED_LIBRARIES))
     35 ifeq ($(LOCAL_MODULE_CLASS),NATIVE_TESTS)
     36 $(LOCAL_BUILT_MODULE): PRIVATE_RPATHS := ../../$(my_libdir) ../../../$(my_libdir)
     37 else
     38 $(LOCAL_BUILT_MODULE): PRIVATE_RPATHS := ../$(my_libdir) $(my_libdir)
     39 endif
     40 my_libdir :=
     41 
     42 $(LOCAL_BUILT_MODULE): $(all_objects) $(all_libraries)
     43 	$(transform-host-o-to-executable)
     44 
     45 endif  # skip_build_from_source
     46