File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed
Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change 1+ BINARY := slirpnetstack
2+
13export GOPRIVATE := code.cfops.it
24IMPORT_PATH := github.com/cloudflare/slirpnetstack
35
4- VERSION := $(shell git describe --tags --always --dirty="-dev")
5- DATE := $(shell date -u '+% Y-% m-% d-% H:% MUTC')
6- GOFLAGS := -ldflags='-compressdwarf=false -X "$(IMPORT_PATH ) /ext.Version=$(VERSION ) " -X "$(IMPORT_PATH ) /ext.BuildTime=$(DATE ) "'
6+ VERSION := $(shell git describe --tags --always --dirty="-dev")
7+ DATE := $(shell date -u '+% Y-% m-% d-% H:% MUTC')
8+ GOFLAGS := -ldflags='-X "$(IMPORT_PATH ) /ext.Version=$(VERSION ) " -X "$(IMPORT_PATH ) /ext.BuildTime=$(DATE ) "'
9+ BUILD_DIR := bin
10+
11+ GO_BUILD = go build $(GOFLAGS )
12+
13+ LINUX_ARCH_LIST = \
14+ linux-amd64 \
15+ linux-arm64
716
817bin/slirpnetstack : * .go go.mod
918 go build \
@@ -80,3 +89,13 @@ update-gomod:
8089 go get -u gvisor.dev/gvisor@go all
8190 go mod tidy
8291 $(MAKE ) bin/gocovmerge bin/slirpnetstack bin/slirpnetstack.cover
92+
93+
94+ # ## Distribution section ###
95+ dist : $(LINUX_ARCH_LIST )
96+
97+ linux-amd64 :
98+ GOARCH=amd64 GOOS=linux $(GO_BUILD ) -o $(BUILD_DIR ) /$(BINARY ) -$@
99+
100+ linux-arm64 :
101+ GOARCH=arm64 GOOS=linux $(GO_BUILD ) -o $(BUILD_DIR ) /$(BINARY ) -$@
You can’t perform that action at this time.
0 commit comments