Feature: full 64bit support

This commit is contained in:
xjasonlyu
2021-02-14 15:45:42 +08:00
parent 4294f56125
commit 14b905c125
6 changed files with 35 additions and 10 deletions
+28 -6
View File
@@ -17,14 +17,20 @@ LDFLAGS += -X "$(MODULE)/constant.GitCommit=$(BUILD_COMMIT)"
GO_BUILD = GO111MODULE=$(GO111MODULE) CGO_ENABLED=$(CGO_ENABLED) \
go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(BUILD_TAGS)' -trimpath
PLATFORM_LIST = \
UNIX_ARCH_LIST = \
darwin-amd64 \
freebsd-amd64 \
freebsd-arm64 \
linux-amd64 \
linux-arm64 \
linux-mips64 \
linux-mips64le \
linux-ppc64 \
linux-ppc64le \
openbsd-amd64 \
openbsd-arm64 \
WINDOWS_ARCH_LIST = \
windows-amd64 \
all: linux-amd64 darwin-amd64 windows-amd64
@@ -47,6 +53,18 @@ linux-amd64:
linux-arm64:
GOARCH=arm64 GOOS=linux $(GO_BUILD) -o $(BUILD_DIR)/$(BINARY)-$@
linux-mips64:
GOARCH=mips64 GOOS=linux $(GO_BUILD) -o $(BUILD_DIR)/$(BINARY)-$@
linux-mips64le:
GOARCH=mips64le GOOS=linux $(GO_BUILD) -o $(BUILD_DIR)/$(BINARY)-$@
linux-ppc64:
GOARCH=ppc64 GOOS=linux $(GO_BUILD) -o $(BUILD_DIR)/$(BINARY)-$@
linux-ppc64le:
GOARCH=ppc64le GOOS=linux $(GO_BUILD) -o $(BUILD_DIR)/$(BINARY)-$@
openbsd-amd64:
GOARCH=amd64 GOOS=openbsd $(GO_BUILD) -o $(BUILD_DIR)/$(BINARY)-$@
@@ -56,14 +74,18 @@ openbsd-arm64:
windows-amd64:
GOARCH=amd64 GOOS=windows $(GO_BUILD) -o $(BUILD_DIR)/$(BINARY)-$@.exe
zip_releases := $(addsuffix .zip, $(PLATFORM_LIST))
unix_releases := $(addsuffix .zip, $(UNIX_ARCH_LIST))
windows_releases := $(addsuffix .zip, $(WINDOWS_ARCH_LIST))
$(zip_releases): %.zip: %
@zip -m -j $(BUILD_DIR)/$(BINARY)-$(basename $@).zip $(BUILD_DIR)/$(BINARY)-$(basename $@)*
$(unix_releases): %.zip: %
@zip -qmj $(BUILD_DIR)/$(BINARY)-$(basename $@).zip $(BUILD_DIR)/$(BINARY)-$(basename $@)
all-arch: $(PLATFORM_LIST)
$(windows_releases): %.zip: %
@zip -qmj $(BUILD_DIR)/$(BINARY)-$(basename $@).zip $(BUILD_DIR)/$(BINARY)-$(basename $@).exe
releases: $(zip_releases)
all-arch: $(UNIX_ARCH_LIST) $(WINDOWS_ARCH_LIST)
releases: $(unix_releases) $(windows_releases)
clean:
rm -rf $(BUILD_DIR)
+1 -1
View File
@@ -30,7 +30,7 @@ English | [简体中文](README_ZH.md)
| :----- | :-----: | :---------: |
| System | Linux MacOS Freebsd OpenBSD Windows | Linux or MacOS |
| Memory | >20MB | >128MB |
| CPU | AMD64 ARM64 | AMD64 with AES-NI & AVX2 |
| CPU | AMD64 ARM64 MIPS64 PPC64 | AMD64 with AES-NI & AVX2 |
## Documentation
+1 -1
View File
@@ -39,7 +39,7 @@
| :--- | :---: | :---: |
| 系统 | Linux MacOS Freebsd OpenBSD Windows | Linux or MacOS |
| 内存 | >20MB | >128MB |
| 架构 | AMD64 ARM64 | AMD64 with AES-NI & AVX2 |
| 架构 | AMD64 ARM64 MIPS64 PPC64 | AMD64 with AES-NI & AVX2 |
## 使用文档
+1 -1
View File
@@ -1,4 +1,4 @@
// +build darwin freebsd openbsd
// +build darwin freebsd linux openbsd
package tun
@@ -1,3 +1,6 @@
// +build linux
// +build amd64 arm64
package tun
import (
+1 -1
View File
@@ -1,4 +1,4 @@
// +build !linux
// +build !linux !amd64,!arm64
package tun