blob: e255b9d436fed3de4b468bb81c26aac87071ef18 [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",
78 "libhardware_headers",
79 "libnativebase_headers",
80 ],
81 export_header_lib_headers: ["gl_headers"],
Dan Willemsena3310632016-10-03 23:56:51 -070082}
83
84//##############################################################################
85// Build META EGL library
86//
87cc_defaults {
88 name: "egl_libs_defaults",
89 defaults: ["gl_libs_defaults"],
90 cflags: [
91 "-DLOG_TAG=\"libEGL\"",
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -070092 "-Wall",
93 "-Werror",
94 "-Wno-error=deprecated-register",
95 "-Wno-error=unknown-attributes",
96 "-Wno-unused-variable",
Dan Willemsena3310632016-10-03 23:56:51 -070097 ],
98 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -080099 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
100 // In particular, DO NOT add libutils nor anything "above" libui
Jiyong Park27c39e12017-05-08 13:00:02 +0900101 "libgraphicsenv",
Mathias Agopian89ed4c82017-02-09 18:48:34 -0800102 "libnativewindow",
Mathias Agopian5f1af042017-03-09 18:50:05 -0800103 "libbacktrace",
Dan Willemsena3310632016-10-03 23:56:51 -0700104 ],
Jiyong Parka243e5d2017-06-21 12:26:51 +0900105 target: {
106 vendor: {
107 exclude_shared_libs: ["libgraphicsenv"],
108 },
109 },
Dan Willemsena3310632016-10-03 23:56:51 -0700110}
111
112cc_library_static {
113 name: "libEGL_getProcAddress",
114 defaults: ["egl_libs_defaults"],
115 srcs: ["EGL/getProcAddress.cpp"],
116 arch: {
117 arm: {
118 instruction_set: "arm",
119 },
120 },
121}
122
Stan Iliev9e7cd072017-10-09 15:56:10 -0400123cc_library_static {
124 name: "libEGL_blobCache",
125 defaults: ["egl_libs_defaults"],
126 srcs: [
127 "EGL/BlobCache.cpp",
128 "EGL/FileBlobCache.cpp",
129 ],
130 export_include_dirs: ["EGL"],
131}
132
Dan Willemsena3310632016-10-03 23:56:51 -0700133cc_library_shared {
134 name: "libEGL",
135 defaults: ["egl_libs_defaults"],
136 srcs: [
137 "EGL/egl_tls.cpp",
138 "EGL/egl_cache.cpp",
139 "EGL/egl_display.cpp",
140 "EGL/egl_object.cpp",
Cody Northrop629ce4e2018-10-15 07:22:09 -0600141 "EGL/egl_layers.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700142 "EGL/egl.cpp",
Cody Northrop68d10352018-10-15 07:22:09 -0600143 "EGL/eglApi.cpp",
Cody Northrop0ec5d382018-10-15 07:22:07 -0600144 "EGL/egl_platform_entries.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700145 "EGL/Loader.cpp",
Tobin Ehlis96a184d2018-07-18 16:14:07 -0600146 "EGL/egl_angle_platform.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700147 ],
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600148 shared_libs: [
149 "libvndksupport",
150 "android.hardware.configstore@1.0",
151 "android.hardware.configstore-utils",
Cody Northrop629ce4e2018-10-15 07:22:09 -0600152 "libbase",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600153 "libhidlbase",
Jiyong Parkbd1ddb22019-02-18 21:22:28 +0900154 "libnativebridge_lazy",
155 "libnativeloader_lazy",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600156 "libutils",
157 ],
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 },
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800168}
169
170cc_test {
171 name: "libEGL_test",
172 defaults: ["egl_libs_defaults"],
173 srcs: [
174 "EGL/BlobCache.cpp",
175 "EGL/BlobCache_test.cpp",
176 ],
Dan Willemsena3310632016-10-03 23:56:51 -0700177}
178
179cc_defaults {
180 name: "gles_libs_defaults",
181 defaults: ["gl_libs_defaults"],
182 arch: {
183 arm: {
184 instruction_set: "arm",
185
186 // TODO: This is to work around b/20093774. Remove after root cause is fixed
187 ldflags: ["-Wl,--hash-style,both"],
188 },
189 },
190 shared_libs: ["libEGL"],
191}
192
193//##############################################################################
194// Build the wrapper OpenGL ES 1.x library
195//
196cc_library_shared {
197 name: "libGLESv1_CM",
198 defaults: ["gles_libs_defaults"],
199 srcs: ["GLES_CM/gl.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700200 cflags: ["-DLOG_TAG=\"libGLESv1\""],
dimitry0b586e82018-12-11 14:33:30 +0100201 version_script: "libGLESv1_CM.map.txt",
Dan Willemsena3310632016-10-03 23:56:51 -0700202}
203
204//##############################################################################
205// Build the wrapper OpenGL ES 2.x library
206//
207cc_library_shared {
208 name: "libGLESv2",
209 defaults: ["gles_libs_defaults"],
210 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700211 cflags: ["-DLOG_TAG=\"libGLESv2\""],
Pirama Arumuga Nainar5d7eb4f2019-05-29 15:17:53 -0700212
213 // Bug: http://b/133874658 Disable native_coverage as we investigate a
214 // crash in surfaceflinger on coverage-enabled cuttlefish builds.
215 native_coverage: false,
Dan Willemsena3310632016-10-03 23:56:51 -0700216}
217
218//##############################################################################
219// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
220//
221cc_library_shared {
222 name: "libGLESv3",
223 defaults: ["gles_libs_defaults"],
224 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700225 cflags: ["-DLOG_TAG=\"libGLESv3\""],
226}