github.com/halybang/go-ethereum@v1.0.5-0.20180325041310-3b262bc1367c/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: gwan evm all test testCoin testToken clean
     6  # .PHONY: gwan android ios geth-cross evm all test clean
     7  # .PHONY: geth-linux geth-linux-386 geth-linux-amd64 geth-linux-mips64 geth-linux-mips64le
     8  # .PHONY: geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
     9  # .PHONY: geth-darwin geth-darwin-386 geth-darwin-amd64
    10  # .PHONY: geth-windows geth-windows-386 geth-windows-amd64
    11  
    12  GOBIN = build/bin
    13  GO ?= latest
    14  
    15  linuxDir=$(shell echo gwan-linux-amd64-`cat ./VERSION`-`git rev-parse --short=8 HEAD`)
    16  windowsDir=$(shell echo gwan-windows-amd64-`cat ./VERSION`-`git rev-parse --short=8 HEAD`)
    17  darwinDir=$(shell echo gwan-mac-amd64-`cat ./VERSION`-`git rev-parse --short=8 HEAD`)
    18  # The gwan target build gwan binary
    19  gwan:
    20  	build/env.sh  go run   -gcflags "-N -l"    build/ci.go   install ./cmd/gwan
    21  	@echo "Done building."
    22  	@echo "Run \"$(GOBIN)/gwan\" to launch gwan."
    23  
    24  # The evm target build EVM emulator binary
    25  evm:
    26  	build/env.sh go run build/ci.go install ./cmd/evm
    27  	@echo "Done building."
    28  	@echo "Run \"$(GOBIN)/evm\" to start the evm."
    29  
    30  	
    31  # The all target build all the wanchain tools
    32  all:
    33  	build/env.sh go run build/ci.go install
    34  
    35  # android:
    36  # 	build/env.sh go run build/ci.go aar --local
    37  # 	@echo "Done building."
    38  # 	@echo "Import \"$(GOBIN)/geth.aar\" to use the library."
    39  
    40  # ios:
    41  # 	build/env.sh go run build/ci.go xcode --local
    42  # 	@echo "Done building."
    43  # 	@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
    44  
    45  # The test target run all unit tests
    46  test: all
    47  	build/env.sh go run build/ci.go test
    48  
    49  # The testCoin target test a simple wancoin privacy transaction
    50  testCoin: all
    51  	./build/bin/gwan --dev --nodiscover --networkid 483855466823 --datadir './DOCKER/data-loadScript' --etherbase '0x9da26fc2e1d6ad9fdd46138906b0104ae68a65d8' --unlock '0x9da26fc2e1d6ad9fdd46138906b0104ae68a65d8' --password './DOCKER/data-loadScript/pwdfile' --mine --minerthreads 1 --nodiscover js './loadScript/wancoin.js'
    52  
    53  # The testToken target test a simple token privacy transaction
    54  testToken: all
    55  	./build/bin/gwan --dev --nodiscover --networkid 483855466823 --datadir "./DOCKER/data-loadScript" --etherbase '0x9da26fc2e1d6ad9fdd46138906b0104ae68a65d8' --unlock '0x9da26fc2e1d6ad9fdd46138906b0104ae68a65d8' --password './DOCKER/data-loadScript/pwdfile' --mine --minerthreads 1 --nodiscover js './loadScript/wantoken.js'
    56  
    57  # The clean target clear all the build output
    58  clean:
    59  	rm -fr build/_workspace/pkg/ $(GOBIN)/*
    60  
    61  # The devtools target installs tools required for 'go generate'.
    62  # You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
    63  
    64  devtools:
    65  	env GOBIN= go get -u golang.org/x/tools/cmd/stringer
    66  	env GOBIN= go get -u github.com/jteeuwen/go-bindata/go-bindata
    67  	env GOBIN= go get -u github.com/fjl/gencodec
    68  	env GOBIN= go install ./cmd/abigen
    69  
    70  
    71  
    72  # Cross Compilation Targets (xgo)
    73  
    74  # geth-cross: geth-linux geth-darwin geth-windows geth-android geth-ios
    75  # 	@echo "Full cross compilation done:"
    76  # 	@ls -ld $(GOBIN)/geth-*
    77  
    78  # geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 geth-linux-mips64le
    79  # 	@echo "Linux cross compilation done:"
    80  # 	@ls -ld $(GOBIN)/geth-linux-*
    81  
    82  # geth-linux-386:
    83  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth
    84  # 	@echo "Linux 386 cross compilation done:"
    85  # 	@ls -ld $(GOBIN)/geth-linux-* | grep 386
    86  
    87  gwan-linux-amd64:
    88  	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/gwan
    89  	@echo "Linux amd64 cross compilation done:"
    90  	@ls -ld $(GOBIN)/gwan-linux-* | grep amd64
    91  	mkdir -p ${linuxDir}
    92  	cp ./build/bin/gwan-linux-* ${linuxDir}/gwan
    93  	tar zcf ${linuxDir}.tar.gz ${linuxDir}/gwan
    94  
    95  # geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
    96  # 	@echo "Linux ARM cross compilation done:"
    97  # 	@ls -ld $(GOBIN)/geth-linux-* | grep arm
    98  
    99  # geth-linux-arm-5:
   100  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/geth
   101  # 	@echo "Linux ARMv5 cross compilation done:"
   102  # 	@ls -ld $(GOBIN)/geth-linux-* | grep arm-5
   103  
   104  # geth-linux-arm-6:
   105  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/geth
   106  # 	@echo "Linux ARMv6 cross compilation done:"
   107  # 	@ls -ld $(GOBIN)/geth-linux-* | grep arm-6
   108  
   109  # geth-linux-arm-7:
   110  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/geth
   111  # 	@echo "Linux ARMv7 cross compilation done:"
   112  # 	@ls -ld $(GOBIN)/geth-linux-* | grep arm-7
   113  
   114  # geth-linux-arm64:
   115  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth
   116  # 	@echo "Linux ARM64 cross compilation done:"
   117  # 	@ls -ld $(GOBIN)/geth-linux-* | grep arm64
   118  
   119  # geth-linux-mips:
   120  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/geth
   121  # 	@echo "Linux MIPS cross compilation done:"
   122  # 	@ls -ld $(GOBIN)/geth-linux-* | grep mips
   123  
   124  # geth-linux-mipsle:
   125  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/geth
   126  # 	@echo "Linux MIPSle cross compilation done:"
   127  # 	@ls -ld $(GOBIN)/geth-linux-* | grep mipsle
   128  
   129  # geth-linux-mips64:
   130  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/geth
   131  # 	@echo "Linux MIPS64 cross compilation done:"
   132  # 	@ls -ld $(GOBIN)/geth-linux-* | grep mips64
   133  
   134  # geth-linux-mips64le:
   135  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/geth
   136  # 	@echo "Linux MIPS64le cross compilation done:"
   137  # 	@ls -ld $(GOBIN)/geth-linux-* | grep mips64le
   138  
   139  # geth-darwin: geth-darwin-386 geth-darwin-amd64
   140  # 	@echo "Darwin cross compilation done:"
   141  # 	@ls -ld $(GOBIN)/geth-darwin-*
   142  
   143  # geth-darwin-386:
   144  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth
   145  # 	@echo "Darwin 386 cross compilation done:"
   146  # 	@ls -ld $(GOBIN)/geth-darwin-* | grep 386
   147  
   148  gwan-darwin-amd64:
   149  	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/gwan
   150  	@echo "Darwin amd64 cross compilation done:"
   151  	@ls -ld $(GOBIN)/gwan-darwin-* | grep amd64
   152  	mkdir -p ${darwinDir}
   153  	cp ./build/bin/gwan-darwin-* ${darwinDir}/gwan
   154  	tar zcf ${darwinDir}.tar.gz ${darwinDir}/gwan
   155  
   156  # geth-windows: geth-windows-386 geth-windows-amd64
   157  # 	@echo "Windows cross compilation done:"
   158  # 	@ls -ld $(GOBIN)/geth-windows-*
   159  
   160  # geth-windows-386:
   161  # 	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth
   162  # 	@echo "Windows 386 cross compilation done:"
   163  # 	@ls -ld $(GOBIN)/geth-windows-* | grep 386
   164  
   165  gwan-windows-amd64:
   166  	build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/gwan
   167  	@echo "Windows amd64 cross compilation done:"
   168  	@ls -ld $(GOBIN)/gwan-windows-* | grep amd64
   169  	mkdir -p ${windowsDir}
   170  	cp ./build/bin/gwan-windows-* ${windowsDir}/gwan.exe
   171  	zip ${windowsDir}.zip ${windowsDir}/gwan.exe
   172  
   173  release: clean gwan-linux-amd64 gwan-windows-amd64 gwan-darwin-amd64