1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5cc_binary {
6    name: "android.hardware.thermal-service.pixel",
7    srcs: [
8        "service.cpp",
9        "Thermal.cpp",
10        "thermal-helper.cpp",
11        "utils/thermal_throttling.cpp",
12        "utils/thermal_info.cpp",
13        "utils/thermal_files.cpp",
14        "utils/power_files.cpp",
15        "utils/powerhal_helper.cpp",
16        "utils/thermal_stats_helper.cpp",
17        "utils/thermal_watcher.cpp",
18        "virtualtemp_estimator/virtualtemp_estimator.cpp",
19    ],
20    vendor: true,
21    relative_install_path: "hw",
22    vintf_fragments: [
23        "android.hardware.thermal-service.pixel.xml",
24    ],
25    init_rc: [
26        "android.hardware.thermal-service.pixel.rc",
27    ],
28    shared_libs: [
29        "libbase",
30        "libcutils",
31        "libjsoncpp",
32        "libutils",
33        "libnl",
34        "libbinder_ndk",
35        "android.frameworks.stats-V2-ndk",
36        "android.hardware.power-V1-ndk",
37        "android.hardware.thermal-V2-ndk",
38        "pixel-power-ext-V1-ndk",
39        "pixelatoms-cpp",
40    ],
41    static_libs: [
42        "libpixelstats",
43    ],
44    export_shared_lib_headers: [
45        "android.frameworks.stats-V2-ndk",
46        "pixelatoms-cpp",
47    ],
48    cflags: [
49        "-Wall",
50        "-Werror",
51        "-Wextra",
52        "-Wunused",
53    ],
54    tidy: true,
55    tidy_checks: [
56        "android-*",
57        "cert-*",
58        "clang-analyzer-security*",
59    ],
60    tidy_checks_as_errors: [
61        "android-*",
62        "clang-analyzer-security*",
63        "cert-*",
64    ],
65}
66
67cc_test {
68    name: "libthermaltest",
69    vendor: true,
70    srcs: [
71        "service.cpp",
72        "Thermal.cpp",
73        "thermal-helper.cpp",
74        "utils/thermal_throttling.cpp",
75        "utils/thermal_info.cpp",
76        "utils/thermal_files.cpp",
77        "utils/power_files.cpp",
78        "utils/powerhal_helper.cpp",
79        "utils/thermal_stats_helper.cpp",
80        "utils/thermal_watcher.cpp",
81        "tests/mock_thermal_helper.cpp",
82        "tests/thermal_looper_test.cpp",
83        "virtualtemp_estimator/virtualtemp_estimator.cpp",
84    ],
85    shared_libs: [
86        "libbase",
87        "libcutils",
88        "libjsoncpp",
89        "libutils",
90        "libnl",
91        "liblog",
92        "libbinder_ndk",
93        "android.frameworks.stats-V2-ndk",
94        "android.hardware.power-V1-ndk",
95        "android.hardware.thermal-V2-ndk",
96        "pixel-power-ext-V1-ndk",
97        "pixelatoms-cpp",
98    ],
99    static_libs: [
100        "libgmock",
101        "libpixelstats",
102    ],
103    test_suites: ["device-tests"],
104    require_root: true,
105}
106
107sh_binary {
108    name: "thermal_logd",
109    src: "init.thermal.logging.sh",
110    vendor: true,
111    init_rc: [
112        "pixel-thermal-logd.rc",
113    ],
114}
115
116sh_binary {
117    name: "thermal_symlinks",
118    src: "init.thermal.symlinks.sh",
119    vendor: true,
120    init_rc: [
121        "pixel-thermal-symlinks.rc",
122    ],
123}
124
125
126cc_binary {
127    name: "virtualtemp_estimator_test",
128    srcs: [
129        "virtualtemp_estimator/virtualtemp_estimator.cpp",
130        "virtualtemp_estimator/virtualtemp_estimator_test.cpp"
131        ],
132    shared_libs: [
133        "libbase",
134        "libc",
135        "liblog",
136        "libcutils",
137        "libbinder",
138        "libhidlbase",
139        "libutils",
140        "libjsoncpp",],
141    vendor: true,
142    cflags: [
143        "-Wall",
144        "-Werror",
145        "-Wextra",
146        "-Wunused",
147    ],
148    tidy: true,
149    tidy_checks: [
150        "android-*",
151        "cert-*",
152        "clang-analyzer-security*",
153    ],
154    tidy_checks_as_errors: [
155        "android-*",
156        "clang-analyzer-security*",
157        "cert-*",
158    ],
159}
160