blob: 642b7475923b769f1c1770ca053a7e7620551d0c [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")
import("//common-mk/proto_library.gni")
group("all") {
deps = [ ":server_proxy" ]
if (use.test) {
deps += [ ":vsock_proxy_test" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo",
"libchrome",
"protobuf-lite",
]
defines = [ "FUSE_USE_VERSION=26" ]
}
proto_library("message") {
proto_in_dir = "."
proto_out_dir = "include/arc/vm/vsock_proxy"
sources = [ "${proto_in_dir}/message.proto" ]
}
static_library("vsock_proxy_lib") {
sources = [
"file_descriptor_util.cc",
"fuse_mount.cc",
"local_file.cc",
"message_stream.cc",
"proxy_file_system.cc",
"server_proxy.cc",
"vsock_proxy.cc",
]
configs += [ ":target_defaults" ]
pkg_deps = [ "fuse" ]
deps = [ ":message" ]
}
executable("server_proxy") {
sources = [ "server_proxy_main.cc" ]
configs += [ ":target_defaults" ]
deps = [ ":vsock_proxy_lib" ]
}
if (use.test) {
executable("vsock_proxy_test") {
sources = [
"file_descriptor_util_test.cc",
"local_file_test.cc",
"message_stream_test.cc",
"proxy_file_system_test.cc",
"vsock_proxy_test.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
]
pkg_deps = [
"libbrillo-test",
"libchrome-test",
]
deps = [
":vsock_proxy_lib",
"//common-mk/testrunner",
]
}
}