Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "renderengine_defaults", |
| 3 | cflags: [ |
| 4 | "-DLOG_TAG=\"RenderEngine\"", |
| 5 | "-Wall", |
| 6 | "-Werror", |
| 7 | "-Wthread-safety", |
| 8 | "-Wunused", |
| 9 | "-Wunreachable-code", |
| 10 | ], |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 11 | } |
| 12 | |
| 13 | cc_defaults { |
| 14 | name: "librenderengine_defaults", |
| 15 | defaults: ["renderengine_defaults"], |
| 16 | cflags: [ |
| 17 | "-DGL_GLEXT_PROTOTYPES", |
| 18 | "-DEGL_EGLEXT_PROTOTYPES", |
| 19 | ], |
| 20 | shared_libs: [ |
Yiwei Zhang | 5434a78 | 2018-12-05 18:06:32 -0800 | [diff] [blame] | 21 | "libbase", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 22 | "libcutils", |
| 23 | "libEGL", |
| 24 | "libGLESv1_CM", |
| 25 | "libGLESv2", |
| 26 | "libgui", |
| 27 | "liblog", |
Peiyong Lin | 46080ef | 2018-10-26 18:43:14 -0700 | [diff] [blame] | 28 | "libnativewindow", |
Alec Mouri | 16a9940 | 2019-07-29 16:37:30 -0700 | [diff] [blame] | 29 | "libprocessgroup", |
Alec Mouri | 0d5e1eb | 2018-11-10 20:40:12 -0800 | [diff] [blame] | 30 | "libsync", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 31 | "libui", |
| 32 | "libutils", |
| 33 | ], |
| 34 | local_include_dirs: ["include"], |
| 35 | export_include_dirs: ["include"], |
| 36 | } |
| 37 | |
| 38 | filegroup { |
| 39 | name: "librenderengine_sources", |
| 40 | srcs: [ |
| 41 | "Description.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 42 | "Mesh.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 43 | "RenderEngine.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 44 | "Texture.cpp", |
| 45 | ], |
| 46 | } |
| 47 | |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 48 | filegroup { |
| 49 | name: "librenderengine_gl_sources", |
| 50 | srcs: [ |
Peiyong Lin | 7e219eb | 2018-12-03 05:40:42 -0800 | [diff] [blame] | 51 | "gl/GLESRenderEngine.cpp", |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 52 | "gl/GLExtensions.cpp", |
Peiyong Lin | e5a9a7f | 2018-08-30 15:32:13 -0700 | [diff] [blame] | 53 | "gl/GLFramebuffer.cpp", |
Peiyong Lin | f1bada9 | 2018-08-29 09:39:31 -0700 | [diff] [blame] | 54 | "gl/GLImage.cpp", |
Alec Mouri | 16a9940 | 2019-07-29 16:37:30 -0700 | [diff] [blame] | 55 | "gl/ImageManager.cpp", |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 56 | "gl/Program.cpp", |
| 57 | "gl/ProgramCache.cpp", |
| 58 | ], |
| 59 | } |
| 60 | |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 61 | cc_library_static { |
| 62 | name: "librenderengine", |
| 63 | defaults: ["librenderengine_defaults"], |
Peiyong Lin | 338ea4f | 2018-11-03 17:04:37 -0700 | [diff] [blame] | 64 | vendor_available: true, |
| 65 | vndk: { |
| 66 | enabled: true, |
| 67 | }, |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 68 | double_loadable: true, |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 69 | clang: true, |
| 70 | cflags: [ |
| 71 | "-fvisibility=hidden", |
| 72 | "-Werror=format", |
| 73 | ], |
| 74 | cppflags: [ |
| 75 | "-fwhole-program-vtables", // requires ThinLTO |
| 76 | ], |
| 77 | srcs: [ |
| 78 | ":librenderengine_sources", |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 79 | ":librenderengine_gl_sources", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 80 | ], |
| 81 | lto: { |
| 82 | thin: true, |
| 83 | }, |
| 84 | } |
Lloyd Pique | 3823e7b | 2018-10-18 16:58:10 -0700 | [diff] [blame] | 85 | |
| 86 | cc_library_static { |
| 87 | name: "librenderengine_mocks", |
| 88 | defaults: ["librenderengine_defaults"], |
| 89 | srcs: [ |
| 90 | "mock/Framebuffer.cpp", |
| 91 | "mock/Image.cpp", |
| 92 | "mock/RenderEngine.cpp", |
| 93 | ], |
| 94 | static_libs: [ |
| 95 | "libgtest", |
| 96 | "libgmock", |
| 97 | ], |
| 98 | local_include_dirs: ["include"], |
| 99 | export_include_dirs: ["include"], |
| 100 | } |