OSDN Git Service

Merge branch 'dev' of https://github.com/Bytom/bytom into dev
[bytom/bytom-spv.git] / Makefile
1 GOTOOLS  = \
2                    github.com/mitchellh/gox \
3                    github.com/Masterminds/glide
4 PACKAGES = $(shell go list ./... | grep -v '/vendor/' | grep -v '/rpc/')
5
6 all: install test
7
8 install: get_vendor_deps
9         @go install --ldflags '-extldflags "-static"' \
10                 --ldflags "-X github.com/Bytom/blockchain/version.GitCommit=`git rev-parse HEAD`" ./node/
11         @echo "====> Done!"
12
13 get_vendor_deps: ensure_tools
14         @rm -rf vendor/
15         @echo "====> Running glide install"
16         @glide install
17
18 ensure_tools:
19         go get $(GOTOOLS)
20
21 test:
22         @echo "====> Running go test"
23         @go test $(PACKAGES)
24
25 .PHONY: install get_vendor_deps ensure_tools test