roughtime.googlesource.com/roughtime.git@v0.0.0-20201210012726-dd529367052d/BUILD (about)

     1  cc_library(
     2      name = "roughtime_logging",
     3      hdrs = ["logging.h"],
     4      deps = ["@com_google_protobuf//:protobuf"],
     5  )
     6  
     7  cc_library(
     8      name = "protocol",
     9      srcs = ["protocol.cc"],
    10      hdrs = ["protocol.h"],
    11      deps = [
    12          ":roughtime_logging",
    13          "@boringssl//:crypto",
    14      ],
    15  )
    16  
    17  cc_test(
    18      name = "protocol_test",
    19      srcs = ["protocol_test.cc"],
    20      copts = ["-Iexternal/gtest/include"],
    21      deps = [
    22          ":protocol",
    23          "@gtest//:main",
    24      ],
    25  )
    26  
    27  cc_library(
    28      name = "client",
    29      srcs = ["client.cc"],
    30      hdrs = ["client.h"],
    31      deps = [
    32          ":protocol",
    33          ":roughtime_logging",
    34      ],
    35  )
    36  
    37  cc_test(
    38      name = "client_test",
    39      srcs = ["client_test.cc"],
    40      copts = ["-Iexternal/gtest/include"],
    41      deps = [
    42          ":client",
    43          ":open_source_fillins",
    44          "@gtest//:main",
    45      ],
    46  )
    47  
    48  cc_library(
    49      name = "time_source",
    50      hdrs = ["time_source.h"],
    51      deps = [":protocol"],
    52  )
    53  
    54  cc_library(
    55      name = "server",
    56      srcs = ["server.cc"],
    57      hdrs = ["server.h"],
    58      deps = [
    59          ":protocol",
    60          ":time_source",
    61          ":roughtime_logging",
    62          "@boringssl//:crypto",
    63      ],
    64  )
    65  
    66  cc_proto_library(
    67      name = "config_cc_proto",
    68      deps = [":config_proto"],
    69  )
    70  
    71  proto_library(
    72      name = "config_proto",
    73      srcs = ["config.proto"],
    74  )
    75  
    76  cc_binary(
    77      name = "simple_client",
    78      srcs = [
    79          "clock_linux.cc",
    80          "clock_macos.cc",
    81          "simple_client.cc",
    82      ],
    83      deps = [
    84          ":client",
    85          ":config_cc_proto",
    86          "@boringssl//:crypto",
    87          "@com_google_protobuf//:protobuf",
    88      ],
    89  )
    90  
    91  cc_library(
    92      name = "simple_server_lib",
    93      srcs = ["simple_server.cc"],
    94      hdrs = ["simple_server.h"],
    95      deps = [
    96          ":server",
    97          ":sys_time",
    98          ":udp_processor",
    99      ],
   100  )
   101  
   102  cc_binary(
   103      name = "simple_server",
   104      srcs = ["simple_server_main.cc"],
   105      deps = [":simple_server_lib"],
   106  )
   107  
   108  cc_library(
   109      name = "open_source_fillins",
   110      hdrs = ["open_source_fillins.h"],
   111      deps = [":roughtime_logging"],
   112      defines = ["ROUGHTIME_OPEN_SOURCE"],
   113  )
   114  
   115  cc_test(
   116      name = "server_test",
   117      srcs = ["server_test.cc"],
   118      copts = ["-Iexternal/gtest/include"],
   119      deps = [
   120          ":open_source_fillins",
   121          ":server",
   122          "@boringssl//:crypto",
   123          "@gtest//:main",
   124      ],
   125  )
   126  
   127  cc_library(
   128      name = "udp_processor",
   129      srcs = ["udp_processor.cc"],
   130      hdrs = ["udp_processor.h"],
   131      deps = [
   132          ":open_source_fillins",
   133          ":protocol",
   134          ":server",
   135          ":time_source",
   136          ":roughtime_logging",
   137      ],
   138  )
   139  
   140  cc_library(
   141      name = "sys_time",
   142      srcs = ["sys_time.cc"],
   143      hdrs = ["sys_time.h"],
   144      deps = [
   145          ":time_source",
   146          ":roughtime_logging",
   147      ],
   148  )