-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
92 lines (83 loc) · 1.79 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
proto_library(
name = "message_proto",
srcs = ["message.proto"],
)
cc_proto_library(
name = "message_cc_proto",
deps = [":message_proto"],
)
cc_import(
name = "cryptopp",
hdrs = glob(["cryptopp/*.h"]),
shared_library = "cryptopp/libcryptopp.so.8",
)
cc_library(
name = "encryption",
srcs = ["encryption.cc"],
hdrs = ["encryption.h"],
deps = [
":cryptopp",
"@absl//absl/random",
"@absl//absl/status:statusor",
],
)
cc_library(
name = "utils",
srcs = ["utils.cc"],
hdrs = ["utils.h"],
linkopts = ["-lpthread"],
deps = [
":encryption",
":message_cc_proto",
"@absl//absl/status",
"@absl//absl/status:statusor",
"@absl//absl/strings",
],
)
cc_library(
name = "storage",
srcs = ["storage.cc"],
hdrs = ["storage.h"],
deps = [
"@absl//absl/container:flat_hash_map",
"@absl//absl/status",
"@absl//absl/types:optional",
],
)
cc_library(
name = "connection",
srcs = ["connection.cc"],
hdrs = ["connection.h"],
deps = [
":encryption",
":message_cc_proto",
":storage",
":utils",
"@absl//absl/status",
"@absl//absl/status:statusor",
],
)
cc_binary(
name = "server",
srcs = ["server.cc"],
linkopts = ["-lpthread"],
deps = [
":connection",
":storage",
"@absl//absl/container:flat_hash_map",
],
)
cc_binary(
name = "client",
srcs = ["client.cc"],
deps = [
":encryption",
":message_cc_proto",
":utils",
"@absl//absl/status",
"@absl//absl/status:statusor",
"@absl//absl/strings",
],
)