1SubDir HAIKU_TOP src system kernel lib zstd ; 2 3local zstdSourceDirectory = [ BuildFeatureAttribute zstd : sources : path ] ; 4UseHeaders [ FDirName $(zstdSourceDirectory) lib ] ; 5UseHeaders [ FDirName $(zstdSourceDirectory) lib common ] ; 6 7# disable -Werror for this directory only 8SubDirCcFlags -Wno-error ; 9 10local zstdCommonSources = 11 error_private.c 12 entropy_common.c fse_decompress.c zstd_common.c 13 xxhash.c 14 ; 15local zstdDecSources = 16 huf_decompress.c zstd_ddict.c zstd_decompress.c zstd_decompress_block.c 17 ; 18 19LOCATE on [ FGristFiles $(zstdCommonSources) ] = 20 [ FDirName $(zstdSourceDirectory) lib common ] ; 21LOCATE on [ FGristFiles $(zstdDecSources) ] = 22 [ FDirName $(zstdSourceDirectory) lib decompress ] ; 23Depends [ FGristFiles $(zstdCommonSources) $(zstdDecSources) ] 24 : [ BuildFeatureAttribute zstd : sources ] ; 25 26# Build zstd with PIC, such that it can be used by kernel add-ons (filesystems). 27KernelStaticLibrary kernel_libzstd.a : 28 $(zstdCommonSources) $(zstdDecSources) 29 ; 30