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