Lines Matching +full:zlib +full:- +full:dev
5 # This source code is licensed under both the BSD-style license (found in the
8 # You may select, at your option, one of the above-listed licenses.
10 # zstd : Command Line Utility, supporting gzip-like arguments
11 # zstd32 : Same as zstd, but forced to compile in 32-bits mode
12 # zstd-nolegacy : zstd without support of decompression of legacy versions
13 # zstd-small : minimal zstd without dictionary builder and benchmark
14 # zstd-compress : compressor-only version of zstd
15 # zstd-decompress : decompressor-only version of zstd
19 default: zstd-release
25 ifeq ($(shell $(CC) -v 2>&1 | $(GREP) -c "gcc version "), 1)
26 ALIGN_LOOP = -falign-loops=32
56 ifneq (,$(filter x86_64%,$(shell $(CC) -dumpmachine)))
67 …(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pth…
68 HAVE_THREAD := $(shell [ "$(HAVE_PTHREAD)" -eq "1" -o -n "$(filter Windows%,$(OS))" ] && echo 1 || …
71 THREAD_CPP := -DZSTD_MULTITHREAD
72 THREAD_LD := -pthread
77 # zlib detection
78 NO_ZLIB_MSG := ==> no zlib, building zstd without .gz support
79 …f '$(NUM_SYMBOL)include <zlib.h>\nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o…
82 ZLIBCPP = -DZSTD_GZCOMPRESS -DZSTD_GZDECOMPRESS
83 ZLIBLD = -lz
90 …t main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma …
93 LZMACPP = -DZSTD_LZMACOMPRESS -DZSTD_LZMADECOMPRESS
94 LZMALD = -llzma
101 …int main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2>…
104 LZ4CPP = -DZSTD_LZ4COMPRESS -DZSTD_LZ4DECOMPRESS
105 LZ4LD = -llz4
112 DEBUGFLAGS += -DBACKTRACE_ENABLE=0
116 DEBUGFLAGS += -DBACKTRACE_ENABLE=1
117 DEBUGFLAGS_LD += -rdynamic
122 +$(MAKE) --no-print-directory $@ \
135 allVariants: zstd zstd-compress zstd-decompress zstd-small zstd-frugal zstd-nolegacy zstd-dictBuild…
141 zstd : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT)
162 $(CC) $(FLAGS) $^ $(LDLIBS) -o $@$(EXT)
165 SRCBIN_HASH = $(shell cat $(BUILD_DIR)/zstd$(EXT) 2> $(VOID) | $(HASH) | cut -f 1 -d " ")
166 DSTBIN_HASH = $(shell cat zstd$(EXT) 2> $(VOID) | $(HASH) | cut -f 1 -d " ")
173 if [ $(BIN_ISDIFFERENT) -eq 1 ]; then \
174 cp -f $<$(EXT) $@$(EXT); \
183 .PHONY: zstd-release
184 zstd-release: DEBUGFLAGS := -DBACKTRACE_ENABLE=0
185 zstd-release: DEBUGFLAGS_LD :=
186 zstd-release: zstd
190 zstd32 : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT)
195 $(CC) -m32 $(FLAGS) $^ -o $@$(EXT)
197 ## zstd-nolegacy: same scope as zstd, with just support of legacy formats removed
198 zstd-nolegacy : LDFLAGS += $(THREAD_LD) $(ZLIBLD) $(LZMALD) $(LZ4LD) $(DEBUGFLAGS_LD)
199 zstd-nolegacy : CPPFLAGS += -UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=0
200 zstd-nolegacy : $(ZSTDLIB_CORE_SRC) $(ZDICT_SRC) $(ZSTD_CLI_OBJ)
201 $(CC) $(FLAGS) $^ -o $@$(EXT) $(LDFLAGS)
203 .PHONY: zstd-nomt
204 zstd-nomt : THREAD_CPP :=
205 zstd-nomt : THREAD_LD :=
206 zstd-nomt : THREAD_MSG := - multi-threading disabled
207 zstd-nomt : zstd
209 .PHONY: zstd-nogz
210 zstd-nogz : ZLIBCPP :=
211 zstd-nogz : ZLIBLD :=
212 zstd-nogz : ZLIB_MSG := - gzip support is disabled
213 zstd-nogz : zstd
215 .PHONY: zstd-noxz
216 zstd-noxz : LZMACPP :=
217 zstd-noxz : LZMALD :=
218 zstd-noxz : LZMA_MSG := - xz/lzma support is disabled
219 zstd-noxz : zstd
221 ## zstd-dll: zstd executable linked to dynamic library libzstd (must have same version)
222 .PHONY: zstd-dll
223 zstd-dll : LDFLAGS+= -L$(LIBZSTD)
224 zstd-dll : LDLIBS += -lzstd
225 zstd-dll : ZSTDLIB_LOCAL_SRC = xxhash.c
226 zstd-dll : zstd
229 ## zstd-pgo: zstd executable optimized with PGO.
230 .PHONY: zstd-pgo
231 zstd-pgo :
233 $(MAKE) zstd MOREFLAGS=-fprofile-generate
234 ./zstd -b19i1 $(PROFILE_WITH)
235 ./zstd -b16i1 $(PROFILE_WITH)
236 ./zstd -b9i2 $(PROFILE_WITH)
237 ./zstd -b $(PROFILE_WITH)
238 ./zstd -b7i2 $(PROFILE_WITH)
239 ./zstd -b5 $(PROFILE_WITH)
241 …case $(CC) in *clang*) if ! [ -e default.profdata ]; then llvm-profdata merge -output=default.prof…
242 $(MAKE) zstd MOREFLAGS=-fprofile-use
244 ## zstd-small: minimal target, supporting only zstd compression and decompression. no bench. no leg…
245 zstd-small: CFLAGS = -Os -s
246 zstd-frugal zstd-small: $(ZSTDLIB_CORE_SRC) zstdcli.c util.c timefn.c fileio.c
247 …$(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOTRACE -UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUP…
249 zstd-decompress: $(ZSTDLIB_COMMON_SRC) $(ZSTDLIB_DECOMPRESS_SRC) zstdcli.c util.c timefn.c fileio.c
250 …$(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOCOMPRESS -DZSTD_NOTRACE -UZSTD_LEGACY_SUPPORT…
252 zstd-compress: $(ZSTDLIB_COMMON_SRC) $(ZSTDLIB_COMPRESS_SRC) zstdcli.c util.c timefn.c fileio.c
253 …$(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NODECOMPRESS -DZSTD_NOTRACE -UZSTD_LEGACY_SUPPO…
255 ## zstd-dictBuilder: executable supporting dictionary creation and compression (only)
256 zstd-dictBuilder: $(ZSTDLIB_COMMON_SRC) $(ZSTDLIB_COMPRESS_SRC) $(ZDICT_SRC) zstdcli.c util.c timef…
257 $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODECOMPRESS -DZSTD_NOTRACE $^ -o $@$(EXT)
260 ln -sf zstd zstdmt
267 # http://stackoverflow.com/questions/708238/how-do-i-add-an-icon-to-a-mingw-gcc-compiled-executable
269 $(RC) -o $@ -I ../lib -I windres -i $< -O coff -F pe-x86-64
271 $(RC) -o $@ -I ../lib -I windres -i $< -O coff -F pe-i386
277 zstd$(EXT) zstd32$(EXT) zstd-dll$(EXT) \
278 zstd-compress$(EXT) zstd-decompress$(EXT) \
279 zstd-small$(EXT) zstd-frugal$(EXT) zstd-nolegacy$(EXT) zstd4$(EXT) \
280 zstd-dictBuilder$(EXT) \
282 $(RM) -r obj/*
286 MD2ROFF_FLAGS = --roff --warnings --manual="User Commands" --organization="zstd $(ZSTD_VERSION)"
289 cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | sed -n '/^\.\\\".*/!p' > $@
292 cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | sed -n '/^\.\\\".*/!p' > $@
295 cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | sed -n '/^\.\\\".*/!p' > $@
300 .PHONY: clean-man
301 clean-man:
306 .PHONY: preview-man
307 preview-man: clean-man man
315 DEPFLAGS = -MT $@ -MMD -MP -MF
326 $(BUILD_DIR): ; $(MKDIR) -p $@
335 #-----------------------------------------------------------------------------
337 #-----------------------------------------------------------------------------
340 HAVE_COLORNEVER = $(shell echo a | egrep --color=never a > /dev/null 2> /dev/null && echo 1 || echo…
343 EGREP_OPTIONS += --color=never
354 TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \
355 | $(AWK) -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \
356 | $(EGREP) -v -e '^[^[:alnum:]]' | sort); \
359 printf "%0.s-" {1..16}; printf "\t"; printf "%0.s-" {1..40}; printf "\n"; \
365 } | column -t -s $$'\t'
370 # see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
396 INSTALL_DATA ?= $(INSTALL) -m 644
402 [ -e zstd ] || $(MAKE) zstd-release
403 [ -e $(DESTDIR)$(BINDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/
404 [ -e $(DESTDIR)$(MAN1DIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(MAN1DIR)/
407 ln -sf zstd$(EXT) $(DESTDIR)$(BINDIR)/zstdcat$(EXT)
408 ln -sf zstd$(EXT) $(DESTDIR)$(BINDIR)/unzstd$(EXT)
409 ln -sf zstd$(EXT) $(DESTDIR)$(BINDIR)/zstdmt$(EXT)
414 ln -sf zstd.1 $(DESTDIR)$(MAN1DIR)/zstdcat.1
415 ln -sf zstd.1 $(DESTDIR)$(MAN1DIR)/unzstd.1