Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # This Makefile is meant to be used by people that do not usually work
  2. # with Go source code. If you know what GOPATH is then you probably
  3. # don't need to bother with make.
  4. .PHONY: geth android ios evm all test clean
  5. GOBIN = ./build/bin
  6. GO ?= latest
  7. GORUN = env GO111MODULE=on go run
  8. geth:
  9. $(GORUN) build/ci.go install ./cmd/geth
  10. @echo "Done building."
  11. @echo "Run \"$(GOBIN)/geth\" to launch geth."
  12. all:
  13. $(GORUN) build/ci.go install
  14. android:
  15. $(GORUN) build/ci.go aar --local
  16. @echo "Done building."
  17. @echo "Import \"$(GOBIN)/geth.aar\" to use the library."
  18. @echo "Import \"$(GOBIN)/geth-sources.jar\" to add javadocs"
  19. @echo "For more info see https://stackoverflow.com/questions/20994336/android-studio-how-to-attach-javadoc"
  20. ios:
  21. $(GORUN) build/ci.go xcode --local
  22. @echo "Done building."
  23. @echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
  24. test: all
  25. $(GORUN) build/ci.go test
  26. lint: ## Run linters.
  27. $(GORUN) build/ci.go lint
  28. clean:
  29. env GO111MODULE=on go clean -cache
  30. rm -fr build/_workspace/pkg/ $(GOBIN)/*
  31. # The devtools target installs tools required for 'go generate'.
  32. # You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
  33. devtools:
  34. env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
  35. env GOBIN= go install github.com/fjl/gencodec@latest
  36. env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
  37. env GOBIN= go install ./cmd/abigen
  38. @type "solc" 2> /dev/null || echo 'Please install solc'
  39. @type "protoc" 2> /dev/null || echo 'Please install protoc'