mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-17 00:06:33 -04:00
Makefile: use ifdef/ifndef
This commit is contained in:
parent
7e19d17e49
commit
aaadf1421a
26
Makefile
26
Makefile
@ -76,32 +76,32 @@ LIB_HEADERS := $(wildcard lib/*.h)
|
|||||||
LIB_SRC := lib/aligned_malloc.c lib/deflate_decompress.c lib/x86_cpu_features.c
|
LIB_SRC := lib/aligned_malloc.c lib/deflate_decompress.c lib/x86_cpu_features.c
|
||||||
|
|
||||||
DECOMPRESSION_ONLY :=
|
DECOMPRESSION_ONLY :=
|
||||||
ifeq ($(DECOMPRESSION_ONLY),)
|
ifndef DECOMPRESSION_ONLY
|
||||||
LIB_SRC += lib/deflate_compress.c
|
LIB_SRC += lib/deflate_compress.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DISABLE_ZLIB :=
|
DISABLE_ZLIB :=
|
||||||
ifeq ($(DISABLE_ZLIB),)
|
ifndef DISABLE_ZLIB
|
||||||
LIB_SRC += lib/adler32.c lib/zlib_decompress.c
|
LIB_SRC += lib/adler32.c lib/zlib_decompress.c
|
||||||
ifeq ($(DECOMPRESSION_ONLY),)
|
ifndef DECOMPRESSION_ONLY
|
||||||
LIB_SRC += lib/zlib_compress.c
|
LIB_SRC += lib/zlib_compress.c
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DISABLE_GZIP :=
|
DISABLE_GZIP :=
|
||||||
ifeq ($(DISABLE_GZIP),)
|
ifndef DISABLE_GZIP
|
||||||
LIB_SRC += lib/crc32.c lib/gzip_decompress.c
|
LIB_SRC += lib/crc32.c lib/gzip_decompress.c
|
||||||
ifeq ($(DECOMPRESSION_ONLY),)
|
ifndef DECOMPRESSION_ONLY
|
||||||
LIB_SRC += lib/gzip_compress.c
|
LIB_SRC += lib/gzip_compress.c
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIB_OBJ := $(LIB_SRC:.c=.o)
|
LIB_OBJ := $(LIB_SRC:.c=.o)
|
||||||
LIB_PIC_OBJ := $(LIB_SRC:.c=.pic.o)
|
LIB_PIC_OBJ := $(LIB_SRC:.c=.pic.o)
|
||||||
ifeq ($(PIC_REQUIRED),)
|
ifdef PIC_REQUIRED
|
||||||
SHLIB_OBJ := $(LIB_OBJ)
|
|
||||||
else
|
|
||||||
SHLIB_OBJ := $(LIB_PIC_OBJ)
|
SHLIB_OBJ := $(LIB_PIC_OBJ)
|
||||||
|
else
|
||||||
|
SHLIB_OBJ := $(LIB_OBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Compile position dependent library object files
|
# Compile position dependent library object files
|
||||||
@ -170,14 +170,14 @@ gzip$(PROG_SUFFIX):programs/gzip.o $(PROG_COMMON_OBJ) $(STATIC_LIB)
|
|||||||
|
|
||||||
ALL_TARGETS += gzip$(PROG_SUFFIX)
|
ALL_TARGETS += gzip$(PROG_SUFFIX)
|
||||||
|
|
||||||
ifeq ($(HARD_LINKS),)
|
ifdef HARD_LINKS
|
||||||
# No hard links; copy gzip to gunzip
|
|
||||||
gunzip$(PROG_SUFFIX):gzip$(PROG_SUFFIX)
|
|
||||||
$(QUIET_CP) cp -f $< $@
|
|
||||||
else
|
|
||||||
# Hard link gunzip to gzip
|
# Hard link gunzip to gzip
|
||||||
gunzip$(PROG_SUFFIX):gzip$(PROG_SUFFIX)
|
gunzip$(PROG_SUFFIX):gzip$(PROG_SUFFIX)
|
||||||
$(QUIET_LN) ln -f $< $@
|
$(QUIET_LN) ln -f $< $@
|
||||||
|
else
|
||||||
|
# No hard links; copy gzip to gunzip
|
||||||
|
gunzip$(PROG_SUFFIX):gzip$(PROG_SUFFIX)
|
||||||
|
$(QUIET_CP) cp -f $< $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ALL_TARGETS += gunzip$(PROG_SUFFIX)
|
ALL_TARGETS += gunzip$(PROG_SUFFIX)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user