2017-08-04 16:14:17 +00:00
|
|
|
# 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.
|
|
|
|
|
2022-10-25 14:25:08 +00:00
|
|
|
.PHONY: geth android ios evm all test clean
|
2017-08-04 16:14:17 +00:00
|
|
|
|
2019-10-04 15:21:24 +00:00
|
|
|
GOBIN = ./build/bin
|
2017-08-04 16:14:17 +00:00
|
|
|
GO ?= latest
|
2021-06-28 06:53:50 +00:00
|
|
|
GORUN = env GO111MODULE=on go run
|
2017-08-04 16:14:17 +00:00
|
|
|
|
|
|
|
geth:
|
2021-06-28 06:53:50 +00:00
|
|
|
$(GORUN) build/ci.go install ./cmd/geth
|
2017-08-04 16:14:17 +00:00
|
|
|
@echo "Done building."
|
|
|
|
@echo "Run \"$(GOBIN)/geth\" to launch geth."
|
|
|
|
|
|
|
|
all:
|
2021-06-28 06:53:50 +00:00
|
|
|
$(GORUN) build/ci.go install
|
2017-08-04 16:14:17 +00:00
|
|
|
|
|
|
|
android:
|
2021-06-28 06:53:50 +00:00
|
|
|
$(GORUN) build/ci.go aar --local
|
2017-08-04 16:14:17 +00:00
|
|
|
@echo "Done building."
|
|
|
|
@echo "Import \"$(GOBIN)/geth.aar\" to use the library."
|
2021-06-28 06:53:50 +00:00
|
|
|
@echo "Import \"$(GOBIN)/geth-sources.jar\" to add javadocs"
|
|
|
|
@echo "For more info see https://stackoverflow.com/questions/20994336/android-studio-how-to-attach-javadoc"
|
2017-08-04 16:14:17 +00:00
|
|
|
|
|
|
|
ios:
|
2021-06-28 06:53:50 +00:00
|
|
|
$(GORUN) build/ci.go xcode --local
|
2017-08-04 16:14:17 +00:00
|
|
|
@echo "Done building."
|
|
|
|
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
|
|
|
|
|
|
|
|
test: all
|
2021-06-28 06:53:50 +00:00
|
|
|
$(GORUN) build/ci.go test
|
2017-08-04 16:14:17 +00:00
|
|
|
|
2018-04-24 15:50:26 +00:00
|
|
|
lint: ## Run linters.
|
2021-06-28 06:53:50 +00:00
|
|
|
$(GORUN) build/ci.go lint
|
2018-04-24 15:50:26 +00:00
|
|
|
|
2017-08-04 16:14:17 +00:00
|
|
|
clean:
|
2021-06-28 06:53:50 +00:00
|
|
|
env GO111MODULE=on go clean -cache
|
2017-08-04 16:14:17 +00:00
|
|
|
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:
|
2021-06-28 06:53:50 +00:00
|
|
|
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
|
|
|
|
env GOBIN= go install github.com/fjl/gencodec@latest
|
|
|
|
env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
|
2017-08-04 16:14:17 +00:00
|
|
|
env GOBIN= go install ./cmd/abigen
|
2018-02-27 10:39:30 +00:00
|
|
|
@type "solc" 2> /dev/null || echo 'Please install solc'
|
|
|
|
@type "protoc" 2> /dev/null || echo 'Please install protoc'
|