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