From 6181fc8d9f87af3194040c7e0a4eff31455b98bd Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Wed, 2 Jul 2025 22:59:49 +0200 Subject: [PATCH] added valgrind to targets to check for memory leaks --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ddb9f11..98c0f4b 100644 --- a/Makefile +++ b/Makefile @@ -31,9 +31,12 @@ TEST_TARGET := $(BIN_DIR)/monkey_tests # ------------------------------------------------------------------- # Top‐level rules # ------------------------------------------------------------------- -.PHONY: all clean run tests +.PHONY: all clean run tests valgrind all: $(TARGET) $(TEST_TARGET) +valgrind: CXXFLAGS += -O0 -g +valgrind: $(TARGET) $(TEST_TARGET) + clean: @rm -rf $(BUILD_DIR)