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