-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
33 lines (23 loc) · 1013 Bytes
/
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
PACKAGES=$(shell go list ./... | grep -v '/simulation')
VERSION := $(shell echo $(shell git describe --tags))
COMMIT := $(shell git log -1 --format='%H')
BUILDDIR ?= $(CURDIR)/build
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=cudos-node \
-X github.com/cosmos/cosmos-sdk/version.AppName=cudos-noded \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT)
BUILD_FLAGS := -ldflags '$(ldflags)'
all: install
install: export CGO_LDFLAGS=-Wl,-rpath,$$ORIGIN/../
install: go.sum
@echo "--> Installing cudos-noded"
@go install -mod=readonly $(BUILD_FLAGS) -tags "ledger" ./cmd/cudos-noded
build: export CGO_LDFLAGS=-Wl,-rpath,$$ORIGIN/../
build: go.sum
@echo "--> Building cudos-noded"
@go build -mod=readonly $(BUILD_FLAGS) -o $(BUILDDIR)/ -tags "ledger" ./cmd/cudos-noded
go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
GO111MODULE=on go mod verify
test:
@go test -v -mod=readonly $(PACKAGES)