Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
| 2 | |
Brian Silverman | 96d1295 | 2015-10-12 13:36:42 -0400 | [diff] [blame] | 3 | # This target is everything which should get deployed to the robot. |
| 4 | filegroup( |
Austin Schuh | dde6405 | 2019-12-11 20:28:00 -0800 | [diff] [blame] | 5 | name = "starter", |
| 6 | srcs = [ |
| 7 | "starter.sh", |
| 8 | "starter_exe", |
| 9 | ], |
| 10 | visibility = ["//visibility:public"], |
Brian Silverman | 96d1295 | 2015-10-12 13:36:42 -0400 | [diff] [blame] | 11 | ) |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 12 | |
| 13 | cc_binary( |
Austin Schuh | dde6405 | 2019-12-11 20:28:00 -0800 | [diff] [blame] | 14 | name = "starter_exe", |
| 15 | srcs = [ |
| 16 | "starter.cc", |
| 17 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 18 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | dde6405 | 2019-12-11 20:28:00 -0800 | [diff] [blame] | 19 | deps = [ |
| 20 | "//aos:init", |
Austin Schuh | dde6405 | 2019-12-11 20:28:00 -0800 | [diff] [blame] | 21 | "//aos:unique_malloc_ptr", |
| 22 | "//aos/libc:aos_strsignal", |
| 23 | "//aos/logging", |
| 24 | "//aos/logging:implementations", |
| 25 | "//aos/time", |
| 26 | "//aos/util:run_command", |
| 27 | "//third_party/libevent", |
Brian Silverman | 1463c09 | 2020-10-30 17:28:24 -0700 | [diff] [blame] | 28 | "@com_github_google_glog//:glog", |
John Park | 7bf05bf | 2019-12-02 21:33:19 -0800 | [diff] [blame] | 29 | "@com_google_absl//absl/base", |
Austin Schuh | dde6405 | 2019-12-11 20:28:00 -0800 | [diff] [blame] | 30 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 31 | ) |
Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 32 | |
| 33 | cc_library( |
| 34 | name = "starterd_lib", |
| 35 | srcs = ["starterd_lib.cc"], |
| 36 | hdrs = ["starterd_lib.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 37 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 38 | deps = [ |
| 39 | ":starter_fbs", |
| 40 | ":starter_rpc_fbs", |
| 41 | "//aos:configuration", |
| 42 | "//aos:macros", |
| 43 | "//aos/events:shm_event_loop", |
| 44 | "@com_github_google_glog//:glog", |
| 45 | ], |
| 46 | ) |
| 47 | |
| 48 | cc_test( |
| 49 | name = "starter_test", |
| 50 | srcs = ["starter_test.cc"], |
| 51 | data = [ |
| 52 | "//aos/events:ping", |
| 53 | "//aos/events:pingpong_config", |
| 54 | "//aos/events:pong", |
| 55 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 56 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 57 | deps = [ |
| 58 | ":starter_rpc_lib", |
| 59 | ":starterd_lib", |
| 60 | "//aos/events:ping_fbs", |
| 61 | "//aos/events:pong_fbs", |
| 62 | "//aos/testing:googletest", |
| 63 | "//aos/testing:tmpdir", |
| 64 | ], |
| 65 | ) |
| 66 | |
| 67 | cc_binary( |
| 68 | name = "starterd", |
| 69 | srcs = ["starterd.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 70 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 71 | deps = [ |
| 72 | ":starterd_lib", |
| 73 | "//aos:init", |
| 74 | ], |
| 75 | ) |
| 76 | |
| 77 | cc_library( |
| 78 | name = "starter_rpc_lib", |
| 79 | srcs = ["starter_rpc_lib.cc"], |
| 80 | hdrs = ["starter_rpc_lib.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 81 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 82 | deps = [ |
| 83 | ":starter_fbs", |
| 84 | ":starter_rpc_fbs", |
| 85 | "//aos:configuration", |
| 86 | "//aos:init", |
| 87 | "//aos/events:shm_event_loop", |
| 88 | ], |
| 89 | ) |
| 90 | |
| 91 | cc_binary( |
| 92 | name = "starter_cmd", |
| 93 | srcs = ["starter_cmd.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 94 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 95 | deps = [ |
| 96 | ":starter_rpc_lib", |
| 97 | "@com_github_google_glog//:glog", |
| 98 | ], |
| 99 | ) |
| 100 | |
| 101 | flatbuffer_cc_library( |
| 102 | name = "starter_fbs", |
| 103 | srcs = ["starter.fbs"], |
| 104 | gen_reflections = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 105 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 106 | visibility = ["//visibility:public"], |
| 107 | ) |
| 108 | |
| 109 | flatbuffer_cc_library( |
| 110 | name = "starter_rpc_fbs", |
| 111 | srcs = ["starter_rpc.fbs"], |
| 112 | gen_reflections = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 113 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 114 | visibility = ["//visibility:public"], |
| 115 | ) |