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