blob: 75dda6dc61403b7b4fa4872ed3ecd5e449bbbd1e [file] [log] [blame]
Dan Willemsen59e086f2016-07-26 00:13:451// Build the ETC1 library
2cc_library {
3 name: "libETC1",
4 srcs: ["ETC1/etc1.cpp"],
5 host_supported: true,
Chih-Hung Hsiehc60a0f02017-10-05 21:25:186 cflags: ["-Wall", "-Werror"],
Dan Willemsen59e086f2016-07-26 00:13:457
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 19:36:0024
Dan Albert7facb1d2016-10-03 19:36:0025// The headers modules are in frameworks/native/opengl/Android.bp.
Dan Albert49fbff42016-10-03 19:36:0026ndk_library {
Dan Willemsen219db6c2017-04-07 22:48:3927 name: "libEGL",
Dan Albert49fbff42016-10-03 19:36:0028 symbol_file: "libEGL.map.txt",
29 first_version: "9",
Dan Albertb9c62a62017-01-05 23:58:5030 unversioned_until: "current",
Dan Albert49fbff42016-10-03 19:36:0031}
Dan Albert7facb1d2016-10-03 19:36:0032
33ndk_library {
Dan Willemsen219db6c2017-04-07 22:48:3934 name: "libGLESv1_CM",
Dan Albert7facb1d2016-10-03 19:36:0035 symbol_file: "libGLESv1_CM.map.txt",
36 first_version: "9",
Dan Albertb9c62a62017-01-05 23:58:5037 unversioned_until: "current",
Dan Albert7facb1d2016-10-03 19:36:0038}
Dan Albert00500c72016-10-03 19:36:0039
40ndk_library {
Dan Willemsen219db6c2017-04-07 22:48:3941 name: "libGLESv2",
Dan Albert00500c72016-10-03 19:36:0042 symbol_file: "libGLESv2.map.txt",
43 first_version: "9",
Dan Albertb9c62a62017-01-05 23:58:5044 unversioned_until: "current",
Dan Albert00500c72016-10-03 19:36:0045}
Dan Albertd7d8efa2016-10-03 19:36:0046
47ndk_library {
Dan Willemsen219db6c2017-04-07 22:48:3948 name: "libGLESv3",
Dan Albertd7d8efa2016-10-03 19:36:0049 symbol_file: "libGLESv3.map.txt",
50 first_version: "18",
Dan Albertb9c62a62017-01-05 23:58:5051 unversioned_until: "current",
Dan Albertd7d8efa2016-10-03 19:36:0052}
Dan Willemsena3310632016-10-04 06:56:5153
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 21:25:1860 "-Wall",
61 "-Werror",
62 "-Wno-unused-variable",
Dan Willemsena3310632016-10-04 06:56:5163 ],
64 shared_libs: [
Mathias Agopian5f1af042017-03-10 02:50:0565 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
66 // In particular, DO NOT add libutils or anything "above" libcutils
Dan Willemsena3310632016-10-04 06:56:5167 "libcutils",
68 "liblog",
69 "libdl",
70 ],
Jiyong Parka243e5d2017-06-21 03:26:5171 static_libs: [
72 "libarect",
73 ],
74 header_libs: [
75 "gl_headers",
76 "libsystem_headers",
77 "libhardware_headers",
78 "libnativebase_headers",
79 ],
80 export_header_lib_headers: ["gl_headers"],
Dan Willemsena3310632016-10-04 06:56:5181
82 // we need to access the private Bionic header <bionic_tls.h>
83 include_dirs: ["bionic/libc/private"],
84}
85
86//##############################################################################
87// Build META EGL library
88//
89cc_defaults {
90 name: "egl_libs_defaults",
91 defaults: ["gl_libs_defaults"],
Dan Willemsena3310632016-10-04 06:56:5192 cflags: [
93 "-DLOG_TAG=\"libEGL\"",
Chih-Hung Hsiehc60a0f02017-10-05 21:25:1894 "-Wall",
95 "-Werror",
96 "-Wno-error=deprecated-register",
97 "-Wno-error=unknown-attributes",
98 "-Wno-unused-variable",
Dan Willemsena3310632016-10-04 06:56:5199 ],
100 shared_libs: [
Mathias Agopian5f1af042017-03-10 02:50:05101 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
102 // In particular, DO NOT add libutils nor anything "above" libui
Jiyong Park27c39e12017-05-08 04:00:02103 "libgraphicsenv",
Mathias Agopian89ed4c82017-02-10 02:48:34104 "libnativewindow",
Mathias Agopian5f1af042017-03-10 02:50:05105 "libbacktrace",
Dan Willemsena3310632016-10-04 06:56:51106 ],
Jiyong Parka243e5d2017-06-21 03:26:51107 target: {
108 vendor: {
109 exclude_shared_libs: ["libgraphicsenv"],
110 },
111 },
Dan Willemsena3310632016-10-04 06:56:51112}
113
114cc_library_static {
115 name: "libEGL_getProcAddress",
116 defaults: ["egl_libs_defaults"],
117 srcs: ["EGL/getProcAddress.cpp"],
118 arch: {
119 arm: {
120 instruction_set: "arm",
121 },
122 },
123}
124
Stan Iliev9e7cd072017-10-09 19:56:10125cc_library_static {
126 name: "libEGL_blobCache",
127 defaults: ["egl_libs_defaults"],
128 srcs: [
129 "EGL/BlobCache.cpp",
130 "EGL/FileBlobCache.cpp",
131 ],
132 export_include_dirs: ["EGL"],
133}
134
Dan Willemsena3310632016-10-04 06:56:51135cc_library_shared {
136 name: "libEGL",
137 defaults: ["egl_libs_defaults"],
138 srcs: [
139 "EGL/egl_tls.cpp",
140 "EGL/egl_cache.cpp",
141 "EGL/egl_display.cpp",
142 "EGL/egl_object.cpp",
143 "EGL/egl.cpp",
144 "EGL/eglApi.cpp",
145 "EGL/Loader.cpp",
Dan Willemsena3310632016-10-04 06:56:51146 ],
Courtney Goeltzenleuchter1b717022017-07-07 20:55:40147 shared_libs: [
148 "libvndksupport",
149 "[email protected]",
150 "android.hardware.configstore-utils",
151 "libhidlbase",
152 "libhidltransport",
153 "libutils",
154 ],
Stan Iliev9e7cd072017-10-09 19:56:10155 static_libs: [
156 "libEGL_getProcAddress",
157 "libEGL_blobCache",
158 ],
Dan Willemsena3310632016-10-04 06:56:51159 ldflags: ["-Wl,--exclude-libs=ALL"],
Mathias Agopianb7f9a242017-03-09 06:29:31160 export_include_dirs: ["EGL/include"],
161}
162
163cc_test {
164 name: "libEGL_test",
165 defaults: ["egl_libs_defaults"],
166 srcs: [
167 "EGL/BlobCache.cpp",
168 "EGL/BlobCache_test.cpp",
169 ],
Dan Willemsena3310632016-10-04 06:56:51170}
171
172cc_defaults {
173 name: "gles_libs_defaults",
174 defaults: ["gl_libs_defaults"],
Dan Willemsena3310632016-10-04 06:56:51175 arch: {
176 arm: {
177 instruction_set: "arm",
178
179 // TODO: This is to work around b/20093774. Remove after root cause is fixed
180 ldflags: ["-Wl,--hash-style,both"],
181 },
182 },
183 shared_libs: ["libEGL"],
184}
185
186//##############################################################################
187// Build the wrapper OpenGL ES 1.x library
188//
189cc_library_shared {
190 name: "libGLESv1_CM",
191 defaults: ["gles_libs_defaults"],
192 srcs: ["GLES_CM/gl.cpp"],
Dan Willemsena3310632016-10-04 06:56:51193 cflags: ["-DLOG_TAG=\"libGLESv1\""],
194}
195
196//##############################################################################
197// Build the wrapper OpenGL ES 2.x library
198//
199cc_library_shared {
200 name: "libGLESv2",
201 defaults: ["gles_libs_defaults"],
202 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-04 06:56:51203 cflags: ["-DLOG_TAG=\"libGLESv2\""],
Pirama Arumuga Nainar5d7eb4f2019-05-29 22:17:53204
205 // Bug: http://b/133874658 Disable native_coverage as we investigate a
206 // crash in surfaceflinger on coverage-enabled cuttlefish builds.
207 native_coverage: false,
Dan Willemsena3310632016-10-04 06:56:51208}
209
210//##############################################################################
211// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
212//
213cc_library_shared {
214 name: "libGLESv3",
215 defaults: ["gles_libs_defaults"],
216 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-04 06:56:51217 cflags: ["-DLOG_TAG=\"libGLESv3\""],
218}