SHA256
1
0
forked from pool/lz4
lz4/lz4-use-shlib.diff

30 lines
1.2 KiB
Diff

From: Jan Engelhardt <jengelh@inai.de>
Date: 2014-10-01 14:23:22.000000000 +0200
build: make programs use liblz too instead of duplicating object code.
---
programs/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: lz4-r131/programs/Makefile
===================================================================
--- lz4-r131.orig/programs/Makefile
+++ lz4-r131/programs/Makefile
@@ -72,11 +72,11 @@ bins: lz4 lz4c fullbench fuzzer frametes
all: bins m32
-lz4: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/lz4frame.c $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c
- $(CC) $(FLAGS) $^ -o $@$(EXT)
+lz4: bench.c lz4io.c lz4cli.c
+ $(CC) $(FLAGS) $^ -o $@$(EXT) -L${LZ4DIR} -llz4
-lz4c : $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/lz4frame.c $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c
- $(CC) $(FLAGS) -DENABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT)
+lz4c : bench.c lz4io.c lz4cli.c
+ $(CC) $(FLAGS) -DENABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT) -L${LZ4DIR} -llz4
lz4c32: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/lz4frame.c $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c
$(CC) -m32 $(FLAGS) -DENABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT)