1# $FreeBSD$ 2 3LIB= zstd 4SRCS= entropy_common.c \ 5 error_private.c \ 6 fse_decompress.c \ 7 pool.c \ 8 threading.c \ 9 xxhash.c \ 10 zstd_common.c \ 11 fse_compress.c \ 12 huf_compress.c \ 13 zstd_compress.c \ 14 zstdmt_compress.c \ 15 huf_decompress.c \ 16 zstd_ddict.c \ 17 zstd_decompress.c \ 18 zstd_decompress_block.c \ 19 zbuff_common.c \ 20 zbuff_compress.c \ 21 zbuff_decompress.c \ 22 cover.c \ 23 divsufsort.c \ 24 zdict.c \ 25 zstd_fast.c \ 26 zstd_lazy.c \ 27 zstd_ldm.c \ 28 zstd_opt.c \ 29 zstd_double_fast.c \ 30 debug.c \ 31 hist.c \ 32 fastcover.c 33WARNS= 2 34INCS= zstd.h 35CFLAGS+= -I${ZSTDDIR}/lib -I${ZSTDDIR}/lib/common -DXXH_NAMESPACE=ZSTD_ \ 36 -DZSTD_MULTITHREAD=1 37LIBADD= pthread 38 39PRIVATELIB= yes 40 41ZSTDDIR= ${SRCTOP}/sys/contrib/zstd 42.PATH: ${ZSTDDIR}/lib/common ${ZSTDDIR}/lib/compress \ 43 ${ZSTDDIR}/lib/decompress ${ZSTDDIR}/lib/deprecated \ 44 ${ZSTDDIR}/lib/dictBuilder ${ZSTDDIR}/lib 45 46# Work around for LLVM bug 35023, https://bugs.llvm.org/show_bug.cgi?id=35023 47.if ${MACHINE_ARCH:Marm*} != "" 48CFLAGS.zstd_compress.c+= -O0 49.endif 50 51# Work around lack of __bswap[sd]i2() intrinsics on riscv. Probably should be 52# added to one of the runtime C libraries instead. 53.if ${MACHINE_CPUARCH} == "riscv" 54.PATH: ${ZSTDDIR}/lib/freebsd 55SRCS+= zstd_kfreebsd.c 56.endif 57 58.include <bsd.lib.mk> 59