From bf787f3cfe5270cc9f1c0445a97b89b00b441e4a Mon Sep 17 00:00:00 2001 From: Kyler Date: Thu, 6 Nov 2025 14:33:51 -0700 Subject: [PATCH] Added gdb debug to makefile --- SLS_C/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SLS_C/Makefile b/SLS_C/Makefile index 034b76b..e73a172 100644 --- a/SLS_C/Makefile +++ b/SLS_C/Makefile @@ -3,7 +3,7 @@ CC ?= gcc CFLAGS ?= -std=c11 -Wall -Wextra -g -Iinclude -MMD -MP LDFLAGS ?= -CTESTFLAGS ?= -std=c11 -Wall -Wextra -Wno-unused-function -g -Iinclude -MMD -MP +CTESTFLAGS ?= -std=c11 -Wall -Wextra -Wno-unused-function -g -O0 -Iinclude -MMD -MP SRCDIR := src OBJDIR := obj @@ -54,6 +54,12 @@ test_cases: ../SLS_Tests/yaml_to_c_tests.py ../SLS_Tests/cases.yaml $(TEST_TARGET): $(TEST_OBJECTS) $(NON_MAIN_OBJECTS) | $(BINDIR) $(CC) $(LDFLAGS) $^ -o $@ -lm +build_tests: test_cases $(TEST_TARGET) + +# Run tests +debug: build_tests + gdb ./$(TEST_TARGET) + # Run tests test: test_cases $(TEST_TARGET) @echo "Running tests..."