blob: e4ce15403301028eb8819a407b9106a40c376a74 [file] [log] [blame]
# Copyright 2020 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 = [ ":pciguard" ]
if (use.test) {
deps += [ ":pciguard_testrunner" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo",
"libchrome",
"libsession_manager-client",
"libudev",
]
}
executable("pciguard") {
sources = [
"daemon.cc",
"main.cc",
]
configs += [ ":target_defaults" ]
deps = [ ":pciguard_common" ]
}
static_library("pciguard_common") {
sources = [
"authorizer.cc",
"event_handler.cc",
"session_monitor.cc",
"sysfs_utils.cc",
"udev_monitor.cc",
]
all_dependent_configs = [ ":target_defaults" ]
libs = [ "pthread" ]
}
if (use.test) {
pkg_config("test_defaults") {
pkg_deps = [
"libbrillo-test",
"libchrome-test",
"libudev",
]
}
executable("pciguard_testrunner") {
sources = [
"event_handler_test.cc",
"sysfs_utils_test.cc",
]
configs += [
":test_defaults",
"//common-mk:test",
]
deps = [
":pciguard_common",
"//common-mk/testrunner:testrunner",
]
}
}