| # Copyright 2017 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/package.gni") |
| |
| package("network_time") { |
| deps = [ |
| ":bin", |
| ] |
| |
| binary = "network_time" |
| |
| resources = [ |
| { |
| path = rebase_path("roughtime-servers.json") |
| dest = "roughtime-servers.json" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/network_time.cmx") |
| dest = "network_time.cmx" |
| }, |
| ] |
| } |
| |
| package("network_time_tests") { |
| testonly = true |
| |
| deps = [ |
| ":tests", |
| ] |
| |
| tests = [ |
| { |
| name = "network_time_tests" |
| }, |
| ] |
| } |
| |
| source_set("lib") { |
| sources = [ |
| "roughtime_server.cc", |
| "roughtime_server.h", |
| "time_server_config.cc", |
| "time_server_config.h", |
| "timezone.cc", |
| "timezone.h", |
| ] |
| |
| deps = [ |
| ":time_util_lib", |
| "//garnet/public/lib/fxl", |
| "//garnet/public/lib/syslog/cpp", |
| "//third_party/boringssl", |
| "//third_party/rapidjson", |
| "//third_party/roughtime:client_lib", |
| "//zircon/public/fidl/zircon-rtc:zircon-rtc_c_client", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/fit", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "network_time" |
| |
| sources = [ |
| "main.cc", |
| ] |
| |
| deps = [ |
| ":lib", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/fxl", |
| ] |
| } |
| |
| static_library("time_util_lib") { |
| output_name = "time_util_lib" |
| sources = [ |
| "time_util.cc", |
| "time_util.h", |
| ] |
| } |
| |
| executable("tests") { |
| output_name = "network_time_tests" |
| |
| testonly = true |
| |
| sources = [ |
| "roughtime_server_test.cc", |
| "time_server_config_test.cc", |
| ] |
| |
| deps = [ |
| ":lib", |
| "//garnet/public/lib/fxl", |
| "//third_party/boringssl", |
| "//third_party/googletest:gtest_main", |
| "//third_party/roughtime:client_lib", |
| ] |
| } |