github.com/ethereum/go-ethereum@v1.16.1/Makefile (about) 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 5 .PHONY: geth evm all test lint fmt clean devtools help 6 7 GOBIN = ./build/bin 8 GO ?= latest 9 GORUN = go run 10 11 #? geth: Build geth. 12 geth: 13 $(GORUN) build/ci.go install ./cmd/geth 14 @echo "Done building." 15 @echo "Run \"$(GOBIN)/geth\" to launch geth." 16 17 #? evm: Build evm. 18 evm: 19 $(GORUN) build/ci.go install ./cmd/evm 20 @echo "Done building." 21 @echo "Run \"$(GOBIN)/evm\" to launch evm." 22 23 #? all: Build all packages and executables. 24 all: 25 $(GORUN) build/ci.go install 26 27 #? test: Run the tests. 28 test: all 29 $(GORUN) build/ci.go test 30 31 #? lint: Run certain pre-selected linters. 32 lint: ## Run linters. 33 $(GORUN) build/ci.go lint 34 35 #? fmt: Ensure consistent code formatting. 36 fmt: 37 gofmt -s -w $(shell find . -name "*.go") 38 39 #? clean: Clean go cache, built executables, and the auto generated folder. 40 clean: 41 go clean -cache 42 rm -fr build/_workspace/pkg/ $(GOBIN)/* 43 44 # The devtools target installs tools required for 'go generate'. 45 # You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'. 46 47 #? devtools: Install recommended developer tools. 48 devtools: 49 env GOBIN= go install golang.org/x/tools/cmd/stringer@latest 50 env GOBIN= go install github.com/fjl/gencodec@latest 51 env GOBIN= go install google.golang.org/protobuf/cmd/protoc-gen-go@latest 52 env GOBIN= go install ./cmd/abigen 53 @type "solc" 2> /dev/null || echo 'Please install solc' 54 @type "protoc" 2> /dev/null || echo 'Please install protoc' 55 56 #? help: Get more info on make commands. 57 help: Makefile 58 @echo '' 59 @echo 'Usage:' 60 @echo ' make [target]' 61 @echo '' 62 @echo 'Targets:' 63 @sed -n 's/^#?//p' $< | column -t -s ':' | sort | sed -e 's/^/ /'