| # Copyright 2019 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. |
| |
| declare_args() { |
| # Whether to enable debug commands in netsvc. |
| netsvc_debug_commands = true |
| } |
| |
| executable("netsvc") { |
| sources = [ |
| "board-name.cpp", |
| "debuglog.cpp", |
| "device_id.cpp", |
| "netboot.cpp", |
| "netfile.cpp", |
| "netsvc.cpp", |
| "tftp.cpp", |
| "zbi.cpp", |
| ] |
| if (netsvc_debug_commands) { |
| sources += [ |
| "debug-command-enabled.cpp", |
| ] |
| } else { |
| sources += [ |
| "debug-command-disabled.cpp", |
| ] |
| } |
| deps = [ |
| "$zx/system/fidl/fuchsia-device:c", |
| "$zx/system/fidl/fuchsia-device-manager:c", |
| "$zx/system/fidl/fuchsia-hardware-block:c", |
| "$zx/system/fidl/fuchsia-hardware-ethernet:c", |
| "$zx/system/fidl/fuchsia-sysinfo:c", |
| "$zx/system/ulib/chromeos-disk-setup", |
| "$zx/system/ulib/fdio", |
| "$zx/system/ulib/fzl", |
| "$zx/system/ulib/gpt", |
| "$zx/system/ulib/inet6", |
| "$zx/system/ulib/libzbi", |
| "$zx/system/ulib/sync", |
| "$zx/system/ulib/tftp", |
| "$zx/system/ulib/zircon", |
| "$zx/system/ulib/zx", |
| "$zx/system/ulib/zxcpp", |
| ] |
| data_deps = [ |
| # netsvc launches /boot/bin/install-disk-image under --netboot. |
| "$zx/system/uapp/disk-pave", |
| |
| # netsvc launches /boot/bin/sh for netruncmd. |
| "$zx/third_party/uapp/dash", |
| ] |
| } |