2014-11-25 00:44:39 +01:00
|
|
|
# Include this makefile to create the LOCAL_MODULE symlink to the primary version binary.
|
|
|
|
# Include this file only after "include $(BUILD_EXECUTABLE)".
|
|
|
|
# It requires the primary version name specified via LOCAL_MODULE_STEM_32 or LOCAL_MODULE_STEM_64,
|
|
|
|
# and different from the LOCAL_MODULE value.
|
2014-05-07 06:41:24 +02:00
|
|
|
#
|
2014-11-25 00:44:39 +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
|
|
|
|
# configuration. Note that we require the TARGET_IS_64_BIT
|
|
|
|
# check because 32 bit targets may not define TARGET_PREFER_32_BIT_APPS
|
|
|
|
# et al. since those variables make no sense in that context.
|
2014-06-25 09:04:30 +02:00
|
|
|
ifneq ($(LOCAL_IS_HOST_MODULE),true)
|
2014-11-25 00:44:39 +01:00
|
|
|
my_symlink := $(TARGET_OUT)/bin/$(LOCAL_MODULE)
|
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)
|
|
|
|
# We support both 32 and 64 bit apps, so we will have to
|
|
|
|
# base our decision on whether the target prefers one or the
|
|
|
|
# other.
|
2014-08-14 16:28:48 +02:00
|
|
|
ifeq ($(TARGET_PREFER_32_BIT_APPS),true)
|
2014-11-25 00:44:39 +01:00
|
|
|
my_symlink_tgt := $(LOCAL_MODULE_STEM_32)
|
2014-06-28 22:49:26 +02:00
|
|
|
else
|
2014-11-25 00:44:39 +01:00
|
|
|
my_symlink_tgt := $(LOCAL_MODULE_STEM_64)
|
2014-06-28 22:49:26 +02:00
|
|
|
endif
|
|
|
|
else ifeq ($(TARGET_SUPPORTS_64_BIT_APPS),true)
|
|
|
|
# We support only 64 bit apps.
|
2014-11-25 00:44:39 +01:00
|
|
|
my_symlink_tgt := $(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.
|
2014-11-25 00:44:39 +01:00
|
|
|
my_symlink_tgt := $(LOCAL_MODULE_STEM_32)
|
2014-06-25 09:04:30 +02:00
|
|
|
endif
|
2014-06-17 17:36:08 +02:00
|
|
|
else
|
2014-11-25 00:44:39 +01:00
|
|
|
my_symlink_tgt := $(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 00:44:39 +01:00
|
|
|
my_symlink := $(HOST_OUT)/bin/$(LOCAL_MODULE)
|
2014-06-25 09:04:30 +02:00
|
|
|
ifneq ($(HOST_PREFER_32_BIT),true)
|
2014-11-25 00:44:39 +01:00
|
|
|
my_symlink_tgt := $(LOCAL_MODULE_STEM_64)
|
2014-06-25 09:04:30 +02:00
|
|
|
else
|
2014-11-25 00:44:39 +01:00
|
|
|
my_symlink_tgt := $(LOCAL_MODULE_STEM_32)
|
2014-06-25 09:04:30 +02:00
|
|
|
endif
|
2014-05-14 19:26:48 +02:00
|
|
|
endif
|
|
|
|
|
2014-11-25 00:44:39 +01:00
|
|
|
# Create the symlink as a post-install command.
|
|
|
|
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD += \
|
|
|
|
ln -sf $(my_symlink_tgt) $(my_symlink)
|
2014-06-25 09:04:30 +02:00
|
|
|
|
2014-11-25 00:44:39 +01:00
|
|
|
my_symlink_tgt :=
|
2014-05-07 06:41:24 +02:00
|
|
|
my_symlink :=
|