syncfiles/convert/BUILD.bazel

62 lines
1.1 KiB
Python
Raw Normal View History

load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("//bazel:copts.bzl", "COPTS")
_data = [
"charmap_roman.dat",
"charmap_turkish.dat",
"charmap_croatian.dat",
"charmap_iceland.dat",
"charmap_romanian.dat",
"charmap_celtic.dat",
"charmap_gaelic.dat",
"charmap_greek.dat",
"charmap_cyrillic.dat",
"charmap_inuit.dat",
"charmap_centeuro.dat",
]
genrule(
name = "data",
srcs = [
"//charmap:data",
"//scripts:data",
],
outs = [
"charmap.c",
"charmap.r",
"charmap_name.c",
] + _data,
cmd = "$(execpath //gen:macscript) -dest=$(RULEDIR) -src=. -quiet",
tools = [
"//gen:macscript",
],
)
cc_library(
name = "convert",
srcs = [
2022-03-22 23:05:13 +00:00
"charmap.c",
"convert.c",
2022-03-22 23:05:13 +00:00
"convert.h",
"convert_1f.c",
"convert_1r.c",
"defs.h",
"test.h",
"toolbox.c",
],
copts = COPTS,
)
cc_test(
name = "convert_test",
srcs = [
"charmap_name.c",
"convert_test.c",
],
copts = COPTS,
data = _data,
deps = [
":convert",
],
)