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