1c37c9ab3SMatthew Dillon# $FreeBSD$ 2c37c9ab3SMatthew Dillon 3c37c9ab3SMatthew DillonPROG= zstd 4c37c9ab3SMatthew DillonSRCS= \ 5c37c9ab3SMatthew Dillon benchfn.c \ 6c37c9ab3SMatthew Dillon benchzstd.c \ 7c37c9ab3SMatthew Dillon datagen.c \ 8c37c9ab3SMatthew Dillon dibio.c \ 9c37c9ab3SMatthew Dillon fileio.c \ 10c37c9ab3SMatthew Dillon timefn.c \ 11c37c9ab3SMatthew Dillon util.c \ 12c37c9ab3SMatthew Dillon zstdcli.c 13*3dc61c8bSSascha WildnerSCRIPTS=zstdgrep 14*3dc61c8bSSascha WildnerMAN= zstd.1 \ 15*3dc61c8bSSascha Wildner zstdgrep.1 16c37c9ab3SMatthew Dillon 175ebc8a7fSSascha Wildner# Subset of libzstd with threading enabled 185ebc8a7fSSascha WildnerZSMT_SRCS= cover.c divsufsort.c entropy_common.c error_private.c 195ebc8a7fSSascha WildnerZSMT_SRCS+= fastcover.c fse_compress.c fse_decompress.c hist.c 205ebc8a7fSSascha WildnerZSMT_SRCS+= huf_compress.c huf_decompress.c pool.c threading.c xxhash.c 215ebc8a7fSSascha WildnerZSMT_SRCS+= zdict.c zstd_common.c zstd_compress.c zstdmt_compress.c 225ebc8a7fSSascha WildnerZSMT_SRCS+= zstd_compress_literals.c zstd_compress_sequences.c 235ebc8a7fSSascha WildnerZSMT_SRCS+= zstd_compress_superblock.c zstd_decompress.c 245ebc8a7fSSascha WildnerZSMT_SRCS+= zstd_decompress_block.c zstd_ddict.c zstd_double_fast.c 255ebc8a7fSSascha WildnerZSMT_SRCS+= zstd_fast.c zstd_lazy.c zstd_ldm.c zstd_opt.c 265ebc8a7fSSascha Wildner 27c37c9ab3SMatthew DillonZSTDCONTRIB= ${.CURDIR}/../../contrib/zstd 28c37c9ab3SMatthew Dillon 29c37c9ab3SMatthew DillonCFLAGS+= -I${ZSTDCONTRIB}/programs \ 30c37c9ab3SMatthew Dillon -I${ZSTDCONTRIB}/lib/common \ 31c37c9ab3SMatthew Dillon -I${ZSTDCONTRIB}/lib/compress \ 32c37c9ab3SMatthew Dillon -I${ZSTDCONTRIB}/lib/dictBuilder \ 33c37c9ab3SMatthew Dillon -I${ZSTDCONTRIB}/lib \ 345ebc8a7fSSascha Wildner -DXXH_NAMESPACE=ZSTD_ 35c37c9ab3SMatthew Dillon 36c37c9ab3SMatthew DillonLINKS= ${BINDIR}/zstd ${BINDIR}/unzstd \ 37c37c9ab3SMatthew Dillon ${BINDIR}/zstd ${BINDIR}/zstdcat \ 38c37c9ab3SMatthew Dillon ${BINDIR}/zstd ${BINDIR}/zstdmt 39c37c9ab3SMatthew DillonMLINKS= zstd.1 unzstd.1 \ 40c37c9ab3SMatthew Dillon zstd.1 zstdcat.1 \ 41c37c9ab3SMatthew Dillon zstd.1 zstdmt.1 42c37c9ab3SMatthew Dillon 43c37c9ab3SMatthew DillonWARNS?= 2 445ebc8a7fSSascha Wildner 455ebc8a7fSSascha Wildner#.if defined(RESCUE) 465ebc8a7fSSascha Wildner#CFLAGS+= ${PRIVATELIB_CFLAGS} 475ebc8a7fSSascha Wildner#DPADD= ${LIBZSTD} 485ebc8a7fSSascha Wildner#LDADD= -lprivate_zstd 495ebc8a7fSSascha Wildner#LDFLAGS+= ${PRIVATELIB_LDFLAGS} 505ebc8a7fSSascha Wildner#.else 515ebc8a7fSSascha Wildner.PATH: ${ZSTDCONTRIB}/lib/common 525ebc8a7fSSascha Wildner.PATH: ${ZSTDCONTRIB}/lib/compress 535ebc8a7fSSascha Wildner.PATH: ${ZSTDCONTRIB}/lib/decompress 545ebc8a7fSSascha Wildner.PATH: ${ZSTDCONTRIB}/lib/dictBuilder 555ebc8a7fSSascha WildnerSRCS+= ${ZSMT_SRCS} 565ebc8a7fSSascha WildnerCFLAGS+=-DZSTD_MULTITHREAD=1 575ebc8a7fSSascha WildnerDPADD+= ${LIBPTHREAD} 585ebc8a7fSSascha WildnerLDADD+= -lpthread 595ebc8a7fSSascha Wildner#.endif 60c37c9ab3SMatthew Dillon 61c37c9ab3SMatthew Dillon.PATH: ${ZSTDCONTRIB}/programs 62c37c9ab3SMatthew Dillon 63c37c9ab3SMatthew Dillon.include <bsd.prog.mk> 64