1package { 2 default_applicable_licenses: ["Android-Apache-2.0"], 3} 4 5soong_config_module_type { 6 name: "thermal_hal_feature_cc_defaults", 7 module_type: "cc_defaults", 8 config_namespace: "thermal_hal_feature", 9 variables: ["pid"], 10 properties: ["cflags", "srcs"], 11} 12 13soong_config_string_variable { 14 name: "pid", 15 values: ["apply_1_0", "apply_2_0"], 16} 17 18thermal_hal_feature_cc_defaults { 19 name: "thermal_hal_feature_defaults", 20 soong_config_variables: { 21 pid: { 22 apply_1_0: { 23 srcs: [ 24 "pid_1_0/service.cpp", 25 "pid_1_0/Thermal.cpp", 26 "pid_1_0/thermal-helper.cpp", 27 "pid_1_0/utils/thermal_throttling.cpp", 28 "pid_1_0/utils/thermal_info.cpp", 29 "pid_1_0/utils/thermal_files.cpp", 30 "pid_1_0/utils/power_files.cpp", 31 "pid_1_0/utils/powerhal_helper.cpp", 32 "pid_1_0/utils/thermal_watcher.cpp", 33 ], 34 }, 35 apply_2_0: { 36 srcs: [ 37 "service.cpp", 38 "Thermal.cpp", 39 "thermal-helper.cpp", 40 "utils/thermal_throttling.cpp", 41 "utils/thermal_info.cpp", 42 "utils/thermal_files.cpp", 43 "utils/power_files.cpp", 44 "utils/powerhal_helper.cpp", 45 "utils/thermal_watcher.cpp", 46 ], 47 }, 48 }, 49 }, 50} 51 52cc_binary { 53 name: "android.hardware.thermal@2.0-service.pixel", 54 defaults: [ 55 "hidl_defaults", 56 "thermal_hal_feature_defaults", 57 ], 58 vendor: true, 59 relative_install_path: "hw", 60 vintf_fragments: ["android.hardware.thermal@2.0-service.pixel.xml"], 61 init_rc: [ 62 "android.hardware.thermal@2.0-service.pixel.rc", 63 ], 64 shared_libs: [ 65 "libbase", 66 "libcutils", 67 "libhidlbase", 68 "libjsoncpp", 69 "libutils", 70 "libnl", 71 "libbinder_ndk", 72 "android.hardware.thermal@1.0", 73 "android.hardware.thermal@2.0", 74 "android.hardware.power-V1-ndk", 75 "pixel-power-ext-V1-ndk" 76 ], 77 cflags: [ 78 "-Wall", 79 "-Werror", 80 "-Wextra", 81 "-Wunused", 82 ], 83 tidy: true, 84 tidy_checks: [ 85 "android-*", 86 "cert-*", 87 "clang-analyzer-security*", 88 ], 89 tidy_flags: [ 90 "-warnings-as-errors=android-*,clang-analyzer-security*,cert-*" 91 ], 92} 93 94sh_binary { 95 name: "thermal_logd", 96 src: "init.thermal.logging.sh", 97 vendor: true, 98 init_rc: [ 99 "pixel-thermal-logd.rc", 100 ], 101} 102 103sh_binary { 104 name: "thermal_symlinks", 105 src: "init.thermal.symlinks.sh", 106 vendor: true, 107 init_rc: [ 108 "pixel-thermal-symlinks.rc", 109 ], 110} 111