Convert libGLES_android to Android.bp
See build/soong/README.md for more information.
It's split into two libraries since Soong does not support the .cpp.arm
syntax.
Bug: 122332691
Test: treehugger
Change-Id: Ia21e467509832401214c8475486c8a7dd49653f6
diff --git a/opengl/libagl/Android.bp b/opengl/libagl/Android.bp
new file mode 100644
index 0000000..6ec24b3
--- /dev/null
+++ b/opengl/libagl/Android.bp
@@ -0,0 +1,99 @@
+//
+// Build the software OpenGL ES library
+//
+
+cc_defaults {
+ name: "libGLES_android_defaults",
+
+ cflags: [
+ "-DLOG_TAG=\"libagl\"",
+ "-DGL_GLEXT_PROTOTYPES",
+ "-DEGL_EGLEXT_PROTOTYPES",
+ "-fvisibility=hidden",
+ "-Wall",
+ "-Werror",
+ ],
+
+ shared_libs: [
+ "libcutils",
+ "libhardware",
+ "libutils",
+ "liblog",
+ "libpixelflinger",
+ "libETC1",
+ "libui",
+ "libnativewindow",
+ ],
+
+ // we need to access the private Bionic header <bionic_tls.h>
+ include_dirs: ["bionic/libc/private"],
+
+ arch: {
+ arm: {
+ cflags: ["-fstrict-aliasing"],
+ },
+
+ mips: {
+ cflags: [
+ "-fstrict-aliasing",
+ // The graphics code can generate division by zero
+ "-mno-check-zero-division",
+ ],
+ },
+ },
+}
+
+cc_library_shared {
+ name: "libGLES_android",
+ defaults: ["libGLES_android_defaults"],
+
+ whole_static_libs: ["libGLES_android_arm"],
+
+ srcs: [
+ "egl.cpp",
+ "state.cpp",
+ "texture.cpp",
+ "Tokenizer.cpp",
+ "TokenManager.cpp",
+ "TextureObjectManager.cpp",
+ "BufferObjectManager.cpp",
+ ],
+
+ arch: {
+ arm: {
+ srcs: [
+ "fixed_asm.S",
+ "iterators.S",
+ ],
+ },
+
+ mips: {
+ rev6: {
+ srcs: ["arch-mips/fixed_asm.S"],
+ },
+ },
+ },
+
+ relative_install_path: "egl",
+}
+
+cc_library_static {
+ name: "libGLES_android_arm",
+ defaults: ["libGLES_android_defaults"],
+
+ srcs: [
+ "array.cpp",
+ "fp.cpp",
+ "light.cpp",
+ "matrix.cpp",
+ "mipmap.cpp",
+ "primitives.cpp",
+ "vertex.cpp",
+ ],
+
+ arch: {
+ arm: {
+ instruction_set: "arm",
+ },
+ },
+}