build: support configurable target architecture

This commit is contained in:
Eric 1549169735@qq.com
2026-08-19 21:55:16 +08:00
parent 8de48fb05e
commit c8a0d89474
2 changed files with 12 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
WEB_DIR := web
SDK_DIR := sdk
ARCH ?= $(shell go env GOARCH)
GOOS ?= $(shell go env GOOS)
.PHONY: web-install web-build sdk-install sdk-build build test vet check seed-pet-doctor docker-config docker-up docker-down docker-logs
@@ -16,7 +18,7 @@ sdk-build:
cd $(SDK_DIR) && npm run build
build: web-build sdk-build
go build -o bin/iqudo-top1 .
GOOS=$(GOOS) GOARCH=$(ARCH) go build -o bin/iqudo-top1 .
test:
go test ./...