blob: 32c2d7e0d508bd79a47f916d1db9d2fe2d599e10 [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: [
75 "gl_headers",
76 "libsystem_headers",
77 "libhardware_headers",
78 "libnativebase_headers",
79 ],
80 export_header_lib_headers: ["gl_headers"],
Dan Willemsena3310632016-10-03 23:56:51 -070081
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"],
92 cflags: [
93 "-DLOG_TAG=\"libEGL\"",
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -070094 "-Wall",
95 "-Werror",
96 "-Wno-error=deprecated-register",
97 "-Wno-error=unknown-attributes",
98 "-Wno-unused-variable",
Dan Willemsena3310632016-10-03 23:56:51 -070099 ],
100 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -0800101 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
102 // In particular, DO NOT add libutils nor anything "above" libui
Jiyong Park27c39e12017-05-08 13:00:02 +0900103 "libgraphicsenv",
Mathias Agopian89ed4c82017-02-09 18:48:34 -0800104 "libnativewindow",
Mathias Agopian5f1af042017-03-09 18:50:05 -0800105 "libbacktrace",
Dan Willemsena3310632016-10-03 23:56:51 -0700106 ],
Jiyong Parka243e5d2017-06-21 12:26:51 +0900107 target: {
108 vendor: {
109 exclude_shared_libs: ["libgraphicsenv"],
110 },
111 },
Dan Willemsena3310632016-10-03 23:56:51 -0700112}
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
125cc_library_shared {
126 name: "libEGL",
127 defaults: ["egl_libs_defaults"],
128 srcs: [
129 "EGL/egl_tls.cpp",
130 "EGL/egl_cache.cpp",
131 "EGL/egl_display.cpp",
132 "EGL/egl_object.cpp",
133 "EGL/egl.cpp",
134 "EGL/eglApi.cpp",
135 "EGL/Loader.cpp",
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800136 "EGL/BlobCache.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700137 ],
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600138 shared_libs: [
139 "libvndksupport",
140 "android.hardware.configstore@1.0",
141 "android.hardware.configstore-utils",
142 "libhidlbase",
143 "libhidltransport",
144 "libutils",
145 ],
Dan Willemsena3310632016-10-03 23:56:51 -0700146 static_libs: ["libEGL_getProcAddress"],
147 ldflags: ["-Wl,--exclude-libs=ALL"],
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800148 export_include_dirs: ["EGL/include"],
149}
150
151cc_test {
152 name: "libEGL_test",
153 defaults: ["egl_libs_defaults"],
154 srcs: [
155 "EGL/BlobCache.cpp",
156 "EGL/BlobCache_test.cpp",
157 ],
Dan Willemsena3310632016-10-03 23:56:51 -0700158}
159
160cc_defaults {
161 name: "gles_libs_defaults",
162 defaults: ["gl_libs_defaults"],
163 arch: {
164 arm: {
165 instruction_set: "arm",
166
167 // TODO: This is to work around b/20093774. Remove after root cause is fixed
168 ldflags: ["-Wl,--hash-style,both"],
169 },
170 },
171 shared_libs: ["libEGL"],
172}
173
174//##############################################################################
175// Build the wrapper OpenGL ES 1.x library
176//
177cc_library_shared {
178 name: "libGLESv1_CM",
179 defaults: ["gles_libs_defaults"],
180 srcs: ["GLES_CM/gl.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700181 cflags: ["-DLOG_TAG=\"libGLESv1\""],
182}
183
184//##############################################################################
185// Build the wrapper OpenGL ES 2.x library
186//
187cc_library_shared {
188 name: "libGLESv2",
189 defaults: ["gles_libs_defaults"],
190 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700191 cflags: ["-DLOG_TAG=\"libGLESv2\""],
192}
193
194//##############################################################################
195// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
196//
197cc_library_shared {
198 name: "libGLESv3",
199 defaults: ["gles_libs_defaults"],
200 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700201 cflags: ["-DLOG_TAG=\"libGLESv3\""],
202}