summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2022-06-21 20:51:36 -0600
committerAaron Ball <nullspoon@oper.io>2022-06-21 20:51:36 -0600
commite3eadc3a5b85b3c97b7ff5504808ef73ea1c7e2a (patch)
treecf8f711fdffa3764fbb2344a04ad6ff322da5cf6
parent9de768f602b90fe09b2db91ad400ca96e48fe9bd (diff)
downloadcmon-e3eadc3a5b85b3c97b7ff5504808ef73ea1c7e2a.tar.gz
cmon-e3eadc3a5b85b3c97b7ff5504808ef73ea1c7e2a.tar.xz
Makefile:Add valgrind target
This is set up to check for memory leaks verbosely, as well as notify of leaked file descriptors.
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4af7f0b..52f5602 100644
--- a/Makefile
+++ b/Makefile
@@ -7,3 +7,11 @@ all:
cc $(CCOPTS) -o obj/proc.o -c src/proc.c
cc $(CCOPTS) -o obj/status.o -c src/status.c
cc $(CCOPTS) -o cmon obj/*.o src/main.c
+
+valgrind: all
+ $(info Running memory leak check)
+ valgrind \
+ --leak-check=full \
+ --show-leak-kinds=all \
+ --error-exitcode=1 \
+ ./cmon

Generated by cgit