| # 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 = [ ":secanomalyd" ] |
| if (use.test) { |
| deps += [ ":secanomalyd_testrunner" ] |
| } |
| } |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ |
| "libbrillo", |
| "libchrome", |
| "libmetrics", |
| "vboot_host", |
| ] |
| } |
| |
| static_library("libsecanomaly") { |
| sources = [ |
| "daemon.cc", |
| "metrics.cc", |
| "mount_entry.cc", |
| "mounts.cc", |
| "processes.cc", |
| "reporter.cc", |
| ] |
| configs += [ ":target_defaults" ] |
| } |
| |
| executable("secanomalyd") { |
| sources = [ "main.cc" ] |
| configs += [ ":target_defaults" ] |
| deps = [ ":libsecanomaly" ] |
| } |
| |
| if (use.test) { |
| pkg_config("secanomalyd_testrunner_config") { |
| pkg_deps = [ "libchrome-test" ] |
| } |
| |
| executable("secanomalyd_testrunner") { |
| sources = [ |
| "mount_entry_test.cc", |
| "mounts_test.cc", |
| "processes_test.cc", |
| "reporter_test.cc", |
| ] |
| configs += [ |
| "//common-mk:test", |
| ":secanomalyd_testrunner_config", |
| ":target_defaults", |
| ] |
| deps = [ |
| ":libsecanomaly", |
| "//common-mk/testrunner", |
| ] |
| } |
| } |