blob: d7b2065189bde4cdbf29308df4fe95020090cd01 [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/generate-dbus-proxies.gni")
import("//common-mk/pkg_config.gni")
import("//common-mk/proto_library.gni")
generate_dbus_proxies("bootlockbox-proxies") {
dbus_service_config = "../dbus_adaptors/dbus-service-config.json"
proxy_output_file = "include/bootlockbox/dbus-proxies.h"
mock_output_file = "include/bootlockbox/dbus-proxy-mocks.h"
proxy_path_in_mocks = "bootlockbox/dbus-proxies.h"
sources = [ "../dbus_adaptors/org.chromium.BootLockboxInterface.xml" ]
}
pkg_config("proto_config") {
pkg_deps = [ "protobuf" ]
}
proto_library("bootlockbox-proto") {
proto_in_dir = "../bootlockbox"
proto_lib_dirs = [ target_gen_dir ]
proto_out_dir = "include/cryptohome/bootlockbox"
# shared_library.
use_pic = true
sources = [ "${proto_in_dir}/key_value_map.proto" ]
all_dependent_configs = [ ":proto_config" ]
standalone = true
}
config("target_defaults") {
defines = [
"USE_SELINUX=${use.selinux}",
"USE_TPM2=${use.tpm2}",
]
}
pkg_config("bootlockbox_dependent_config") {
pkg_deps = [
"libbrillo",
"libchrome",
]
}
shared_library("libbootlockbox-client") {
configs += [ ":target_defaults" ]
sources = [
"../bootlockbox/boot_lockbox_client.cc",
"../bootlockbox/boot_lockbox_client.h",
]
all_dependent_configs = [ ":bootlockbox_dependent_config" ]
deps = [
":bootlockbox-proto",
":bootlockbox-proxies",
]
}
group("all") {
deps = [
":bootlockbox-proto",
":bootlockbox-proxies",
":libbootlockbox-client",
]
}