From 760b3fee15e64622e47442eb93608e5eb138ff10 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sat, 25 Mar 2017 15:26:40 +0100 Subject: Makefile: Add a memcheck target Add a memcheck target to the Makefile that calls the valgrind memcheck tool on the test binary. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5c534ee..0c0c3e6 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ else QUIET := @ endif -.PHONY = all clean doc test +.PHONY = all clean doc memcheck test all: $(TARGETS) @@ -53,6 +53,9 @@ clean: doc: $(INCLUDES) doxygen +memcheck: $(TARGET_TEST) + LD_LIBRARY_PATH=$(LIBRARY_DIR) valgrind --tool=memcheck ./$(TARGET_TEST) + test: $(TARGET_TEST) LD_LIBRARY_PATH=$(LIBRARY_DIR) ./$(TARGET_TEST) -- cgit v1.2.3