blob: 5b13dbf9b6f390d7b3a5fea4fb1e36c8428bc47d [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 = [
":cros_config",
":cros_configfs",
]
if (use.test) {
deps += [
":cros_config_main_test",
":cros_config_test",
":fake_cros_config_test",
]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo",
"libchrome",
]
}
shared_library("libcros_config") {
sources = [
"libcros_config/configfs.cc",
"libcros_config/cros_config.cc",
"libcros_config/cros_config_fallback.cc",
"libcros_config/cros_config_impl.cc",
"libcros_config/cros_config_json.cc",
"libcros_config/fake_cros_config.cc",
"libcros_config/identity.cc",
"libcros_config/identity_arm.cc",
"libcros_config/identity_x86.cc",
]
configs += [ ":target_defaults" ]
}
executable("cros_config") {
sources = [ "cros_config_main.cc" ]
configs += [ ":target_defaults" ]
deps = [ ":libcros_config" ]
}
executable("cros_configfs") {
sources = [ "cros_configfs_main.cc" ]
configs += [ ":target_defaults" ]
deps = [ ":libcros_config" ]
}
if (use.test) {
executable("cros_config_test") {
sources = [ "libcros_config/cros_config_test.cc" ]
configs += [
"//common-mk:test",
":target_defaults",
]
include_dirs = [ "libcros_config" ]
deps = [ ":libcros_config" ]
}
executable("cros_config_main_test") {
sources = [ "cros_config_main_test.cc" ]
configs += [
"//common-mk:test",
":target_defaults",
]
deps = [ ":cros_config" ]
}
executable("fake_cros_config_test") {
sources = [ "libcros_config/fake_cros_config_test.cc" ]
configs += [
"//common-mk:test",
":target_defaults",
]
include_dirs = [ "libcros_config" ]
deps = [ ":libcros_config" ]
}
}