From 057ad704a3db92b7817329305c0ce3c2bacb4b71 Mon Sep 17 00:00:00 2001 From: Omkar Chandorkar Date: Wed, 16 Mar 2022 17:06:52 +0900 Subject: [PATCH] common: update symlinks * get rid of ugly build time warnings Change-Id: Ib4084c96572ba3bc1f0fa05477fc21d8af9cc414 Signed-off-by: Omkar Chandorkar --- system/telephony/Android.mk | 11 +++++++-- system/wfd/Android.mk | 8 ++++++- vendor/adreno-legacy/Android.mk | 42 +++++++++++++++++++++++++++++++++ vendor/adreno/Android.mk | 35 +++++++++++++++++++++------ vendor/telephony/Android.mk | 8 ++++++- 5 files changed, 93 insertions(+), 11 deletions(-) create mode 100644 vendor/adreno-legacy/Android.mk diff --git a/system/telephony/Android.mk b/system/telephony/Android.mk index c1c2e00c..99c13a34 100644 --- a/system/telephony/Android.mk +++ b/system/telephony/Android.mk @@ -18,7 +18,14 @@ ifneq (,$(filter telephony, $(TARGET_COMMON_QTI_COMPONENTS))) include $(CLEAR_VARS) -$(shell mkdir -p $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/ims/lib/arm64/ && pushd $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/ims/lib/arm64 > /dev/null && ln -s /system_ext/lib64/libimscamera_jni.so libimscamera_jni.so && popd > /dev/null) -$(shell mkdir -p $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/ims/lib/arm64/ && pushd $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/ims/lib/arm64 > /dev/null && ln -s /system_ext/lib64/libimsmedia_jni.so libimsmedia_jni.so && popd > /dev/null) +IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so + +IMS_SYMLINKS := $(addprefix $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/ims/lib/arm64/,$(notdir $(IMS_LIBS))) +$(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @rm -rf $@ + @mkdir -p $(dir $@) + $(hide) ln -sf $(TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES)/$(notdir $@) $@ + +ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS) endif diff --git a/system/wfd/Android.mk b/system/wfd/Android.mk index 9b378c0d..f6c8b81c 100644 --- a/system/wfd/Android.mk +++ b/system/wfd/Android.mk @@ -18,6 +18,12 @@ ifneq (,$(filter wfd, $(TARGET_COMMON_QTI_COMPONENTS))) include $(CLEAR_VARS) -$(shell mkdir -p $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/WfdService/lib/arm64/ && pushd $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/WfdService/lib/arm64 > /dev/null && ln -s /system_ext/lib64/libwfdnative.so libwfdnative.so && popd > /dev/null) +WFDSERVICE_SYMLINKS := $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/WfdService/lib/arm64/ +$(WFDSERVICE_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @rm -rf $@ + @mkdir -p $(dir $@) + $(hide) ln -sf $(TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES)/libwfdnative.so $@/libwfdnative.so + +ALL_DEFAULT_INSTALLED_MODULES += $(WFDSERVICE_SYMLINKS) endif diff --git a/vendor/adreno-legacy/Android.mk b/vendor/adreno-legacy/Android.mk new file mode 100644 index 00000000..c68b30ae --- /dev/null +++ b/vendor/adreno-legacy/Android.mk @@ -0,0 +1,42 @@ +# Copyright (C) 2022 Paranoid Android +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH := $(call my-dir) + +ifneq (,$(filter adreno-legacy, $(TARGET_COMMON_QTI_COMPONENTS))) + +include $(CLEAR_VARS) + +EGL_LIBRARIES := \ + libEGL_adreno.so \ + libGLESv2_adreno.so \ + libq3dtools_adreno.so + +EGL_32_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/lib/,$(notdir $(EGL_LIBRARIES))) +$(EGL_32_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @mkdir -p $(dir $@) + @rm -rf $@ + $(hide) ln -sf egl/$(notdir $@) $@ + +EGL_64_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/lib64/,$(notdir $(EGL_LIBRARIES))) +$(EGL_64_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @mkdir -p $(dir $@) + @rm -rf $@ + $(hide) ln -sf egl/$(notdir $@) $@ + +ALL_DEFAULT_INSTALLED_MODULES += \ + $(EGL_32_SYMLINKS) \ + $(EGL_64_SYMLINKS) + +endif diff --git a/vendor/adreno/Android.mk b/vendor/adreno/Android.mk index 72f0d3b2..649356ff 100644 --- a/vendor/adreno/Android.mk +++ b/vendor/adreno/Android.mk @@ -12,10 +12,31 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This Android.mk is included regardless of device using adreno or adreno-legacy -$(shell mkdir -p $(TARGET_OUT_VENDOR)/lib/egl && pushd $(TARGET_OUT_VENDOR)/lib > /dev/null && ln -s egl/libEGL_adreno.so libEGL_adreno.so && popd > /dev/null) -$(shell mkdir -p $(TARGET_OUT_VENDOR)/lib/egl && pushd $(TARGET_OUT_VENDOR)/lib > /dev/null && ln -s egl/libGLESv2_adreno.so libGLESv2_adreno.so && popd > /dev/null) -$(shell mkdir -p $(TARGET_OUT_VENDOR)/lib/egl && pushd $(TARGET_OUT_VENDOR)/lib > /dev/null && ln -s egl/libq3dtools_adreno.so libq3dtools_adreno.so && popd > /dev/null) -$(shell mkdir -p $(TARGET_OUT_VENDOR)/lib64/egl && pushd $(TARGET_OUT_VENDOR)/lib64 > /dev/null && ln -s egl/libEGL_adreno.so libEGL_adreno.so && popd > /dev/null) -$(shell mkdir -p $(TARGET_OUT_VENDOR)/lib64/egl && pushd $(TARGET_OUT_VENDOR)/lib64 > /dev/null && ln -s egl/libGLESv2_adreno.so libGLESv2_adreno.so && popd > /dev/null) -$(shell mkdir -p $(TARGET_OUT_VENDOR)/lib64/egl && pushd $(TARGET_OUT_VENDOR)/lib64 > /dev/null && ln -s egl/libq3dtools_adreno.so libq3dtools_adreno.so && popd > /dev/null) +LOCAL_PATH := $(call my-dir) + +ifneq (,$(filter adreno, $(TARGET_COMMON_QTI_COMPONENTS))) + +include $(CLEAR_VARS) + +EGL_LIBRARIES := \ + libEGL_adreno.so \ + libGLESv2_adreno.so \ + libq3dtools_adreno.so + +EGL_32_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/lib/,$(notdir $(EGL_LIBRARIES))) +$(EGL_32_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @mkdir -p $(dir $@) + @rm -rf $@ + $(hide) ln -sf egl/$(notdir $@) $@ + +EGL_64_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/lib64/,$(notdir $(EGL_LIBRARIES))) +$(EGL_64_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @mkdir -p $(dir $@) + @rm -rf $@ + $(hide) ln -sf egl/$(notdir $@) $@ + +ALL_DEFAULT_INSTALLED_MODULES += \ + $(EGL_32_SYMLINKS) \ + $(EGL_64_SYMLINKS) + +endif diff --git a/vendor/telephony/Android.mk b/vendor/telephony/Android.mk index c5e6f451..b15afc6c 100644 --- a/vendor/telephony/Android.mk +++ b/vendor/telephony/Android.mk @@ -18,6 +18,12 @@ ifneq (,$(filter telephony, $(TARGET_COMMON_QTI_COMPONENTS))) include $(CLEAR_VARS) -$(shell mkdir -p $(TARGET_OUT_VENDOR_APPS)/CneApp/lib/arm64/vendor/lib64 && pushd $(TARGET_OUT_VENDOR_APPS)/CneApp/lib/arm64 > /dev/null && ln -s /vendor/lib64/libvndfwk_detect_jni.qti.so libvndfwk_detect_jni.qti.so && popd > /dev/null) +CNE_SYMLINKS := $(TARGET_OUT_VENDOR_APPS)/CneApp/lib/arm64/ +$(CNE_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @rm -rf $@ + @mkdir -p $(dir $@) + $(hide) ln -sf $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)/libvndfwk_detect_jni.qti.so $@/libvndfwk_detect_jni.qti.so + +ALL_DEFAULT_INSTALLED_MODULES += $(CNE_SYMLINKS) endif