From f5b6531902a8e12b679b10ea748aa55ac0d40d66 Mon Sep 17 00:00:00 2001 From: Dave Vasilevsky Date: Tue, 6 May 2025 21:57:29 -0400 Subject: [PATCH] seekable_format: Link against multi-threaded libzstd.a Some of these examples are intended to be parallel, and don't make sense to link against single-threaded libzstd. The filename of mt and nomt libzstd are identical, so it's still possible to link against the single-threaded one, just harder. --- contrib/seekable_format/examples/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/seekable_format/examples/Makefile b/contrib/seekable_format/examples/Makefile index 336d8c722..f15a4a15a 100644 --- a/contrib/seekable_format/examples/Makefile +++ b/contrib/seekable_format/examples/Makefile @@ -11,6 +11,8 @@ ZSTDLIB_PATH = ../../../lib ZSTDLIB_NAME = libzstd.a +# Parallel tools only make sense against multi-threaded libzstd +ZSTDLIB_TARGET = $(ZSTDLIB_NAME)-mt ZSTDLIB = $(ZSTDLIB_PATH)/$(ZSTDLIB_NAME) CPPFLAGS += -DXXH_NAMESPACE=ZSTD_ -I../ -I../../../lib -I../../../lib/common @@ -28,7 +30,7 @@ all: seekable_compression seekable_decompression seekable_decompression_mem \ parallel_processing $(ZSTDLIB): - $(MAKE) -C $(ZSTDLIB_PATH) $(ZSTDLIB_NAME) + $(MAKE) -C $(ZSTDLIB_PATH) $(ZSTDLIB_TARGET) seekable_compression : seekable_compression.c $(SEEKABLE_OBJS) $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@