|
2 | 2 | # -------------------------------------------------------------- |
3 | 3 | # SPDX-License-Identifier: GPL-3.0-or-later |
4 | 4 | # -------------------------------------------------------------- |
5 | | -# Build File : justfile |
6 | | -# File Authors : Aoran Zeng <[email protected]> |
7 | | -# Contributors : Mikachu2333 <[email protected]> |
8 | | -# | |
| 5 | +# Build File : justfile |
| 6 | +# File Authors : 曾奥然 <[email protected]> |
| 7 | +# Contributors : Mikachu2333 <[email protected]> |
| 8 | +# | |
9 | 9 | # Created On : <2025-06-18> |
10 | | -# Last Modified : <2025-10-11> |
| 10 | +# Last Modified : <2025-10-15> |
11 | 11 | # |
12 | 12 | # 该文件主要用于在原生Windows上执行项目的基本任务,而不借助于 |
13 | 13 | # GNU make 以及相应的 MSYS2、Cygwin 环境 |
@@ -53,7 +53,7 @@ CFLAGS_chk_Clang := if os() == 'windows' { |
53 | 53 | } else {''} |
54 | 54 |
|
55 | 55 |
|
56 | | -CFLAGS_base := '-Iinclude -Ilib -Isrc/framework ' + CFLAGS_chk_Clang |
| 56 | +CFLAGS_base := '-Iinclude -Ilib ' + CFLAGS_chk_Clang |
57 | 57 |
|
58 | 58 | WARN := '-Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-missing-braces -Wno-misleading-indentation' + ' ' + \ |
59 | 59 | '-Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare' |
@@ -114,12 +114,17 @@ build-in-debug-mode: |
114 | 114 | @echo Finished: Build in DEBUG mode |
115 | 115 |
|
116 | 116 | build-in-release-mode: |
117 | | - @echo Starting: Build in RELEASE mode: '{{CC}}' {{CFLAGS_release_mode_prompt}} -o {{ReleaseMode-Target-Name}} |
118 | | - {{ if os() == 'windows' { '@if exist src\\res\\chsrc.res del src\\res\\chsrc.res' } else { '' } }} |
119 | | - {{ if os() == 'windows' { '@windres src\\res\\win_res.rc -O coff -o src\\res\\chsrc.res -Iinclude -Ilib -Isrc\\framework -Isrc\\res' } else { '' } }} |
120 | | - {{ if os() == 'windows' { '@' + CC + ' src/chsrc-main.c src/res/chsrc.res ' + CFLAGS_release_mode + ' -o ' + ReleaseMode-Target-Name } else { '@' + CC + ' src/chsrc-main.c ' + CFLAGS_release_mode + ' -o ' + ReleaseMode-Target-Name } }} |
121 | | - {{ if os() == 'windows' { '@del src\\res\\chsrc.res' } else { '' } }} |
122 | | - @echo Finished: Build in RELEASE mode |
| 117 | + @echo Starting: Build in RELEASE mode: '{{CC}}' {{CFLAGS_release_mode_prompt}} -o {{ReleaseMode-Target-Name}} |
| 118 | + @{{ if os() == 'windows' { \ |
| 119 | + 'if exist chsrc.res del chsrc.res' + \ |
| 120 | + ' & windres src/resource/chsrc.rc -O coff -o chsrc.res' \ |
| 121 | + } else { '' } }} |
| 122 | + @{{ if os() == 'windows' { \ |
| 123 | + CC + ' src/chsrc-main.c chsrc.res ' + CFLAGS_release_mode + ' -o ' + ReleaseMode-Target-Name \ |
| 124 | + } else { \ |
| 125 | + CC + ' src/chsrc-main.c ' + CFLAGS_release_mode + ' -o ' + ReleaseMode-Target-Name \ |
| 126 | + } }} |
| 127 | + @echo Finished: Build in RELEASE mode |
123 | 128 |
|
124 | 129 | debug: build-in-debug-mode |
125 | 130 | @{{DEBUGGER}} {{DebugMode-Target-Name}} |
|
0 commit comments