Merge pull request #703 from cosmos/fabo/536-fixed-build-windows

Fixing Makefile for build on windows
This commit is contained in:
Rigel 2018-03-27 21:59:44 +02:00 committed by GitHub
commit 24a01c7917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
BUILD_FLAGS = -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=`git rev-parse --short HEAD`"
COMMIT_HASH := $(shell git rev-parse --short HEAD)
BUILD_FLAGS = -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=${COMMIT_HASH}"
all: check_tools get_vendor_deps build test
@ -17,9 +18,14 @@ gaia:
go build $(BUILD_FLAGS) -o build/gaiacli ./examples/gaia/gaiacli
build:
@rm -rf examples/basecoin/vendor/
@rm -rf $(shell pwd)/examples/basecoin/vendor/
ifeq ($(OS),Windows_NT)
go build $(BUILD_FLAGS) -o build/basecoind.exe ./examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli.exe ./examples/basecoin/cmd/basecli
else
go build $(BUILD_FLAGS) -o build/basecoind ./examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli ./examples/basecoin/cmd/basecli
endif
dist:
@bash publish/dist.sh