1 ################################################################################ 2 # proto cc libraries 3 ################################################################################ 4 5 cc_proto_library( 6 name = "nugget_app_keymaster_keymaster_cc_proto", 7 visibility = ["//visibility:public"], 8 deps = [ 9 "nugget_app_keymaster_keymaster_proto", 10 ], 11 ) 12 13 cc_proto_library( 14 name = "nugget_app_protoapi_control_cc_proto", 15 visibility = ["//visibility:public"], 16 deps = [ 17 "nugget_app_protoapi_control_proto", 18 ], 19 ) 20 21 cc_proto_library( 22 name = "nugget_app_protoapi_diagnostics_api_cc_proto", 23 visibility = ["//visibility:public"], 24 deps = [ 25 "nugget_app_protoapi_diagnostics_api_proto", 26 ], 27 ) 28 29 cc_proto_library( 30 name = "nugget_app_protoapi_testing_api_cc_proto", 31 visibility = ["//visibility:public"], 32 deps = [ 33 "nugget_app_protoapi_testing_api_proto", 34 ], 35 ) 36 37 cc_proto_library( 38 name = "nugget_app_weaver_weaver_cc_proto", 39 visibility = ["//visibility:public"], 40 deps = [ 41 "nugget_app_weaver_weaver_proto", 42 ], 43 ) 44 45 cc_proto_library( 46 name = "nugget_app_avb_avb_cc_proto", 47 visibility = ["//visibility:public"], 48 deps = [ 49 "nugget_app_avb_avb_proto", 50 ], 51 ) 52 53 cc_proto_library( 54 name = "nugget_protobuf_options_cc_proto", 55 visibility = ["//visibility:public"], 56 deps = [ 57 "nugget_protobuf_options_proto", 58 ], 59 ) 60 61 ################################################################################ 62 # rpc proto cc_libraries 63 ################################################################################ 64 65 cc_library( 66 name = "keymaster_client_proto", 67 srcs = [ 68 "nugget/app/keymaster/Keymaster.client.cpp", 69 ], 70 hdrs = [ 71 "nugget/app/keymaster/Keymaster.client.h", 72 ], 73 includes = [ 74 "./nugget/app/keymaster", 75 ], 76 visibility = ["//visibility:public"], 77 deps = [ 78 "nugget_app_keymaster_keymaster_cc_proto", 79 "nugget_protobuf_options_cc_proto", 80 "@nugget_host_generic_libnos//:libnos", 81 ], 82 ) 83 84 cc_library( 85 name = "weaver_client_proto", 86 srcs = [ 87 "nugget/app/weaver/Weaver.client.cpp", 88 ], 89 hdrs = [ 90 "nugget/app/weaver/Weaver.client.h", 91 ], 92 includes = [ 93 "./nugget/app/weaver/", 94 ], 95 visibility = ["//visibility:public"], 96 deps = [ 97 "nugget_app_weaver_weaver_cc_proto", 98 "nugget_protobuf_options_cc_proto", 99 "@nugget_host_generic_libnos//:libnos", 100 ], 101 ) 102 103 cc_library( 104 name = "avb_client_proto", 105 srcs = [ 106 "nugget/app/avb/Avb.client.cpp", 107 ], 108 hdrs = [ 109 "nugget/app/avb/Avb.client.h", 110 ], 111 includes = [ 112 "./nugget/app/avb/", 113 ], 114 visibility = ["//visibility:public"], 115 deps = [ 116 "nugget_app_avb_avb_cc_proto", 117 "nugget_protobuf_options_cc_proto", 118 "@nugget_host_generic_libnos//:libnos", 119 ], 120 ) 121 122 ################################################################################ 123 # rpc proto genrules. 124 ################################################################################ 125 126 GEN_SERVICE = "$(location @com_google_protobuf//:protoc) --plugin=protoc-gen-nos-client-cpp=$(location @nugget_host_generic_libnos_generator//:protoc_gen_nos_client_cpp)" 127 128 PROTO_ROOT = "$$(dirname $$(dirname $$(dirname $(location nugget/protobuf/options.proto))))" 129 130 genrule( 131 name = "avb_proto_client_cc_genrule", 132 srcs = [ 133 "nugget/app/avb/avb.proto", 134 "nugget/protobuf/options.proto", 135 "google/protobuf/descriptor.proto", 136 ], 137 outs = [ 138 "nugget/app/avb/Avb.client.cpp", 139 ], 140 cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT + 141 " --nos-client-cpp_out=source:$$(dirname $(location nugget/app/avb/Avb.client.cpp)) " + 142 "$(location nugget/app/avb/avb.proto)", 143 tools = [ 144 "@com_google_protobuf//:protoc", 145 "@nugget_host_generic_libnos_generator//:protoc_gen_nos_client_cpp", 146 ], 147 ) 148 149 genrule( 150 name = "avb_proto_client_h_genrule", 151 srcs = [ 152 "nugget/app/avb/avb.proto", 153 "nugget/protobuf/options.proto", 154 "google/protobuf/descriptor.proto", 155 ], 156 outs = [ 157 "nugget/app/avb/Avb.client.h", 158 ], 159 cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT + 160 " --nos-client-cpp_out=header:$$(dirname $(location nugget/app/avb/Avb.client.h)) " + 161 "$(location nugget/app/avb/avb.proto)", 162 tools = [ 163 "@com_google_protobuf//:protoc", 164 "@nugget_host_generic_libnos_generator//:protoc_gen_nos_client_cpp", 165 ], 166 ) 167 168 genrule( 169 name = "weaver_proto_client_cc_genrule", 170 srcs = [ 171 "nugget/app/weaver/weaver.proto", 172 "nugget/protobuf/options.proto", 173 "google/protobuf/descriptor.proto", 174 ], 175 outs = [ 176 "nugget/app/weaver/Weaver.client.cpp", 177 ], 178 cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT + 179 " --nos-client-cpp_out=source:$$(dirname $(location nugget/app/weaver/Weaver.client.cpp)) " + 180 "$(location nugget/app/weaver/weaver.proto)", 181 tools = [ 182 "@com_google_protobuf//:protoc", 183 "@nugget_host_generic_libnos_generator//:protoc_gen_nos_client_cpp", 184 ], 185 ) 186 187 genrule( 188 name = "weaver_proto_client_h_genrule", 189 srcs = [ 190 "nugget/app/weaver/weaver.proto", 191 "nugget/protobuf/options.proto", 192 "google/protobuf/descriptor.proto", 193 ], 194 outs = [ 195 "nugget/app/weaver/Weaver.client.h", 196 ], 197 cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT + 198 " --nos-client-cpp_out=header:$$(dirname $(location nugget/app/weaver/Weaver.client.h)) " + 199 "$(location nugget/app/weaver/weaver.proto)", 200 tools = [ 201 "@com_google_protobuf//:protoc", 202 "@nugget_host_generic_libnos_generator//:protoc_gen_nos_client_cpp", 203 ], 204 ) 205 206 genrule( 207 name = "keymaster_proto_client_cc_genrule", 208 srcs = [ 209 "nugget/app/keymaster/keymaster.proto", 210 "nugget/app/keymaster/keymaster_defs.proto", 211 "nugget/app/keymaster/keymaster_types.proto", 212 "nugget/protobuf/options.proto", 213 "google/protobuf/descriptor.proto", 214 ], 215 outs = [ 216 "nugget/app/keymaster/Keymaster.client.cpp", 217 ], 218 cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT + 219 " --nos-client-cpp_out=source:$$(dirname $(location nugget/app/keymaster/Keymaster.client.cpp)) " + 220 "$(location nugget/app/keymaster/keymaster.proto)", 221 tools = [ 222 "@com_google_protobuf//:protoc", 223 "@nugget_host_generic_libnos_generator//:protoc_gen_nos_client_cpp", 224 ], 225 ) 226 227 genrule( 228 name = "keymaster_proto_client_h_genrule", 229 srcs = [ 230 "nugget/app/keymaster/keymaster.proto", 231 "nugget/app/keymaster/keymaster_defs.proto", 232 "nugget/app/keymaster/keymaster_types.proto", 233 "nugget/protobuf/options.proto", 234 "google/protobuf/descriptor.proto", 235 ], 236 outs = [ 237 "nugget/app/keymaster/Keymaster.client.h", 238 ], 239 cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT + 240 " --nos-client-cpp_out=header:$$(dirname $(location nugget/app/keymaster/Keymaster.client.h)) " + 241 "$(location nugget/app/keymaster/keymaster.proto)", 242 tools = [ 243 "@com_google_protobuf//:protoc", 244 "@nugget_host_generic_libnos_generator//:protoc_gen_nos_client_cpp", 245 ], 246 ) 247 248 ################################################################################ 249 # proto libraries 250 ################################################################################ 251 252 proto_library( 253 name = "google_protobuf_descriptor_proto", 254 srcs = [ 255 "google/protobuf/descriptor.proto", 256 ], 257 ) 258 259 proto_library( 260 name = "nugget_app_avb_avb_proto", 261 srcs = [ 262 "nugget/app/avb/avb.proto", 263 ], 264 deps = [ 265 "nugget_protobuf_options_proto", 266 ], 267 ) 268 269 proto_library( 270 name = "nugget_app_keymaster_keymaster_proto", 271 srcs = [ 272 "nugget/app/keymaster/keymaster.proto", 273 "nugget/app/keymaster/keymaster_defs.proto", 274 "nugget/app/keymaster/keymaster_types.proto", 275 ], 276 deps = [ 277 "nugget_protobuf_options_proto", 278 ], 279 ) 280 281 proto_library( 282 name = "nugget_app_protoapi_control_proto", 283 srcs = [ 284 "nugget/app/protoapi/control.proto", 285 ], 286 deps = [ 287 "nugget_app_protoapi_header_proto", 288 ], 289 ) 290 291 proto_library( 292 name = "nugget_app_protoapi_diagnostics_api_proto", 293 srcs = [ 294 "nugget/app/protoapi/diagnostics_api.proto", 295 ], 296 deps = [ 297 "nugget_app_protoapi_header_proto", 298 ], 299 ) 300 301 proto_library( 302 name = "nugget_app_protoapi_gchips_types_proto", 303 srcs = [ 304 "nugget/app/protoapi/gchips_types.proto", 305 ], 306 ) 307 308 proto_library( 309 name = "nugget_app_protoapi_header_proto", 310 srcs = [ 311 "nugget/app/protoapi/header.proto", 312 ], 313 ) 314 315 proto_library( 316 name = "nugget_app_protoapi_testing_api_proto", 317 srcs = [ 318 "nugget/app/protoapi/testing_api.proto", 319 ], 320 deps = [ 321 "nugget_app_protoapi_header_proto", 322 ], 323 ) 324 325 proto_library( 326 name = "nugget_app_weaver_weaver_proto", 327 srcs = [ 328 "nugget/app/weaver/weaver.proto", 329 ], 330 deps = [ 331 "nugget_protobuf_options_proto", 332 ], 333 ) 334 335 proto_library( 336 name = "nugget_protobuf_options_proto", 337 srcs = [ 338 "nugget/protobuf/options.proto", 339 ], 340 deps = [ 341 "@com_google_protobuf//:descriptor_proto", 342 ], 343 ) 344