blob: 6812c1b1e54c543184346fccb537ba0cd33af344 [file] [log] [blame]
Nick Terrell9c018cc2017-01-26 15:56:34 -08001cxx_library(
2 name='zstd',
3 header_namespace='',
4 visibility=['PUBLIC'],
5 deps=[
6 ':common',
7 ':compress',
8 ':decompress',
9 ':deprecated',
10 ],
11)
12
13cxx_library(
14 name='compress',
15 header_namespace='',
16 visibility=['PUBLIC'],
17 exported_headers=subdir_glob([
18 ('compress', 'zstdmt_compress.h'),
19 ]),
20 headers=subdir_glob([
21 ('compress', 'zstd_opt.h'),
22 ]),
23 srcs=[
24 'compress/zstd_compress.c',
25 'compress/zstdmt_compress.c',
26 ],
27 deps=[':common'],
28)
29
30cxx_library(
31 name='decompress',
32 header_namespace='',
33 visibility=['PUBLIC'],
34 srcs=['decompress/zstd_decompress.c'],
35 deps=[
36 ':common',
37 ':legacy',
38 ],
39)
40
41cxx_library(
42 name='deprecated',
43 header_namespace='',
44 visibility=['PUBLIC'],
45 exported_headers=subdir_glob([
46 ('decprecated', '*.h'),
47 ]),
48 srcs=glob(['deprecated/*.c']),
49 deps=[':common'],
50)
51
52cxx_library(
53 name='legacy',
54 header_namespace='',
55 visibility=['PUBLIC'],
56 exported_headers=subdir_glob([
57 ('legacy', '*.h'),
58 ]),
59 srcs=glob(['legacy/*.c']),
60 deps=[':common'],
61)
62
63cxx_library(
64 name='zdict',
65 header_namespace='',
66 visibility=['PUBLIC'],
67 exported_headers=subdir_glob([
68 ('dictBuilder', 'zdict.h'),
69 ]),
70 headers=subdir_glob([
71 ('dictBuilder', 'divsufsort.h'),
72 ]),
73 srcs=glob(['dictBuilder/*.c']),
74 deps=[':common'],
75)
76
77cxx_library(
78 name='bitstream',
79 header_namespace='',
80 visibility=['PUBLIC'],
81 exported_headers=subdir_glob([
82 ('common', 'bitstream.h'),
83 ]),
84)
85
86cxx_library(
87 name='entropy',
88 header_namespace='',
89 visibility=['PUBLIC'],
90 exported_headers=subdir_glob([
91 ('common', 'fse.h'),
92 ('common', 'huf.h'),
93 ]),
94 srcs=[
95 'common/entropy_common.c',
96 'common/fse_decompress.c',
97 'compress/fse_compress.c',
98 'compress/huf_compress.c',
99 'decompress/huf_decompress.c',
100 ],
101 deps=[
102 ':bitstream',
103 ':errors',
104 ':mem',
105 ],
106)
107
108cxx_library(
109 name='errors',
110 header_namespace='',
111 visibility=['PUBLIC'],
112 exported_headers=subdir_glob([
113 ('common', 'error_private.h'),
114 ('common', 'zstd_errors.h'),
115 ]),
116 srcs=['common/error_private.c'],
117)
118
119cxx_library(
120 name='mem',
121 header_namespace='',
122 visibility=['PUBLIC'],
123 exported_headers=subdir_glob([
124 ('common', 'mem.h'),
125 ]),
126)
127
128cxx_library(
129 name='pool',
130 header_namespace='',
131 visibility=['PUBLIC'],
132 exported_headers=subdir_glob([
133 ('common', 'pool.h'),
134 ]),
135 srcs=['common/pool.c'],
136 deps=[':threading'],
137)
138
139cxx_library(
140 name='threading',
141 header_namespace='',
142 visibility=['PUBLIC'],
143 exported_headers=subdir_glob([
144 ('common', 'threading.h'),
145 ]),
146 srcs=['common/threading.c'],
147)
148
149cxx_library(
150 name='xxhash',
151 header_namespace='',
152 visibility=['PUBLIC'],
153 exported_headers=subdir_glob([
154 ('common', 'xxhash.h'),
155 ]),
156 srcs=['common/xxhash.c'],
157)
158
159cxx_library(
160 name='zstd_common',
161 header_namespace='',
162 visibility=['PUBLIC'],
163 exported_headers=subdir_glob([
164 ('', 'zstd.h'),
165 ('common', 'zstd_internal.h'),
166 ]),
167 srcs=['common/zstd_common.c'],
168 deps=[
169 ':errors',
170 ':mem',
171 ],
172)
173
174cxx_library(
175 name='common',
176 deps=[
177 ':bitstream',
178 ':entropy',
179 ':errors',
180 ':mem',
181 ':pool',
182 ':threading',
183 ':xxhash',
184 ':zstd_common',
185 ]
186)