This repository has been archived by the owner on Mar 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
使用uuid作为特殊指令,避免0rtt时的探测攻击;新增Makefile
新增的Makefile可以自动将版本号写入程序中。目前默认编译四种环境下的可执行文件
- Loading branch information
1 parent
7437968
commit 43f475e
Showing
9 changed files
with
228 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
BUILD_VERSION := v1.0.2 | ||
|
||
prefix:=verysimple | ||
|
||
cmd:=go build -trimpath -ldflags "-X 'main.Version=${BUILD_VERSION}' -s -w -buildid=" -o | ||
|
||
all: win10 linux_amd64 linux_arm64 macos_arm64 | ||
|
||
|
||
|
||
linux_amd64: | ||
GOARCH=amd64 GOOS=linux $(cmd) ${prefix}_linux_amd64_${BUILD_VERSION} | ||
|
||
linux_arm64: | ||
GOARCH=arm64 GOOS=linux $(cmd) ${prefix}_linux_arm64_${BUILD_VERSION} | ||
|
||
#我只提供mac 的apple silicon版本. | ||
|
||
macos_arm64: | ||
GOARCH=arm64 GOOS=darwin $(cmd) ${prefix}_macos_${BUILD_VERSION} | ||
|
||
win10: | ||
GOARCH=amd64 GOOS=windows $(cmd) ${prefix}_win10_${BUILD_VERSION}.exe | ||
|
||
|
||
clean: | ||
rm -f ${prefix}_linux_amd64_${BUILD_VERSION} | ||
rm -f ${prefix}_linux_arm64_${BUILD_VERSION} | ||
rm -f ${prefix}_win10_${BUILD_VERSION}.exe | ||
rm -f ${prefix}_macos_${BUILD_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.