Change make variable

This commit is contained in:
Aoran Zeng 2025-03-06 08:33:17 +08:00
parent 52212db815
commit 47bc5bc81a
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
7 changed files with 15 additions and 14 deletions

View File

@ -24,7 +24,7 @@ jobs:
pwd ; ls -al pwd ; ls -al
git clone https://github.com/RubyMetric/chsrc -b gh-build -q git clone https://github.com/RubyMetric/chsrc -b gh-build -q
cd chsrc cd chsrc
make CI CI_Build_Name=chsrc-aarch64-linux make CI CI_ARTIFACT_NAME=chsrc-aarch64-linux
cp ./chsrc-aarch64-linux /artifacts cp ./chsrc-aarch64-linux /artifacts
- name: Release - name: Release

View File

@ -24,7 +24,7 @@ jobs:
pwd ; ls -al pwd ; ls -al
git clone https://github.com/RubyMetric/chsrc -b gh-build -q git clone https://github.com/RubyMetric/chsrc -b gh-build -q
cd chsrc cd chsrc
make CI CI_Build_Name=chsrc-armv7-linux make CI CI_ARTIFACT_NAME=chsrc-armv7-linux
cp ./chsrc-armv7-linux /artifacts cp ./chsrc-armv7-linux /artifacts
- name: Release - name: Release

View File

@ -24,7 +24,7 @@ jobs:
pwd ; ls -al pwd ; ls -al
git clone https://github.com/RubyMetric/chsrc -b gh-build -q git clone https://github.com/RubyMetric/chsrc -b gh-build -q
cd chsrc cd chsrc
make CI CI_Build_Name=chsrc-riscv64-linux make CI CI_ARTIFACT_NAME=chsrc-riscv64-linux
cp ./chsrc-riscv64-linux /artifacts cp ./chsrc-riscv64-linux /artifacts
- name: Release - name: Release

View File

@ -15,7 +15,7 @@ jobs:
- name: Compile chsrc x64 - name: Compile chsrc x64
run: | run: |
make CI CI_Build_Name=chsrc-x64-linux make CI CI_ARTIFACT_NAME=chsrc-x64-linux
- name: List files - name: List files
run: ls *-linux run: ls *-linux

View File

@ -15,7 +15,7 @@ jobs:
- name: Compile chsrc for AArch64 - name: Compile chsrc for AArch64
run: | run: |
make CI CI_Build_Name=chsrc-aarch64-macos make CI CI_ARTIFACT_NAME=chsrc-aarch64-macos
- name: List files - name: List files
run: ls *-macos run: ls *-macos
@ -39,7 +39,7 @@ jobs:
- name: Compile chsrc for x64 - name: Compile chsrc for x64
run: | run: |
make CI CI_Build_Name=chsrc-x64-macos make CI CI_ARTIFACT_NAME=chsrc-x64-macos
- name: List files - name: List files
run: ls *-macos run: ls *-macos

View File

@ -31,13 +31,13 @@ jobs:
- name: Compile chsrc x64 - name: Compile chsrc x64
run: | run: |
mingw32-make.exe CI CI_Build_Name=chsrc-x64-windows mingw32-make.exe CI CI_ARTIFACT_NAME=chsrc-x64-windows
- name: Compile chsrc x86 - name: Compile chsrc x86
env: env:
MSYSTEM: MINGW32 MSYSTEM: MINGW32
run: | run: |
mingw32-make.exe CI CI_Build_Name=chsrc-x86-windows mingw32-make.exe CI CI_ARTIFACT_NAME=chsrc-x86-windows
- name: List files - name: List files
run: ls *.exe run: ls *.exe

View File

@ -29,19 +29,20 @@ override WARN += -Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-mi
-Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare
_C_Warning_Flags := $(WARN) _C_Warning_Flags := $(WARN)
Target = chsrc Target_Name = chsrc
CI_Build_Name = chsrc # 由 GitHub Actions 在调用时修改
CI_ARTIFACT_NAME = chsrc
DEBUGGER = gdb DEBUGGER = gdb
#======================= #=======================
all: all:
@$(CC) src/chsrc-main.c $(CFLAGS) $(_C_Warning_Flags) -o $(Target) @$(CC) src/chsrc-main.c $(CFLAGS) $(_C_Warning_Flags) -o $(Target_Name)
@echo; echo Compile done using \'$(CC)\' $(CFLAGS) @echo; echo Compile done using \'$(CC)\' $(CFLAGS)
CI: all CI: all
@mv $(Target) $(CI_Build_Name) @mv $(Target_Name) $(CI_ARTIFACT_NAME)
debug: CFLAGS += -g debug: CFLAGS += -g
debug: all debug: all
@ -58,10 +59,10 @@ test-fw:
@./fw @./fw
# AUR package 安装时将执行此 target # AUR package 安装时将执行此 target
fastcheck: $(Target) fastcheck: $(Target_Name)
@perl ./test/cli.pl fastcheck @perl ./test/cli.pl fastcheck
test-cli: $(Target) test-cli: $(Target_Name)
@perl ./test/cli.pl @perl ./test/cli.pl
clean: clean: