File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1717
1818# target exe name
1919chsrc
20+ chsrc-debug
2021
2122# test files
2223xy
Original file line number Diff line number Diff line change 88# | sanchuanhehe <[email protected] >99# |
1010# Created On : <2023-08-28>
11- # Last Modified : <2025-06-16 >
11+ # Last Modified : <2025-06-19 >
1212# --------------------------------------------------------------
1313
1414On-Linux = 0
@@ -39,17 +39,20 @@ override WARN += -Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-mi
3939 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare
4040_C_Warning_Flags := $(WARN )
4141
42+ Target-Name = chsrc
43+
44+ Debuggable-Target-Name = chsrc-debug
45+
4246ifdef DEBUG
4347 CFLAGS += -g
48+ Target-Name = $(Debuggable-Target-Name)
4449endif
4550
4651DEBUGGER = gdb
4752
4853STATIC = 0
4954# =======================
5055
51- Target-Name = chsrc
52-
5356# 由 GitHub Actions 在调用时修改
5457CI_ARTIFACT_NAME = chsrc
5558
@@ -76,8 +79,9 @@ CI: all
7679
7780
7881debug : CFLAGS += -g
82+ debug : Target-Name = $(Debuggable-Target-Name )
7983debug : all
80- @$(DEBUGGER ) ./chsrc
84+ @$(DEBUGGER ) $( Debuggable-Target-Name )
8185
8286test : test-make-env test-xy test-fw
8387
You can’t perform that action at this time.
0 commit comments