mirror of
https://github.com/depp/syncfiles.git
synced 2024-11-24 17:31:40 +00:00
55 lines
973 B
Python
55 lines
973 B
Python
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
|
load("//bazel:copts.bzl", "COPTS")
|
|
|
|
genrule(
|
|
name = "data",
|
|
srcs = [
|
|
"//charmap:data",
|
|
"//scripts:data",
|
|
],
|
|
outs = [
|
|
"charmap_data.c",
|
|
"charmap_info.c",
|
|
"charmap_region.c",
|
|
"charmap.r",
|
|
],
|
|
cmd = "$(execpath //gen:macscript) -dest=$(RULEDIR) -src=. -quiet -format=false",
|
|
tools = [
|
|
"//gen:macscript",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "convert",
|
|
srcs = [
|
|
"charmap_data.c",
|
|
"charmap_info.c",
|
|
"charmap_region.c",
|
|
"convert.c",
|
|
"convert_1f.c",
|
|
"convert_1r.c",
|
|
],
|
|
hdrs = [
|
|
"convert.h",
|
|
"data.h",
|
|
],
|
|
copts = COPTS,
|
|
deps = [
|
|
"//lib",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "convert_test",
|
|
size = "small",
|
|
srcs = [
|
|
"convert_test.c",
|
|
],
|
|
copts = COPTS,
|
|
deps = [
|
|
":convert",
|
|
"//lib",
|
|
"//lib:test",
|
|
],
|
|
)
|