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 = [
|
|
|
|
"toolbox.c",
|
2022-03-30 07:46:19 +00:00
|
|
|
"util.c",
|
2022-03-25 05:45:55 +00:00
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"defs.h",
|
2022-03-29 19:34:27 +00:00
|
|
|
"endian.h",
|
2022-03-30 07:46:19 +00:00
|
|
|
"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"],
|
2022-03-30 07:46:19 +00:00
|
|
|
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",
|
2022-03-30 07:46:19 +00:00
|
|
|
":test",
|
2022-03-29 19:34:27 +00:00
|
|
|
],
|
|
|
|
)
|