forked from antonio-salieri/assetMantle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
52 lines (34 loc) · 1.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
export GO111MODULE=on
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
COMMIT := $(shell git rev-parse --short HEAD)
build_tags = netgo
build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=assetMantle \
-X github.com/cosmos/cosmos-sdk/version.ServerName=assetNode \
-X github.com/cosmos/cosmos-sdk/version.ClientName=assetClient \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)
BUILD_FLAGS += -ldflags "${ldflags}"
GOBIN = $(shell go env GOPATH)/bin
all: verify build
install:
ifeq (${OS},Windows_NT)
go build -mod=readonly ${BUILD_FLAGS} -o ${GOBIN}/assetClient.exe ./client
go build -mod=readonly ${BUILD_FLAGS} -o ${GOBIN}/assetNode.exe ./node
else
go build -mod=readonly ${BUILD_FLAGS} -o ${GOBIN}/assetClient ./client
go build -mod=readonly ${BUILD_FLAGS} -o ${GOBIN}/assetNode ./node
endif
build:
ifeq (${OS},Windows_NT)
go build ${BUILD_FLAGS} -o ${GOBIN}/assetClient.exe ./client
go build ${BUILD_FLAGS} -o ${GOBIN}/assetNode.exe ./node
else
go build ${BUILD_FLAGS} -o ${GOBIN}/assetClient ./client
go build ${BUILD_FLAGS} -o ${GOBIN}/assetNode ./node
endif
verify:
@echo "verifying modules"
@go mod verify
.PHONY: all install build verify