-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (35 loc) · 1.38 KB
/
Makefile
File metadata and controls
50 lines (35 loc) · 1.38 KB
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
maDEP := $(shell command -v dep 2> /dev/null)
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
COMMIT := $(shell git log -1 --format='%H')
CAT := $(if $(filter $(OS),Windows_NT),type,cat)
# process linker flags
ifeq ($(VERSION),)
VERSION = $(COMMIT)
endif
ldflags = -X github.com/cmdpos/cmapp/vendor/github.com/cosmos/cosmos-sdk/version.Version=$(COMMIT) \
-X github.com/cmdpos/cmapp/vendor/github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X github.com/cmdpos/cmapp/vendor/github.com/cosmos/cosmos-sdk/version.VendorDirHash=null \
-X github.com/cmdpos/cmapp/vendor/github.com/cosmos/cosmos-sdk/version.BuildTags=gcc
ldflags += $(LDFLAGS)
ldflags := $(strip $(ldflags))
BUILD_FLAGS := -ldflags '$(ldflags)'
get_tools:
ifndef DEP
@echo "Installing dep"
go get -u -v github.com/golang/dep/cmd/dep
else
@echo "Dep is already installed..."
endif
all: install
install:
CGO_LDFLAGS="-lsnappy" go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS) gcc" ./cmd/gaia/cmd/gaiad
CGO_LDFLAGS="-lsnappy" go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS) gcc" ./cmd/gaia/cmd/gaiacli
installnsd:
go install ./cmd/nsd
go install ./cmd/nscli
install2:
go install ./cmd/gaia/cmd/gaiad
go install ./cmd/gaia/cmd/gaiacli
format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofmt -w -s
.PHONY: build