msm8937-common: Migrate to versioned VNDK layout

Change-Id: Ia766c6e43ae162e79a7dc1b792e7ba3017da0cdd
This commit is contained in:
Logan Chien 2018-08-12 08:52:21 +00:00 committed by Darshan Manjrekar
parent 3230c5785f
commit cca4efdd0e

View file

@ -37,10 +37,18 @@ EXTRA_VENDOR_LIBRARIES := \
vendor.display.config@1.0 \
vendor.qti.hardware.iop@1.0
INSTALL_IN_HW_SUBDIR := android.hidl.memory@1.0-impl
#-------------------------------------------------------------------------------
# VNDK Modules
#-------------------------------------------------------------------------------
ifdef PLATFORM_VNDK_VERSION
VNDK_SP_DIR := vndk-sp-$(PLATFORM_VNDK_VERSION)
else
VNDK_SP_DIR := vndk-sp
endif
LOCAL_PATH := $(call my-dir)
define define-vndk-lib
@ -53,7 +61,7 @@ LOCAL_MULTILIB := first
LOCAL_MODULE_TAGS := optional
LOCAL_INSTALLED_MODULE_STEM := $1.so
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_RELATIVE_PATH := $3
LOCAL_MODULE_RELATIVE_PATH := $3$(if $(filter $1,$(INSTALL_IN_HW_SUBDIR)),/hw)
LOCAL_VENDOR_MODULE := $4
include $$(BUILD_PREBUILT)
@ -68,7 +76,7 @@ LOCAL_MULTILIB := 32
LOCAL_MODULE_TAGS := optional
LOCAL_INSTALLED_MODULE_STEM := $1.so
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_RELATIVE_PATH := $3
LOCAL_MODULE_RELATIVE_PATH := $3$(if $(filter $1,$(INSTALL_IN_HW_SUBDIR)),/hw)
LOCAL_VENDOR_MODULE := $4
include $$(BUILD_PREBUILT)
endif # TARGET_TRANSLATE_2ND_ARCH is not true
@ -76,12 +84,13 @@ endif # TARGET_2ND_ARCH is not empty
endef
$(foreach lib,$(VNDK_SP_LIBRARIES),\
$(eval $(call define-vndk-lib,$(lib),vndk-sp-gen,vndk-sp,)))
$(eval $(call define-vndk-lib,$(lib),vndk-sp-gen,$(VNDK_SP_DIR),)))
$(foreach lib,$(VNDK_SP_EXT_LIBRARIES),\
$(eval $(call define-vndk-lib,$(lib),vndk-sp-ext-gen,vndk-sp,true)))
$(eval $(call define-vndk-lib,$(lib),vndk-sp-ext-gen,$(VNDK_SP_DIR),true)))
$(foreach lib,$(EXTRA_VENDOR_LIBRARIES),\
$(eval $(call define-vndk-lib,$(lib),vndk-ext-gen,,true)))
VNDK_SP_DIR :=
#-------------------------------------------------------------------------------
# Phony Package
@ -95,3 +104,8 @@ LOCAL_REQUIRED_MODULES := \
$(addsuffix .vndk-sp-ext-gen,$(VNDK_SP_EXT_LIBRARIES)) \
$(addsuffix .vndk-ext-gen,$(EXTRA_VENDOR_LIBRARIES))
include $(BUILD_PHONY_PACKAGE)
VNDK_SP_LIBRARIES :=
VNDK_SP_EXT_LIBRARIES :=
EXTRA_VENDOR_LIBRARIES :=
INSTALL_IN_HW_SUBDIR :=