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