blob: cbdd502b3261730bdef84d8dcb02d5d219601bcb [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",
29}
Dan Albert7facb1d2016-10-03 12:36:00 -070030
31ndk_library {
32 name: "libGLESv1_CM.ndk",
33 symbol_file: "libGLESv1_CM.map.txt",
34 first_version: "9",
35}
Dan Albert00500c72016-10-03 12:36:00 -070036
37ndk_library {
38 name: "libGLESv2.ndk",
39 symbol_file: "libGLESv2.map.txt",
40 first_version: "9",
41}
Dan Albertd7d8efa2016-10-03 12:36:00 -070042
43ndk_library {
44 name: "libGLESv3.ndk",
45 symbol_file: "libGLESv3.map.txt",
46 first_version: "18",
Dan Albertd8735382017-01-03 15:18:48 -080047
48 // https://github.com/android-ndk/ndk/issues/265
49 unversioned_until: "24",
Dan Albertd7d8efa2016-10-03 12:36:00 -070050}
Dan Willemsena3310632016-10-03 23:56:51 -070051
52cc_defaults {
53 name: "gl_libs_defaults",
54 cflags: [
55 "-DGL_GLEXT_PROTOTYPES",
56 "-DEGL_EGLEXT_PROTOTYPES",
57 "-fvisibility=hidden",
58 ],
59 shared_libs: [
60 "libcutils",
61 "liblog",
62 "libdl",
63 ],
64
65 // we need to access the private Bionic header <bionic_tls.h>
66 include_dirs: ["bionic/libc/private"],
67}
68
69//##############################################################################
70// Build META EGL library
71//
72cc_defaults {
73 name: "egl_libs_defaults",
74 defaults: ["gl_libs_defaults"],
75 cflags: [
76 "-DLOG_TAG=\"libEGL\"",
77 ],
78 shared_libs: [
79 "libbinder",
80 "libutils",
81 "libui",
82 ],
83}
84
85cc_library_static {
86 name: "libEGL_getProcAddress",
87 defaults: ["egl_libs_defaults"],
88 srcs: ["EGL/getProcAddress.cpp"],
89 arch: {
90 arm: {
91 instruction_set: "arm",
92 },
93 },
94}
95
96cc_library_shared {
97 name: "libEGL",
98 defaults: ["egl_libs_defaults"],
99 srcs: [
100 "EGL/egl_tls.cpp",
101 "EGL/egl_cache.cpp",
102 "EGL/egl_display.cpp",
103 "EGL/egl_object.cpp",
104 "EGL/egl.cpp",
105 "EGL/eglApi.cpp",
106 "EGL/Loader.cpp",
107 ],
108 static_libs: ["libEGL_getProcAddress"],
109 ldflags: ["-Wl,--exclude-libs=ALL"],
110
111 required: ["egl.cfg"],
112}
113
114cc_defaults {
115 name: "gles_libs_defaults",
116 defaults: ["gl_libs_defaults"],
117 arch: {
118 arm: {
119 instruction_set: "arm",
120
121 // TODO: This is to work around b/20093774. Remove after root cause is fixed
122 ldflags: ["-Wl,--hash-style,both"],
123 },
124 },
125 shared_libs: ["libEGL"],
126}
127
128//##############################################################################
129// Build the wrapper OpenGL ES 1.x library
130//
131cc_library_shared {
132 name: "libGLESv1_CM",
133 defaults: ["gles_libs_defaults"],
134 srcs: ["GLES_CM/gl.cpp"],
135
136 cflags: ["-DLOG_TAG=\"libGLESv1\""],
137}
138
139//##############################################################################
140// Build the wrapper OpenGL ES 2.x library
141//
142cc_library_shared {
143 name: "libGLESv2",
144 defaults: ["gles_libs_defaults"],
145 srcs: ["GLES2/gl2.cpp"],
146
147 shared_libs: ["libutils"],
148
149 cflags: ["-DLOG_TAG=\"libGLESv2\""],
150}
151
152//##############################################################################
153// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
154//
155cc_library_shared {
156 name: "libGLESv3",
157 defaults: ["gles_libs_defaults"],
158 srcs: ["GLES2/gl2.cpp"],
159
160 shared_libs: ["libutils"],
161
162 cflags: ["-DLOG_TAG=\"libGLESv3\""],
163}