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