• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1################################################################################
2# proto cc libraries
3################################################################################
4
5cc_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
13cc_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
21cc_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
29cc_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
37cc_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
45cc_proto_library(
46    name = "nugget_app_identity_identity_cc_proto",
47    visibility = ["//visibility:public"],
48    deps = [
49        "nugget_app_identity_identity_proto",
50    ],
51)
52
53cc_proto_library(
54    name = "nugget_app_avb_avb_cc_proto",
55    visibility = ["//visibility:public"],
56    deps = [
57        "nugget_app_avb_avb_proto",
58    ],
59)
60
61cc_proto_library(
62    name = "nugget_protobuf_options_cc_proto",
63    visibility = ["//visibility:public"],
64    deps = [
65        "nugget_protobuf_options_proto",
66    ],
67)
68
69################################################################################
70# rpc proto cc_libraries
71################################################################################
72
73cc_library(
74    name = "keymaster_client_proto",
75    srcs = [
76        "nugget/app/keymaster/Keymaster.client.cpp",
77    ],
78    hdrs = [
79        "nugget/app/keymaster/Keymaster.client.h",
80    ],
81    includes = [
82        "./nugget/app/keymaster",
83    ],
84    visibility = ["//visibility:public"],
85    deps = [
86        "nugget_app_keymaster_keymaster_cc_proto",
87        "nugget_protobuf_options_cc_proto",
88        "//host/generic/libnos",
89    ],
90)
91
92cc_library(
93    name = "weaver_client_proto",
94    srcs = [
95        "nugget/app/weaver/Weaver.client.cpp",
96    ],
97    hdrs = [
98        "nugget/app/weaver/Weaver.client.h",
99    ],
100    includes = [
101        "./nugget/app/weaver/",
102    ],
103    visibility = ["//visibility:public"],
104    deps = [
105        "nugget_app_weaver_weaver_cc_proto",
106        "nugget_protobuf_options_cc_proto",
107        "//host/generic/libnos",
108    ],
109)
110
111cc_library(
112    name = "identity_client_proto",
113    srcs = [
114        "nugget/app/identity/Identity.client.cpp",
115    ],
116    hdrs = [
117        "nugget/app/identity/Identity.client.h",
118    ],
119    includes = [
120        "./nugget/app/identity/",
121    ],
122    visibility = ["//visibility:public"],
123    deps = [
124        "nugget_app_identity_identity_cc_proto",
125        "nugget_protobuf_options_cc_proto",
126        "//host/generic/libnos",
127    ],
128)
129
130cc_library(
131    name = "avb_client_proto",
132    srcs = [
133        "nugget/app/avb/Avb.client.cpp",
134    ],
135    hdrs = [
136        "nugget/app/avb/Avb.client.h",
137    ],
138    includes = [
139        "./nugget/app/avb/",
140    ],
141    visibility = ["//visibility:public"],
142    deps = [
143        "nugget_app_avb_avb_cc_proto",
144        "nugget_protobuf_options_cc_proto",
145        "//host/generic/libnos",
146    ],
147)
148
149################################################################################
150# rpc proto genrules.
151################################################################################
152
153GEN_SERVICE = "$(location @com_google_protobuf//:protoc) --plugin=protoc-gen-nos-client-cpp=$(location //host/generic/libnos/generator:protoc_gen_nos_client_cpp)"
154
155PROTO_ROOT = "$$(dirname $$(dirname $$(dirname $(location nugget/protobuf/options.proto))))"
156
157genrule(
158    name = "avb_proto_client_cc_genrule",
159    srcs = [
160        "nugget/app/avb/avb.proto",
161        "nugget/protobuf/options.proto",
162        "google/protobuf/descriptor.proto",
163    ],
164    outs = [
165        "nugget/app/avb/Avb.client.cpp",
166    ],
167    cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT +
168          " --nos-client-cpp_out=source:$$(dirname $(location nugget/app/avb/Avb.client.cpp)) " +
169          "$(location nugget/app/avb/avb.proto)",
170    tools = [
171        "//host/generic/libnos/generator:protoc_gen_nos_client_cpp",
172        "@com_google_protobuf//:protoc",
173    ],
174)
175
176genrule(
177    name = "avb_proto_client_h_genrule",
178    srcs = [
179        "nugget/app/avb/avb.proto",
180        "nugget/protobuf/options.proto",
181        "google/protobuf/descriptor.proto",
182    ],
183    outs = [
184        "nugget/app/avb/Avb.client.h",
185    ],
186    cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT +
187          " --nos-client-cpp_out=header:$$(dirname $(location nugget/app/avb/Avb.client.h)) " +
188          "$(location nugget/app/avb/avb.proto)",
189    tools = [
190        "//host/generic/libnos/generator:protoc_gen_nos_client_cpp",
191        "@com_google_protobuf//:protoc",
192    ],
193)
194
195genrule(
196    name = "weaver_proto_client_cc_genrule",
197    srcs = [
198        "nugget/app/weaver/weaver.proto",
199        "nugget/protobuf/options.proto",
200        "google/protobuf/descriptor.proto",
201    ],
202    outs = [
203        "nugget/app/weaver/Weaver.client.cpp",
204    ],
205    cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT +
206          " --nos-client-cpp_out=source:$$(dirname $(location nugget/app/weaver/Weaver.client.cpp)) " +
207          "$(location nugget/app/weaver/weaver.proto)",
208    tools = [
209        "//host/generic/libnos/generator:protoc_gen_nos_client_cpp",
210        "@com_google_protobuf//:protoc",
211    ],
212)
213
214genrule(
215    name = "weaver_proto_client_h_genrule",
216    srcs = [
217        "nugget/app/weaver/weaver.proto",
218        "nugget/protobuf/options.proto",
219        "google/protobuf/descriptor.proto",
220    ],
221    outs = [
222        "nugget/app/weaver/Weaver.client.h",
223    ],
224    cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT +
225          " --nos-client-cpp_out=header:$$(dirname $(location nugget/app/weaver/Weaver.client.h)) " +
226          "$(location nugget/app/weaver/weaver.proto)",
227    tools = [
228        "//host/generic/libnos/generator:protoc_gen_nos_client_cpp",
229        "@com_google_protobuf//:protoc",
230    ],
231)
232
233genrule(
234    name = "identity_proto_client_cc_genrule",
235    srcs = [
236        "nugget/app/identity/identity.proto",
237        "nugget/app/identity/identity_defs.proto",
238        "nugget/app/identity/identity_types.proto",
239        "nugget/protobuf/options.proto",
240        "google/protobuf/descriptor.proto",
241    ],
242    outs = [
243        "nugget/app/identity/Identity.client.cpp",
244    ],
245    cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT +
246          " --nos-client-cpp_out=source:$$(dirname $(location nugget/app/identity/Identity.client.cpp)) " +
247          "$(location nugget/app/identity/identity.proto)",
248    tools = [
249        "@com_google_protobuf//:protoc",
250        "//host/generic/libnos/generator:protoc_gen_nos_client_cpp",
251    ],
252)
253
254genrule(
255    name = "identity_proto_client_h_genrule",
256    srcs = [
257        "nugget/app/identity/identity.proto",
258        "nugget/app/identity/identity_defs.proto",
259        "nugget/app/identity/identity_types.proto",
260        "nugget/protobuf/options.proto",
261        "google/protobuf/descriptor.proto",
262    ],
263    outs = [
264        "nugget/app/identity/Identity.client.h",
265    ],
266    cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT +
267          " --nos-client-cpp_out=header:$$(dirname $(location nugget/app/identity/Identity.client.h)) " +
268          "$(location nugget/app/identity/identity.proto)",
269    tools = [
270        "@com_google_protobuf//:protoc",
271        "//host/generic/libnos/generator:protoc_gen_nos_client_cpp",
272    ],
273)
274
275genrule(
276    name = "keymaster_proto_client_cc_genrule",
277    srcs = [
278        "nugget/app/keymaster/keymaster.proto",
279        "nugget/app/keymaster/keymaster_defs.proto",
280        "nugget/app/keymaster/keymaster_types.proto",
281        "nugget/protobuf/options.proto",
282        "google/protobuf/descriptor.proto",
283    ],
284    outs = [
285        "nugget/app/keymaster/Keymaster.client.cpp",
286    ],
287    cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT +
288          " --nos-client-cpp_out=source:$$(dirname $(location nugget/app/keymaster/Keymaster.client.cpp)) " +
289          "$(location nugget/app/keymaster/keymaster.proto)",
290    tools = [
291        "//host/generic/libnos/generator:protoc_gen_nos_client_cpp",
292        "@com_google_protobuf//:protoc",
293    ],
294)
295
296genrule(
297    name = "keymaster_proto_client_h_genrule",
298    srcs = [
299        "nugget/app/keymaster/keymaster.proto",
300        "nugget/app/keymaster/keymaster_defs.proto",
301        "nugget/app/keymaster/keymaster_types.proto",
302        "nugget/protobuf/options.proto",
303        "google/protobuf/descriptor.proto",
304    ],
305    outs = [
306        "nugget/app/keymaster/Keymaster.client.h",
307    ],
308    cmd = GEN_SERVICE + " --proto_path=" + PROTO_ROOT +
309          " --nos-client-cpp_out=header:$$(dirname $(location nugget/app/keymaster/Keymaster.client.h)) " +
310          "$(location nugget/app/keymaster/keymaster.proto)",
311    tools = [
312        "//host/generic/libnos/generator:protoc_gen_nos_client_cpp",
313        "@com_google_protobuf//:protoc",
314    ],
315)
316
317################################################################################
318# proto libraries
319################################################################################
320
321PROTO_SOURCE_ROOT = "/host/generic/nugget/proto"
322
323proto_library(
324    name = "google_protobuf_descriptor_proto",
325    srcs = [
326        "google/protobuf/descriptor.proto",
327    ],
328    strip_import_prefix = PROTO_SOURCE_ROOT,
329)
330
331proto_library(
332    name = "nugget_app_avb_avb_proto",
333    srcs = [
334        "nugget/app/avb/avb.proto",
335    ],
336    strip_import_prefix = PROTO_SOURCE_ROOT,
337    deps = [
338        "nugget_protobuf_options_proto",
339    ],
340)
341
342proto_library(
343    name = "nugget_app_keymaster_keymaster_proto",
344    srcs = [
345        "nugget/app/keymaster/keymaster.proto",
346        "nugget/app/keymaster/keymaster_defs.proto",
347        "nugget/app/keymaster/keymaster_types.proto",
348    ],
349    strip_import_prefix = PROTO_SOURCE_ROOT,
350    deps = [
351        "nugget_protobuf_options_proto",
352    ],
353)
354
355proto_library(
356    name = "nugget_app_protoapi_control_proto",
357    srcs = [
358        "nugget/app/protoapi/control.proto",
359    ],
360    strip_import_prefix = PROTO_SOURCE_ROOT,
361    deps = [
362        "nugget_app_protoapi_header_proto",
363    ],
364)
365
366proto_library(
367    name = "nugget_app_protoapi_diagnostics_api_proto",
368    srcs = [
369        "nugget/app/protoapi/diagnostics_api.proto",
370    ],
371    strip_import_prefix = PROTO_SOURCE_ROOT,
372    deps = [
373        "nugget_app_protoapi_header_proto",
374    ],
375)
376
377proto_library(
378    name = "nugget_app_protoapi_gchips_types_proto",
379    srcs = [
380        "nugget/app/protoapi/gchips_types.proto",
381    ],
382    strip_import_prefix = PROTO_SOURCE_ROOT,
383)
384
385proto_library(
386    name = "nugget_app_protoapi_header_proto",
387    srcs = [
388        "nugget/app/protoapi/header.proto",
389    ],
390    strip_import_prefix = PROTO_SOURCE_ROOT,
391)
392
393proto_library(
394    name = "nugget_app_protoapi_testing_api_proto",
395    srcs = [
396        "nugget/app/protoapi/testing_api.proto",
397    ],
398    strip_import_prefix = PROTO_SOURCE_ROOT,
399    deps = [
400        "nugget_app_protoapi_header_proto",
401    ],
402)
403
404proto_library(
405    name = "nugget_app_weaver_weaver_proto",
406    srcs = [
407        "nugget/app/weaver/weaver.proto",
408    ],
409    strip_import_prefix = PROTO_SOURCE_ROOT,
410    deps = [
411        "nugget_protobuf_options_proto",
412    ],
413)
414
415proto_library(
416    name = "nugget_app_identity_identity_proto",
417    srcs = [
418        "nugget/app/identity/identity.proto",
419        "nugget/app/identity/identity_defs.proto",
420        "nugget/app/identity/identity_types.proto",
421    ],
422    strip_import_prefix = PROTO_SOURCE_ROOT,
423    deps = [
424        "nugget_protobuf_options_proto",
425    ],
426)
427
428proto_library(
429    name = "nugget_protobuf_options_proto",
430    srcs = [
431        "nugget/protobuf/options.proto",
432    ],
433    strip_import_prefix = PROTO_SOURCE_ROOT,
434    deps = [
435        "@com_google_protobuf//:descriptor_proto",
436    ],
437)
438