Skip to content

Commit c3d6b1c

Browse files
committed
Sync with justfile
1 parent d49377f commit c3d6b1c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
# target exe name
1919
chsrc
20+
chsrc-debug
2021

2122
# test files
2223
xy

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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

1414
On-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+
4246
ifdef DEBUG
4347
CFLAGS += -g
48+
Target-Name = $(Debuggable-Target-Name)
4449
endif
4550

4651
DEBUGGER = gdb
4752

4853
STATIC = 0
4954
#=======================
5055

51-
Target-Name = chsrc
52-
5356
# 由 GitHub Actions 在调用时修改
5457
CI_ARTIFACT_NAME = chsrc
5558

@@ -76,8 +79,9 @@ CI: all
7679

7780

7881
debug: CFLAGS += -g
82+
debug: Target-Name = $(Debuggable-Target-Name)
7983
debug: all
80-
@$(DEBUGGER) ./chsrc
84+
@$(DEBUGGER) $(Debuggable-Target-Name)
8185

8286
test: test-make-env test-xy test-fw
8387

0 commit comments

Comments
 (0)