From: W. Felix Handte Date: Thu, 6 Dec 2018 20:32:32 +0000 (-0800) Subject: Add Logic to Makefile to Convert Make Vars to Defines X-Git-Tag: v1.3.8~13^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd4afc389f986c51243ca62168c0b71c39d9c5b7;p=thirdparty%2Fzstd.git Add Logic to Makefile to Convert Make Vars to Defines --- diff --git a/lib/Makefile b/lib/Makefile index 3fddf4fcd..386583e72 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -50,6 +50,12 @@ ZSTD_LIB_COMPRESSION ?= 1 ZSTD_LIB_DECOMPRESSION ?= 1 ZSTD_LIB_DICTBUILDER ?= 1 ZSTD_LIB_DEPRECATED ?= 1 +HUF_FORCE_DECOMPRESS_X1 ?= 0 +HUF_FORCE_DECOMPRESS_X2 ?= 0 +ZSTD_FORCE_DECOMPRESS_SHORT ?= 0 +ZSTD_FORCE_DECOMPRESS_LONG ?= 0 +ZSTD_NO_INLINE ?= 0 +ZSTD_STRIP_ERROR_STRINGS ?= 0 ifeq ($(ZSTD_LIB_COMPRESSION), 0) ZSTD_LIB_DICTBUILDER = 0 @@ -77,6 +83,30 @@ ifneq ($(ZSTD_LIB_DICTBUILDER), 0) ZSTD_FILES += $(ZDICT_FILES) endif +ifneq ($(HUF_FORCE_DECOMPRESS_X1), 0) + CFLAGS += -DHUF_FORCE_DECOMPRESS_X1 +endif + +ifneq ($(HUF_FORCE_DECOMPRESS_X2), 0) + CFLAGS += -DHUF_FORCE_DECOMPRESS_X2 +endif + +ifneq ($(ZSTD_FORCE_DECOMPRESS_SHORT), 0) + CFLAGS += -DZSTD_FORCE_DECOMPRESS_SHORT +endif + +ifneq ($(ZSTD_FORCE_DECOMPRESS_LONG), 0) + CFLAGS += -DZSTD_FORCE_DECOMPRESS_LONG +endif + +ifneq ($(ZSTD_NO_INLINE), 0) + CFLAGS += -DZSTD_NO_INLINE +endif + +ifneq ($(ZSTD_STRIP_ERROR_STRINGS), 0) + CFLAGS += -DZSTD_STRIP_ERROR_STRINGS +endif + ifneq ($(ZSTD_LEGACY_SUPPORT), 0) ifeq ($(shell test $(ZSTD_LEGACY_SUPPORT) -lt 8; echo $$?), 0) ZSTD_FILES += $(shell ls legacy/*.c | $(GREP) 'v0[$(ZSTD_LEGACY_SUPPORT)-7]')