blob: c1e935aab05bce7ea751b6fd4499613b0df98be6 [file] [log] [blame]
Dan Willemsen59e086f2016-07-25 17:13:45 -07001// Build the ETC1 library
Bob Badour3306e492021-02-25 15:35:37 -08002package {
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 Willemsen59e086f2016-07-25 17:13:45 -070011cc_library {
12 name: "libETC1",
13 srcs: ["ETC1/etc1.cpp"],
14 host_supported: true,
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -070015 cflags: ["-Wall", "-Werror"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070016
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 Albert49fbff42016-10-03 12:36:00 -070033
Dan Albert7facb1d2016-10-03 12:36:00 -070034// The headers modules are in frameworks/native/opengl/Android.bp.
Dan Albert49fbff42016-10-03 12:36:00 -070035ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070036 name: "libEGL",
Dan Albert49fbff42016-10-03 12:36:00 -070037 symbol_file: "libEGL.map.txt",
38 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080039 unversioned_until: "current",
Dan Albert49fbff42016-10-03 12:36:00 -070040}
Dan Albert7facb1d2016-10-03 12:36:00 -070041
42ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070043 name: "libGLESv1_CM",
Dan Albert7facb1d2016-10-03 12:36:00 -070044 symbol_file: "libGLESv1_CM.map.txt",
45 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080046 unversioned_until: "current",
Dan Albert7facb1d2016-10-03 12:36:00 -070047}
Dan Albert00500c72016-10-03 12:36:00 -070048
49ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070050 name: "libGLESv2",
Dan Albert00500c72016-10-03 12:36:00 -070051 symbol_file: "libGLESv2.map.txt",
52 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080053 unversioned_until: "current",
Dan Albert00500c72016-10-03 12:36:00 -070054}
Dan Albertd7d8efa2016-10-03 12:36:00 -070055
56ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070057 name: "libGLESv3",
Dan Albertd7d8efa2016-10-03 12:36:00 -070058 symbol_file: "libGLESv3.map.txt",
59 first_version: "18",
Dan Albertb9c62a62017-01-05 15:58:50 -080060 unversioned_until: "current",
Dan Albertd7d8efa2016-10-03 12:36:00 -070061}
Dan Willemsena3310632016-10-03 23:56:51 -070062
63cc_defaults {
64 name: "gl_libs_defaults",
65 cflags: [
66 "-DGL_GLEXT_PROTOTYPES",
67 "-DEGL_EGLEXT_PROTOTYPES",
68 "-fvisibility=hidden",
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -070069 "-Wall",
70 "-Werror",
71 "-Wno-unused-variable",
Dan Willemsena3310632016-10-03 23:56:51 -070072 ],
73 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -080074 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
75 // In particular, DO NOT add libutils or anything "above" libcutils
Dan Willemsena3310632016-10-03 23:56:51 -070076 "libcutils",
77 "liblog",
78 "libdl",
79 ],
Jiyong Parka243e5d2017-06-21 12:26:51 +090080 static_libs: [
81 "libarect",
82 ],
83 header_libs: [
Christopher Ferrisddd1d6b2019-09-26 08:27:25 -070084 "bionic_libc_platform_headers",
Jiyong Parka243e5d2017-06-21 12:26:51 +090085 "gl_headers",
86 "libsystem_headers",
Jiyong Parka243e5d2017-06-21 12:26:51 +090087 "libnativebase_headers",
88 ],
89 export_header_lib_headers: ["gl_headers"],
Dan Willemsena3310632016-10-03 23:56:51 -070090}
91
92//##############################################################################
93// Build META EGL library
94//
95cc_defaults {
96 name: "egl_libs_defaults",
97 defaults: ["gl_libs_defaults"],
98 cflags: [
99 "-DLOG_TAG=\"libEGL\"",
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -0700100 "-Wall",
101 "-Werror",
102 "-Wno-error=deprecated-register",
103 "-Wno-error=unknown-attributes",
104 "-Wno-unused-variable",
Dan Willemsena3310632016-10-03 23:56:51 -0700105 ],
106 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -0800107 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
108 // In particular, DO NOT add libutils nor anything "above" libui
Jiyong Park27c39e12017-05-08 13:00:02 +0900109 "libgraphicsenv",
Mathias Agopian89ed4c82017-02-09 18:48:34 -0800110 "libnativewindow",
Michael Hoisie4e0f56b2020-04-30 18:40:55 -0400111 "libbase",
Dan Willemsena3310632016-10-03 23:56:51 -0700112 ],
113}
114
115cc_library_static {
116 name: "libEGL_getProcAddress",
117 defaults: ["egl_libs_defaults"],
118 srcs: ["EGL/getProcAddress.cpp"],
119 arch: {
120 arm: {
121 instruction_set: "arm",
122 },
123 },
124}
125
Stan Iliev9e7cd072017-10-09 15:56:10 -0400126cc_library_static {
127 name: "libEGL_blobCache",
128 defaults: ["egl_libs_defaults"],
129 srcs: [
130 "EGL/BlobCache.cpp",
131 "EGL/FileBlobCache.cpp",
132 ],
133 export_include_dirs: ["EGL"],
134}
135
Dan Willemsena3310632016-10-03 23:56:51 -0700136cc_library_shared {
137 name: "libEGL",
138 defaults: ["egl_libs_defaults"],
Colin Cross03943642021-04-21 16:47:25 -0700139 llndk: {
140 symbol_file: "libEGL.map.txt",
Colin Crossed0e6e62021-04-26 17:19:59 -0700141 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 16:47:25 -0700142 // Don't export EGL/include from the LLNDK variant.
143 override_export_include_dirs: [],
144 },
Dan Willemsena3310632016-10-03 23:56:51 -0700145 srcs: [
146 "EGL/egl_tls.cpp",
147 "EGL/egl_cache.cpp",
148 "EGL/egl_display.cpp",
149 "EGL/egl_object.cpp",
Cody Northrop629ce4e2018-10-15 07:22:09 -0600150 "EGL/egl_layers.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700151 "EGL/egl.cpp",
Cody Northrop68d10352018-10-15 07:22:09 -0600152 "EGL/eglApi.cpp",
Cody Northrop0ec5d382018-10-15 07:22:07 -0600153 "EGL/egl_platform_entries.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700154 "EGL/Loader.cpp",
Tobin Ehlis96a184d2018-07-18 16:14:07 -0600155 "EGL/egl_angle_platform.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700156 ],
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600157 shared_libs: [
158 "libvndksupport",
159 "android.hardware.configstore@1.0",
160 "android.hardware.configstore-utils",
Cody Northrop629ce4e2018-10-15 07:22:09 -0600161 "libbase",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600162 "libhidlbase",
Jiyong Parkbd1ddb22019-02-18 21:22:28 +0900163 "libnativebridge_lazy",
164 "libnativeloader_lazy",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600165 "libutils",
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900166 "libSurfaceFlingerProp",
Christopher Ferrisdfb50b42022-03-23 12:37:58 -0700167 "libunwindstack",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600168 ],
Stan Iliev9e7cd072017-10-09 15:56:10 -0400169 static_libs: [
170 "libEGL_getProcAddress",
171 "libEGL_blobCache",
172 ],
Tao Wu8f054a62019-05-14 09:16:07 -0700173 ldflags: ["-Wl,--exclude-libs=ALL,--Bsymbolic-functions"],
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800174 export_include_dirs: ["EGL/include"],
jorgegil@google.come8141512019-11-21 13:42:16 -0800175 stubs: {
176 symbol_file: "libEGL.map.txt",
177 versions: ["29"],
178 },
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900179 header_libs: ["libsurfaceflinger_headers"],
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800180}
181
182cc_test {
183 name: "libEGL_test",
184 defaults: ["egl_libs_defaults"],
185 srcs: [
186 "EGL/BlobCache.cpp",
187 "EGL/BlobCache_test.cpp",
188 ],
Dan Willemsena3310632016-10-03 23:56:51 -0700189}
190
191cc_defaults {
192 name: "gles_libs_defaults",
193 defaults: ["gl_libs_defaults"],
194 arch: {
195 arm: {
196 instruction_set: "arm",
197
198 // TODO: This is to work around b/20093774. Remove after root cause is fixed
199 ldflags: ["-Wl,--hash-style,both"],
200 },
201 },
202 shared_libs: ["libEGL"],
203}
204
205//##############################################################################
206// Build the wrapper OpenGL ES 1.x library
207//
208cc_library_shared {
209 name: "libGLESv1_CM",
210 defaults: ["gles_libs_defaults"],
Colin Cross03943642021-04-21 16:47:25 -0700211 llndk: {
212 symbol_file: "libGLESv1_CM.map.txt",
Colin Crossed0e6e62021-04-26 17:19:59 -0700213 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 16:47:25 -0700214 // Don't export EGL/include from the LLNDK variant.
215 override_export_include_dirs: [],
216 },
Dan Willemsena3310632016-10-03 23:56:51 -0700217 srcs: ["GLES_CM/gl.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700218 cflags: ["-DLOG_TAG=\"libGLESv1\""],
dimitry0b586e82018-12-11 14:33:30 +0100219 version_script: "libGLESv1_CM.map.txt",
Dan Willemsena3310632016-10-03 23:56:51 -0700220}
221
222//##############################################################################
223// Build the wrapper OpenGL ES 2.x library
224//
225cc_library_shared {
226 name: "libGLESv2",
227 defaults: ["gles_libs_defaults"],
Colin Cross03943642021-04-21 16:47:25 -0700228 llndk: {
229 symbol_file: "libGLESv2.map.txt",
Colin Crossed0e6e62021-04-26 17:19:59 -0700230 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 16:47:25 -0700231 // Don't export EGL/include from the LLNDK variant.
232 override_export_include_dirs: [],
233 },
Dan Willemsena3310632016-10-03 23:56:51 -0700234 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700235 cflags: ["-DLOG_TAG=\"libGLESv2\""],
Pirama Arumuga Nainar5d7eb4f2019-05-29 15:17:53 -0700236
237 // Bug: http://b/133874658 Disable native_coverage as we investigate a
238 // crash in surfaceflinger on coverage-enabled cuttlefish builds.
239 native_coverage: false,
Dan Willemsena3310632016-10-03 23:56:51 -0700240}
241
242//##############################################################################
243// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
244//
245cc_library_shared {
246 name: "libGLESv3",
247 defaults: ["gles_libs_defaults"],
Colin Cross03943642021-04-21 16:47:25 -0700248 llndk: {
249 symbol_file: "libGLESv3.map.txt",
Colin Crossed0e6e62021-04-26 17:19:59 -0700250 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 16:47:25 -0700251 // Don't export EGL/include from the LLNDK variant.
252 override_export_include_dirs: [],
253 },
Dan Willemsena3310632016-10-03 23:56:51 -0700254 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700255 cflags: ["-DLOG_TAG=\"libGLESv3\""],
256}