gta4xl-common: generate vulkan and opencl symlinks
[Linux4: Drop our old way of doing so]
Change-Id: I25501e0ffcb86b8e21ee44c648b9f14bbb931b8b
diff --git a/Android.mk b/Android.mk
index be21ddc..ea08f62 100644
--- a/Android.mk
+++ b/Android.mk
@@ -18,4 +18,27 @@
ifneq ($(filter gta4xlwifi gta4xl, $(TARGET_DEVICE)),)
include $(call all-subdir-makefiles,$(LOCAL_PATH))
+
+include $(COMMON_PATH)/AndroidBoard.mk
+
+include $(CLEAR_VARS)
+
+EGL_LIBS := libGLES_mali.so libOpenCL.so libOpenCL.so.1 libOpenCL.so.1.1 hw/vulkan.universal9611.so
+
+EGL_32_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/lib/,$(EGL_LIBS))
+$(EGL_32_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
+ @echo "EGL 32 lib link: $@"
+ @mkdir -p $(dir $@)
+ @rm -rf $@
+ $(hide) ln -sf /vendor/lib/egl/libGLES_mali.so $@
+
+EGL_64_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/lib64/,$(EGL_LIBS))
+$(EGL_64_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
+ @echo "EGL 64 lib link: $@"
+ @mkdir -p $(dir $@)
+ @rm -rf $@
+ $(hide) ln -sf /vendor/lib64/egl/libGLES_mali.so $@
+
+ALL_DEFAULT_INSTALLED_MODULES += $(EGL_32_SYMLINKS) $(EGL_64_SYMLINKS)
+
endif
diff --git a/hardware/Android.mk b/hardware/Android.mk
deleted file mode 100644
index d19b925..0000000
--- a/hardware/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2020 The LineageOS Project
-#
-# 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)
-
-include $(call all-subdir-makefiles,$(LOCAL_PATH))
diff --git a/hardware/gles/Android.mk b/hardware/gles/Android.mk
deleted file mode 100644
index c8a99f5..0000000
--- a/hardware/gles/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2020 The LineageOS Project
-#
-# 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)
-
-include $(LOCAL_PATH)/gles.mk
-include $(LOCAL_PATH)/opencl.mk
-include $(LOCAL_PATH)/vulkan.mk
diff --git a/hardware/gles/gles.mk b/hardware/gles/gles.mk
deleted file mode 100644
index e47677a..0000000
--- a/hardware/gles/gles.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (C) 2020 The LineageOS Project
-#
-# 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)
-
-include $(CLEAR_VARS)
-
-LIBGLES_MALI_LIBRARY := /vendor/lib/egl/libGLES_mali.so
-LIBGLES_MALI64_LIBRARY := /vendor/lib64/egl/libGLES_mali.so
-
-LIBGLES_MALI_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libGLES_mali.so
-$(LIBGLES_MALI_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib/libGLES_mali.so symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf $(LIBGLES_MALI_LIBRARY) $@
-
-LIBGLES_MALI64_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libGLES_mali.so
-$(LIBGLES_MALI64_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib64/libGLES_mali.so symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf $(LIBGLES_MALI64_LIBRARY) $@
-
-ALL_DEFAULT_INSTALLED_MODULES += \
- $(LIBGLES_MALI_SYMLINK) \
- $(LIBGLES_MALI64_SYMLINK) \
diff --git a/hardware/gles/opencl.mk b/hardware/gles/opencl.mk
deleted file mode 100644
index 757a220..0000000
--- a/hardware/gles/opencl.mk
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# Copyright (C) 2020 The LineageOS Project
-#
-# 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)
-
-include $(CLEAR_VARS)
-
-LIBGLES_MALI_LIBRARY := /vendor/lib/egl/libGLES_mali.so
-LIBGLES_MALI64_LIBRARY := /vendor/lib64/egl/libGLES_mali.so
-
-LIBOPENCL_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libOpenCL.so
-$(LIBOPENCL_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib/libOpenCL.so symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf libOpenCL.so.1 $@
-
-LIBOPENCL64_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libOpenCL.so
-$(LIBOPENCL64_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib64/libOpenCL.so symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf libOpenCL.so.1 $@
-
-LIBOPENCL1_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libOpenCL.so.1
-$(LIBOPENCL1_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib/libOpenCL.so.1 symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf libOpenCL.so.1.1 $@
-
-LIBOPENCL641_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libOpenCL.so.1
-$(LIBOPENCL641_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib64/libOpenCL.so.1 symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf libOpenCL.so.1.1 $@
-
-LIBOPENCL11_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libOpenCL.so.1.1
-$(LIBOPENCL11_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib/libOpenCL.so.1.1 symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf $(LIBGLES_MALI_LIBRARY) $@
-
-LIBOPENCL6411_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libOpenCL.so.1.1
-$(LIBOPENCL6411_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib64/libOpenCL.so.1.1 symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf $(LIBGLES_MALI64_LIBRARY) $@
-
-ALL_DEFAULT_INSTALLED_MODULES += \
- $(LIBOPENCL_SYMLINK) \
- $(LIBOPENCL64_SYMLINK) \
- $(LIBOPENCL1_SYMLINK) \
- $(LIBOPENCL641_SYMLINK) \
- $(LIBOPENCL11_SYMLINK) \
- $(LIBOPENCL6411_SYMLINK)
diff --git a/hardware/gles/vulkan.mk b/hardware/gles/vulkan.mk
deleted file mode 100644
index 2536592..0000000
--- a/hardware/gles/vulkan.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (C) 2020 The LineageOS Project
-#
-# 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)
-
-include $(CLEAR_VARS)
-
-LIBGLES_MALI_LIBRARY := /vendor/lib/egl/libGLES_mali.so
-LIBGLES_MALI64_LIBRARY := /vendor/lib64/egl/libGLES_mali.so
-
-VULKAN_SYMLINK := $(TARGET_OUT_VENDOR)/lib/hw/vulkan.universal9611.so
-$(VULKAN_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib/hw/vulkan.universal9611.so symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf $(LIBGLES_MALI_LIBRARY) $@
-
-VULKAN64_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/hw/vulkan.universal9611.so
-$(VULKAN64_SYMLINK): $(LOCAL_INSTALLED_MODULE)
- @echo "Creating lib64/hw/vulkan.universal9611.so symlink: $@"
- @mkdir -p $(dir $@)
- $(hide) ln -sf $(LIBGLES_MALI64_LIBRARY) $@
-
-ALL_DEFAULT_INSTALLED_MODULES += \
- $(VULKAN_SYMLINK) \
- $(VULKAN64_SYMLINK)