Added gdb debug to makefile
This commit is contained in:
parent
f91fe2793a
commit
bf787f3cfe
|
|
@ -3,7 +3,7 @@
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
CFLAGS ?= -std=c11 -Wall -Wextra -g -Iinclude -MMD -MP
|
CFLAGS ?= -std=c11 -Wall -Wextra -g -Iinclude -MMD -MP
|
||||||
LDFLAGS ?=
|
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
|
SRCDIR := src
|
||||||
OBJDIR := obj
|
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)
|
$(TEST_TARGET): $(TEST_OBJECTS) $(NON_MAIN_OBJECTS) | $(BINDIR)
|
||||||
$(CC) $(LDFLAGS) $^ -o $@ -lm
|
$(CC) $(LDFLAGS) $^ -o $@ -lm
|
||||||
|
|
||||||
|
build_tests: test_cases $(TEST_TARGET)
|
||||||
|
|
||||||
|
# Run tests
|
||||||
|
debug: build_tests
|
||||||
|
gdb ./$(TEST_TARGET)
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
test: test_cases $(TEST_TARGET)
|
test: test_cases $(TEST_TARGET)
|
||||||
@echo "Running tests..."
|
@echo "Running tests..."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue