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