OSDN Git Service

1cfc5133c1dc273d7e49aee4ba3cc4cca20b4876
[android-x86/frameworks-native.git] / opengl / libs / Android.bp
1 // Build the ETC1 library
2 cc_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 }
23
24 // The headers modules are in frameworks/native/opengl/Android.bp.
25 ndk_library {
26     name: "libEGL",
27     symbol_file: "libEGL.map.txt",
28     first_version: "9",
29     unversioned_until: "current",
30 }
31
32 ndk_library {
33     name: "libGLESv1_CM",
34     symbol_file: "libGLESv1_CM.map.txt",
35     first_version: "9",
36     unversioned_until: "current",
37 }
38
39 ndk_library {
40     name: "libGLESv2",
41     symbol_file: "libGLESv2.map.txt",
42     first_version: "9",
43     unversioned_until: "current",
44 }
45
46 ndk_library {
47     name: "libGLESv3",
48     symbol_file: "libGLESv3.map.txt",
49     first_version: "18",
50     unversioned_until: "current",
51 }
52
53 cc_defaults {
54     name: "gl_libs_defaults",
55     cflags: [
56         "-DGL_GLEXT_PROTOTYPES",
57         "-DEGL_EGLEXT_PROTOTYPES",
58         "-fvisibility=hidden",
59     ],
60     shared_libs: [
61         // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
62         // In particular, DO NOT add libutils or anything "above" libcutils
63         "libcutils",
64         "liblog",
65         "libdl",
66     ],
67     static_libs: [
68         "libarect",
69     ],
70     header_libs: [
71         "gl_headers",
72         "libsystem_headers",
73         "libhardware_headers",
74         "libnativebase_headers",
75     ],
76     export_header_lib_headers: ["gl_headers"],
77
78     // we need to access the private Bionic header <bionic_tls.h>
79     include_dirs: ["bionic/libc/private"],
80 }
81
82 //##############################################################################
83 // Build META EGL library
84 //
85 cc_defaults {
86     name: "egl_libs_defaults",
87     defaults: ["gl_libs_defaults"],
88     vendor_available: true,
89     cflags: [
90         "-DLOG_TAG=\"libEGL\"",
91     ],
92     shared_libs: [
93         // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
94         // In particular, DO NOT add libutils nor anything "above" libui
95         "libgraphicsenv",
96         "libnativewindow",
97         "libbacktrace",
98     ],
99     target: {
100         vendor: {
101             exclude_shared_libs: ["libgraphicsenv"],
102         },
103     },
104 }
105
106 cc_library_static {
107     name: "libEGL_getProcAddress",
108     defaults: ["egl_libs_defaults"],
109     srcs: ["EGL/getProcAddress.cpp"],
110     arch: {
111         arm: {
112             instruction_set: "arm",
113         },
114     },
115 }
116
117 cc_library_shared {
118     name: "libEGL",
119     defaults: ["egl_libs_defaults"],
120     vndk: {
121         enabled: true,
122     },
123     srcs: [
124         "EGL/egl_tls.cpp",
125         "EGL/egl_cache.cpp",
126         "EGL/egl_display.cpp",
127         "EGL/egl_object.cpp",
128         "EGL/egl.cpp",
129         "EGL/eglApi.cpp",
130         "EGL/Loader.cpp",
131         "EGL/BlobCache.cpp",
132     ],
133     shared_libs: [
134         "libvndksupport",
135         "android.hardware.configstore@1.0",
136         "android.hardware.configstore-utils",
137         "libhidlbase",
138         "libhidltransport",
139         "libutils",
140     ],
141     static_libs: ["libEGL_getProcAddress"],
142     ldflags: ["-Wl,--exclude-libs=ALL"],
143     export_include_dirs: ["EGL/include"],
144 }
145
146 cc_test {
147     name: "libEGL_test",
148     defaults: ["egl_libs_defaults"],
149     srcs: [
150         "EGL/BlobCache.cpp",
151         "EGL/BlobCache_test.cpp",
152     ],
153 }
154
155 cc_defaults {
156     name: "gles_libs_defaults",
157     defaults: ["gl_libs_defaults"],
158     vendor_available: true,
159     arch: {
160         arm: {
161             instruction_set: "arm",
162
163             // TODO: This is to work around b/20093774. Remove after root cause is fixed
164             ldflags: ["-Wl,--hash-style,both"],
165         },
166     },
167     shared_libs: ["libEGL"],
168 }
169
170 //##############################################################################
171 // Build the wrapper OpenGL ES 1.x library
172 //
173 cc_library_shared {
174     name: "libGLESv1_CM",
175     defaults: ["gles_libs_defaults"],
176     srcs: ["GLES_CM/gl.cpp"],
177     cflags: ["-DLOG_TAG=\"libGLESv1\""],
178 }
179
180 //##############################################################################
181 // Build the wrapper OpenGL ES 2.x library
182 //
183 cc_library_shared {
184     name: "libGLESv2",
185     defaults: ["gles_libs_defaults"],
186     vndk: {
187         enabled: true,
188     },
189     srcs: ["GLES2/gl2.cpp"],
190     cflags: ["-DLOG_TAG=\"libGLESv2\""],
191 }
192
193 //##############################################################################
194 // Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
195 //
196 cc_library_shared {
197     name: "libGLESv3",
198     defaults: ["gles_libs_defaults"],
199     srcs: ["GLES2/gl2.cpp"],
200     cflags: ["-DLOG_TAG=\"libGLESv3\""],
201 }