1c37c9ab3SMatthew Dillon# $FreeBSD$ 2c37c9ab3SMatthew Dillon 3c37c9ab3SMatthew DillonLIB= private_zstd 4c37c9ab3SMatthew DillonSHLIBDIR?= /lib 5*c4b0111fSSascha WildnerWARNS?= 4 6c37c9ab3SMatthew DillonPRIVATELIB= 7c37c9ab3SMatthew Dillon 8c37c9ab3SMatthew DillonSRCS= entropy_common.c \ 9c37c9ab3SMatthew Dillon error_private.c \ 10c37c9ab3SMatthew Dillon fse_decompress.c \ 11c37c9ab3SMatthew Dillon pool.c \ 12c37c9ab3SMatthew Dillon threading.c \ 13c37c9ab3SMatthew Dillon xxhash.c \ 14c37c9ab3SMatthew Dillon zstd_common.c \ 15c37c9ab3SMatthew Dillon fse_compress.c \ 16c37c9ab3SMatthew Dillon huf_compress.c \ 17c37c9ab3SMatthew Dillon zstd_compress.c \ 18c37c9ab3SMatthew Dillon zstd_compress_literals.c \ 19c37c9ab3SMatthew Dillon zstd_compress_sequences.c \ 20c37c9ab3SMatthew Dillon zstd_compress_superblock.c \ 21c37c9ab3SMatthew Dillon zstdmt_compress.c \ 22c37c9ab3SMatthew Dillon huf_decompress.c \ 23c37c9ab3SMatthew Dillon zstd_ddict.c \ 24c37c9ab3SMatthew Dillon zstd_decompress.c \ 25c37c9ab3SMatthew Dillon zstd_decompress_block.c \ 26c37c9ab3SMatthew Dillon zbuff_common.c \ 27c37c9ab3SMatthew Dillon zbuff_compress.c \ 28c37c9ab3SMatthew Dillon zbuff_decompress.c \ 29c37c9ab3SMatthew Dillon cover.c \ 30c37c9ab3SMatthew Dillon divsufsort.c \ 31c37c9ab3SMatthew Dillon zdict.c \ 32c37c9ab3SMatthew Dillon zstd_fast.c \ 33c37c9ab3SMatthew Dillon zstd_lazy.c \ 34c37c9ab3SMatthew Dillon zstd_ldm.c \ 35c37c9ab3SMatthew Dillon zstd_opt.c \ 36c37c9ab3SMatthew Dillon zstd_double_fast.c \ 37c37c9ab3SMatthew Dillon debug.c \ 38c37c9ab3SMatthew Dillon hist.c \ 39c37c9ab3SMatthew Dillon fastcover.c 40c37c9ab3SMatthew Dillon 41c37c9ab3SMatthew DillonINCS= zstd.h 42c37c9ab3SMatthew DillonINCSDIR= ${INCLUDEDIR}/priv/zstd 43c37c9ab3SMatthew Dillon 44c37c9ab3SMatthew DillonCFLAGS+= -I${ZSTDDIR}/lib -I${ZSTDDIR}/lib/common -DXXH_NAMESPACE=ZSTD_ \ 45c37c9ab3SMatthew Dillon -fvisibility=hidden 46c37c9ab3SMatthew Dillon 47c37c9ab3SMatthew DillonZSTDDIR= ${.CURDIR}/../../contrib/zstd 48c37c9ab3SMatthew Dillon.PATH: ${ZSTDDIR}/lib/common ${ZSTDDIR}/lib/compress \ 49c37c9ab3SMatthew Dillon ${ZSTDDIR}/lib/decompress ${ZSTDDIR}/lib/deprecated \ 50c37c9ab3SMatthew Dillon ${ZSTDDIR}/lib/dictBuilder ${ZSTDDIR}/lib 51c37c9ab3SMatthew Dillon 52c37c9ab3SMatthew DillonVERSION_DEF= ${.CURDIR}/Versions.def 53c37c9ab3SMatthew DillonSYMBOL_MAPS= ${.CURDIR}/Symbol.map 54c37c9ab3SMatthew Dillon#FILES= zlib.pc 55c37c9ab3SMatthew Dillon#FILESDIR= ${LIBDATADIR}/pkgconfig 56c37c9ab3SMatthew Dillon 57c37c9ab3SMatthew Dillon# https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1] 58c37c9ab3SMatthew Dillon# "Note that [GCC] autovectorization still does not do a good job on the 59c37c9ab3SMatthew Dillon# optimized version, so it's turned off via attribute and flag. I found 60c37c9ab3SMatthew Dillon# that neither attribute nor command-line flag were entirely successful in 61c37c9ab3SMatthew Dillon# turning off vectorization, which is why there were both." 62c37c9ab3SMatthew Dillon.if (${CCVER:Mgcc*}) 6306cd13c3SSascha WildnerFLAGS_GROUPS= autovec 6406cd13c3SSascha Wildnerautovec_FLAGS= -fno-tree-vectorize 6506cd13c3SSascha Wildnerautovec_FLAGS_FILES=zstd_decompress_block.c 66c37c9ab3SMatthew Dillon.endif 67c37c9ab3SMatthew Dillon 68c37c9ab3SMatthew Dillon.include <bsd.lib.mk> 69