diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-01-21 16:58:32 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-01-21 19:44:09 +0000 |
commit | 52778aed9391538287874b1f027994cef15b10d4 (patch) | |
tree | 4e54a20165b41a313ca197255e57af788a10f693 /toxav | |
parent | 6c98791563b41deebbd34bd35db2839d78f12c2c (diff) |
Make BUILD files more finely-grained.
This allows us to precisely see which libraries depend on which and lets
us split them up more, if necessary.
Diffstat (limited to 'toxav')
-rw-r--r-- | toxav/BUILD | 100 |
1 files changed, 79 insertions, 21 deletions
diff --git a/toxav/BUILD b/toxav/BUILD index 43e7e0fc..7ebb16ad 100644 --- a/toxav/BUILD +++ b/toxav/BUILD | |||
@@ -1,41 +1,94 @@ | |||
1 | load("//tools:no_undefined.bzl", "cc_library") | ||
2 | |||
1 | filegroup( | 3 | filegroup( |
2 | name = "public", | 4 | name = "public_headers", |
3 | srcs = ["toxav.h"], | 5 | srcs = ["toxav.h"], |
4 | visibility = ["//visibility:public"], | 6 | visibility = ["//c-toxcore:__pkg__"], |
5 | ) | 7 | ) |
6 | 8 | ||
7 | cc_library( | 9 | cc_library( |
8 | name = "toxav", | 10 | name = "public", |
11 | hdrs = [":public_headers"], | ||
12 | ) | ||
13 | |||
14 | cc_library( | ||
15 | name = "ring_buffer", | ||
16 | srcs = ["ring_buffer.c"], | ||
17 | hdrs = ["ring_buffer.h"], | ||
18 | ) | ||
19 | |||
20 | cc_library( | ||
21 | name = "bwcontroller", | ||
22 | srcs = ["bwcontroller.c"], | ||
23 | hdrs = ["bwcontroller.h"], | ||
24 | deps = [ | ||
25 | ":ring_buffer", | ||
26 | "//c-toxcore/toxcore:Messenger", | ||
27 | ], | ||
28 | ) | ||
29 | |||
30 | cc_library( | ||
31 | name = "rtp", | ||
32 | srcs = ["rtp.c"], | ||
33 | hdrs = ["rtp.h"], | ||
34 | deps = [":bwcontroller"], | ||
35 | ) | ||
36 | |||
37 | cc_library( | ||
38 | name = "audio", | ||
39 | srcs = ["audio.c"], | ||
40 | hdrs = ["audio.h"], | ||
41 | deps = [ | ||
42 | ":public", | ||
43 | ":rtp", | ||
44 | "//c-toxcore/toxcore:network", | ||
45 | "@opus", | ||
46 | ], | ||
47 | ) | ||
48 | |||
49 | cc_library( | ||
50 | name = "video", | ||
9 | srcs = [ | 51 | srcs = [ |
10 | "audio.c", | ||
11 | "bwcontroller.c", | ||
12 | "groupav.c", | ||
13 | "msi.c", | 52 | "msi.c", |
14 | "ring_buffer.c", | ||
15 | "rtp.c", | ||
16 | "toxav.c", | ||
17 | "toxav_old.c", | ||
18 | "video.c", | 53 | "video.c", |
19 | ], | 54 | ], |
20 | hdrs = [ | 55 | hdrs = [ |
21 | "audio.h", | ||
22 | "bwcontroller.h", | ||
23 | "groupav.h", | ||
24 | "msi.h", | 56 | "msi.h", |
25 | "ring_buffer.h", | ||
26 | "rtp.h", | ||
27 | "toxav.api.h", | ||
28 | "toxav.h", | ||
29 | "video.h", | 57 | "video.h", |
30 | ], | 58 | ], |
31 | copts = [ | 59 | deps = [ |
32 | "-std=c99", | 60 | ":audio", |
61 | ":public", | ||
62 | "//c-toxcore/toxcore:network", | ||
63 | "@libvpx", | ||
64 | ], | ||
65 | ) | ||
66 | |||
67 | cc_library( | ||
68 | name = "groupav", | ||
69 | srcs = ["groupav.c"], | ||
70 | hdrs = ["groupav.h"], | ||
71 | deps = [ | ||
72 | "//c-toxcore/toxcore:group", | ||
73 | "@opus", | ||
74 | ], | ||
75 | ) | ||
76 | |||
77 | cc_library( | ||
78 | name = "toxav", | ||
79 | srcs = [ | ||
80 | "toxav.c", | ||
81 | "toxav_old.c", | ||
82 | ], | ||
83 | hdrs = [ | ||
84 | "toxav.api.h", | ||
85 | "toxav.h", | ||
33 | ], | 86 | ], |
34 | visibility = ["//visibility:public"], | 87 | visibility = ["//visibility:public"], |
35 | deps = [ | 88 | deps = [ |
89 | ":groupav", | ||
90 | ":video", | ||
36 | "//c-toxcore/toxcore", | 91 | "//c-toxcore/toxcore", |
37 | "@libvpx", | ||
38 | "@opus", | ||
39 | ], | 92 | ], |
40 | ) | 93 | ) |
41 | 94 | ||
@@ -49,4 +102,9 @@ cc_library( | |||
49 | "//c-toxcore/other:__pkg__", | 102 | "//c-toxcore/other:__pkg__", |
50 | "//c-toxcore/testing:__pkg__", | 103 | "//c-toxcore/testing:__pkg__", |
51 | ], | 104 | ], |
105 | deps = [ | ||
106 | "//c-toxcore/toxcore", | ||
107 | "@libvpx", | ||
108 | "@opus", | ||
109 | ], | ||
52 | ) | 110 | ) |