-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUCK
42 lines (39 loc) · 861 Bytes
/
BUCK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
load('//:buckaroo_macros.bzl', 'buckaroo_cell')
load('//:subdir_glob.bzl', 'subdir_glob')
dom_cell = \
buckaroo_cell('github.com/buckaroo-pm/netsurf-dom')
genrule(
name = 'autogenerated-colors-c',
out = 'autogenerated_colors.c',
srcs = [
'src/colors.gperf',
],
cmd = ' && '.join([
'gperf $SRCS --output-file=$OUT',
'sed -e \'s/^\(const struct svgtiny_named_color\)/static \1/\' $OUT > $OUT',
]),
)
cxx_library(
name = 'svgtiny',
header_namespace = '',
exported_headers = subdir_glob([
('include', '**/*.h'),
]),
headers = dict(
subdir_glob([
('src', '**/*.h'),
]).items() + [
('autogenerated_colors.c', ':autogenerated-colors-c'),
]
),
srcs = glob([
'src/**/*.c',
]),
deps = [
dom_cell + '//:dom',
dom_cell + '//bindings/xml:xml',
],
visibility = [
'PUBLIC',
],
)