summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2020-02-22 11:30:37 +0800
committerMichael Bestas <mkbestas@lineageos.org>2020-04-30 00:49:34 +0300
commit69879825f718dbbb7caf5fc41d8f6e43376b008d (patch)
tree7be1f34258bd7ccc7ae4c2ff6d1845ec40093bb6
parentc73b61f2bb4d59485de0cd3bd0f60222d4c930a7 (diff)
sdm660-common: Copy extra system libs to vendor
Change-Id: I0a086920c855da3a39e8a1c902a206d60a743495
-rw-r--r--sdm660.mk4
-rw-r--r--vndk/Android.mk45
-rw-r--r--vndk/vndk-ext-libs.mk3
3 files changed, 51 insertions, 1 deletions
diff --git a/sdm660.mk b/sdm660.mk
index 8df7174..36e7bc4 100644
--- a/sdm660.mk
+++ b/sdm660.mk
@@ -441,7 +441,9 @@ PRODUCT_PACKAGES += \
android.hardware.vibrator@1.0-service
# VNDK
-PRODUCT_PACKAGES += vndk_package
+PRODUCT_PACKAGES += \
+ vndk-ext \
+ vndk_package
# Wifi
PRODUCT_PACKAGES += \
diff --git a/vndk/Android.mk b/vndk/Android.mk
new file mode 100644
index 0000000..fe8ca5b
--- /dev/null
+++ b/vndk/Android.mk
@@ -0,0 +1,45 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(LOCAL_PATH)/vndk-ext-libs.mk
+
+define define-vndk-lib
+include $$(CLEAR_VARS)
+LOCAL_MODULE := $1.$2
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_PREBUILT_MODULE_FILE := $$(call intermediates-dir-for,SHARED_LIBRARIES,$1)/$1.so
+LOCAL_STRIP_MODULE := false
+LOCAL_MULTILIB := first
+LOCAL_MODULE_TAGS := optional
+LOCAL_INSTALLED_MODULE_STEM := $1.so
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_RELATIVE_PATH := $3
+LOCAL_VENDOR_MODULE := $4
+include $$(BUILD_PREBUILT)
+
+ifneq ($$(TARGET_2ND_ARCH),)
+ifneq ($$(TARGET_TRANSLATE_2ND_ARCH),true)
+include $$(CLEAR_VARS)
+LOCAL_MODULE := $1.$2
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_PREBUILT_MODULE_FILE := $$(call intermediates-dir-for,SHARED_LIBRARIES,$1,,,$(TARGET_2ND_ARCH_VAR_PREFIX))/$1.so
+LOCAL_STRIP_MODULE := false
+LOCAL_MULTILIB := 32
+LOCAL_MODULE_TAGS := optional
+LOCAL_INSTALLED_MODULE_STEM := $1.so
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_RELATIVE_PATH := $3
+LOCAL_VENDOR_MODULE := $4
+include $$(BUILD_PREBUILT)
+endif # TARGET_TRANSLATE_2ND_ARCH is not true
+endif # TARGET_2ND_ARCH is not empty
+endef
+
+$(foreach lib,$(EXTRA_VENDOR_LIBRARIES),\
+ $(eval $(call define-vndk-lib,$(lib),vndk-ext-gen,,true)))
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vndk-ext
+LOCAL_MODULE_TAGS := optional
+LOCAL_REQUIRED_MODULES := \
+ $(addsuffix .vndk-ext-gen,$(EXTRA_VENDOR_LIBRARIES))
+include $(BUILD_PHONY_PACKAGE)
diff --git a/vndk/vndk-ext-libs.mk b/vndk/vndk-ext-libs.mk
new file mode 100644
index 0000000..a4f4de8
--- /dev/null
+++ b/vndk/vndk-ext-libs.mk
@@ -0,0 +1,3 @@
+EXTRA_VENDOR_LIBRARIES := \
+ android.hidl.base@1.0 \
+ libpowermanager