forked from subspacecloud/subspace
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
30 lines (24 loc) · 966 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
ARCH ?= $(shell dpkg --print-architecture)
all: subspace-linux-$(ARCH)
BUILD_VERSION?=unknown
subspace-linux-amd64:
go get -u github.com/kevinburke/go-bindata/...\
&& go mod download \
&& go run github.com/kevinburke/go-bindata/go-bindata --pkg main static/... templates/... email/.. \
&& go generate \
&& go fmt \
&& go vet --all
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -v --compiler gc --ldflags "-extldflags -static -s -w -X main.version=${BUILD_VERSION}" -o subspace-linux-amd64
subspace-linux-arm:
go get -u github.com/kevinburke/go-bindata/...\
&& go mod download \
&& go run github.com/kevinburke/go-bindata/go-bindata --pkg main static/... templates/... email/.. \
&& go generate \
&& go fmt \
&& go vet --all
CGO_ENABLED=0 GOOS=linux GOARCH=arm \
go build -v --compiler gc --ldflags "-extldflags -static -s -w -X main.version=${BUILD_VERSION}" -o subspace-linux-arm
clean:
rm -f subspace-linux-amd64 bindata.go
.PHONY: clean