1cc_defaults {
2    name: "renderengine_defaults",
3    cflags: [
4        "-DLOG_TAG=\"RenderEngine\"",
5        "-Wall",
6        "-Werror",
7        "-Wthread-safety",
8        "-Wunused",
9        "-Wunreachable-code",
10    ],
11}
12
13cc_defaults {
14    name: "librenderengine_defaults",
15    defaults: ["renderengine_defaults"],
16    cflags: [
17        "-DGL_GLEXT_PROTOTYPES",
18        "-DEGL_EGLEXT_PROTOTYPES",
19    ],
20    shared_libs: [
21        "libbase",
22        "libcutils",
23        "libEGL",
24        "libGLESv1_CM",
25        "libGLESv2",
26        "libgui",
27        "liblog",
28        "libnativewindow",
29        "libprocessgroup",
30        "libsync",
31        "libui",
32        "libutils",
33    ],
34    local_include_dirs: ["include"],
35    export_include_dirs: ["include"],
36}
37
38filegroup {
39    name: "librenderengine_sources",
40    srcs: [
41        "Description.cpp",
42        "Mesh.cpp",
43        "RenderEngine.cpp",
44        "Texture.cpp",
45    ],
46}
47
48filegroup {
49    name: "librenderengine_gl_sources",
50    srcs: [
51        "gl/GLESRenderEngine.cpp",
52        "gl/GLExtensions.cpp",
53        "gl/GLFramebuffer.cpp",
54        "gl/GLImage.cpp",
55        "gl/GLShadowTexture.cpp",
56        "gl/GLShadowVertexGenerator.cpp",
57        "gl/GLSkiaShadowPort.cpp",
58        "gl/GLVertexBuffer.cpp",
59        "gl/ImageManager.cpp",
60        "gl/Program.cpp",
61        "gl/ProgramCache.cpp",
62        "gl/filters/BlurFilter.cpp",
63        "gl/filters/GenericProgram.cpp",
64    ],
65}
66
67cc_library_static {
68    name: "librenderengine",
69    defaults: ["librenderengine_defaults"],
70    vendor_available: true,
71    vndk: {
72        enabled: true,
73    },
74    double_loadable: true,
75    clang: true,
76    cflags: [
77        "-fvisibility=hidden",
78        "-Werror=format",
79    ],
80    srcs: [
81        ":librenderengine_sources",
82        ":librenderengine_gl_sources",
83    ],
84    lto: {
85        thin: true,
86    },
87}
88
89cc_library_static {
90    name: "librenderengine_mocks",
91    defaults: ["librenderengine_defaults"],
92    srcs: [
93        "mock/Framebuffer.cpp",
94        "mock/Image.cpp",
95        "mock/RenderEngine.cpp",
96    ],
97    static_libs: [
98        "libgtest",
99        "libgmock",
100    ],
101    local_include_dirs: ["include"],
102    export_include_dirs: ["include"],
103}
104