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