Skip to content

Commit 899297d

Browse files
committed
Fix and sync with Makefile
1 parent 74be327 commit 899297d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

justfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
# just debug
1414
# just test
1515
#
16-
# just DEBUG=1 # 编译出 debug 版
16+
# just STATIC=1 # 静态链接
17+
# just DEBUG=1 # 编译出 debug 版
1718
# --------------------------------------------------------------
1819

1920
set windows-shell := ['cmd', '/c']
@@ -49,11 +50,13 @@ Target-Name := if DEBUG != '0' {
4950
CI := '0'
5051
CI_ARTIFACT_NAME := 'chsrc'
5152

53+
STATIC := '0'
54+
5255
# 在 GitHub Actions 时的 Linux 环境下,just CI=1 时触发
53-
CFLAGS_static := if os() == 'linux' {
54-
if CI == '0' {
55-
"-static"
56-
} else {''}
56+
CFLAGS_static := if STATIC == '1' {
57+
"-static"
58+
} else if os() == 'linux' {
59+
if CI == '1' {"-static"} else {''}
5760
} else {''}
5861

5962

0 commit comments

Comments
 (0)