blob: 12195cd71dcadbd89eaaab756fbd1751b34f50a9 [file] [log] [blame]
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//common-mk/pkg_config.gni")
group("all") {
deps = [
":thermald",
]
if (use.test) {
deps += [ ":thermald_unittests" ]
}
}
pkg_config("target_defaults") {
# We assume the cwd is named "thermald" for #include paths.
include_dirs = [ ".." ]
pkg_deps = [
"libbrillo",
"libchrome",
"libmetrics",
]
}
executable("thermald") {
sources = [
"ath10k_interface.cc",
"ath10k_temperature_sensor.cc",
"config_parser.cc",
"cooling_device.cc",
"cpufreq_device.cc",
"fake_temperature_sensor.cc",
"hwmon_temperature_sensor.cc",
"iio_temperature_sensor.cc",
"metrics_reporter.cc",
"network_interface.cc",
"temperature_sensor_monitor.cc",
"thermal_output_processor.cc",
"thermal_state_engine.cc",
"thermal_zone_controller.cc",
"thermal_zone_temperature_sensor.cc",
"thermald.cc",
]
configs += [ ":target_defaults" ]
}
if (use.test) {
executable("thermald_unittests") {
sources = [
"config_parser.cc",
"config_parser_unittest.cc",
"key_value_publisher_unittest.cc",
"metrics_reporter.cc",
"metrics_reporter_unittest.cc",
"temperature_sensor_monitor.cc",
"temperature_sensor_monitor_unittest.cc",
"testrunner.cc",
"thermal_state_engine.cc",
"thermal_state_engine_unittest.cc",
"thermal_zone_controller.cc",
"thermal_zone_controller_unittest.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
]
pkg_deps = [ "libchrome-test" ]
}
}