forked from cortezaproject/corteza
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.inc
74 lines (54 loc) · 1.84 KB
/
Makefile.inc
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
GO = go
GOINSTALL = $(GO) install
GOFLAGS ?= -trimpath
GOPATH ?= $(HOME)/go
CGO_ENABLED = 1
export GOFLAGS
export CGO_ENABLED
########################################################################################################################
# Tool bins
GOCRITIC = $(GOPATH)/bin/gocritic
MOCKGEN = $(GOPATH)/bin/mockgen
GOTEST = $(GOPATH)/bin/gotest
STATICCHECK = $(GOPATH)/bin/staticcheck
PROTOGEN = $(GOPATH)/bin/protoc-gen-go
PROTOGEN_GRPC = $(GOPATH)/bin/protoc-gen-go-grpc
GIN = $(GOPATH)/bin/gin
STATIK = $(GOPATH)/bin/statik
MODOUTDATED = $(GOPATH)/bin/go-mod-outdated
CUE = $(GOPATH)/bin/cue
CODEGEN = build/codegen
JSONTPLEXEC = build/json-tpl-exec
PROTOC = /usr/local/bin/protoc
FSWATCH = /usr/local/bin/fswatch
# fswatch is intentionally left out...
BINS = $(GOCRITIC) $(MOCKGEN) $(GOTEST) $(STATICCHECK) $(PROTOGEN) $(GIN) $(STATIK) $(CODEGEN)
########################################################################################################################
# Go Toolset
$(GOCRITIC):
$(GOINSTALL) github.com/go-critic/go-critic@latest
$(MOCKGEN):
$(GOINSTALL) github.com/golang/mock/mockgen@latest
$(STATICCHECK):
$(GOINSTALL) honnef.co/go/tools/cmd/staticcheck@latest
$(PROTOGEN):
$(GOINSTALL) github.com/golang/protobuf/protoc-gen-go@latest
$(PROTOGEN_GRPC):
$(GOINSTALL) google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
$(GIN):
$(GOINSTALL) github.com/codegangsta/gin@latest
$(GOTEST):
$(GOINSTALL) github.com/rakyll/gotest@latest
$(STATIK):
$(GOINSTALL) github.com/goware/statik@latest
$(MODOUTDATED):
$(GOINSTALL) github.com/psampaz/go-mod-outdated@latest
$(CODEGEN):
$(GO) build -o $@ cmd/codegen/main.go
$(CUE):
$(GOINSTALL) cuelang.org/go/cmd/cue@latest
$(JSONTPLEXEC):
$(GO) build -o $@ ./codegen/tool
clean-tools:
rm -f $(BINS)
#