blob: aa67d41bba427f31e2ab32281acad4cb700d2f33 [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 {
26 name: "libEGL.ndk",
27 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 {
33 name: "libGLESv1_CM.ndk",
34 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 {
40 name: "libGLESv2.ndk",
41 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 {
47 name: "libGLESv3.ndk",
48 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: [
61 "libcutils",
62 "liblog",
63 "libdl",
64 ],
65
66 // we need to access the private Bionic header <bionic_tls.h>
67 include_dirs: ["bionic/libc/private"],
68}
69
70//##############################################################################
71// Build META EGL library
72//
73cc_defaults {
74 name: "egl_libs_defaults",
75 defaults: ["gl_libs_defaults"],
76 cflags: [
77 "-DLOG_TAG=\"libEGL\"",
78 ],
79 shared_libs: [
Dan Willemsena3310632016-10-03 23:56:51 -070080 "libutils",
81 "libui",
Mathias Agopian89ed4c82017-02-09 18:48:34 -080082 "libnativewindow",
Dan Willemsena3310632016-10-03 23:56:51 -070083 ],
84}
85
86cc_library_static {
87 name: "libEGL_getProcAddress",
88 defaults: ["egl_libs_defaults"],
89 srcs: ["EGL/getProcAddress.cpp"],
90 arch: {
91 arm: {
92 instruction_set: "arm",
93 },
94 },
95}
96
97cc_library_shared {
98 name: "libEGL",
99 defaults: ["egl_libs_defaults"],
100 srcs: [
101 "EGL/egl_tls.cpp",
102 "EGL/egl_cache.cpp",
103 "EGL/egl_display.cpp",
104 "EGL/egl_object.cpp",
105 "EGL/egl.cpp",
106 "EGL/eglApi.cpp",
107 "EGL/Loader.cpp",
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800108 "EGL/BlobCache.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700109 ],
110 static_libs: ["libEGL_getProcAddress"],
111 ldflags: ["-Wl,--exclude-libs=ALL"],
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800112 export_include_dirs: ["EGL/include"],
113}
114
115cc_test {
116 name: "libEGL_test",
117 defaults: ["egl_libs_defaults"],
118 srcs: [
119 "EGL/BlobCache.cpp",
120 "EGL/BlobCache_test.cpp",
121 ],
Dan Willemsena3310632016-10-03 23:56:51 -0700122}
123
124cc_defaults {
125 name: "gles_libs_defaults",
126 defaults: ["gl_libs_defaults"],
127 arch: {
128 arm: {
129 instruction_set: "arm",
130
131 // TODO: This is to work around b/20093774. Remove after root cause is fixed
132 ldflags: ["-Wl,--hash-style,both"],
133 },
134 },
135 shared_libs: ["libEGL"],
136}
137
138//##############################################################################
139// Build the wrapper OpenGL ES 1.x library
140//
141cc_library_shared {
142 name: "libGLESv1_CM",
143 defaults: ["gles_libs_defaults"],
144 srcs: ["GLES_CM/gl.cpp"],
145
146 cflags: ["-DLOG_TAG=\"libGLESv1\""],
147}
148
149//##############################################################################
150// Build the wrapper OpenGL ES 2.x library
151//
152cc_library_shared {
153 name: "libGLESv2",
154 defaults: ["gles_libs_defaults"],
155 srcs: ["GLES2/gl2.cpp"],
156
157 shared_libs: ["libutils"],
158
159 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"],
169
170 shared_libs: ["libutils"],
171
172 cflags: ["-DLOG_TAG=\"libGLESv3\""],
173}