blob: 3997134f47ce61b48b42ced8ba544078f2652927 [file] [log] [blame]
Dan Willemsen59e086f2016-07-25 17:13:45 -07001// Build the ETC1 library
2cc_library {
3 name: "libETC1",
4 srcs: ["ETC1/etc1.cpp"],
5 host_supported: true,
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -07006 cflags: ["-Wall", "-Werror"],
Dan Willemsen59e086f2016-07-25 17:13:45 -07007
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 Albert49fbff42016-10-03 12:36:00 -070024
Dan Albert7facb1d2016-10-03 12:36:00 -070025// The headers modules are in frameworks/native/opengl/Android.bp.
Dan Albert49fbff42016-10-03 12:36:00 -070026ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070027 name: "libEGL",
Dan Albert49fbff42016-10-03 12:36:00 -070028 symbol_file: "libEGL.map.txt",
29 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080030 unversioned_until: "current",
Dan Albert49fbff42016-10-03 12:36:00 -070031}
Dan Albert7facb1d2016-10-03 12:36:00 -070032
33ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070034 name: "libGLESv1_CM",
Dan Albert7facb1d2016-10-03 12:36:00 -070035 symbol_file: "libGLESv1_CM.map.txt",
36 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080037 unversioned_until: "current",
Dan Albert7facb1d2016-10-03 12:36:00 -070038}
Dan Albert00500c72016-10-03 12:36:00 -070039
40ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070041 name: "libGLESv2",
Dan Albert00500c72016-10-03 12:36:00 -070042 symbol_file: "libGLESv2.map.txt",
43 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080044 unversioned_until: "current",
Dan Albert00500c72016-10-03 12:36:00 -070045}
Dan Albertd7d8efa2016-10-03 12:36:00 -070046
47ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070048 name: "libGLESv3",
Dan Albertd7d8efa2016-10-03 12:36:00 -070049 symbol_file: "libGLESv3.map.txt",
50 first_version: "18",
Dan Albertb9c62a62017-01-05 15:58:50 -080051 unversioned_until: "current",
Dan Albertd7d8efa2016-10-03 12:36:00 -070052}
Dan Willemsena3310632016-10-03 23:56:51 -070053
54cc_defaults {
55 name: "gl_libs_defaults",
56 cflags: [
57 "-DGL_GLEXT_PROTOTYPES",
58 "-DEGL_EGLEXT_PROTOTYPES",
59 "-fvisibility=hidden",
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -070060 "-Wall",
61 "-Werror",
62 "-Wno-unused-variable",
Dan Willemsena3310632016-10-03 23:56:51 -070063 ],
64 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -080065 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
66 // In particular, DO NOT add libutils or anything "above" libcutils
Dan Willemsena3310632016-10-03 23:56:51 -070067 "libcutils",
68 "liblog",
69 "libdl",
70 ],
Jiyong Parka243e5d2017-06-21 12:26:51 +090071 static_libs: [
72 "libarect",
73 ],
74 header_libs: [
Christopher Ferrisddd1d6b2019-09-26 08:27:25 -070075 "bionic_libc_platform_headers",
Jiyong Parka243e5d2017-06-21 12:26:51 +090076 "gl_headers",
77 "libsystem_headers",
Jiyong Parka243e5d2017-06-21 12:26:51 +090078 "libnativebase_headers",
79 ],
80 export_header_lib_headers: ["gl_headers"],
Dan Willemsena3310632016-10-03 23:56:51 -070081}
82
83//##############################################################################
84// Build META EGL library
85//
86cc_defaults {
87 name: "egl_libs_defaults",
88 defaults: ["gl_libs_defaults"],
89 cflags: [
90 "-DLOG_TAG=\"libEGL\"",
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -070091 "-Wall",
92 "-Werror",
93 "-Wno-error=deprecated-register",
94 "-Wno-error=unknown-attributes",
95 "-Wno-unused-variable",
Dan Willemsena3310632016-10-03 23:56:51 -070096 ],
97 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -080098 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
99 // In particular, DO NOT add libutils nor anything "above" libui
Jiyong Park27c39e12017-05-08 13:00:02 +0900100 "libgraphicsenv",
Mathias Agopian89ed4c82017-02-09 18:48:34 -0800101 "libnativewindow",
Mathias Agopian5f1af042017-03-09 18:50:05 -0800102 "libbacktrace",
Dan Willemsena3310632016-10-03 23:56:51 -0700103 ],
Jiyong Parka243e5d2017-06-21 12:26:51 +0900104 target: {
105 vendor: {
106 exclude_shared_libs: ["libgraphicsenv"],
107 },
108 },
Dan Willemsena3310632016-10-03 23:56:51 -0700109}
110
111cc_library_static {
112 name: "libEGL_getProcAddress",
113 defaults: ["egl_libs_defaults"],
114 srcs: ["EGL/getProcAddress.cpp"],
115 arch: {
116 arm: {
117 instruction_set: "arm",
118 },
119 },
120}
121
Stan Iliev9e7cd072017-10-09 15:56:10 -0400122cc_library_static {
123 name: "libEGL_blobCache",
124 defaults: ["egl_libs_defaults"],
125 srcs: [
126 "EGL/BlobCache.cpp",
127 "EGL/FileBlobCache.cpp",
128 ],
129 export_include_dirs: ["EGL"],
130}
131
Dan Willemsena3310632016-10-03 23:56:51 -0700132cc_library_shared {
133 name: "libEGL",
134 defaults: ["egl_libs_defaults"],
135 srcs: [
136 "EGL/egl_tls.cpp",
137 "EGL/egl_cache.cpp",
138 "EGL/egl_display.cpp",
139 "EGL/egl_object.cpp",
Cody Northrop629ce4e2018-10-15 07:22:09 -0600140 "EGL/egl_layers.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700141 "EGL/egl.cpp",
Cody Northrop68d10352018-10-15 07:22:09 -0600142 "EGL/eglApi.cpp",
Cody Northrop0ec5d382018-10-15 07:22:07 -0600143 "EGL/egl_platform_entries.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700144 "EGL/Loader.cpp",
Tobin Ehlis96a184d2018-07-18 16:14:07 -0600145 "EGL/egl_angle_platform.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700146 ],
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600147 shared_libs: [
148 "libvndksupport",
149 "android.hardware.configstore@1.0",
150 "android.hardware.configstore-utils",
Cody Northrop629ce4e2018-10-15 07:22:09 -0600151 "libbase",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600152 "libhidlbase",
Jiyong Parkbd1ddb22019-02-18 21:22:28 +0900153 "libnativebridge_lazy",
154 "libnativeloader_lazy",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600155 "libutils",
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900156 "libSurfaceFlingerProp",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600157 ],
Stan Iliev9e7cd072017-10-09 15:56:10 -0400158 static_libs: [
159 "libEGL_getProcAddress",
160 "libEGL_blobCache",
161 ],
Tao Wu8f054a62019-05-14 09:16:07 -0700162 ldflags: ["-Wl,--exclude-libs=ALL,--Bsymbolic-functions"],
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800163 export_include_dirs: ["EGL/include"],
jorgegil@google.come8141512019-11-21 13:42:16 -0800164 stubs: {
165 symbol_file: "libEGL.map.txt",
166 versions: ["29"],
167 },
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900168 header_libs: ["libsurfaceflinger_headers"],
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800169}
170
171cc_test {
172 name: "libEGL_test",
173 defaults: ["egl_libs_defaults"],
174 srcs: [
175 "EGL/BlobCache.cpp",
176 "EGL/BlobCache_test.cpp",
177 ],
Dan Willemsena3310632016-10-03 23:56:51 -0700178}
179
180cc_defaults {
181 name: "gles_libs_defaults",
182 defaults: ["gl_libs_defaults"],
183 arch: {
184 arm: {
185 instruction_set: "arm",
186
187 // TODO: This is to work around b/20093774. Remove after root cause is fixed
188 ldflags: ["-Wl,--hash-style,both"],
189 },
190 },
191 shared_libs: ["libEGL"],
192}
193
194//##############################################################################
195// Build the wrapper OpenGL ES 1.x library
196//
197cc_library_shared {
198 name: "libGLESv1_CM",
199 defaults: ["gles_libs_defaults"],
200 srcs: ["GLES_CM/gl.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700201 cflags: ["-DLOG_TAG=\"libGLESv1\""],
dimitry0b586e82018-12-11 14:33:30 +0100202 version_script: "libGLESv1_CM.map.txt",
Dan Willemsena3310632016-10-03 23:56:51 -0700203}
204
205//##############################################################################
206// Build the wrapper OpenGL ES 2.x library
207//
208cc_library_shared {
209 name: "libGLESv2",
210 defaults: ["gles_libs_defaults"],
211 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700212 cflags: ["-DLOG_TAG=\"libGLESv2\""],
Pirama Arumuga Nainar5d7eb4f2019-05-29 15:17:53 -0700213
214 // Bug: http://b/133874658 Disable native_coverage as we investigate a
215 // crash in surfaceflinger on coverage-enabled cuttlefish builds.
216 native_coverage: false,
Dan Willemsena3310632016-10-03 23:56:51 -0700217}
218
219//##############################################################################
220// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
221//
222cc_library_shared {
223 name: "libGLESv3",
224 defaults: ["gles_libs_defaults"],
225 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700226 cflags: ["-DLOG_TAG=\"libGLESv3\""],
227}