@@ -2,7 +2,7 @@ PACKAGES=$(shell go list ./... | grep -v '/vendor/')
22COMMIT_HASH := $(shell git rev-parse --short HEAD)
33BUILD_FLAGS = -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=${COMMIT_HASH}"
44
5- all : check_tools get_vendor_deps build test
5+ all : check_tools get_vendor_deps build build_examples test
66
77# #######################################
88# ## CI
@@ -13,13 +13,16 @@ ci: get_tools get_vendor_deps build test_cover
1313# ## Build
1414
1515# This can be unified later, here for easy demos
16- gaia :
17- go build $(BUILD_FLAGS ) -o build/gaiad ./examples/gaia/gaiad
18- go build $(BUILD_FLAGS ) -o build/gaiacli ./examples/gaia/gaiacli
19-
2016build :
21- @rm -rf $(shell pwd) /examples/basecoin/vendor/
22- @rm -rf $(shell pwd) /examples/democoin/vendor/
17+ ifeq ($(OS ) ,Windows_NT)
18+ go build $(BUILD_FLAGS) -o build/gaiad.exe ./cmd/gaiad
19+ go build $(BUILD_FLAGS) -o build/gaiacli.exe ./cmd/gaiacli
20+ else
21+ go build $(BUILD_FLAGS) -o build/gaiad ./cmd/gaiad
22+ go build $(BUILD_FLAGS) -o build/gaiacli ./cmd/gaiacli
23+ endif
24+
25+ build_examples :
2326ifeq ($(OS ) ,Windows_NT)
2427 go build $(BUILD_FLAGS) -o build/basecoind.exe ./examples/basecoin/cmd/basecoind
2528 go build $(BUILD_FLAGS) -o build/basecli.exe ./examples/basecoin/cmd/basecli
3336endif
3437
3538install :
39+ go install $(BUILD_FLAGS ) ./cmd/gaiad
40+ go install $(BUILD_FLAGS ) ./cmd/gaiacli
41+
42+ install_examples :
3643 go install $(BUILD_FLAGS ) ./examples/basecoin/cmd/basecoind
3744 go install $(BUILD_FLAGS ) ./examples/basecoin/cmd/basecli
3845 go install $(BUILD_FLAGS ) ./examples/democoin/cmd/democoind
@@ -84,12 +91,9 @@ test: test_unit # test_cli
8491# go test -coverprofile=c.out && go tool cover -html=c.out
8592
8693test_unit :
87- @rm -rf examples/basecoin/vendor/
88- @rm -rf examples/democoin/vendor/
8994 @go test $(PACKAGES )
9095
9196test_cover :
92- @rm -rf examples/basecoin/vendor/
9397 @bash tests/test_cover.sh
9498
9599benchmark :
@@ -123,4 +127,4 @@ devdoc_update:
123127# To avoid unintended conflicts with file names, always add to .PHONY
124128# unless there is a reason not to.
125129# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
126- .PHONY : build dist check_tools get_tools get_vendor_deps draw_deps test test_unit test_tutorial benchmark devdoc_init devdoc devdoc_save devdoc_update
130+ .PHONY : build build_examples install install_examples dist check_tools get_tools get_vendor_deps draw_deps test test_unit test_tutorial benchmark devdoc_init devdoc devdoc_save devdoc_update
0 commit comments