| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 1 | // Build the ETC1 library | 
 | 2 | cc_library { | 
 | 3 |     name: "libETC1", | 
 | 4 |     srcs: ["ETC1/etc1.cpp"], | 
 | 5 |     host_supported: true, | 
| Chih-Hung Hsieh | c60a0f0 | 2017-10-05 14:25:18 -0700 | [diff] [blame] | 6 |     cflags: ["-Wall", "-Werror"], | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 7 |  | 
 | 8 |     target: { | 
 | 9 |         android: { | 
 | 10 |             static: { | 
 | 11 |                 enabled: false, | 
 | 12 |             }, | 
 | 13 |         }, | 
 | 14 |         host: { | 
 | 15 |             shared: { | 
 | 16 |                 enabled: false, | 
 | 17 |             }, | 
 | 18 |         }, | 
 | 19 |         windows: { | 
 | 20 |             enabled: true, | 
 | 21 |         }, | 
 | 22 |     }, | 
 | 23 | } | 
| Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 24 |  | 
| Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 25 | // The headers modules are in frameworks/native/opengl/Android.bp. | 
| Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 26 | ndk_library { | 
| Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 27 |     name: "libEGL", | 
| Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 28 |     symbol_file: "libEGL.map.txt", | 
 | 29 |     first_version: "9", | 
| Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 30 |     unversioned_until: "current", | 
| Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 31 | } | 
| Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 32 |  | 
 | 33 | ndk_library { | 
| Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 34 |     name: "libGLESv1_CM", | 
| Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 35 |     symbol_file: "libGLESv1_CM.map.txt", | 
 | 36 |     first_version: "9", | 
| Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 37 |     unversioned_until: "current", | 
| Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 38 | } | 
| Dan Albert | 00500c7 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 39 |  | 
 | 40 | ndk_library { | 
| Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 41 |     name: "libGLESv2", | 
| Dan Albert | 00500c7 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 42 |     symbol_file: "libGLESv2.map.txt", | 
 | 43 |     first_version: "9", | 
| Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 44 |     unversioned_until: "current", | 
| Dan Albert | 00500c7 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 45 | } | 
| Dan Albert | d7d8efa | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 46 |  | 
 | 47 | ndk_library { | 
| Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 48 |     name: "libGLESv3", | 
| Dan Albert | d7d8efa | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 49 |     symbol_file: "libGLESv3.map.txt", | 
 | 50 |     first_version: "18", | 
| Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 51 |     unversioned_until: "current", | 
| Dan Albert | d7d8efa | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 52 | } | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 53 |  | 
 | 54 | cc_defaults { | 
 | 55 |     name: "gl_libs_defaults", | 
 | 56 |     cflags: [ | 
 | 57 |         "-DGL_GLEXT_PROTOTYPES", | 
 | 58 |         "-DEGL_EGLEXT_PROTOTYPES", | 
 | 59 |         "-fvisibility=hidden", | 
| Chih-Hung Hsieh | c60a0f0 | 2017-10-05 14:25:18 -0700 | [diff] [blame] | 60 |         "-Wall", | 
 | 61 |         "-Werror", | 
 | 62 |         "-Wno-unused-variable", | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 63 |     ], | 
 | 64 |     shared_libs: [ | 
| Mathias Agopian | 5f1af04 | 2017-03-09 18:50:05 -0800 | [diff] [blame] | 65 |         // ***** DO NOT ADD NEW DEPENDENCIES HERE ***** | 
 | 66 |         // In particular, DO NOT add libutils or anything "above" libcutils | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 67 |         "libcutils", | 
 | 68 |         "liblog", | 
 | 69 |         "libdl", | 
 | 70 |     ], | 
| Jiyong Park | a243e5d | 2017-06-21 12:26:51 +0900 | [diff] [blame] | 71 |     static_libs: [ | 
 | 72 |         "libarect", | 
 | 73 |     ], | 
 | 74 |     header_libs: [ | 
| Christopher Ferris | ddd1d6b | 2019-09-26 08:27:25 -0700 | [diff] [blame] | 75 |         "bionic_libc_platform_headers", | 
| Jiyong Park | a243e5d | 2017-06-21 12:26:51 +0900 | [diff] [blame] | 76 |         "gl_headers", | 
 | 77 |         "libsystem_headers", | 
| Jiyong Park | a243e5d | 2017-06-21 12:26:51 +0900 | [diff] [blame] | 78 |         "libnativebase_headers", | 
 | 79 |     ], | 
 | 80 |     export_header_lib_headers: ["gl_headers"], | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 81 | } | 
 | 82 |  | 
 | 83 | //############################################################################## | 
 | 84 | // Build META EGL library | 
 | 85 | // | 
 | 86 | cc_defaults { | 
 | 87 |     name: "egl_libs_defaults", | 
 | 88 |     defaults: ["gl_libs_defaults"], | 
 | 89 |     cflags: [ | 
 | 90 |         "-DLOG_TAG=\"libEGL\"", | 
| Chih-Hung Hsieh | c60a0f0 | 2017-10-05 14:25:18 -0700 | [diff] [blame] | 91 |         "-Wall", | 
 | 92 |         "-Werror", | 
 | 93 |         "-Wno-error=deprecated-register", | 
 | 94 |         "-Wno-error=unknown-attributes", | 
 | 95 |         "-Wno-unused-variable", | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 96 |     ], | 
 | 97 |     shared_libs: [ | 
| Mathias Agopian | 5f1af04 | 2017-03-09 18:50:05 -0800 | [diff] [blame] | 98 |         // ***** DO NOT ADD NEW DEPENDENCIES HERE ***** | 
 | 99 |         // In particular, DO NOT add libutils nor anything "above" libui | 
| Jiyong Park | 27c39e1 | 2017-05-08 13:00:02 +0900 | [diff] [blame] | 100 |         "libgraphicsenv", | 
| Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 101 |         "libnativewindow", | 
| Mathias Agopian | 5f1af04 | 2017-03-09 18:50:05 -0800 | [diff] [blame] | 102 |         "libbacktrace", | 
| Michael Hoisie | 4e0f56b | 2020-04-30 18:40:55 -0400 | [diff] [blame] | 103 |         "libbase", | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 104 |     ], | 
 | 105 | } | 
 | 106 |  | 
 | 107 | cc_library_static { | 
 | 108 |     name: "libEGL_getProcAddress", | 
 | 109 |     defaults: ["egl_libs_defaults"], | 
 | 110 |     srcs: ["EGL/getProcAddress.cpp"], | 
 | 111 |     arch: { | 
 | 112 |         arm: { | 
 | 113 |             instruction_set: "arm", | 
 | 114 |         }, | 
 | 115 |     }, | 
 | 116 | } | 
 | 117 |  | 
