forked from nelhage/rules_boost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.lzma
130 lines (124 loc) · 4.6 KB
/
BUILD.lzma
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Description
# lzma is a general purpose data compression library https://tukaani.org/xz/
# Public Domain
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
config_setting(
name = "linux",
constraint_values = ["@bazel_tools//platforms:linux"],
)
config_setting(
name = "osx",
constraint_values = ["@bazel_tools//platforms:osx"],
)
config_setting(
name = "windows",
constraint_values = ["@bazel_tools//platforms:windows"],
)
copy_file(
name = "copy_config",
src = select({
":linux": "@com_github_nelhage_rules_boost//:config.lzma-linux.h",
":osx": "@com_github_nelhage_rules_boost//:config.lzma-osx.h",
":windows": "@com_github_nelhage_rules_boost//:config.lzma-windows.h",
}),
out = "config.h",
)
cc_library(
name = "lzma",
srcs = [
"src/common/tuklib_cpucores.c",
"src/common/tuklib_physmem.c",
"src/liblzma/check/check.c",
"src/liblzma/check/crc32_fast.c",
"src/liblzma/check/crc32_table.c",
"src/liblzma/check/crc64_fast.c",
"src/liblzma/check/crc64_table.c",
"src/liblzma/check/sha256.c",
"src/liblzma/common/alone_decoder.c",
"src/liblzma/common/alone_encoder.c",
"src/liblzma/common/auto_decoder.c",
"src/liblzma/common/block_buffer_decoder.c",
"src/liblzma/common/block_buffer_encoder.c",
"src/liblzma/common/block_decoder.c",
"src/liblzma/common/block_encoder.c",
"src/liblzma/common/block_header_decoder.c",
"src/liblzma/common/block_header_encoder.c",
"src/liblzma/common/block_util.c",
"src/liblzma/common/common.c",
"src/liblzma/common/easy_buffer_encoder.c",
"src/liblzma/common/easy_decoder_memusage.c",
"src/liblzma/common/easy_encoder.c",
"src/liblzma/common/easy_encoder_memusage.c",
"src/liblzma/common/easy_preset.c",
"src/liblzma/common/filter_buffer_decoder.c",
"src/liblzma/common/filter_buffer_encoder.c",
"src/liblzma/common/filter_common.c",
"src/liblzma/common/filter_decoder.c",
"src/liblzma/common/filter_encoder.c",
"src/liblzma/common/filter_flags_decoder.c",
"src/liblzma/common/filter_flags_encoder.c",
"src/liblzma/common/hardware_cputhreads.c",
"src/liblzma/common/hardware_physmem.c",
"src/liblzma/common/index.c",
"src/liblzma/common/index_decoder.c",
"src/liblzma/common/index_encoder.c",
"src/liblzma/common/index_hash.c",
"src/liblzma/common/outqueue.c",
"src/liblzma/common/stream_buffer_decoder.c",
"src/liblzma/common/stream_buffer_encoder.c",
"src/liblzma/common/stream_decoder.c",
"src/liblzma/common/stream_encoder.c",
"src/liblzma/common/stream_encoder_mt.c",
"src/liblzma/common/stream_flags_common.c",
"src/liblzma/common/stream_flags_decoder.c",
"src/liblzma/common/stream_flags_encoder.c",
"src/liblzma/common/vli_decoder.c",
"src/liblzma/common/vli_encoder.c",
"src/liblzma/common/vli_size.c",
"src/liblzma/delta/delta_common.c",
"src/liblzma/delta/delta_decoder.c",
"src/liblzma/delta/delta_encoder.c",
"src/liblzma/lz/lz_decoder.c",
"src/liblzma/lz/lz_encoder.c",
"src/liblzma/lz/lz_encoder_mf.c",
"src/liblzma/lzma/fastpos_table.c",
"src/liblzma/lzma/lzma2_decoder.c",
"src/liblzma/lzma/lzma2_encoder.c",
"src/liblzma/lzma/lzma_decoder.c",
"src/liblzma/lzma/lzma_encoder.c",
"src/liblzma/lzma/lzma_encoder_optimum_fast.c",
"src/liblzma/lzma/lzma_encoder_optimum_normal.c",
"src/liblzma/lzma/lzma_encoder_presets.c",
"src/liblzma/rangecoder/price_table.c",
"src/liblzma/simple/arm.c",
"src/liblzma/simple/armthumb.c",
"src/liblzma/simple/ia64.c",
"src/liblzma/simple/powerpc.c",
"src/liblzma/simple/simple_coder.c",
"src/liblzma/simple/simple_decoder.c",
"src/liblzma/simple/simple_encoder.c",
"src/liblzma/simple/sparc.c",
"src/liblzma/simple/x86.c",
],
hdrs = glob(["src/**/*.h"]) + ["config.h"],
copts = ["-std=c99"],
defines = [
"HAVE_CONFIG_H",
],
includes = [
".",
"src",
"src/common",
"src/liblzma",
"src/liblzma/api",
"src/liblzma/check",
"src/liblzma/common",
"src/liblzma/delta",
"src/liblzma/lz",
"src/liblzma/lzma",
"src/liblzma/rangecoder",
"src/liblzma/simple",
],
linkopts = ["-lpthread"],
visibility = ["//visibility:public"],
)