2017-01-26 23:56:34 +00:00
|
|
|
cxx_library(
|
|
|
|
name='zstd',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
deps=[
|
|
|
|
':common',
|
|
|
|
':compress',
|
|
|
|
':decompress',
|
|
|
|
':deprecated',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='compress',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
2017-10-25 19:47:57 +00:00
|
|
|
('compress', 'zstd*.h'),
|
2017-01-26 23:56:34 +00:00
|
|
|
]),
|
2017-10-25 19:47:57 +00:00
|
|
|
srcs=glob(['compress/zstd*.c']),
|
2017-01-26 23:56:34 +00:00
|
|
|
deps=[':common'],
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='decompress',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
2017-10-25 19:47:57 +00:00
|
|
|
srcs=glob(['decompress/zstd*.c']),
|
2017-01-26 23:56:34 +00:00
|
|
|
deps=[
|
|
|
|
':common',
|
|
|
|
':legacy',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='deprecated',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('decprecated', '*.h'),
|
|
|
|
]),
|
|
|
|
srcs=glob(['deprecated/*.c']),
|
|
|
|
deps=[':common'],
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='legacy',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('legacy', '*.h'),
|
|
|
|
]),
|
|
|
|
srcs=glob(['legacy/*.c']),
|
|
|
|
deps=[':common'],
|
2017-10-25 19:47:57 +00:00
|
|
|
exported_preprocessor_flags=[
|
|
|
|
'-DZSTD_LEGACY_SUPPORT=4',
|
|
|
|
],
|
2017-01-26 23:56:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='zdict',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('dictBuilder', 'zdict.h'),
|
|
|
|
]),
|
|
|
|
headers=subdir_glob([
|
|
|
|
('dictBuilder', 'divsufsort.h'),
|
|
|
|
]),
|
|
|
|
srcs=glob(['dictBuilder/*.c']),
|
|
|
|
deps=[':common'],
|
|
|
|
)
|
|
|
|
|
2017-10-25 19:47:57 +00:00
|
|
|
cxx_library(
|
|
|
|
name='compiler',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('common', 'compiler.h'),
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
|
2017-01-26 23:56:34 +00:00
|
|
|
cxx_library(
|
|
|
|
name='bitstream',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('common', 'bitstream.h'),
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='entropy',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('common', 'fse.h'),
|
|
|
|
('common', 'huf.h'),
|
|
|
|
]),
|
|
|
|
srcs=[
|
|
|
|
'common/entropy_common.c',
|
|
|
|
'common/fse_decompress.c',
|
|
|
|
'compress/fse_compress.c',
|
|
|
|
'compress/huf_compress.c',
|
|
|
|
'decompress/huf_decompress.c',
|
|
|
|
],
|
|
|
|
deps=[
|
|
|
|
':bitstream',
|
2017-10-25 19:47:57 +00:00
|
|
|
':compiler',
|
2017-01-26 23:56:34 +00:00
|
|
|
':errors',
|
|
|
|
':mem',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='errors',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('common', 'error_private.h'),
|
|
|
|
('common', 'zstd_errors.h'),
|
|
|
|
]),
|
|
|
|
srcs=['common/error_private.c'],
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='mem',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('common', 'mem.h'),
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='pool',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('common', 'pool.h'),
|
|
|
|
]),
|
|
|
|
srcs=['common/pool.c'],
|
2017-10-25 19:47:57 +00:00
|
|
|
deps=[
|
|
|
|
':threading',
|
|
|
|
':zstd_common',
|
|
|
|
],
|
2017-01-26 23:56:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='threading',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('common', 'threading.h'),
|
|
|
|
]),
|
|
|
|
srcs=['common/threading.c'],
|
2017-10-25 19:47:57 +00:00
|
|
|
exported_preprocessor_flags=[
|
|
|
|
'-DZSTD_MULTITHREAD',
|
|
|
|
],
|
|
|
|
exported_linker_flags=[
|
|
|
|
'-pthread',
|
|
|
|
],
|
2017-01-26 23:56:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='xxhash',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('common', 'xxhash.h'),
|
|
|
|
]),
|
|
|
|
srcs=['common/xxhash.c'],
|
2017-10-25 19:47:57 +00:00
|
|
|
exported_preprocessor_flags=[
|
|
|
|
'-DXXH_NAMESPACE=ZSTD_',
|
|
|
|
],
|
2017-01-26 23:56:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='zstd_common',
|
|
|
|
header_namespace='',
|
|
|
|
visibility=['PUBLIC'],
|
|
|
|
exported_headers=subdir_glob([
|
|
|
|
('', 'zstd.h'),
|
|
|
|
('common', 'zstd_internal.h'),
|
|
|
|
]),
|
|
|
|
srcs=['common/zstd_common.c'],
|
|
|
|
deps=[
|
2017-10-25 19:47:57 +00:00
|
|
|
':compiler',
|
2017-01-26 23:56:34 +00:00
|
|
|
':errors',
|
|
|
|
':mem',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
|
|
|
name='common',
|
|
|
|
deps=[
|
|
|
|
':bitstream',
|
2017-10-25 19:47:57 +00:00
|
|
|
':compiler',
|
2017-01-26 23:56:34 +00:00
|
|
|
':entropy',
|
|
|
|
':errors',
|
|
|
|
':mem',
|
|
|
|
':pool',
|
|
|
|
':threading',
|
|
|
|
':xxhash',
|
|
|
|
':zstd_common',
|
|
|
|
]
|
|
|
|
)
|