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