diff options
author | Przemyslaw Skibinski <inikep@gmail.com> | 2016-12-27 09:43:07 (GMT) |
---|---|---|
committer | Przemyslaw Skibinski <inikep@gmail.com> | 2016-12-27 09:43:07 (GMT) |
commit | efaa9b7bc72a037bddee530b8dcaefa53c9c999d (patch) | |
tree | 2ae32cac8cd397e2d3604d8172d18c61761496fa /programs/Makefile | |
parent | b22e2bed5e44f2cdacb11cf01d4a15a00bcb76ca (diff) | |
parent | 19c0f21b000ababf11cb38e0d6154742f5e1cd83 (diff) | |
download | lz4-efaa9b7bc72a037bddee530b8dcaefa53c9c999d.zip lz4-efaa9b7bc72a037bddee530b8dcaefa53c9c999d.tar.gz lz4-efaa9b7bc72a037bddee530b8dcaefa53c9c999d.tar.bz2 |
Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
# Conflicts:
# lib/Makefile
Diffstat (limited to 'programs/Makefile')
-rw-r--r-- | programs/Makefile | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/programs/Makefile b/programs/Makefile index 14b042a..07bec03 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -39,7 +39,9 @@ LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT)) LIBVER := $(shell echo $(LIBVER_SCRIPT)) LZ4DIR := ../lib -VOID := /dev/null + +SRCFILES := $(wildcard $(LZ4DIR)/*.c) $(wildcard *.c) +OBJFILES := $(patsubst %.c,%.o,$(SRCFILES)) CPPFLAGS+= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ CFLAGS ?= -O3 @@ -56,33 +58,36 @@ MD2ROFF_FLAGS = --roff --warnings --manual="User Commands" --organization="lz4 # Define *.exe as extension for Windows systems ifneq (,$(filter Windows%,$(OS))) -EXT =.exe +VOID := nul +EXT :=.exe else -EXT = +VOID := /dev/null +EXT := endif default: lz4-release -lz4-release: $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/lz4frame.o $(LZ4DIR)/xxhash.o bench.o lz4io.o lz4cli.o datagen.o - $(CC) $(FLAGS) $^ -o lz4$(EXT) - all: lz4 lz4c all32: CFLAGS+=-m32 all32: all lz4: CFLAGS += $(DEBUGFLAGS) -lz4: lz4-release +lz4: $(OBJFILES) + $(CC) $(FLAGS) $^ -o $@$(EXT) + +lz4-release: DEBUGFLAGS= +lz4-release: lz4 -lz4c: CFLAGS += $(DEBUGFLAGS) -lz4c : $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/lz4frame.o $(LZ4DIR)/xxhash.o bench.o lz4io.o lz4cli.c datagen.o +lz4c : CFLAGS += $(DEBUGFLAGS) +lz4c : $(SRCFILES) $(CC) $(FLAGS) -DENABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT) -lz4c32: CFLAGS+=-m32 -lz4c32: lz4 - @cp lz4$(EXT) lz4c32$(EXT) +lz4c32: CFLAGS += -m32 $(DEBUGFLAGS) +lz4c32: $(SRCFILES) + $(CC) $(FLAGS) $^ -o $@$(EXT) clean: @$(MAKE) -C $(LZ4DIR) $@ > $(VOID) |