Fix and sync with Makefile

This commit is contained in:
Aoran Zeng 2025-06-19 19:21:53 +08:00
parent 74be327274
commit 899297de22
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -13,7 +13,8 @@
# just debug # just debug
# just test # just test
# #
# just DEBUG=1 # 编译出 debug 版 # just STATIC=1 # 静态链接
# just DEBUG=1 # 编译出 debug 版
# -------------------------------------------------------------- # --------------------------------------------------------------
set windows-shell := ['cmd', '/c'] set windows-shell := ['cmd', '/c']
@ -49,11 +50,13 @@ Target-Name := if DEBUG != '0' {
CI := '0' CI := '0'
CI_ARTIFACT_NAME := 'chsrc' CI_ARTIFACT_NAME := 'chsrc'
STATIC := '0'
# 在 GitHub Actions 时的 Linux 环境下just CI=1 时触发 # 在 GitHub Actions 时的 Linux 环境下just CI=1 时触发
CFLAGS_static := if os() == 'linux' { CFLAGS_static := if STATIC == '1' {
if CI == '0' { "-static"
"-static" } else if os() == 'linux' {
} else {''} if CI == '1' {"-static"} else {''}
} else {''} } else {''}