blob: bff80cddd8ce5f9c5b019c32bd569c7eb3aad28e [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,
6
7 target: {
8 android: {
9 static: {
10 enabled: false,
11 },
12 },
13 host: {
14 shared: {
15 enabled: false,
16 },
17 },
18 windows: {
19 enabled: true,
20 },
21 },
22}
Dan Albert49fbff42016-10-03 12:36:00 -070023
Dan Albert7facb1d2016-10-03 12:36:00 -070024// The headers modules are in frameworks/native/opengl/Android.bp.
Dan Albert49fbff42016-10-03 12:36:00 -070025ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070026 name: "libEGL",
Dan Albert49fbff42016-10-03 12:36:00 -070027 symbol_file: "libEGL.map.txt",
28 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080029 unversioned_until: "current",
Dan Albert49fbff42016-10-03 12:36:00 -070030}
Dan Albert7facb1d2016-10-03 12:36:00 -070031
32ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070033 name: "libGLESv1_CM",
Dan Albert7facb1d2016-10-03 12:36:00 -070034 symbol_file: "libGLESv1_CM.map.txt",
35 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080036 unversioned_until: "current",
Dan Albert7facb1d2016-10-03 12:36:00 -070037}
Dan Albert00500c72016-10-03 12:36:00 -070038
39ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070040 name: "libGLESv2",
Dan Albert00500c72016-10-03 12:36:00 -070041 symbol_file: "libGLESv2.map.txt",
42 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080043 unversioned_until: "current",
Dan Albert00500c72016-10-03 12:36:00 -070044}
Dan Albertd7d8efa2016-10-03 12:36:00 -070045
46ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070047 name: "libGLESv3",
Dan Albertd7d8efa2016-10-03 12:36:00 -070048 symbol_file: "libGLESv3.map.txt",
49 first_version: "18",
Dan Albertb9c62a62017-01-05 15:58:50 -080050 unversioned_until: "current",
Dan Albertd7d8efa2016-10-03 12:36:00 -070051}
Dan Willemsena3310632016-10-03 23:56:51 -070052
53cc_defaults {
54 name: "gl_libs_defaults",
55 cflags: [
56 "-DGL_GLEXT_PROTOTYPES",
57 "-DEGL_EGLEXT_PROTOTYPES",
58 "-fvisibility=hidden",
59 ],
60 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -080061 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
62 // In particular, DO NOT add libutils or anything "above" libcutils
Dan Willemsena3310632016-10-03 23:56:51 -070063 "libcutils",
64 "liblog",
65 "libdl",
66 ],
67
68 // we need to access the private Bionic header <bionic_tls.h>
69 include_dirs: ["bionic/libc/private"],
70}
71
72//##############################################################################
73// Build META EGL library
74//
75cc_defaults {
76 name: "egl_libs_defaults",
77 defaults: ["gl_libs_defaults"],
78 cflags: [
79 "-DLOG_TAG=\"libEGL\"",
80 ],
81 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -080082 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
83 // In particular, DO NOT add libutils nor anything "above" libui
Jiyong Park27c39e12017-05-08 13:00:02 +090084 "libgraphicsenv",
Mathias Agopian89ed4c82017-02-09 18:48:34 -080085 "libnativewindow",
Mathias Agopian5f1af042017-03-09 18:50:05 -080086 "libbacktrace",
Dan Willemsena3310632016-10-03 23:56:51 -070087 ],
88}
89
90cc_library_static {
91 name: "libEGL_getProcAddress",
92 defaults: ["egl_libs_defaults"],
93 srcs: ["EGL/getProcAddress.cpp"],
94 arch: {
95 arm: {
96 instruction_set: "arm",
97 },
98 },
99}
100
101cc_library_shared {
102 name: "libEGL",
103 defaults: ["egl_libs_defaults"],
104 srcs: [
105 "EGL/egl_tls.cpp",
106 "EGL/egl_cache.cpp",
107 "EGL/egl_display.cpp",
108 "EGL/egl_object.cpp",
109 "EGL/egl.cpp",
110 "EGL/eglApi.cpp",
111 "EGL/Loader.cpp",
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800112 "EGL/BlobCache.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700113 ],
114 static_libs: ["libEGL_getProcAddress"],
115 ldflags: ["-Wl,--exclude-libs=ALL"],
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800116 export_include_dirs: ["EGL/include"],
117}
118
119cc_test {
120 name: "libEGL_test",
121 defaults: ["egl_libs_defaults"],
122 srcs: [
123 "EGL/BlobCache.cpp",
124 "EGL/BlobCache_test.cpp",
125 ],
Dan Willemsena3310632016-10-03 23:56:51 -0700126}
127
128cc_defaults {
129 name: "gles_libs_defaults",
130 defaults: ["gl_libs_defaults"],
131 arch: {
132 arm: {
133 instruction_set: "arm",
134
135 // TODO: This is to work around b/20093774. Remove after root cause is fixed
136 ldflags: ["-Wl,--hash-style,both"],
137 },
138 },
139 shared_libs: ["libEGL"],
140}
141
142//##############################################################################
143// Build the wrapper OpenGL ES 1.x library
144//
145cc_library_shared {
146 name: "libGLESv1_CM",
147 defaults: ["gles_libs_defaults"],
148 srcs: ["GLES_CM/gl.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700149 cflags: ["-DLOG_TAG=\"libGLESv1\""],
150}
151
152//##############################################################################
153// Build the wrapper OpenGL ES 2.x library
154//
155cc_library_shared {
156 name: "libGLESv2",
157 defaults: ["gles_libs_defaults"],
158 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700159 cflags: ["-DLOG_TAG=\"libGLESv2\""],
160}
161
162//##############################################################################
163// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
164//
165cc_library_shared {
166 name: "libGLESv3",
167 defaults: ["gles_libs_defaults"],
168 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700169 cflags: ["-DLOG_TAG=\"libGLESv3\""],
170}