-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
53 lines (41 loc) · 1002 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: all
all: gettools generate format
gettools:
go get github.com/golang/mock/gomock@v1.6.0
go get github.com/golang/mock/mockgen@v1.6.0
go get golang.org/x/tools/cmd/goimports@v0.1.5
go mod tidy
generate:
go generate ./apis/... ./service/...
format:
go fmt . ./types/... ./errors ./utils ./config ./apis/... ./service/... ./tests
goimports -w .
go vet . ./types/... ./errors ./utils ./config ./apis/... ./service/... ./tests
go mod tidy
build-lib:
echo "build for Linux/MacOS"
./tools/simple_build.sh
build-lib-win:
echo "build for Windows"
.\tools\build_mingw.bat
build-all: cleanup build-lib
build-all-win: cleanup-win build-lib-win
cleanup:
echo "cleanup for Linux/MacOS"
./tools/cmake_cleanup.sh
cleanup-win:
echo "cleanup for Windows"
.\tools\cmake_cleanup.bat
test:
echo "test for Linux/MacOS"
go version
go mod download
./go_test.sh
test-win:
echo "test for Windows"
go version
go mod download
go_test.bat
gen-swig:
./tools/gen_swig.sh
goimports -w .