Makefile day 19: added memcheck targets

This commit is contained in:
2022-01-14 11:48:47 +01:00
parent 457b3eb9b9
commit 77ef1fa003

View File

@@ -40,10 +40,18 @@ CFLAGS += -DDEBUG_POOL # memory pools management
TIME := \time -f "\ttime: %E real, %U user, %S sys\n\tcontext-switch:\t%c+%w, page-faults: %F+%R\n" TIME := \time -f "\ttime: %E real, %U user, %S sys\n\tcontext-switch:\t%c+%w, page-faults: %F+%R\n"
export PATH := .:$(PATH) export PATH := .:$(PATH)
.PHONY: clean all compile ex1 ex2 .PHONY: clean all compile memcheck memcheck1 memcheck2 ex1 ex2
all: ex1 ex2 all: ex1 ex2
memcheck: memcheck1 memcheck2
memcheck1:
@valgrind -q -s --track-origins=yes aoc-c -p 1 < $(INPUT)
memcheck2:
@valgrind -q -s --track-origins=yes aoc-c -p 2 < $(INPUT)
compile: aoc-c compile: aoc-c
ex1: aoc-c ex1: aoc-c