blob: 299855666bcc407782181c8436025fc6ff305c6c [file] [log] [blame]
# Copyright 2016 The Fuchsia 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("//build/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
import("//build/go/toolchain.gni")
import("//build/package.gni")
package("netstack") {
deps = [
":netstack_bin",
]
binary = "netstack"
meta = [
{
path = rebase_path("meta/netstack.cmx")
dest = "netstack.cmx"
},
{
path = rebase_path("//garnet/bin/appmgr/legacy_flat_exported_dir")
dest = "legacy_flat_exported_dir"
},
]
}
package("netstack_tools") {
deprecated_system_image = true
deps = [
"filter/netfilter",
"ifconfig",
"ifinfo",
"netstat",
]
binaries = [
{
name = "ifconfig"
},
{
name = "ifinfo"
},
{
name = "netstat"
},
{
name = "netfilter"
},
]
}
package("netstack_gotests") {
testonly = true
deps = [
":netstack_connectivity_test",
":netstack_fidlconv_test",
":netstack_filter_test",
":netstack_netiface_test",
"netstack_service_test",
"//garnet/go/src/netstack/netstat:netstack_netstat_test",
]
binaries = [
{
name = "netstack_service_test"
},
]
tests = [
{
name = "netstack_fidlconv_test"
},
{
name = "netstack_filter_test"
},
{
name = "netstack_netiface_test"
},
{
name = "netstack_netstat_test"
},
]
}
go_library("netstack_lib") {
name = "netstack"
deps = [
"//garnet/public/fidl/fuchsia.devicesettings($go_toolchain)",
"//garnet/public/fidl/fuchsia.netstack($go_toolchain)",
"//garnet/public/fidl/fuchsia.sys($go_toolchain)",
"//garnet/public/go/third_party:github.com/google/netstack",
"//garnet/public/lib/component/go/src/app",
"//zircon/public/fidl/fuchsia-net($go_toolchain)",
"//zircon/public/fidl/fuchsia-net-stack($go_toolchain)",
]
}
go_binary("netstack_bin") {
output_name = "netstack"
gopackage = "netstack"
deps = [ ":netstack_lib" ]
}
go_test("netstack_fidlconv_test") {
gopackage = "netstack/fidlconv"
deps = [ ":netstack_lib" ]
}
go_test("netstack_netiface_test") {
gopackage = "netstack/netiface"
deps = [ ":netstack_lib" ]
}
go_test("netstack_filter_test") {
gopackage = "netstack/filter"
deps = [ ":netstack_lib" ]
}
go_test("netstack_connectivity_test") {
gopackage = "netstack/connectivity"
deps = [ ":netstack_lib" ]
}