summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-12-27 12:02:40 (GMT)
committerYann Collet <cyan@fb.com>2017-12-27 12:02:40 (GMT)
commite2900241e8c541edf3b8c18688caab238ad8d46f (patch)
treeeb29c211185e3f7d46755e1e376896c5f2fcf2e7 /tests
parent7d2f30c7d1519a3a4a199e398e13d9baa21bf84e (diff)
downloadlz4-e2900241e8c541edf3b8c18688caab238ad8d46f.zip
lz4-e2900241e8c541edf3b8c18688caab238ad8d46f.tar.gz
lz4-e2900241e8c541edf3b8c18688caab238ad8d46f.tar.bz2
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/Makefile b/tests/Makefile
index ce8c3fb..819ba43 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