free memories
[calc.git] / makefile
index 090167546568a9e47e12ff1688f0d3003d59d68c..b10fc9fdb46825141ef65786ae50c1eec847521e 100644 (file)
--- a/makefile
+++ b/makefile
@@ -63,6 +63,9 @@ purge: clean
        rm -f purge $(ALLEXE:%=%.exe)
        $(call PASS, SUCCESS)
 
+valgrinds:
+       $(MAKE) $(addprefix valgrind_,$(ALLEXE))
+
 wipe: purge
        $(call TITLE, "wiping")
        touch wipe
@@ -102,10 +105,10 @@ test_%: %.test %.exe
        done; \
        test "$$RC" -ne 1 
 
-valgrind_%: %
+valgrind_%: %.exe
        VALGRIND="valgrind -v --leak-check=full --show-reachable=yes --log-fd=2"; \
        export VALGRIND; \
-       $(MAKE) test_$<
+       $(MAKE) $(@:valgrind_%=test_%)
 
 %.d: %.c
        $(call TITLE, "Building $@")