-
Notifications
You must be signed in to change notification settings - Fork 145
/
Copy pathMakefile
92 lines (74 loc) · 2.47 KB
/
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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# This Makefile is meant to be used by people that do not usually work
# with Go source code. If you know what GOPATH is then you probably
# don't need to bother with make.
.PHONY: geth android ios evm all test clean
GOBIN = $(shell pwd)/build/bin
GO ?= latest
GPATH = $(shell go env GOPATH)
GORUN = env GO111MODULE=on GOPATH=$(GPATH) go run
platon:
build/build_deps.sh
$(GORUN) build/ci.go install ./cmd/platon
@echo "Done building."
@echo "Run \"$(GOBIN)/platon\" to launch platon."
platon-with-mpc:
build/build_deps.sh
$(GORUN) build/ci.go install -mpc on ./cmd/platon
@echo "Done building platon with mpc."
@echo "Run \"$(GOBIN)/platon\" to launch platon."
platon-with-vc:
build/build_deps.sh
build/build_snark.sh
$(GORUN) build/ci.go install -vc on ./cmd/platon
@echo "Done building platon with vc."
@echo "Run \"$(GOBIN)/platon\" to launch platon."
platon-with-mv:
build/build_deps.sh
build/build_snark.sh
$(GORUN) build/ci.go install -mv on ./cmd/platon
@echo "Done building platon with vc."
@echo "Run \"$(GOBIN)/platon\" to launch platon."
all:
build/build_deps.sh
$(GORUN) build/ci.go install
@mv $(GOBIN)/keytool $(GOBIN)/platonkey
all-debug:
build/build_deps.sh
$(GORUN) build/ci.go install -gcflags on
all-with-mpc:
build/build_deps.sh
$(GORUN) build/ci.go install -mpc on
all-with-vc:
build/build_deps.sh
build/build_snark.sh
$(GORUN) build/ci.go install -vc on
all-with-mv:
build/build_deps.sh
build/build_snark.sh
$(GORUN) build/ci.go install -mv on
android:
$(GORUN) build/ci.go aar --local
@echo "Done building."
@echo "Import \"$(GOBIN)/geth.aar\" to use the library."
ios:
$(GORUN) build/ci.go xcode --local
@echo "Done building."
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
test: all
$(GORUN) build/ci.go test
lint: ## Run linters.
$(GORUN) build/ci.go lint
clean:
./build/clean_deps.sh
env GO111MODULE=on go clean -cache
rm -fr build/_workspace/pkg/ $(GOBIN)/*
# The devtools target installs tools required for 'go generate'.
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
devtools:
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
env GOBIN= go install github.com/kevinburke/go-bindata/go-bindata@latest
env GOBIN= go install github.com/fjl/gencodec@latest
env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
env GOBIN= go install ./cmd/abigen
@type "solc" 2> /dev/null || echo 'Please install solc'
@type "protoc" 2> /dev/null || echo 'Please install protoc'