github.com/cheng762/PlatON-Go@v1.8.17-0.20190529111256-7deff2d7be26/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 swarm 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 = $(shell pwd)/build/bin 12 GO ?= latest 13 14 platon: 15 build/build_deps.sh 16 build/env.sh go run build/ci.go install ./cmd/platon 17 @echo "Done building." 18 @echo "Run \"$(GOBIN)/platon\" to launch platon." 19 20 platon-with-mpc: 21 build/build_deps.sh 22 build/env.sh go run build/ci.go install -mpc on ./cmd/platon 23 @echo "Done building platon with mpc." 24 @echo "Run \"$(GOBIN)/platon\" to launch platon." 25 26 platon-with-vc: 27 build/build_deps.sh 28 build/build_snark.sh 29 build/env.sh go run build/ci.go install -vc on ./cmd/platon 30 @echo "Done building platon with vc." 31 @echo "Run \"$(GOBIN)/platon\" to launch platon." 32 33 platon-with-mv: 34 build/build_deps.sh 35 build/build_snark.sh 36 build/env.sh go run build/ci.go install -mv on ./cmd/platon 37 @echo "Done building platon with vc." 38 @echo "Run \"$(GOBIN)/platon\" to launch platon." 39 40 swarm: 41 build/env.sh go run build/ci.go install ./cmd/swarm 42 @echo "Done building." 43 @echo "Run \"$(GOBIN)/swarm\" to launch swarm." 44 45 all: 46 build/build_deps.sh 47 build/env.sh go run build/ci.go install 48 49 all-debug: 50 build/build_deps.sh 51 build/env.sh go run build/ci.go install -gcflags on 52 53 all-with-mpc: 54 build/build_deps.sh 55 build/env.sh go run build/ci.go install -mpc on 56 57 all-with-vc: 58 build/build_deps.sh 59 build/build_snark.sh 60 build/env.sh go run build/ci.go install -vc on 61 62 all-with-mv: 63 build/build_deps.sh 64 build/build_snark.sh 65 build/env.sh go run build/ci.go install -mv on 66 67 android: 68 build/env.sh go run build/ci.go aar --local 69 @echo "Done building." 70 @echo "Import \"$(GOBIN)/geth.aar\" to use the library." 71 72 ios: 73 build/env.sh go run build/ci.go xcode --local 74 @echo "Done building." 75 @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." 76 77 test: all 78 build/env.sh go run build/ci.go test 79 80 lint: ## Run linters. 81 build/env.sh go run build/ci.go lint 82 83 clean: 84 ./build/clean_deps.sh 85 ./build/clean_go_build_cache.sh 86 rm -fr build/_workspace/pkg/ $(GOBIN)/* 87 88 # The devtools target installs tools required for 'go generate'. 89 # You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'. 90 91 devtools: 92 env GOBIN= go get -u golang.org/x/tools/cmd/stringer 93 env GOBIN= go get -u github.com/kevinburke/go-bindata/go-bindata 94 env GOBIN= go get -u github.com/fjl/gencodec 95 env GOBIN= go get -u github.com/golang/protobuf/protoc-gen-go 96 env GOBIN= go install ./cmd/abigen 97 @type "npm" 2> /dev/null || echo 'Please install node.js and npm' 98 @type "solc" 2> /dev/null || echo 'Please install solc' 99 @type "protoc" 2> /dev/null || echo 'Please install protoc' 100 101 # Cross Compilation Targets (xgo) 102 103 geth-cross: geth-linux geth-darwin geth-windows geth-android geth-ios 104 @echo "Full cross compilation done:" 105 @ls -ld $(GOBIN)/geth-* 106 107 geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 geth-linux-mips64le 108 @echo "Linux cross compilation done:" 109 @ls -ld $(GOBIN)/geth-linux-* 110 111 geth-linux-386: 112 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth 113 @echo "Linux 386 cross compilation done:" 114 @ls -ld $(GOBIN)/geth-linux-* | grep 386 115 116 geth-linux-amd64: 117 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/geth 118 @echo "Linux amd64 cross compilation done:" 119 @ls -ld $(GOBIN)/geth-linux-* | grep amd64 120 121 geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64 122 @echo "Linux ARM cross compilation done:" 123 @ls -ld $(GOBIN)/geth-linux-* | grep arm 124 125 geth-linux-arm-5: 126 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/geth 127 @echo "Linux ARMv5 cross compilation done:" 128 @ls -ld $(GOBIN)/geth-linux-* | grep arm-5 129 130 geth-linux-arm-6: 131 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/geth 132 @echo "Linux ARMv6 cross compilation done:" 133 @ls -ld $(GOBIN)/geth-linux-* | grep arm-6 134 135 geth-linux-arm-7: 136 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/geth 137 @echo "Linux ARMv7 cross compilation done:" 138 @ls -ld $(GOBIN)/geth-linux-* | grep arm-7 139 140 geth-linux-arm64: 141 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth 142 @echo "Linux ARM64 cross compilation done:" 143 @ls -ld $(GOBIN)/geth-linux-* | grep arm64 144 145 geth-linux-mips: 146 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/geth 147 @echo "Linux MIPS cross compilation done:" 148 @ls -ld $(GOBIN)/geth-linux-* | grep mips 149 150 geth-linux-mipsle: 151 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/geth 152 @echo "Linux MIPSle cross compilation done:" 153 @ls -ld $(GOBIN)/geth-linux-* | grep mipsle 154 155 geth-linux-mips64: 156 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/geth 157 @echo "Linux MIPS64 cross compilation done:" 158 @ls -ld $(GOBIN)/geth-linux-* | grep mips64 159 160 geth-linux-mips64le: 161 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/geth 162 @echo "Linux MIPS64le cross compilation done:" 163 @ls -ld $(GOBIN)/geth-linux-* | grep mips64le 164 165 geth-darwin: geth-darwin-386 geth-darwin-amd64 166 @echo "Darwin cross compilation done:" 167 @ls -ld $(GOBIN)/geth-darwin-* 168 169 geth-darwin-386: 170 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth 171 @echo "Darwin 386 cross compilation done:" 172 @ls -ld $(GOBIN)/geth-darwin-* | grep 386 173 174 geth-darwin-amd64: 175 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/geth 176 @echo "Darwin amd64 cross compilation done:" 177 @ls -ld $(GOBIN)/geth-darwin-* | grep amd64 178 179 geth-windows: geth-windows-386 geth-windows-amd64 180 @echo "Windows cross compilation done:" 181 @ls -ld $(GOBIN)/geth-windows-* 182 183 geth-windows-386: 184 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth 185 @echo "Windows 386 cross compilation done:" 186 @ls -ld $(GOBIN)/geth-windows-* | grep 386 187 188 geth-windows-amd64: 189 build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth 190 @echo "Windows amd64 cross compilation done:" 191 @ls -ld $(GOBIN)/geth-windows-* | grep amd64