2014-11-25 13:52:26 +01:00
|
|
|
# include this makefile to create the LOCAL_MODULE symlink to the primary version binary.
|
|
|
|
# but this requires the primary version name specified via LOCAL_MODULE_STEM_32 or LOCAL_MODULE_STEM_64,
|
|
|
|
# and different with the LOCAL_MODULE value
|
2014-05-07 06:41:24 +02:00
|
|
|
#
|
2014-11-25 13:52:26 +01:00
|
|
|
# Note: now only limited to the binaries that will be installed under system/bin directory
|
2014-05-07 06:41:24 +02:00
|
|
|
|
2014-05-14 19:26:48 +02:00
|
|
|
# Create link to the one used depending on the target
|
2020-04-18 00:46:55 +02:00
|
|
|
# configuration.
|
2014-06-25 09:04:30 +02:00
|
|
|
ifneq ($(LOCAL_IS_HOST_MODULE),true)
|
2014-11-25 13:52:26 +01:00
|
|
|
my_symlink := $(addprefix $(TARGET_OUT)/bin/, $(LOCAL_MODULE))
|
2016-07-15 01:02:57 +02:00
|
|
|
my_src_binary_name :=
|
2014-06-25 09:04:30 +02:00
|
|
|
ifeq ($(TARGET_IS_64_BIT),true)
|
2014-06-28 22:49:26 +02:00
|
|
|
ifeq ($(TARGET_SUPPORTS_64_BIT_APPS)|$(TARGET_SUPPORTS_32_BIT_APPS),true|true)
|
2020-04-18 00:46:55 +02:00
|
|
|
my_src_binary_name := $(LOCAL_MODULE_STEM_64)
|
2014-06-28 22:49:26 +02:00
|
|
|
else ifeq ($(TARGET_SUPPORTS_64_BIT_APPS),true)
|
|
|
|
# We support only 64 bit apps.
|
2016-07-15 01:02:57 +02:00
|
|
|
my_src_binary_name := $(LOCAL_MODULE_STEM_64)
|
2014-06-25 09:04:30 +02:00
|
|
|
else
|
2014-06-28 22:49:26 +02:00
|
|
|
# We support only 32 bit apps.
|
2016-07-15 01:02:57 +02:00
|
|
|
my_src_binary_name := $(LOCAL_MODULE_STEM_32)
|
2014-06-25 09:04:30 +02:00
|
|
|
endif
|
2014-06-17 17:36:08 +02:00
|
|
|
else
|
2016-07-15 01:02:57 +02:00
|
|
|
my_src_binary_name := $(LOCAL_MODULE_STEM_32)
|
2014-06-17 17:36:08 +02:00
|
|
|
endif
|
2014-05-14 19:26:48 +02:00
|
|
|
else
|
2014-11-25 13:52:26 +01:00
|
|
|
my_symlink := $(addprefix $(HOST_OUT)/bin/, $(LOCAL_MODULE))
|
2016-09-02 22:20:52 +02:00
|
|
|
my_src_binary_name := $(LOCAL_MODULE_STEM_64)
|
2014-05-14 19:26:48 +02:00
|
|
|
endif
|
|
|
|
|
2016-07-15 01:02:57 +02:00
|
|
|
$(call symlink-file,$(my_module_path)/$(my_src_binary_name),$(my_src_binary_name),$(my_symlink))
|
2014-11-25 13:52:26 +01:00
|
|
|
|
|
|
|
# We need this so that the installed files could be picked up based on the
|
|
|
|
# local module name
|
2020-05-08 09:38:46 +02:00
|
|
|
ALL_MODULES.$(my_register_name).INSTALLED += $(my_symlink)
|
2014-11-25 13:52:26 +01:00
|
|
|
|
|
|
|
# Create the symlink when you run mm/mmm or "make <module_name>"
|
|
|
|
$(LOCAL_MODULE) : $(my_symlink)
|
2014-06-25 09:04:30 +02:00
|
|
|
|
2014-05-07 06:41:24 +02:00
|
|
|
my_symlink :=
|