From e2900241e8c541edf3b8c18688caab238ad8d46f Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 27 Dec 2017 13:02:40 +0100 Subject: [PATCH] object files in /tests object files created from /tests are compiled with specific flags (`-g -DLZ4_DEBUG=1`) which are not welcomed in release binary. `lib/*.o` files created from /tests are now stored in /tests, to avoid unintentional mix. --- tests/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index ce8c3fb3..819ba43c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -78,21 +78,26 @@ lz4c unlz4 lz4cat: lz4 lz4c32: # create a 32-bits version for 32/64 interop tests $(MAKE) -C $(PRGDIR) $@ CFLAGS="-m32 $(CFLAGS)" -fullbench : $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/lz4frame.o $(LZ4DIR)/xxhash.o fullbench.c +%.o : $(LZ4DIR)/%.c $(LZ4DIR)/%.h + $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ + +fullbench : lz4.o lz4hc.o lz4frame.o xxhash.o fullbench.c $(CC) $(FLAGS) $^ -o $@$(EXT) -fullbench-lib: fullbench.c $(LZ4DIR)/xxhash.c +$(LZ4DIR)/liblz4.a: $(MAKE) -C $(LZ4DIR) liblz4.a - $(CC) $(FLAGS) $^ -o $@$(EXT) $(LZ4DIR)/liblz4.a + +fullbench-lib: fullbench.c $(LZ4DIR)/liblz4.a + $(CC) $(FLAGS) $^ -o $@$(EXT) fullbench-dll: fullbench.c $(LZ4DIR)/xxhash.c $(MAKE) -C $(LZ4DIR) liblz4 $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(LZ4DIR)/dll/liblz4.dll -fuzzer : $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/xxhash.o fuzzer.c +fuzzer : lz4.o lz4hc.o xxhash.o fuzzer.c $(CC) $(FLAGS) $^ -o $@$(EXT) -frametest: $(LZ4DIR)/lz4frame.o $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/xxhash.o frametest.c +frametest: lz4frame.o lz4.o lz4hc.o xxhash.o frametest.c $(CC) $(FLAGS) $^ -o $@$(EXT) datagen : $(PRGDIR)/datagen.c datagencli.c