forked from BytomDAO/bytom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (64 loc) · 3.81 KB
/
Makefile
File metadata and controls
77 lines (64 loc) · 3.81 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
PACKAGES = $(shell go list ./... | grep -v '/vendor/')
all: bytomd bytomcli miner test
bytomd:
@echo "Building bytomd to cmd/bytomd/bytomd"
@go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/bytomd/bytomd cmd/bytomd/main.go
bytomcli:
@echo "Building bytomcli to cmd/bytomcli/bytomcli"
@go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/bytomcli/bytomcli cmd/bytomcli/main.go
miner:
@echo "Building miner to cmd/miner/miner"
@go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/miner/miner cmd/miner/main.go
multi_platform:
@echo "Building multi platform binary"
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/darwin/bytomcli cmd/bytomcli/main.go
@echo "Building bytomd to cmd/bytomd/bytomd"
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/darwin/bytomd cmd/bytomd/main.go
@echo "Building miner to cmd/miner/miner"
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/darwin/miner cmd/miner/main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/windows/bytomcli cmd/bytomcli/main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/windows/bytomd cmd/bytomd/main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/windows/miner cmd/miner/main.go
go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/ubuntu64/bytomcli cmd/bytomcli/main.go
go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/ubuntu64/bytomd cmd/bytomd/main.go
go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/ubuntu64/miner cmd/miner/main.go
386_multi_platform:
@echo "Building multi platform binary"
CGO_ENABLED=0 GOOS=darwin GOARCH=386 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/darwin386/bytomcli cmd/bytomcli/main.go
@echo "Building bytomd to cmd/bytomd/bytomd"
CGO_ENABLED=0 GOOS=darwin GOARCH=386 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/darwin386/bytomd cmd/bytomd/main.go
@echo "Building miner to cmd/miner/miner"
CGO_ENABLED=0 GOOS=darwin GOARCH=386 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/darwin386/miner cmd/miner/main.go
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/windows386/bytomcli cmd/bytomcli/main.go
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/windows386/bytomd cmd/bytomd/main.go
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/windows386/miner cmd/miner/main.go
GOOS=linux GOARCH=386 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/linux386/bytomcli cmd/bytomcli/main.go
GOOS=linux GOARCH=386 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/linux386/bytomd cmd/bytomd/main.go
GOOS=linux GOARCH=386 go build -ldflags "-X github.com/bytom/version.GitCommit=`git rev-parse HEAD`" \
-o cmd/linux386/miner cmd/miner/main.go
test:
@echo "====> Running go test"
@go test $(PACKAGES)
benchmark:
go test -bench $(PACKAGES)
.PHONY: test