File lz4-use-shlib.diff of Package lz4

From: Jan Engelhardt <jengelh@inai.de>
Date: 2014-10-01 14:23:22.000000000 +0200

build: make programs use liblz too instead of linking it statically

Stop wasting my disk space!
---
 programs/Makefile |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: trunk/programs/Makefile
===================================================================
--- trunk.orig/programs/Makefile
+++ trunk/programs/Makefile
@@ -65,11 +65,11 @@ default: lz4 lz4c
 
 all: lz4 lz4c lz4c32 fullbench fullbench32 fuzzer fuzzer32 frametest frametest32 datagen
 
-lz4: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c
-	$(CC)      $(FLAGS) -DDISABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT)
+lz4: $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c
+	$(CC)      $(FLAGS) -DDISABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT) -L${LZ4DIR} -llz4
 
-lz4c  : $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c
-	$(CC)      $(FLAGS) $^ -o $@$(EXT)
+lz4c  : $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c
+	$(CC)      $(FLAGS) $^ -o $@$(EXT) -L${LZ4DIR} -llz4
 
 lz4c32: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c
 	$(CC) -m32 $(FLAGS) $^ -o $@$(EXT)
openSUSE Build Service is sponsored by