blob: b245350179976662741d40c2227c11699d601f6b [file] [log] [blame] [edit]
# 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_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 = [
"ifconfig",
"ifinfo",
"netstat",
]
binaries = [
{
name = "ifconfig"
},
{
name = "ifinfo"
},
{
name = "netstat"
},
]
}
package("netstack_gotests") {
testonly = true
deprecated_system_image = true
deps = [
":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_filter_test"
},
{
name = "netstack_netiface_test"
},
{
name = "netstack_netstat_test"
},
]
}
go_binary("netstack_bin") {
output_name = "netstack"
gopackage = "netstack"
go_dependencies = [
{
package = "netstack"
source = "//garnet/go/src/netstack"
},
{
package = "github.com/google/netstack"
source = "//third_party/netstack"
},
]
extra_dependencies = [
"//garnet/public/lib/app/fidl($go_toolchain)",
"//garnet/public/lib/netstack/fidl($go_toolchain)",
"//garnet/public/lib/device_settings/fidl($go_toolchain)",
"//garnet/public/lib/app/go/src/app",
"//garnet/public/lib/fidl/go/src/fidl/bindings",
]
}
go_test("netstack_netiface_test") {
gopackage = "netstack/netiface"
go_dependencies = [
{
package = "netstack"
source = "//garnet/go/src/netstack"
},
{
package = "github.com/google/netstack"
source = "//third_party/netstack"
},
]
}
go_test("netstack_filter_test") {
gopackage = "netstack/filter"
go_dependencies = [
{
package = "netstack"
source = "//garnet/go/src/netstack"
},
{
package = "github.com/google/netstack"
source = "//third_party/netstack"
},
]
}