Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 1 | load("//aos/seasocks:gen_embedded.bzl", "gen_embedded") |
| 2 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library") |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 3 | load("//aos:config.bzl", "aos_config") |
| 4 | |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 5 | package(default_visibility = ["//visibility:public"]) |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 6 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 7 | flatbuffer_cc_library( |
| 8 | name = "connect_fbs", |
| 9 | srcs = ["connect.fbs"], |
| 10 | gen_reflections = 1, |
| 11 | includes = [ |
| 12 | "//aos:configuration_fbs_includes", |
| 13 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 14 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 15 | ) |
| 16 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 17 | flatbuffer_ts_library( |
| 18 | name = "connect_ts_fbs", |
| 19 | srcs = ["connect.fbs"], |
| 20 | includes = [ |
| 21 | "//aos:configuration_fbs_includes", |
| 22 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 23 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 24 | ) |
| 25 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 26 | flatbuffer_cc_library( |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 27 | name = "timestamp_fbs", |
| 28 | srcs = ["timestamp.fbs"], |
| 29 | gen_reflections = 1, |
| 30 | includes = [ |
| 31 | "//aos:configuration_fbs_includes", |
| 32 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 33 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 34 | ) |
| 35 | |
| 36 | flatbuffer_cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 37 | name = "message_bridge_client_fbs", |
| 38 | srcs = ["message_bridge_client.fbs"], |
| 39 | gen_reflections = 1, |
| 40 | includes = [ |
| 41 | ":message_bridge_server_fbs_includes", |
| 42 | "//aos:configuration_fbs_includes", |
| 43 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 44 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 45 | ) |
| 46 | |
| 47 | flatbuffer_cc_library( |
| 48 | name = "message_bridge_server_fbs", |
| 49 | srcs = ["message_bridge_server.fbs"], |
| 50 | gen_reflections = 1, |
| 51 | includes = [ |
| 52 | "//aos:configuration_fbs_includes", |
| 53 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 54 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 55 | ) |
| 56 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 57 | cc_library( |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 58 | name = "team_number", |
| 59 | srcs = [ |
| 60 | "team_number.cc", |
| 61 | ], |
| 62 | hdrs = [ |
| 63 | "team_number.h", |
| 64 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 65 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 66 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 67 | "//aos/util:string_to_num", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 68 | "@com_github_google_glog//:glog", |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 69 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 70 | ) |
| 71 | |
Austin Schuh | df5591e | 2015-12-19 22:36:50 -0800 | [diff] [blame] | 72 | cc_test( |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 73 | name = "team_number_test", |
| 74 | srcs = [ |
| 75 | "team_number_test.cc", |
| 76 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 77 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 78 | deps = [ |
| 79 | ":team_number", |
Jim Ostrowski | 8565b40 | 2020-02-29 20:26:53 -0800 | [diff] [blame] | 80 | "//aos:configuration", |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 81 | "//aos/testing:googletest", |
| 82 | ], |
Austin Schuh | df5591e | 2015-12-19 22:36:50 -0800 | [diff] [blame] | 83 | ) |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 84 | |
| 85 | cc_library( |
| 86 | name = "sctp_lib", |
| 87 | srcs = [ |
| 88 | "sctp_lib.cc", |
| 89 | ], |
| 90 | hdrs = [ |
| 91 | "sctp_lib.h", |
| 92 | ], |
| 93 | copts = [ |
| 94 | # The casts required to read datastructures from sockets trip -Wcast-align. |
| 95 | "-Wno-cast-align", |
| 96 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 97 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 98 | deps = [ |
| 99 | "//aos:unique_malloc_ptr", |
Austin Schuh | 2fe4b71 | 2020-03-15 14:21:45 -0700 | [diff] [blame] | 100 | "//aos/util:file", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 101 | "//third_party/lksctp-tools:sctp", |
| 102 | "@com_github_google_glog//:glog", |
| 103 | ], |
| 104 | ) |
| 105 | |
| 106 | cc_library( |
| 107 | name = "sctp_server", |
| 108 | srcs = [ |
| 109 | "sctp_server.cc", |
| 110 | ], |
| 111 | hdrs = [ |
| 112 | "sctp_server.h", |
| 113 | ], |
| 114 | copts = [ |
| 115 | "-Wno-cast-align", |
| 116 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 117 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 118 | deps = [ |
| 119 | ":sctp_lib", |
| 120 | "//third_party/lksctp-tools:sctp", |
| 121 | ], |
| 122 | ) |
| 123 | |
| 124 | cc_library( |
| 125 | name = "message_bridge_protocol", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 126 | srcs = [ |
| 127 | "message_bridge_protocol.cc", |
| 128 | ], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 129 | hdrs = [ |
| 130 | "message_bridge_protocol.h", |
| 131 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 132 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 133 | deps = [ |
| 134 | ":connect_fbs", |
| 135 | "//aos:configuration", |
| 136 | "//aos:flatbuffer_merge", |
| 137 | "//aos:flatbuffers", |
| 138 | "@com_github_google_flatbuffers//:flatbuffers", |
| 139 | ], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 140 | ) |
| 141 | |
| 142 | cc_library( |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 143 | name = "message_bridge_server_status", |
| 144 | srcs = [ |
| 145 | "message_bridge_server_status.cc", |
| 146 | ], |
| 147 | hdrs = [ |
| 148 | "message_bridge_server_status.h", |
| 149 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 150 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 151 | deps = [ |
| 152 | ":message_bridge_client_fbs", |
| 153 | ":message_bridge_server_fbs", |
| 154 | ":timestamp_fbs", |
| 155 | ":timestamp_filter", |
| 156 | "//aos:flatbuffer_merge", |
| 157 | "//aos:flatbuffers", |
| 158 | "//aos/events:event_loop", |
| 159 | "//aos/time", |
| 160 | ], |
| 161 | ) |
| 162 | |
| 163 | cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 164 | name = "message_bridge_server_lib", |
| 165 | srcs = [ |
| 166 | "message_bridge_server_lib.cc", |
| 167 | ], |
| 168 | hdrs = [ |
| 169 | "message_bridge_server_lib.h", |
| 170 | ], |
| 171 | copts = [ |
| 172 | "-Wno-cast-align", |
| 173 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 174 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 175 | deps = [ |
| 176 | ":connect_fbs", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 177 | ":message_bridge_client_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 178 | ":message_bridge_protocol", |
| 179 | ":message_bridge_server_fbs", |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 180 | ":message_bridge_server_status", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 181 | ":sctp_lib", |
| 182 | ":sctp_server", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 183 | ":timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 184 | "//aos:unique_malloc_ptr", |
| 185 | "//aos/events:shm_event_loop", |
| 186 | "//aos/events/logging:logger", |
| 187 | "//third_party/lksctp-tools:sctp", |
| 188 | ], |
| 189 | ) |
| 190 | |
| 191 | cc_binary( |
| 192 | name = "message_bridge_server", |
| 193 | srcs = [ |
| 194 | "message_bridge_server.cc", |
| 195 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 196 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 197 | deps = [ |
| 198 | ":message_bridge_server_lib", |
| 199 | "//aos:init", |
| 200 | "//aos:json_to_flatbuffer", |
| 201 | "//aos/events:shm_event_loop", |
| 202 | ], |
| 203 | ) |
| 204 | |
| 205 | cc_library( |
| 206 | name = "sctp_client", |
| 207 | srcs = [ |
| 208 | "sctp_client.cc", |
| 209 | ], |
| 210 | hdrs = [ |
| 211 | "sctp_client.h", |
| 212 | ], |
| 213 | copts = [ |
| 214 | "-Wno-cast-align", |
| 215 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 216 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 217 | deps = [ |
| 218 | ":sctp_lib", |
| 219 | "//third_party/lksctp-tools:sctp", |
| 220 | ], |
| 221 | ) |
| 222 | |
| 223 | cc_library( |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 224 | name = "message_bridge_client_status", |
| 225 | srcs = [ |
| 226 | "message_bridge_client_status.cc", |
| 227 | ], |
| 228 | hdrs = [ |
| 229 | "message_bridge_client_status.h", |
| 230 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 231 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 232 | deps = [ |
| 233 | ":message_bridge_client_fbs", |
| 234 | ":message_bridge_server_fbs", |
| 235 | ":timestamp_filter", |
| 236 | "//aos:flatbuffers", |
| 237 | "//aos/events:event_loop", |
| 238 | "//aos/time", |
| 239 | ], |
| 240 | ) |
| 241 | |
| 242 | cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 243 | name = "message_bridge_client_lib", |
| 244 | srcs = [ |
| 245 | "message_bridge_client_lib.cc", |
| 246 | ], |
| 247 | hdrs = [ |
| 248 | "message_bridge_client_lib.h", |
| 249 | ], |
| 250 | copts = [ |
| 251 | "-Wno-cast-align", |
| 252 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 253 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 254 | deps = [ |
| 255 | ":connect_fbs", |
| 256 | ":message_bridge_client_fbs", |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 257 | ":message_bridge_client_status", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 258 | ":message_bridge_protocol", |
| 259 | ":message_bridge_server_fbs", |
| 260 | ":sctp_client", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 261 | ":timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 262 | "//aos/events:shm_event_loop", |
| 263 | "//aos/events/logging:logger", |
| 264 | ], |
| 265 | ) |
| 266 | |
| 267 | cc_binary( |
| 268 | name = "message_bridge_client", |
| 269 | srcs = [ |
| 270 | "message_bridge_client.cc", |
| 271 | ], |
| 272 | copts = [ |
| 273 | "-Wno-cast-align", |
| 274 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 275 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 276 | deps = [ |
| 277 | ":message_bridge_client_lib", |
| 278 | "//aos:init", |
| 279 | "//aos:json_to_flatbuffer", |
| 280 | "//aos/events:shm_event_loop", |
| 281 | ], |
| 282 | ) |
| 283 | |
| 284 | aos_config( |
| 285 | name = "message_bridge_test_common_config", |
| 286 | src = "message_bridge_test_common.json", |
| 287 | flatbuffers = [ |
Austin Schuh | 2f8fd75 | 2020-09-01 22:38:28 -0700 | [diff] [blame] | 288 | "//aos/events/logging:logger_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 289 | "//aos/events:ping_fbs", |
| 290 | "//aos/events:pong_fbs", |
| 291 | "//aos/network:message_bridge_client_fbs", |
| 292 | "//aos/network:message_bridge_server_fbs", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 293 | "//aos/network:timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 294 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 295 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 296 | deps = ["//aos/events:config"], |
| 297 | ) |
| 298 | |
| 299 | aos_config( |
| 300 | name = "message_bridge_test_server_config", |
| 301 | src = "message_bridge_test_server.json", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 302 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 303 | deps = [":message_bridge_test_common_config"], |
| 304 | ) |
| 305 | |
| 306 | aos_config( |
| 307 | name = "message_bridge_test_client_config", |
| 308 | src = "message_bridge_test_client.json", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 309 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 310 | deps = [":message_bridge_test_common_config"], |
| 311 | ) |
| 312 | |
| 313 | cc_test( |
| 314 | name = "message_bridge_test", |
| 315 | srcs = [ |
| 316 | "message_bridge_test.cc", |
| 317 | ], |
| 318 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 319 | ":message_bridge_test_client_config", |
| 320 | ":message_bridge_test_server_config", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 321 | ], |
Austin Schuh | 4889b18 | 2020-11-18 19:11:56 -0800 | [diff] [blame] | 322 | shard_count = 5, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 323 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 324 | deps = [ |
| 325 | ":message_bridge_client_lib", |
| 326 | ":message_bridge_server_lib", |
Austin Schuh | 4889b18 | 2020-11-18 19:11:56 -0800 | [diff] [blame] | 327 | "//aos:event", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 328 | "//aos:json_to_flatbuffer", |
| 329 | "//aos/events:ping_fbs", |
| 330 | "//aos/events:pong_fbs", |
| 331 | "//aos/events:shm_event_loop", |
| 332 | "//aos/testing:googletest", |
| 333 | ], |
| 334 | ) |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 335 | |
| 336 | flatbuffer_cc_library( |
| 337 | name = "web_proxy_fbs", |
| 338 | srcs = ["web_proxy.fbs"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 339 | gen_reflections = True, |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 340 | includes = [ |
| 341 | ":connect_fbs_includes", |
| 342 | "//aos:configuration_fbs_includes", |
| 343 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 344 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 345 | ) |
| 346 | |
| 347 | flatbuffer_ts_library( |
| 348 | name = "web_proxy_ts_fbs", |
| 349 | srcs = ["web_proxy.fbs"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 350 | includes = [ |
| 351 | ":connect_fbs_includes", |
| 352 | "//aos:configuration_fbs_includes", |
| 353 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 354 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 355 | ) |
| 356 | |
| 357 | cc_library( |
| 358 | name = "web_proxy_utils", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 359 | srcs = ["web_proxy_utils.cc"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 360 | hdrs = ["web_proxy_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 361 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 362 | deps = [ |
| 363 | ":connect_fbs", |
| 364 | ":web_proxy_fbs", |
| 365 | "//aos:configuration_fbs", |
| 366 | "//aos/events:event_loop", |
| 367 | "@com_github_google_flatbuffers//:flatbuffers", |
| 368 | ], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 369 | ) |
| 370 | |
| 371 | cc_library( |
| 372 | name = "web_proxy", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 373 | srcs = ["web_proxy.cc"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 374 | hdrs = ["web_proxy.h"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 375 | copts = [ |
| 376 | "-DWEBRTC_POSIX", |
| 377 | "-Wno-unused-parameter", |
| 378 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 379 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 380 | deps = [ |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 381 | ":connect_fbs", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 382 | ":web_proxy_fbs", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 383 | ":web_proxy_utils", |
| 384 | "//aos/events:shm_event_loop", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 385 | "//aos/seasocks:seasocks_logger", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 386 | "//third_party:webrtc", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 387 | "//third_party/seasocks", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 388 | "@com_github_google_glog//:glog", |
| 389 | ], |
| 390 | ) |
| 391 | |
| 392 | gen_embedded( |
| 393 | name = "gen_embedded", |
| 394 | srcs = glob( |
| 395 | include = ["www_defaults/**/*"], |
| 396 | exclude = ["www/**/*"], |
| 397 | ), |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 398 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 399 | ) |
| 400 | |
| 401 | cc_binary( |
| 402 | name = "web_proxy_main", |
| 403 | srcs = ["web_proxy_main.cc"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 404 | copts = [ |
| 405 | "-DWEBRTC_POSIX", |
| 406 | "-Wno-unused-parameter", |
| 407 | ], |
| 408 | data = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 409 | "//aos/network/www:files", |
Austin Schuh | da9d060 | 2019-09-15 17:29:38 -0700 | [diff] [blame] | 410 | "//aos/network/www:main_bundle.min.js", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 411 | "@com_github_google_flatbuffers//:flatjs", |
| 412 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 413 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 414 | deps = [ |
| 415 | ":gen_embedded", |
| 416 | ":web_proxy", |
| 417 | "//aos:init", |
| 418 | "//aos/events:shm_event_loop", |
| 419 | "//aos/seasocks:seasocks_logger", |
| 420 | "//third_party/seasocks", |
| 421 | "@com_github_google_flatbuffers//:flatbuffers", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 422 | ], |
| 423 | ) |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 424 | |
| 425 | cc_library( |
| 426 | name = "timestamp_filter", |
Austin Schuh | 7ee6f72 | 2020-08-24 16:19:36 -0700 | [diff] [blame] | 427 | srcs = ["timestamp_filter.cc"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 428 | hdrs = ["timestamp_filter.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 429 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 430 | deps = [ |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 431 | "//aos:configuration", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 432 | "//aos/time", |
Austin Schuh | e52e23b | 2020-08-24 21:18:24 -0700 | [diff] [blame] | 433 | "//third_party/gmp", |
Austin Schuh | 85357ee | 2020-08-24 16:41:42 -0700 | [diff] [blame] | 434 | "@com_google_absl//absl/strings", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 435 | ], |
| 436 | ) |
| 437 | |
| 438 | cc_test( |
| 439 | name = "timestamp_filter_test", |
| 440 | srcs = [ |
| 441 | "timestamp_filter_test.cc", |
| 442 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 443 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 444 | deps = [ |
| 445 | ":timestamp_filter", |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 446 | "//aos:json_to_flatbuffer", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 447 | "//aos/testing:googletest", |
| 448 | ], |
| 449 | ) |