blob: 5d1756124828a7d33200d2cba7962f84a95d3248 [file] [log] [blame]
// Build the ETC1 library
cc_library {
name: "libETC1",
srcs: ["ETC1/etc1.cpp"],
host_supported: true,
cflags: ["-Wall", "-Werror"],
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",
"-Wall",
"-Werror",
"-Wno-unused-variable",
],
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: [
"bionic_libc_platform_headers",
"gl_headers",
"libsystem_headers",
"libnativebase_headers",
],
export_header_lib_headers: ["gl_headers"],
}
//##############################################################################
// Build META EGL library
//
cc_defaults {
name: "egl_libs_defaults",
defaults: ["gl_libs_defaults"],
cflags: [
"-DLOG_TAG=\"libEGL\"",
"-Wall",
"-Werror",
"-Wno-error=deprecated-register",
"-Wno-error=unknown-attributes",
"-Wno-unused-variable",
],
shared_libs: [
// ***** DO NOT ADD NEW DEPENDENCIES HERE *****
// In particular, DO NOT add libutils nor anything "above" libui
"libgraphicsenv",
"libnativewindow",
"libbacktrace",
"libbase",
],
}
cc_library_static {
name: "libEGL_getProcAddress",
defaults: ["egl_libs_defaults"],
srcs: ["EGL/getProcAddress.cpp"],
arch: {
arm: {
instruction_set: "arm",
},
},
}
cc_library_static {
name: "libEGL_blobCache",
defaults: ["egl_libs_defaults"],
srcs: [
"EGL/BlobCache.cpp",
"EGL/FileBlobCache.cpp",
],
export_include_dirs: ["EGL"],
}
cc_library_shared {
name: "libEGL",
defaults: ["egl_libs_defaults"],
llndk_stubs: "libEGL.llndk",
srcs: [
"EGL/egl_tls.cpp",
"EGL/egl_cache.cpp",
"EGL/egl_display.cpp",
"EGL/egl_object.cpp",
"EGL/egl_layers.cpp",
"EGL/egl.cpp",
"EGL/eglApi.cpp",
"EGL/egl_platform_entries.cpp",
"EGL/Loader.cpp",
"EGL/egl_angle_platform.cpp",
],
shared_libs: [
"libvndksupport",
"android.hardware.configstore@1.0",
"android.hardware.configstore-utils",
"libbase",
"libhidlbase",
"libnativebridge_lazy",
"libnativeloader_lazy",
"libutils",
"libSurfaceFlingerProp",
],
static_libs: [
"libEGL_getProcAddress",
"libEGL_blobCache",
],
ldflags: ["-Wl,--exclude-libs=ALL,--Bsymbolic-functions"],
export_include_dirs: ["EGL/include"],
stubs: {
symbol_file: "libEGL.map.txt",
versions: ["29"],
},
header_libs: ["libsurfaceflinger_headers"],
}
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"],
llndk_stubs: "libGLESv1_CM.llndk",
srcs: ["GLES_CM/gl.cpp"],
cflags: ["-DLOG_TAG=\"libGLESv1\""],
version_script: "libGLESv1_CM.map.txt",
}
//##############################################################################
// Build the wrapper OpenGL ES 2.x library
//
cc_library_shared {
name: "libGLESv2",
defaults: ["gles_libs_defaults"],
llndk_stubs: "libGLESv2.llndk",
srcs: ["GLES2/gl2.cpp"],
cflags: ["-DLOG_TAG=\"libGLESv2\""],
// Bug: http://b/133874658 Disable native_coverage as we investigate a
// crash in surfaceflinger on coverage-enabled cuttlefish builds.
native_coverage: false,
}
//##############################################################################
// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
//
cc_library_shared {
name: "libGLESv3",
defaults: ["gles_libs_defaults"],
llndk_stubs: "libGLESv3.llndk",
srcs: ["GLES2/gl2.cpp"],
cflags: ["-DLOG_TAG=\"libGLESv3\""],
}
llndk_library {
name: "libEGL.llndk",
symbol_file: "libEGL.map.txt",
export_llndk_headers: ["gl_llndk_headers"],
}
llndk_library {
name: "libGLESv1_CM.llndk",
symbol_file: "libGLESv1_CM.map.txt",
export_llndk_headers: ["gl_llndk_headers"],
}
llndk_library {
name: "libGLESv2.llndk",
symbol_file: "libGLESv2.map.txt",
export_llndk_headers: ["gl_llndk_headers"],
}
llndk_library {
name: "libGLESv3.llndk",
symbol_file: "libGLESv3.map.txt",
export_llndk_headers: ["gl_llndk_headers"],
}