From a9812f63f13c8e189574b1c699096c1f2b989b68 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Fri, 27 Dec 2024 17:07:06 +0800 Subject: [PATCH] Add debug --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index ddcdb9c..8785fcd 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,9 @@ endif ifeq ($(shell uname), Linux) CFLAGS += -static endif +ifdef DEBUG + CFLAGS += -g +endif override WARN += -Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-missing-braces -Wno-misleading-indentation \ -Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare @@ -38,6 +41,10 @@ all: CI: all @mv $(Target) $(CI_Build_Name) +debug: CFLAGS += -g +debug: all + @gdb ./chsrc + test: test-xy test-fw test-xy: