From 855e38cde4fbc02fdcc9dbd47f2063cfe60a4b68 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 23 Nov 2021 06:10:15 +0000 Subject: (General)~extract valgrind memcheck flags to VFLAGS variable --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5d9ccd0..7112d2f 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,17 @@ CC=clang++ CFLAGS=-pedantic -Wall -ggdb +VFLAGS=--show-leak-kinds=all --leak-check=full list: list.cpp $(CC) $(CFLAGS) $^ -o $@ .PHONY: memcheck_list memcheck_list: list - valgrind --show-leak-kinds=all --leak-check=full ./list; + valgrind $(VFLAGS) ./$^; btree: btree.cpp $(CC) $(CFLAGS) $^ -o $@ .PHONY: memcheck_btree memcheck_btree: btree - valgrind --show-leak-kinds=all --leak-check=full ./btree; + valgrind $(VFLAGS) ./$^; -- cgit v1.2.3-13-gbd6f