brotli/BUILD

107 lines
1.8 KiB
Python
Raw Normal View History

# Description:
# Brotli is a generic-purpose lossless compression algorithm.
package(
default_visibility = ["//visibility:public"],
)
licenses(["notice"]) # MIT
exports_files(["LICENSE"])
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",
2016-08-23 12:40:33 +00:00
srcs = glob(["include/brotli/*.h"]),
)
2016-06-24 13:32:51 +00:00
filegroup(
name = "common_headers",
srcs = glob(["common/*.h"]),
)
2016-06-24 13:32:51 +00:00
filegroup(
name = "common_sources",
srcs = glob(["common/*.c"]),
)
2016-06-24 13:32:51 +00:00
filegroup(
name = "dec_headers",
srcs = glob(["dec/*.h"]),
)
2016-06-24 13:32:51 +00:00
filegroup(
name = "dec_sources",
srcs = glob(["dec/*.c"]),
)
2016-06-24 13:32:51 +00:00
filegroup(
name = "enc_headers",
srcs = glob(["enc/*.h"]),
)
2016-06-24 13:32:51 +00:00
filegroup(
name = "enc_sources",
srcs = glob(["enc/*.c"]),
)
cc_library(
2016-08-23 12:40:33 +00:00
name = "brotli",
hdrs = [":public_headers"],
copts = STRICT_C_OPTIONS,
includes = ["include"],
2016-08-23 12:40:33 +00:00
)
cc_library(
name = "brotlicommon",
2016-06-24 13:32:51 +00:00
srcs = [":common_sources"],
2016-08-23 12:40:33 +00:00
hdrs = [":common_headers"],
copts = STRICT_C_OPTIONS,
deps = [":brotli"],
)
cc_library(
name = "brotlidec",
2016-06-24 13:32:51 +00:00
srcs = [":dec_sources"],
2016-08-23 12:40:33 +00:00
hdrs = [":dec_headers"],
copts = STRICT_C_OPTIONS,
deps = [":brotlicommon"],
)
cc_library(
name = "brotlienc",
2016-06-24 13:32:51 +00:00
srcs = [":enc_sources"],
2016-08-23 12:40:33 +00:00
hdrs = [":enc_headers"],
copts = STRICT_C_OPTIONS,
linkopts = ["-lm"],
deps = [":brotlicommon"],
)
cc_binary(
name = "bro",
srcs = ["tools/bro.c"],
copts = STRICT_C_OPTIONS,
2016-06-24 13:32:51 +00:00
linkstatic = 1,
deps = [
":brotlidec",
":brotlienc",
],
)
load("@io_bazel_rules_go//go:def.bzl", "go_prefix")
go_prefix("github.com/google/brotli")