-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
41 lines (29 loc) · 814 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
31
32
33
34
35
36
37
38
39
40
41
VERSION=`git rev-parse --short HEAD`
flags=-ldflags="-s -w -X main.version=${VERSION}"
all: build
vet:
go vet .
build:
go clean; rm -rf pkg imagebot*; go build ${flags}
build_all: build build_osx build_linux build_power8 build_arm64
build_osx:
go clean; rm -rf pkg imagebot_osx; GOOS=darwin go build ${flags}
mv imagebot imagebot_osx
build_linux:
go clean; rm -rf pkg imagebot_linux; GOOS=linux go build ${flags}
mv imagebot imagebot_linux
build_power8:
go clean; rm -rf pkg imagebot_power8; GOARCH=ppc64le GOOS=linux go build ${flags}
mv imagebot imagebot_power8
build_arm64:
go clean; rm -rf pkg imagebot_arm64; GOARCH=arm64 GOOS=linux go build ${flags}
mv imagebot imagebot_arm64
install:
go install
clean:
go clean; rm -rf pkg
test : test1
test1:
go test -v .
bench:
go test -bench=.