syncfiles/lib/BUILD.bazel

76 lines
1.1 KiB
Python
Raw Normal View History

2022-03-29 19:34:27 +00:00
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
2022-03-25 05:45:55 +00:00
load("//bazel:copts.bzl", "COPTS")
cc_library(
name = "lib",
srcs = [
2022-04-10 07:37:14 +00:00
"crc32.c",
2022-07-16 21:04:27 +00:00
"strbuf.c",
2022-03-25 05:45:55 +00:00
"toolbox.c",
"util.c",
2022-03-25 05:45:55 +00:00
],
hdrs = [
2022-04-10 07:37:14 +00:00
"crc32.h",
2022-03-25 05:45:55 +00:00
"defs.h",
2022-03-29 19:34:27 +00:00
"endian.h",
"error.h",
2022-07-16 21:04:27 +00:00
"strbuf.h",
"util.h",
],
copts = COPTS,
visibility = ["//visibility:public"],
)
cc_library(
name = "test",
testonly = True,
srcs = [
"test.c",
],
hdrs = [
2022-03-25 05:45:55 +00:00
"test.h",
],
copts = COPTS,
visibility = ["//visibility:public"],
deps = [
":lib",
],
2022-03-25 05:45:55 +00:00
)
2022-03-29 19:34:27 +00:00
cc_test(
name = "endian_test",
2022-03-30 09:18:21 +00:00
size = "small",
2022-03-29 19:34:27 +00:00
srcs = [
"endian_test.c",
],
copts = COPTS,
deps = [
":lib",
":test",
2022-03-29 19:34:27 +00:00
],
)
2022-04-10 07:37:14 +00:00
cc_test(
name = "crc32_test",
size = "small",
srcs = [
"crc32_test.c",
],
copts = COPTS,
deps = [
":lib",
],
)
2022-07-16 21:04:27 +00:00
cc_test(
name = "strbuf_test",
size = "small",
srcs = [
"strbuf_test.c",
],
copts = COPTS,
deps = [
":lib",
],
)