summaryrefslogtreecommitdiff
path: root/opengl/libs/Android.bp
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/libs/Android.bp')
-rw-r--r--opengl/libs/Android.bp113
1 files changed, 113 insertions, 0 deletions
diff --git a/opengl/libs/Android.bp b/opengl/libs/Android.bp
index bdd5152209..6a8aac8d70 100644
--- a/opengl/libs/Android.bp
+++ b/opengl/libs/Android.bp
@@ -45,3 +45,116 @@ ndk_library {
symbol_file: "libGLESv3.map.txt",
first_version: "18",
}
+
+cc_defaults {
+ name: "gl_libs_defaults",
+ cflags: [
+ "-DGL_GLEXT_PROTOTYPES",
+ "-DEGL_EGLEXT_PROTOTYPES",
+ "-fvisibility=hidden",
+ ],
+ shared_libs: [
+ "libcutils",
+ "liblog",
+ "libdl",
+ ],
+
+ // we need to access the private Bionic header <bionic_tls.h>
+ include_dirs: ["bionic/libc/private"],
+}
+
+//##############################################################################
+// Build META EGL library
+//
+cc_defaults {
+ name: "egl_libs_defaults",
+ defaults: ["gl_libs_defaults"],
+ cflags: [
+ "-DLOG_TAG=\"libEGL\"",
+ ],
+ shared_libs: [
+ "libbinder",
+ "libutils",
+ "libui",
+ ],
+}
+
+cc_library_static {
+ name: "libEGL_getProcAddress",
+ defaults: ["egl_libs_defaults"],
+ srcs: ["EGL/getProcAddress.cpp"],
+ arch: {
+ arm: {
+ instruction_set: "arm",
+ },
+ },
+}
+
+cc_library_shared {
+ name: "libEGL",
+ defaults: ["egl_libs_defaults"],
+ srcs: [
+ "EGL/egl_tls.cpp",
+ "EGL/egl_cache.cpp",
+ "EGL/egl_display.cpp",
+ "EGL/egl_object.cpp",
+ "EGL/egl.cpp",
+ "EGL/eglApi.cpp",
+ "EGL/Loader.cpp",
+ ],
+ static_libs: ["libEGL_getProcAddress"],
+ ldflags: ["-Wl,--exclude-libs=ALL"],
+
+ required: ["egl.cfg"],
+}
+
+cc_defaults {
+ name: "gles_libs_defaults",
+ defaults: ["gl_libs_defaults"],
+ arch: {
+ arm: {
+ instruction_set: "arm",
+
+ // TODO: This is to work around b/20093774. Remove after root cause is fixed
+ ldflags: ["-Wl,--hash-style,both"],
+ },
+ },
+ shared_libs: ["libEGL"],
+}
+
+//##############################################################################
+// Build the wrapper OpenGL ES 1.x library
+//
+cc_library_shared {
+ name: "libGLESv1_CM",
+ defaults: ["gles_libs_defaults"],
+ srcs: ["GLES_CM/gl.cpp"],
+
+ cflags: ["-DLOG_TAG=\"libGLESv1\""],
+}
+
+//##############################################################################
+// Build the wrapper OpenGL ES 2.x library
+//
+cc_library_shared {
+ name: "libGLESv2",
+ defaults: ["gles_libs_defaults"],
+ srcs: ["GLES2/gl2.cpp"],
+
+ shared_libs: ["libutils"],
+
+ cflags: ["-DLOG_TAG=\"libGLESv2\""],
+}
+
+//##############################################################################
+// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
+//
+cc_library_shared {
+ name: "libGLESv3",
+ defaults: ["gles_libs_defaults"],
+ srcs: ["GLES2/gl2.cpp"],
+
+ shared_libs: ["libutils"],
+
+ cflags: ["-DLOG_TAG=\"libGLESv3\""],
+}