| Stan Iliev | 9e7cd07 | 2017-10-09 15:56:10 -0400 | [diff] [blame] | 118 | cc_library_static { | 
 | 119 |     name: "libEGL_blobCache", | 
 | 120 |     defaults: ["egl_libs_defaults"], | 
 | 121 |     srcs: [ | 
 | 122 |         "EGL/BlobCache.cpp", | 
 | 123 |         "EGL/FileBlobCache.cpp", | 
 | 124 |     ], | 
 | 125 |     export_include_dirs: ["EGL"], | 
 | 126 | } | 
 | 127 |  | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 128 | cc_library_shared { | 
 | 129 |     name: "libEGL", | 
 | 130 |     defaults: ["egl_libs_defaults"], | 
 | 131 |     srcs: [ | 
 | 132 |         "EGL/egl_tls.cpp", | 
 | 133 |         "EGL/egl_cache.cpp", | 
 | 134 |         "EGL/egl_display.cpp", | 
 | 135 |         "EGL/egl_object.cpp", | 
| Cody Northrop | 629ce4e | 2018-10-15 07:22:09 -0600 | [diff] [blame] | 136 |         "EGL/egl_layers.cpp", | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 137 |         "EGL/egl.cpp", | 
| Cody Northrop | 68d1035 | 2018-10-15 07:22:09 -0600 | [diff] [blame] | 138 |         "EGL/eglApi.cpp", | 
| Cody Northrop | 0ec5d38 | 2018-10-15 07:22:07 -0600 | [diff] [blame] | 139 |         "EGL/egl_platform_entries.cpp", | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 140 |         "EGL/Loader.cpp", | 
| Tobin Ehlis | 96a184d | 2018-07-18 16:14:07 -0600 | [diff] [blame] | 141 |         "EGL/egl_angle_platform.cpp", | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 142 |     ], | 
| Courtney Goeltzenleuchter | 1b71702 | 2017-07-07 14:55:40 -0600 | [diff] [blame] | 143 |     shared_libs: [ | 
 | 144 |         "libvndksupport", | 
 | 145 |         "android.hardware.configstore@1.0", | 
 | 146 |         "android.hardware.configstore-utils", | 
| Cody Northrop | 629ce4e | 2018-10-15 07:22:09 -0600 | [diff] [blame] | 147 |         "libbase", | 
| Courtney Goeltzenleuchter | 1b71702 | 2017-07-07 14:55:40 -0600 | [diff] [blame] | 148 |         "libhidlbase", | 
| Jiyong Park | bd1ddb2 | 2019-02-18 21:22:28 +0900 | [diff] [blame] | 149 |         "libnativebridge_lazy", | 
 | 150 |         "libnativeloader_lazy", | 
| Courtney Goeltzenleuchter | 1b71702 | 2017-07-07 14:55:40 -0600 | [diff] [blame] | 151 |         "libutils", | 
| Sundong Ahn | 204fb1f | 2020-04-23 21:56:36 +0900 | [diff] [blame] | 152 |         "libSurfaceFlingerProp", | 
| Courtney Goeltzenleuchter | 1b71702 | 2017-07-07 14:55:40 -0600 | [diff] [blame] | 153 |     ], | 
| Stan Iliev | 9e7cd07 | 2017-10-09 15:56:10 -0400 | [diff] [blame] | 154 |     static_libs: [ | 
 | 155 |         "libEGL_getProcAddress", | 
 | 156 |         "libEGL_blobCache", | 
 | 157 |     ], | 
| Tao Wu | 8f054a6 | 2019-05-14 09:16:07 -0700 | [diff] [blame] | 158 |     ldflags: ["-Wl,--exclude-libs=ALL,--Bsymbolic-functions"], | 
| Mathias Agopian | b7f9a24 | 2017-03-08 22:29:31 -0800 | [diff] [blame] | 159 |     export_include_dirs: ["EGL/include"], | 
| jorgegil@google.com | e814151 | 2019-11-21 13:42:16 -0800 | [diff] [blame] | 160 |     stubs: { | 
 | 161 |         symbol_file: "libEGL.map.txt", | 
 | 162 |         versions: ["29"], | 
 | 163 |     }, | 
| Sundong Ahn | 204fb1f | 2020-04-23 21:56:36 +0900 | [diff] [blame] | 164 |     header_libs: ["libsurfaceflinger_headers"], | 
| Mathias Agopian | b7f9a24 | 2017-03-08 22:29:31 -0800 | [diff] [blame] | 165 | } | 
 | 166 |  | 
 | 167 | cc_test { | 
 | 168 |     name: "libEGL_test", | 
 | 169 |     defaults: ["egl_libs_defaults"], | 
 | 170 |     srcs: [ | 
 | 171 |         "EGL/BlobCache.cpp", | 
 | 172 |         "EGL/BlobCache_test.cpp", | 
 | 173 |     ], | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 174 | } | 
 | 175 |  | 
 | 176 | cc_defaults { | 
 | 177 |     name: "gles_libs_defaults", | 
 | 178 |     defaults: ["gl_libs_defaults"], | 
 | 179 |     arch: { | 
 | 180 |         arm: { | 
 | 181 |             instruction_set: "arm", | 
 | 182 |  | 
 | 183 |             // TODO: This is to work around b/20093774. Remove after root cause is fixed | 
 | 184 |             ldflags: ["-Wl,--hash-style,both"], | 
 | 185 |         }, | 
 | 186 |     }, | 
 | 187 |     shared_libs: ["libEGL"], | 
 | 188 | } | 
 | 189 |  | 
 | 190 | //############################################################################## | 
 | 191 | // Build the wrapper OpenGL ES 1.x library | 
 | 192 | // | 
 | 193 | cc_library_shared { | 
 | 194 |     name: "libGLESv1_CM", | 
 | 195 |     defaults: ["gles_libs_defaults"], | 
 | 196 |     srcs: ["GLES_CM/gl.cpp"], | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 197 |     cflags: ["-DLOG_TAG=\"libGLESv1\""], | 
| dimitry | 0b586e8 | 2018-12-11 14:33:30 +0100 | [diff] [blame] | 198 |     version_script: "libGLESv1_CM.map.txt", | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 199 | } | 
 | 200 |  | 
 | 201 | //############################################################################## | 
 | 202 | // Build the wrapper OpenGL ES 2.x library | 
 | 203 | // | 
 | 204 | cc_library_shared { | 
 | 205 |     name: "libGLESv2", | 
 | 206 |     defaults: ["gles_libs_defaults"], | 
 | 207 |     srcs: ["GLES2/gl2.cpp"], | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 208 |     cflags: ["-DLOG_TAG=\"libGLESv2\""], | 
| Pirama Arumuga Nainar | 5d7eb4f | 2019-05-29 15:17:53 -0700 | [diff] [blame] | 209 |  | 
 | 210 |     // Bug: http://b/133874658  Disable native_coverage as we investigate a | 
 | 211 |     // crash in surfaceflinger on coverage-enabled cuttlefish builds. | 
 | 212 |     native_coverage: false, | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 213 | } | 
 | 214 |  | 
 | 215 | //############################################################################## | 
 | 216 | // Build the wrapper OpenGL ES 3.x library (this is just different name for v2) | 
 | 217 | // | 
 | 218 | cc_library_shared { | 
 | 219 |     name: "libGLESv3", | 
 | 220 |     defaults: ["gles_libs_defaults"], | 
 | 221 |     srcs: ["GLES2/gl2.cpp"], | 
| Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 222 |     cflags: ["-DLOG_TAG=\"libGLESv3\""], | 
 | 223 | } |