github.com/ImPedro29/bor@v0.2.7/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 android ios geth-cross evm all test clean 6 .PHONY: geth-linux geth-linux-386 geth-linux-amd64 geth-linux-mips64 geth-linux-mips64le 7 .PHONY: geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64 8 .PHONY: geth-darwin geth-darwin-386 geth-darwin-amd64 9 .PHONY: geth-windows geth-windows-386 geth-windows-amd64 10 11 GOBIN = ./build/bin 12 GO ?= latest 13 GORUN = env GO111MODULE=on go run 14 GOPATH = $(shell go env GOPATH) 15 16 bor: 17 $(GORUN) build/ci.go install ./cmd/geth 18 mkdir -p $(GOPATH)/bin/ 19 cp $(GOBIN)/geth $(GOBIN)/bor 20 cp $(GOBIN)/* $(GOPATH)/bin/ 21 22 bor-all: 23 $(GORUN) build/ci.go install 24 mkdir -p $(GOPATH)/bin/ 25 cp $(GOBIN)/geth $(GOBIN)/bor 26 cp $(GOBIN)/* $(GOPATH)/bin/ 27 28 geth: 29 $(GORUN) build/ci.go install ./cmd/geth 30 @echo "Done building." 31 @echo "Run \"$(GOBIN)/geth\" to launch geth." 32 33 all: 34 $(GORUN) build/ci.go install 35 36 android: 37 $(GORUN) build/ci.go aar --local 38 @echo "Done building." 39 @echo "Import \"$(GOBIN)/geth.aar\" to use the library." 40 @echo "Import \"$(GOBIN)/geth-sources.jar\" to add javadocs" 41 @echo "For more info see https://stackoverflow.com/questions/20994336/android-studio-how-to-attach-javadoc" 42 43 ios: 44 $(GORUN) build/ci.go xcode --local 45 @echo "Done building." 46 @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." 47 48 test: all 49 # $(GORUN) build/ci.go test 50 go test github.com/ethereum/go-ethereum/consensus/bor 51 go test github.com/ethereum/go-ethereum/tests/bor 52 53 lint: ## Run linters. 54 $(GORUN) build/ci.go lint 55 56 clean: 57 env GO111MODULE=on go clean -cache 58 rm -fr build/_workspace/pkg/ $(GOBIN)/* 59 60 # The devtools target installs tools required for 'go generate'. 61 # You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'. 62 63 devtools: 64 env GOBIN= go install golang.org/x/tools/cmd/stringer@latest 65 env GOBIN= go install github.com/kevinburke/go-bindata/go-bindata@latest 66 env GOBIN= go install github.com/fjl/gencodec@latest 67 env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest 68 env GOBIN= go install ./cmd/abigen 69 @type "solc" 2> /dev/null || echo 'Please install solc' 70 @type "protoc" 2> /dev/null || echo 'Please install protoc' 71 72 # Cross Compilation Targets (xgo) 73 74 geth-cross: geth-linux geth-darwin geth-windows geth-android geth-ios 75 @echo "Full cross compilation done:" 76 @ls -ld $(GOBIN)/geth-* 77 78 geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 geth-linux-mips64le 79 @echo "Linux cross compilation done:" 80 @ls -ld $(GOBIN)/geth-linux-* 81 82 geth-linux-386: 83 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth 84 @echo "Linux 386 cross compilation done:" 85 @ls -ld $(GOBIN)/geth-linux-* | grep 386 86 87 geth-linux-amd64: 88 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/geth 89 @echo "Linux amd64 cross compilation done:" 90 @ls -ld $(GOBIN)/geth-linux-* | grep amd64 91 92 geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64 93 @echo "Linux ARM cross compilation done:" 94 @ls -ld $(GOBIN)/geth-linux-* | grep arm 95 96 geth-linux-arm-5: 97 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/geth 98 @echo "Linux ARMv5 cross compilation done:" 99 @ls -ld $(GOBIN)/geth-linux-* | grep arm-5 100 101 geth-linux-arm-6: 102 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/geth 103 @echo "Linux ARMv6 cross compilation done:" 104 @ls -ld $(GOBIN)/geth-linux-* | grep arm-6 105 106 geth-linux-arm-7: 107 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/geth 108 @echo "Linux ARMv7 cross compilation done:" 109 @ls -ld $(GOBIN)/geth-linux-* | grep arm-7 110 111 geth-linux-arm64: 112 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth 113 @echo "Linux ARM64 cross compilation done:" 114 @ls -ld $(GOBIN)/geth-linux-* | grep arm64 115 116 geth-linux-mips: 117 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/geth 118 @echo "Linux MIPS cross compilation done:" 119 @ls -ld $(GOBIN)/geth-linux-* | grep mips 120 121 geth-linux-mipsle: 122 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/geth 123 @echo "Linux MIPSle cross compilation done:" 124 @ls -ld $(GOBIN)/geth-linux-* | grep mipsle 125 126 geth-linux-mips64: 127 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/geth 128 @echo "Linux MIPS64 cross compilation done:" 129 @ls -ld $(GOBIN)/geth-linux-* | grep mips64 130 131 geth-linux-mips64le: 132 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/geth 133 @echo "Linux MIPS64le cross compilation done:" 134 @ls -ld $(GOBIN)/geth-linux-* | grep mips64le 135 136 geth-darwin: geth-darwin-386 geth-darwin-amd64 137 @echo "Darwin cross compilation done:" 138 @ls -ld $(GOBIN)/geth-darwin-* 139 140 geth-darwin-386: 141 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth 142 @echo "Darwin 386 cross compilation done:" 143 @ls -ld $(GOBIN)/geth-darwin-* | grep 386 144 145 geth-darwin-amd64: 146 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/geth 147 @echo "Darwin amd64 cross compilation done:" 148 @ls -ld $(GOBIN)/geth-darwin-* | grep amd64 149 150 geth-windows: geth-windows-386 geth-windows-amd64 151 @echo "Windows cross compilation done:" 152 @ls -ld $(GOBIN)/geth-windows-* 153 154 geth-windows-386: 155 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth 156 @echo "Windows 386 cross compilation done:" 157 @ls -ld $(GOBIN)/geth-windows-* | grep 386 158 159 geth-windows-amd64: 160 $(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth 161 @echo "Windows amd64 cross compilation done:" 162 @ls -ld $(GOBIN)/geth-windows-* | grep amd64