blob: 53e814c1354adab1894ed2bbe6b9d929a4d80429 [file] [log] [blame]
# Copyright 2021 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 = [
":libcrossystem_utils",
":libdbus_service",
":libjson_store",
":librmad_interface",
":libstate_handler",
":libvpd_utils",
":rmad",
]
if (use.test) {
deps += [ ":rmad_test" ]
}
}
pkg_config("target_defaults") {
# NOSORT
pkg_deps = [
"libbrillo",
"libchrome",
"vboot_host",
# system_api depends on protobuf (or protobuf-lite). It must appear
# before protobuf here or the linker flags won't be in the right
# order.
"system_api",
"protobuf",
]
}
static_library("libjson_store") {
sources = [ "utils/json_store.cc" ]
configs += [ ":target_defaults" ]
}
static_library("libcrossystem_utils") {
configs += [ ":target_defaults" ]
sources = [
"utils/crossystem_utils.cc",
"utils/crossystem_utils_impl.cc",
]
}
static_library("libvpd_utils") {
configs += [ ":target_defaults" ]
sources = [ "utils/vpd_utils_impl.cc" ]
}
static_library("libstate_handler") {
sources = [
"state_handler/base_state_handler.cc",
"state_handler/state_handler_manager.cc",
"state_handler/welcome_screen_state_handler.cc",
]
configs += [ ":target_defaults" ]
deps = [ ":libjson_store" ]
}
static_library("libdbus_service") {
sources = [ "dbus_service.cc" ]
configs += [ ":target_defaults" ]
}
static_library("librmad_interface") {
sources = [ "rmad_interface_impl.cc" ]
configs += [ ":target_defaults" ]
deps = [
":libjson_store",
":libstate_handler",
]
}
executable("rmad") {
sources = [ "main.cc" ]
configs += [ ":target_defaults" ]
deps = [
":libdbus_service",
":librmad_interface",
]
}
if (use.test) {
executable("rmad_test") {
sources = [
"dbus_service_test.cc",
"rmad_interface_test.cc",
"state_handler/state_handler_manager_test.cc",
"utils/fake_crossystem_utils.cc",
"utils/fake_vpd_utils.cc",
"utils/json_store_test.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
]
deps = [
":libdbus_service",
":libjson_store",
":librmad_interface",
":libstate_handler",
"//common-mk/testrunner",
]
}
}