-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
42 lines (34 loc) · 1.03 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
prefix ?= /usr/local
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/bin
.PHONY: all install uninstall test test-install update-vendor help
all:
env GO111MODULE=on go build -mod vendor -v . ./cmd/...
install:
env GO111MODULE=on GOBIN=$(bindir) go install -mod vendor -v . ./cmd/secpkg ./cmd/ssotpub
uninstall:
rm -f $(bindir)/codechain $(bindir)/secpkg $(bindir)/ssotpub
test:
gocheck -c -v -timeout 30m
test-install:
go get github.com/frankbraun/gocheck
go get golang.org/x/tools/cmd/goimports
go get -u golang.org/x/lint/golint
update-vendor:
rm -rf vendor
env GO111MODULE=on go get -u
env GO111MODULE=on go mod tidy -v
env GO111MODULE=on go mod vendor
help:
@echo "\
\n\
Codechain\n\
\n\
Commands:\n\
make (all) - go build files to ./cmd\n\
make install - go install required vendor library files (secpkg, ssot)\n\
make uninstall - rm vendor libraries\n\
make test - run gocheck\n\
make test-install - install test dependencies (gocheck, golint, goimports)\n\
make update-vendor - update dependencies\n\
"