From b380f203e3cc6ca34d71ea7f406dfb9e73d55467 Mon Sep 17 00:00:00 2001 From: htom Date: Thu, 8 Jan 2026 12:33:39 +0100 Subject: [PATCH] added valgrind toggle --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 427457b..dd76e24 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ VENDORDIR = vendor target ?= linux profile ?= debug +valgrind ?= false ifeq ($(target), windows) CC = x86_64-w64-mingw32-gcc @@ -56,7 +57,13 @@ $(BUILDDIR)/%.o: $(SRCDIR)/%.c clean: rm -rf $(BUILDDIR) +ifeq ($(valgrind), true) + RUN_CMD = valgrind --leak-check=full ./$(BUILDDIR)/$(APPNAME)$(EXT) +else + RUN_CMD = ./$(BUILDDIR)/$(APPNAME)$(EXT) +endif + run: all - valgrind --leak-check=full ./$(BUILDDIR)/$(APPNAME)$(EXT) ./data/Circuit.duckdb + $(RUN_CMD) ./data/Circuit.duckdb .PHONY: all clean run