1cc_library_static {
2    name: "libRSDispatch",
3    vendor_available: true,
4
5    srcs: ["rsDispatch.cpp"],
6
7    include_dirs: [
8        "frameworks/rs",
9        "libnativehelper/include_jni",
10    ],
11
12    cflags: [
13        "-Wall",
14        "-Werror",
15        "-Wno-unused-parameter",
16        "-std=c++11",
17        "-DRS_COMPATIBILITY_LIB",
18    ],
19
20
21    sdk_version: "9",
22    shared_libs: ["libdl", "liblog"],
23    // Used in librsjni, which is built as NDK code => no ASan.
24    sanitize: {
25        never: true,
26    },
27    stl: "none",
28}
29
30cc_defaults {
31    name: "libRScpp-defaults",
32    defaults: ["rs-version"],
33
34    srcs: [
35        "RenderScript.cpp",
36        "BaseObj.cpp",
37        "Element.cpp",
38        "Type.cpp",
39        "Allocation.cpp",
40        "Script.cpp",
41        "ScriptC.cpp",
42        "ScriptIntrinsics.cpp",
43        "ScriptIntrinsicBLAS.cpp",
44        "Sampler.cpp",
45
46        // TODO: make this not a symlink
47        "rsCppUtils.cpp",
48    ],
49
50    cflags: [
51        "-Werror",
52        "-Wall",
53        "-Wextra",
54        "-Wno-unused-parameter",
55        "-Wno-unused-variable",
56    ],
57
58    // We need to export not just rs/cpp but also rs.  This is because
59    // RenderScript.h includes rsCppStructs.h, which includes rs/rsDefines.h.
60    header_libs: ["rs-headers"],
61    export_header_lib_headers: ["rs-headers"],
62    export_include_dirs: ["."],
63
64    shared_libs: [
65        "libdl",
66        "liblog",
67        "libz",
68    ],
69}
70
71cc_library {
72    name: "libRScpp",
73    defaults: ["libRScpp-defaults"],
74
75    shared_libs: [
76        "libgui",
77        "libutils",
78    ],
79
80    static_libs: ["libRSDispatch"],
81}
82
83cc_library_static {
84    name: "libRScpp_static",
85    defaults: ["libRScpp-defaults"],
86
87    cflags: ["-DRS_COMPATIBILITY_LIB"],
88
89    sdk_version: "9",
90    whole_static_libs: ["libRSDispatch"],
91
92    ldflags: [
93        "-Wl,--exclude-libs,libc++_static.a",
94    ],
95    stl: "c++_static",
96}
97