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