Skip to content

Commit 39206e1

Browse files
committed
Update makefile with Valgrind checking
1 parent d343c0e commit 39206e1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ QPE_SRCS := $(wildcard QPE*.c)
1818
QPE_OBJS := $(QPE_SRCS:.c=.o)
1919
# Executables (only those sources that currently define a main). Adjust as others gain mains.
2020
QPE_EXES := QPESeq
21+
CE SRCS := connectEngine.c
22+
CE OBJS := $(CE SRCS:.c=.o)
2123

2224
# Test sources (all .c in tests directory)
2325
TEST_SRCS := $(wildcard tests/*.c)
@@ -78,6 +80,10 @@ test: $(TEST_BINS)
7880
run: QPESeq
7981
./QPESeq
8082

83+
# Run QPESeq under Valgrind to check for memory leaks
84+
valgrind: QPESeq
85+
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./QPESeq
86+
8187
# Show discovered source collections
8288
show:
8389
@echo "QPE_SRCS = $(QPE_SRCS)"
@@ -92,4 +98,4 @@ clean:
9298
@echo "Cleaned build artifacts."
9399

94100
# Default goal if user just runs `make` without target
95-
.DEFAULT_GOAL := all
101+
.DEFAULT_GOAL := all

0 commit comments

Comments
 (0)