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