forked from google/brotli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
90 lines (77 loc) · 1.48 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
# Description:
# Brotli is a generic-purpose lossless compression algorithm.
package(
default_visibility = ["//visibility:public"],
)
licenses(["notice"]) # MIT
STRICT_C_OPTIONS = [
"--pedantic-errors",
"-Wall",
"-Wconversion",
"-Werror",
"-Wextra",
"-Wlong-long",
"-Wmissing-declarations",
"-Wmissing-prototypes",
"-Wno-strict-aliasing",
"-Wshadow",
"-Wsign-compare",
]
filegroup(
name = "common_headers",
srcs = glob(["common/*.h"]),
)
filegroup(
name = "common_sources",
srcs = glob(["common/*.c"]),
)
filegroup(
name = "dec_headers",
srcs = glob(["dec/*.h"]),
)
filegroup(
name = "dec_sources",
srcs = glob(["dec/*.c"]),
)
filegroup(
name = "enc_headers",
srcs = glob(["enc/*.h"]),
)
filegroup(
name = "enc_sources",
srcs = glob(["enc/*.c"]),
)
cc_library(
name = "brotli_common",
srcs = [":common_sources"],
hdrs = [":common_headers"],
copts = STRICT_C_OPTIONS,
)
cc_library(
name = "brotli_dec",
srcs = [":dec_sources"],
hdrs = [":dec_headers"],
copts = STRICT_C_OPTIONS,
deps = [
":brotli_common",
],
)
cc_library(
name = "brotli_enc",
srcs = [":enc_sources"],
hdrs = [":enc_headers"],
copts = STRICT_C_OPTIONS,
deps = [
":brotli_common",
],
)
cc_binary(
name = "bro",
srcs = ["tools/bro.c"],
copts = STRICT_C_OPTIONS,
linkstatic = 1,
deps = [
":brotli_dec",
":brotli_enc",
],
)