blob: 3ee0fafdb1297286b7a65cadc6b82ea8fa889734 [file] [log] [blame]
Dan Willemsen59e086f2016-07-25 17:13:45 -07001// Build the ETC1 library
Bob Badour3c538232021-02-12 21:26:48 -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",
Mathias Agopian5f1af042017-03-09 18:50:05 -0800111 "libbacktrace",
Michael Hoisie4e0f56b2020-04-30 18:40:55 -0400112 "libbase",
Dan Willemsena3310632016-10-03 23:56:51 -0700113 ],
Jiyong Parka243e5d2017-06-21 12:26:51 +0900114 target: {
115 vendor: {
116 exclude_shared_libs: ["libgraphicsenv"],
117 },
118 },
Dan Willemsena3310632016-10-03 23:56:51 -0700119}
120
121cc_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 Iliev9e7cd072017-10-09 15:56:10 -0400132cc_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 Willemsena3310632016-10-03 23:56:51 -0700142cc_library_shared {
143 name: "libEGL",
144 defaults: ["egl_libs_defaults"],
Colin Cross8af6d1c2020-10-19 13:38:00 -0700145 llndk_stubs: "libEGL.llndk",
Dan Willemsena3310632016-10-03 23:56:51 -0700146 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 07:22:09 -0600151 "EGL/egl_layers.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700152 "EGL/egl.cpp",
Cody Northrop68d10352018-10-15 07:22:09 -0600153 "EGL/eglApi.cpp",
Cody Northrop0ec5d382018-10-15 07:22:07 -0600154 "EGL/egl_platform_entries.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700155 "EGL/Loader.cpp",
Tobin Ehlis96a184d2018-07-18 16:14:07 -0600156 "EGL/egl_angle_platform.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700157 ],
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600158 shared_libs: [
159 "libvndksupport",
160 "android.hardware.configstore@1.0",
161 "android.hardware.configstore-utils",
Cody Northrop629ce4e2018-10-15 07:22:09 -0600162 "libbase",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600163 "libhidlbase",
Jiyong Parkbd1ddb22019-02-18 21:22:28 +0900164 "libnativebridge_lazy",
165 "libnativeloader_lazy",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600166 "libutils",
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900167 "libSurfaceFlingerProp",
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 Cross8af6d1c2020-10-19 13:38:00 -0700211 llndk_stubs: "libGLESv1_CM.llndk",
Dan Willemsena3310632016-10-03 23:56:51 -0700212 srcs: ["GLES_CM/gl.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700213 cflags: ["-DLOG_TAG=\"libGLESv1\""],
dimitry0b586e82018-12-11 14:33:30 +0100214 version_script: "libGLESv1_CM.map.txt",
Dan Willemsena3310632016-10-03 23:56:51 -0700215}
216
217//##############################################################################
218// Build the wrapper OpenGL ES 2.x library
219//
220cc_library_shared {
221 name: "libGLESv2",
222 defaults: ["gles_libs_defaults"],
Colin Cross8af6d1c2020-10-19 13:38:00 -0700223 llndk_stubs: "libGLESv2.llndk",
Dan Willemsena3310632016-10-03 23:56:51 -0700224 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700225 cflags: ["-DLOG_TAG=\"libGLESv2\""],
Pirama Arumuga Nainar5d7eb4f2019-05-29 15:17:53 -0700226
227 // Bug: http://b/133874658 Disable native_coverage as we investigate a
228 // crash in surfaceflinger on coverage-enabled cuttlefish builds.
229 native_coverage: false,
Dan Willemsena3310632016-10-03 23:56:51 -0700230}
231
232//##############################################################################
233// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
234//
235cc_library_shared {
236 name: "libGLESv3",
237 defaults: ["gles_libs_defaults"],
Colin Cross8af6d1c2020-10-19 13:38:00 -0700238 llndk_stubs: "libGLESv3.llndk",
Dan Willemsena3310632016-10-03 23:56:51 -0700239 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700240 cflags: ["-DLOG_TAG=\"libGLESv3\""],
241}
Colin Cross88fd5242020-12-17 10:31:34 -0800242
243llndk_library {
244 name: "libEGL.llndk",
245 symbol_file: "libEGL.map.txt",
246 export_llndk_headers: ["gl_llndk_headers"],
247}
248
249llndk_library {
250 name: "libGLESv1_CM.llndk",
251 symbol_file: "libGLESv1_CM.map.txt",
252 export_llndk_headers: ["gl_llndk_headers"],
253}
254
255llndk_library {
256 name: "libGLESv2.llndk",
257 symbol_file: "libGLESv2.map.txt",
258 export_llndk_headers: ["gl_llndk_headers"],
259}
260
261llndk_library {
262 name: "libGLESv3.llndk",
263 symbol_file: "libGLESv3.map.txt",
264 export_llndk_headers: ["gl_llndk_headers"],
265}