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