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