diff options
author | Yann Collet <cyan@fb.com> | 2016-11-22 19:37:51 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2016-11-22 19:37:51 (GMT) |
commit | edc132b69f0f653029e79ecdbf0a5335ea4ed0ea (patch) | |
tree | f66c10b1a49c9ccc95d507e70fd909384ffd9fe2 /programs | |
parent | 7819d58787082f794afcc38c1a19ee20a805f4bd (diff) | |
download | lz4-edc132b69f0f653029e79ecdbf0a5335ea4ed0ea.zip lz4-edc132b69f0f653029e79ecdbf0a5335ea4ed0ea.tar.gz lz4-edc132b69f0f653029e79ecdbf0a5335ea4ed0ea.tar.bz2 |
lz4 release build compatible with PIE
Diffstat (limited to 'programs')
-rw-r--r-- | programs/Makefile | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/programs/Makefile b/programs/Makefile index 9939a44..caef394 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -34,12 +34,12 @@ MANDIR := $(PREFIX)/share/man/man1 LZ4DIR := ../lib VOID := /dev/null -CFLAGS ?= -O3 # allows custom optimization flags. For example : CFLAGS="-O2 -g" make -CFLAGS += -g -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow \ +CPPFLAGS+= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ +CFLAGS ?= -O3 +DEBUGFLAGS=-g -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow \ -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes \ - -Wpointer-arith -Wstrict-aliasing=1 + -Wpointer-arith -Wstrict-aliasing=1 CFLAGS += $(MOREFLAGS) -CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ FLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) @@ -54,17 +54,18 @@ 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: $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/lz4frame.o $(LZ4DIR)/xxhash.o bench.o lz4io.o lz4cli.o datagen.o - $(CC) $(FLAGS) $^ -o $@$(EXT) - -lz4-release: CFLAGS := -O3 -lz4-release: lz4 +lz4: CFLAGS += $(DEBUGFLAGS) +lz4: lz4-release +lz4c: CFLAGS += $(DEBUGFLAGS) lz4c : $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/lz4frame.o $(LZ4DIR)/xxhash.o bench.o lz4io.o lz4cli.c datagen.o $(CC) $(FLAGS) -DENABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT) |