mirror of
https://github.com/google/brotli.git
synced 2024-11-22 11:40:06 +00:00
2cc33230f4
cc_inc_library is broken when used with external repositories (see: https://github.com/bazelbuild/bazel/issues/1596), which makes it a bit useless at the moment. Switch to using cc_library with "includes" attribute to expose public headers. While there, fix order of attributes in ":brotli_common" target. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
100 lines
1.7 KiB
Python
100 lines
1.7 KiB
Python
# 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 = "public_headers",
|
|
srcs = glob(["include/brotli/*.h"]),
|
|
)
|
|
|
|
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",
|
|
hdrs = [":public_headers"],
|
|
copts = STRICT_C_OPTIONS,
|
|
includes = ["include"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "brotli_common",
|
|
srcs = [":common_sources"],
|
|
hdrs = [":common_headers"],
|
|
copts = STRICT_C_OPTIONS,
|
|
deps = [":brotli"],
|
|
)
|
|
|
|
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",
|
|
],
|
|
)
|