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