mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-12-24 13:27:56 +08:00
68 lines
1.5 KiB
Plaintext
68 lines
1.5 KiB
Plaintext
#BUILD_VERSION := v1.1.3-beta.5 这个将在github action里自动通过tag配置
|
|
|
|
prefix :=verysimple
|
|
|
|
cmd:=go build -tags $(tags) -trimpath -ldflags "-X 'main.Version=${BUILD_VERSION}' -s -w -buildid=" -o
|
|
|
|
|
|
ifdef PACK
|
|
define compile
|
|
GOOS=$(2) GOARCH=$(3) GOARM=$(5) $(cmd) $(1)
|
|
mv $(1) verysimple$(4)
|
|
tar -cJf $(1).tar.xz verysimple$(4) examples/
|
|
rm verysimple$(4)
|
|
endef
|
|
|
|
else
|
|
|
|
define compile
|
|
GOOS=$(2) GOARCH=$(3) $(cmd) $(1)$(4)
|
|
endef
|
|
endif
|
|
|
|
|
|
all: linux_amd64 linux_arm64 linux_arm32_v7 linux_mips64 linux_mips android_arm64 macos macm1 win10 win10_arm win32
|
|
|
|
# 注意调用参数时,逗号前后不能留空格
|
|
# 关于arm版本号 https://github.com/goreleaser/goreleaser/issues/36
|
|
|
|
linux_amd64:
|
|
$(call compile, ${prefix}_linux_amd64,linux,amd64)
|
|
|
|
linux_arm64:
|
|
$(call compile, ${prefix}_linux_arm64,linux,arm64)
|
|
|
|
linux_arm32_v7:
|
|
$(call compile, ${prefix}_linux_arm32_v7a,linux,arm,,7)
|
|
|
|
linux_mips64:
|
|
$(call compile, ${prefix}_linux_mips64,linux,mips64)
|
|
|
|
linux_mips:
|
|
$(call compile, ${prefix}_linux_mips,linux,mips)
|
|
|
|
android_arm64:
|
|
$(call compile, ${prefix}_android_arm64,android,arm64)
|
|
|
|
macos:
|
|
$(call compile, ${prefix}_macOS_intel,darwin,amd64)
|
|
|
|
macm1:
|
|
$(call compile, ${prefix}_macOS_apple,darwin,arm64)
|
|
|
|
win32:
|
|
$(call compile, ${prefix}_win32,windows,386,.exe)
|
|
|
|
win10:
|
|
$(call compile, ${prefix}_win10,windows,amd64,.exe)
|
|
|
|
win10_arm:
|
|
$(call compile, ${prefix}_win10_arm64,windows,arm64,.exe)
|
|
|
|
|
|
clean:
|
|
rm -f verysimple
|
|
rm -f verysimple.exe
|
|
rm -f ${prefix}_*
|
|
rm -f *.tar.xz
|