mirror of
https://github.com/depp/syncfiles.git
synced 2024-11-29 03:51:28 +00:00
76 lines
1.1 KiB
Python
76 lines
1.1 KiB
Python
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
|
load("//bazel:copts.bzl", "COPTS")
|
|
|
|
cc_library(
|
|
name = "lib",
|
|
srcs = [
|
|
"crc32.c",
|
|
"strbuf.c",
|
|
"toolbox.c",
|
|
"util.c",
|
|
],
|
|
hdrs = [
|
|
"crc32.h",
|
|
"defs.h",
|
|
"endian.h",
|
|
"error.h",
|
|
"strbuf.h",
|
|
"util.h",
|
|
],
|
|
copts = COPTS,
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "test",
|
|
testonly = True,
|
|
srcs = [
|
|
"test.c",
|
|
],
|
|
hdrs = [
|
|
"test.h",
|
|
],
|
|
copts = COPTS,
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":lib",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "endian_test",
|
|
size = "small",
|
|
srcs = [
|
|
"endian_test.c",
|
|
],
|
|
copts = COPTS,
|
|
deps = [
|
|
":lib",
|
|
":test",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "crc32_test",
|
|
size = "small",
|
|
srcs = [
|
|
"crc32_test.c",
|
|
],
|
|
copts = COPTS,
|
|
deps = [
|
|
":lib",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "strbuf_test",
|
|
size = "small",
|
|
srcs = [
|
|
"strbuf_test.c",
|
|
],
|
|
copts = COPTS,
|
|
deps = [
|
|
":lib",
|
|
],
|
|
)
|