contrib/zstd/lib/BUCK in extzstd-0.1.1 vs contrib/zstd/lib/BUCK in extzstd-0.2
- old
+ new
@@ -13,27 +13,21 @@
cxx_library(
name='compress',
header_namespace='',
visibility=['PUBLIC'],
exported_headers=subdir_glob([
- ('compress', 'zstdmt_compress.h'),
+ ('compress', 'zstd*.h'),
]),
- headers=subdir_glob([
- ('compress', 'zstd_opt.h'),
- ]),
- srcs=[
- 'compress/zstd_compress.c',
- 'compress/zstdmt_compress.c',
- ],
+ srcs=glob(['compress/zstd*.c']),
deps=[':common'],
)
cxx_library(
name='decompress',
header_namespace='',
visibility=['PUBLIC'],
- srcs=['decompress/zstd_decompress.c'],
+ srcs=glob(['decompress/zstd*.c']),
deps=[
':common',
':legacy',
],
)
@@ -56,10 +50,13 @@
exported_headers=subdir_glob([
('legacy', '*.h'),
]),
srcs=glob(['legacy/*.c']),
deps=[':common'],
+ exported_preprocessor_flags=[
+ '-DZSTD_LEGACY_SUPPORT=4',
+ ],
)
cxx_library(
name='zdict',
header_namespace='',
@@ -73,10 +70,19 @@
srcs=glob(['dictBuilder/*.c']),
deps=[':common'],
)
cxx_library(
+ name='compiler',
+ header_namespace='',
+ visibility=['PUBLIC'],
+ exported_headers=subdir_glob([
+ ('common', 'compiler.h'),
+ ]),
+)
+
+cxx_library(
name='bitstream',
header_namespace='',
visibility=['PUBLIC'],
exported_headers=subdir_glob([
('common', 'bitstream.h'),
@@ -98,10 +104,11 @@
'compress/huf_compress.c',
'decompress/huf_decompress.c',
],
deps=[
':bitstream',
+ ':compiler',
':errors',
':mem',
],
)
@@ -131,31 +138,43 @@
visibility=['PUBLIC'],
exported_headers=subdir_glob([
('common', 'pool.h'),
]),
srcs=['common/pool.c'],
- deps=[':threading'],
+ deps=[
+ ':threading',
+ ':zstd_common',
+ ],
)
cxx_library(
name='threading',
header_namespace='',
visibility=['PUBLIC'],
exported_headers=subdir_glob([
('common', 'threading.h'),
]),
srcs=['common/threading.c'],
+ exported_preprocessor_flags=[
+ '-DZSTD_MULTITHREAD',
+ ],
+ exported_linker_flags=[
+ '-pthread',
+ ],
)
cxx_library(
name='xxhash',
header_namespace='',
visibility=['PUBLIC'],
exported_headers=subdir_glob([
('common', 'xxhash.h'),
]),
srcs=['common/xxhash.c'],
+ exported_preprocessor_flags=[
+ '-DXXH_NAMESPACE=ZSTD_',
+ ],
)
cxx_library(
name='zstd_common',
header_namespace='',
@@ -164,18 +183,20 @@
('', 'zstd.h'),
('common', 'zstd_internal.h'),
]),
srcs=['common/zstd_common.c'],
deps=[
+ ':compiler',
':errors',
':mem',
],
)
cxx_library(
name='common',
deps=[
':bitstream',
+ ':compiler',
':entropy',
':errors',
':mem',
':pool',
':threading',