summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jesse Hall <jessehall@google.com> 2013-02-08 16:13:50 -0800
committer Jesse Hall <jessehall@google.com> 2013-02-13 16:28:56 -0800
commit5ea4c7305850ad4003d314597f4a8255b5b45ba4 (patch)
treea61ec5fd330f3d63d83207bfe0788546e77b16ba
parent4774338bd0ad1ebe42c311fd0c72f13786b5c800 (diff)
Symlink /system/lib/libGLESv3.so -> libGLESv2.so
The platform has a unified GLES2/GLES3 wrapper in libGLESv2.so, which is what bundled binaries should link against. The NDK will have separate GLES2 and GLES3 libraries so that applications will get a link error if they accidentally use GLES3 entry points in a GLES2 application. This symlink allows GLES3 NDK apps to load using the unified wrapper. Change-Id: Ic344ef63c334047fccebb55b7cb2fb23a4c2d61b
-rw-r--r--opengl/libs/Android.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk
index 6c35355948..c72d6fc54e 100644
--- a/opengl/libs/Android.mk
+++ b/opengl/libs/Android.mk
@@ -147,6 +147,20 @@ endif
include $(BUILD_SHARED_LIBRARY)
+# Symlink libGLESv3.so -> libGLESv2.so
+# Platform modules should link against libGLESv2.so (-lGLESv2), but NDK apps
+# will be linked against libGLESv3.so.
+LIBGLESV2 := $(LOCAL_INSTALLED_MODULE)
+LIBGLESV3 := $(subst libGLESv2,libGLESv3,$(LIBGLESV2))
+$(LIBGLESV3): $(LIBGLESV2)
+ @echo "Symlink: $@ -> $(notdir $<)"
+ @mkdir -p $(dir $@)
+ $(hide) ln -sf $(notdir $<) $@
+ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
+ $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(LIBGLESV3)
+LIBGLESV2 :=
+LIBGLESV3 :=
+
###############################################################################
# Build the ETC1 host static library
#