1cxx_binary( 2 name='zstd', 3 headers=glob(['*.h'], excludes=['datagen.h', 'platform.h', 'util.h']), 4 srcs=glob(['*.c'], excludes=['datagen.c']), 5 deps=[ 6 ':datagen', 7 ':util', 8 '//lib:zstd', 9 '//lib:zdict', 10 '//lib:mem', 11 '//lib:xxhash', 12 ], 13) 14 15cxx_binary( 16 name='zstdmt', 17 headers=glob(['*.h'], excludes=['datagen.h', 'platform.h', 'util.h']), 18 srcs=glob(['*.c'], excludes=['datagen.c']), 19 deps=[ 20 ':datagen', 21 ':util', 22 '//lib:zstd', 23 '//lib:zdict', 24 '//lib:mem', 25 '//lib:xxhash', 26 ], 27 preprocessor_flags=['-DZSTD_MULTITHREAD'], 28 linker_flags=['-lpthread'], 29) 30 31cxx_binary( 32 name='gzstd', 33 headers=glob(['*.h'], excludes=['datagen.h', 'platform.h', 'util.h']), 34 srcs=glob(['*.c'], excludes=['datagen.c']), 35 deps=[ 36 ':datagen', 37 ':util', 38 '//lib:zstd', 39 '//lib:zdict', 40 '//lib:mem', 41 '//lib:xxhash', 42 ], 43 preprocessor_flags=['-DZSTD_GZDECOMPRESS'], 44 linker_flags=['-lz'], 45) 46 47cxx_library( 48 name='datagen', 49 visibility=['PUBLIC'], 50 header_namespace='', 51 exported_headers=['datagen.h'], 52 srcs=['datagen.c'], 53 deps=['//lib:mem'], 54) 55 56 57cxx_library( 58 name='util', 59 visibility=['PUBLIC'], 60 header_namespace='', 61 exported_headers=['util.h', 'platform.h'], 62 deps=['//lib:mem'], 63) 64