mirror of
https://github.com/facebook/zstd.git
synced 2025-12-08 00:03:24 -05:00
Add Logic to Makefile to Convert Make Vars to Defines
This commit is contained in:
parent
ece2c18372
commit
bd4afc389f
30
lib/Makefile
30
lib/Makefile
@ -50,6 +50,12 @@ ZSTD_LIB_COMPRESSION ?= 1
|
|||||||
ZSTD_LIB_DECOMPRESSION ?= 1
|
ZSTD_LIB_DECOMPRESSION ?= 1
|
||||||
ZSTD_LIB_DICTBUILDER ?= 1
|
ZSTD_LIB_DICTBUILDER ?= 1
|
||||||
ZSTD_LIB_DEPRECATED ?= 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)
|
ifeq ($(ZSTD_LIB_COMPRESSION), 0)
|
||||||
ZSTD_LIB_DICTBUILDER = 0
|
ZSTD_LIB_DICTBUILDER = 0
|
||||||
@ -77,6 +83,30 @@ ifneq ($(ZSTD_LIB_DICTBUILDER), 0)
|
|||||||
ZSTD_FILES += $(ZDICT_FILES)
|
ZSTD_FILES += $(ZDICT_FILES)
|
||||||
endif
|
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)
|
ifneq ($(ZSTD_LEGACY_SUPPORT), 0)
|
||||||
ifeq ($(shell test $(ZSTD_LEGACY_SUPPORT) -lt 8; echo $$?), 0)
|
ifeq ($(shell test $(ZSTD_LEGACY_SUPPORT) -lt 8; echo $$?), 0)
|
||||||
ZSTD_FILES += $(shell ls legacy/*.c | $(GREP) 'v0[$(ZSTD_LEGACY_SUPPORT)-7]')
|
ZSTD_FILES += $(shell ls legacy/*.c | $(GREP) 'v0[$(ZSTD_LEGACY_SUPPORT)-7]')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user