forked from cortezaproject/corteza
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.inc
60 lines (44 loc) · 1.47 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
GO = go
GOGET = $(GO) get -u
GOFLAGS ?= -mod=vendor
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
CODEGEN = build/codegen
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):
$(GOGET) github.com/go-critic/go-critic/...
$(MOCKGEN):
$(GOGET) github.com/golang/mock/mockgen
$(STATICCHECK):
$(GOGET) honnef.co/go/tools/cmd/staticcheck
$(PROTOGEN):
$(GOGET) github.com/golang/protobuf/protoc-gen-go
$(PROTOGEN_GRPC):
$(GOGET) google.golang.org/grpc/cmd/protoc-gen-go-grpc
$(GIN):
$(GOGET) github.com/codegangsta/gin
$(GOTEST):
$(GOGET) github.com/rakyll/gotest
$(STATIK):
$(GOGET) github.com/goware/statik
$(CODEGEN):
$(GO) build -o $@ cmd/codegen/main.go
clean-tools:
rm -f $(BINS)