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