blob: efc05b6f6b1327643495a3c9434435c50cdf2530 [file] [log] [blame]
# Copyright 2018 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 = [
":bootstat",
":libbootstat",
]
if (use.test) {
deps += [ ":libbootstat_unittests" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [ "libchrome" ]
}
shared_library("libbootstat") {
sources = [ "bootstat_log.cc" ]
configs += [ ":target_defaults" ]
libs = [ "rootdev" ]
}
executable("bootstat") {
sources = [ "bootstat.cc" ]
configs += [ ":target_defaults" ]
deps = [ ":libbootstat" ]
}
if (use.test) {
executable("libbootstat_unittests") {
# Do not use libbootstat shared library for test, as we'd have to export a
# good number of symbols that normal API users do not require.
sources = [
"bootstat_log.cc",
"bootstat_test.cc",
]
libs = [ "rootdev" ]
configs += [
":target_defaults",
"//common-mk:test",
]
deps = [ "//common-mk/testrunner" ]
}
}