summaryrefslogtreecommitdiff
path: root/toxcore/BUILD
blob: 8dfa60a50d38697fe8b3258897b58f18a12adf8e (plain)
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
93
94
95
96
filegroup(
    name = "public",
    srcs = ["tox.h"],
    visibility = ["//visibility:public"],
)

cc_library(
    name = "ccompat",
    hdrs = [
        "ccompat.h",
    ],
    visibility = ["//visibility:public"],
)

cc_library(
    name = "crypto_core",
    srcs = [
        "crypto_core.c",
        "crypto_core_mem.c",
    ],
    hdrs = [
        "crypto_core.h",
    ],
    visibility = ["//c-toxcore:__subpackages__"],
    deps = [
        ":ccompat",
        "@libsodium",
    ],
)

cc_library(
    name = "toxcore",
    srcs = [
        "DHT.c",
        "DHT.h",
        "LAN_discovery.c",
        "LAN_discovery.h",
        "Messenger.c",
        "Messenger.h",
        "TCP_client.c",
        "TCP_client.h",
        "TCP_connection.c",
        "TCP_connection.h",
        "TCP_server.c",
        "TCP_server.h",
        "friend_connection.c",
        "friend_connection.h",
        "friend_requests.c",
        "friend_requests.h",
        "group.c",
        "group.h",
        "list.c",
        "list.h",
        "logger.c",
        "logger.h",
        "net_crypto.c",
        "net_crypto.h",
        "network.c",
        "network.h",
        "onion.c",
        "onion.h",
        "onion_announce.c",
        "onion_announce.h",
        "onion_client.c",
        "onion_client.h",
        "ping.c",
        "ping.h",
        "ping_array.c",
        "ping_array.h",
        "tox.c",
        "tox.h",
        "tox_api.c",
        "util.c",
        "util.h",
    ],
    copts = [
        "-std=c99",
        "-Wno-parentheses",
    ],
    linkopts = ["-lpthread"],
    visibility = ["//visibility:public"],
    deps = [
        ":ccompat",
        ":crypto_core",
        "//c-toxcore/toxencryptsave",
    ],
)

cc_library(
    name = "monolith",
    hdrs = glob([
        "*.c",
        "*.h",
    ]),
    visibility = ["//c-toxcore/other:__pkg__"],
)