blob: c9fce8ad526f50db3220f23ea4744a8047df5aae [file] [log] [blame]
Dan Willemsen59e086f2016-07-26 00:13:451// Build the ETC1 library
Bob Badour3306e492021-02-25 23:35:372package {
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-26 00:13:4511cc_library {
12 name: "libETC1",
13 srcs: ["ETC1/etc1.cpp"],
14 host_supported: true,
Chih-Hung Hsiehc60a0f02017-10-05 21:25:1815 cflags: ["-Wall", "-Werror"],
Dan Willemsen59e086f2016-07-26 00:13:4516
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 19:36:0033
Dan Albert7facb1d2016-10-03 19:36:0034// The headers modules are in frameworks/native/opengl/Android.bp.
Dan Albert49fbff42016-10-03 19:36:0035ndk_library {
Dan Willemsen219db6c2017-04-07 22:48:3936 name: "libEGL",
Dan Albert49fbff42016-10-03 19:36:0037 symbol_file: "libEGL.map.txt",
38 first_version: "9",
Dan Albertb9c62a62017-01-05 23:58:5039 unversioned_until: "current",
Dan Albert49fbff42016-10-03 19:36:0040}
Dan Albert7facb1d2016-10-03 19:36:0041
42ndk_library {
Dan Willemsen219db6c2017-04-07 22:48:3943 name: "libGLESv1_CM",
Dan Albert7facb1d2016-10-03 19:36:0044 symbol_file: "libGLESv1_CM.map.txt",
45 first_version: "9",
Dan Albertb9c62a62017-01-05 23:58:5046 unversioned_until: "current",
Dan Albert7facb1d2016-10-03 19:36:0047}
Dan Albert00500c72016-10-03 19:36:0048
49ndk_library {
Dan Willemsen219db6c2017-04-07 22:48:3950 name: "libGLESv2",
Dan Albert00500c72016-10-03 19:36:0051 symbol_file: "libGLESv2.map.txt",
52 first_version: "9",
Dan Albertb9c62a62017-01-05 23:58:5053 unversioned_until: "current",
Dan Albert00500c72016-10-03 19:36:0054}
Dan Albertd7d8efa2016-10-03 19:36:0055
56ndk_library {
Dan Willemsen219db6c2017-04-07 22:48:3957 name: "libGLESv3",
Dan Albertd7d8efa2016-10-03 19:36:0058 symbol_file: "libGLESv3.map.txt",
59 first_version: "18",
Dan Albertb9c62a62017-01-05 23:58:5060 unversioned_until: "current",
Dan Albertd7d8efa2016-10-03 19:36:0061}
Dan Willemsena3310632016-10-04 06:56:5162
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 21:25:1869 "-Wall",
70 "-Werror",
71 "-Wno-unused-variable",
Dan Willemsena3310632016-10-04 06:56:5172 ],
73 shared_libs: [
Mathias Agopian5f1af042017-03-10 02:50:0574 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
75 // In particular, DO NOT add libutils or anything "above" libcutils
Dan Willemsena3310632016-10-04 06:56:5176 "libcutils",
77 "liblog",
78 "libdl",
79 ],
Jiyong Parka243e5d2017-06-21 03:26:5180 static_libs: [
81 "libarect",
82 ],
83 header_libs: [
Christopher Ferrisddd1d6b2019-09-26 15:27:2584 "bionic_libc_platform_headers",
Jiyong Parka243e5d2017-06-21 03:26:5185 "gl_headers",
86 "libsystem_headers",
Jiyong Parka243e5d2017-06-21 03:26:5187 "libnativebase_headers",
88 ],
89 export_header_lib_headers: ["gl_headers"],
Dan Willemsena3310632016-10-04 06:56:5190}
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 21:25:18100 "-Wall",
101 "-Werror",
102 "-Wno-error=deprecated-register",
103 "-Wno-error=unknown-attributes",
104 "-Wno-unused-variable",
Dan Willemsena3310632016-10-04 06:56:51105 ],
106 shared_libs: [
Mathias Agopian5f1af042017-03-10 02:50:05107 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
108 // In particular, DO NOT add libutils nor anything "above" libui
Jiyong Park27c39e12017-05-08 04:00:02109 "libgraphicsenv",
Mathias Agopian89ed4c82017-02-10 02:48:34110 "libnativewindow",
Mathias Agopian5f1af042017-03-10 02:50:05111 "libbacktrace",
Michael Hoisie4e0f56b2020-04-30 22:40:55112 "libbase",
Dan Willemsena3310632016-10-04 06:56:51113 ],
114}
115
116cc_library_static {
117 name: "libEGL_getProcAddress",
118 defaults: ["egl_libs_defaults"],
119 srcs: ["EGL/getProcAddress.cpp"],
120 arch: {
121 arm: {
122 instruction_set: "arm",
123 },
124 },
125}
126
Stan Iliev9e7cd072017-10-09 19:56:10127cc_library_static {
128 name: "libEGL_blobCache",
129 defaults: ["egl_libs_defaults"],
130 srcs: [
131 "EGL/BlobCache.cpp",
132 "EGL/FileBlobCache.cpp",
133 ],
134 export_include_dirs: ["EGL"],
135}
136
Dan Willemsena3310632016-10-04 06:56:51137cc_library_shared {
138 name: "libEGL",
139 defaults: ["egl_libs_defaults"],
Colin Cross03943642021-04-21 23:47:25140 llndk: {
141 symbol_file: "libEGL.map.txt",
Colin Crossed0e6e62021-04-27 00:19:59142 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 23:47:25143 // Don't export EGL/include from the LLNDK variant.
144 override_export_include_dirs: [],
145 },
Dan Willemsena3310632016-10-04 06:56:51146 srcs: [
147 "EGL/egl_tls.cpp",
148 "EGL/egl_cache.cpp",
149 "EGL/egl_display.cpp",
150 "EGL/egl_object.cpp",
Cody Northrop629ce4e2018-10-15 13:22:09151 "EGL/egl_layers.cpp",
Dan Willemsena3310632016-10-04 06:56:51152 "EGL/egl.cpp",
Cody Northrop68d10352018-10-15 13:22:09153 "EGL/eglApi.cpp",
Cody Northrop0ec5d382018-10-15 13:22:07154 "EGL/egl_platform_entries.cpp",
Dan Willemsena3310632016-10-04 06:56:51155 "EGL/Loader.cpp",
Tobin Ehlis96a184d2018-07-18 22:14:07156 "EGL/egl_angle_platform.cpp",
Dan Willemsena3310632016-10-04 06:56:51157 ],
Courtney Goeltzenleuchter1b717022017-07-07 20:55:40158 shared_libs: [
159 "libvndksupport",
160 "[email protected]",
161 "android.hardware.configstore-utils",
Cody Northrop629ce4e2018-10-15 13:22:09162 "libbase",
Courtney Goeltzenleuchter1b717022017-07-07 20:55:40163 "libhidlbase",
Jiyong Parkbd1ddb22019-02-18 12:22:28164 "libnativebridge_lazy",
165 "libnativeloader_lazy",
Courtney Goeltzenleuchter1b717022017-07-07 20:55:40166 "libutils",
Sundong Ahn204fb1f2020-04-23 12:56:36167 "libSurfaceFlingerProp",
Courtney Goeltzenleuchter1b717022017-07-07 20:55:40168 ],
Stan Iliev9e7cd072017-10-09 19:56:10169 static_libs: [
170 "libEGL_getProcAddress",
171 "libEGL_blobCache",
172 ],
Tao Wu8f054a62019-05-14 16:16:07173 ldflags: ["-Wl,--exclude-libs=ALL,--Bsymbolic-functions"],
Mathias Agopianb7f9a242017-03-09 06:29:31174 export_include_dirs: ["EGL/include"],
[email protected]e8141512019-11-21 21:42:16175 stubs: {
176 symbol_file: "libEGL.map.txt",
177 versions: ["29"],
178 },
Sundong Ahn204fb1f2020-04-23 12:56:36179 header_libs: ["libsurfaceflinger_headers"],
Mathias Agopianb7f9a242017-03-09 06:29:31180}
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-04 06:56:51189}
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 23:47:25211 llndk: {
212 symbol_file: "libGLESv1_CM.map.txt",
Colin Crossed0e6e62021-04-27 00:19:59213 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 23:47:25214 // Don't export EGL/include from the LLNDK variant.
215 override_export_include_dirs: [],
216 },
Dan Willemsena3310632016-10-04 06:56:51217 srcs: ["GLES_CM/gl.cpp"],
Dan Willemsena3310632016-10-04 06:56:51218 cflags: ["-DLOG_TAG=\"libGLESv1\""],
dimitry0b586e82018-12-11 13:33:30219 version_script: "libGLESv1_CM.map.txt",
Dan Willemsena3310632016-10-04 06:56:51220}
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 23:47:25228 llndk: {
229 symbol_file: "libGLESv2.map.txt",
Colin Crossed0e6e62021-04-27 00:19:59230 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 23:47:25231 // Don't export EGL/include from the LLNDK variant.
232 override_export_include_dirs: [],
233 },
Dan Willemsena3310632016-10-04 06:56:51234 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-04 06:56:51235 cflags: ["-DLOG_TAG=\"libGLESv2\""],
Pirama Arumuga Nainar5d7eb4f2019-05-29 22:17:53236
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-04 06:56:51240}
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 23:47:25248 llndk: {
249 symbol_file: "libGLESv3.map.txt",
Colin Crossed0e6e62021-04-27 00:19:59250 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 23:47:25251 // Don't export EGL/include from the LLNDK variant.
252 override_export_include_dirs: [],
253 },
Dan Willemsena3310632016-10-04 06:56:51254 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-04 06:56:51255 cflags: ["-DLOG_TAG=\"libGLESv3\""],
256}