added valgrind toggle

This commit is contained in:
2026-01-08 12:33:39 +01:00
parent 615d8c7f06
commit b380f203e3

View File

@@ -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