-
Notifications
You must be signed in to change notification settings - Fork 8
/
makefile
56 lines (46 loc) · 1.29 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
export GOPATH := $(shell pwd)
build:
@echo "--> Building..."
@mkdir -p bin/
go build -v -o bin/threshwallet-server src/cmd/server.go
go build -v -o bin/threshwallet-client src/cmd/client.go
@chmod 755 bin/*
buildosx:
@echo "--> Building osx library..."
go get -v golang.org/x/mobile/cmd/gobind
go get -v golang.org/x/mobile/cmd/gomobile
./bin/gomobile bind -target=ios library
buildandroid:
@echo "--> Building android library..."
go get -v golang.org/x/mobile/cmd/gobind
go get -v golang.org/x/mobile/cmd/gomobile
./bin/gomobile bind -target=android library
clean:
@echo "--> Cleaning..."
@go clean
@rm -f bin/*
test:
@echo "--> Testing..."
@$(MAKE) testxlog
@$(MAKE) testproto
@$(MAKE) testserver
@$(MAKE) testlibrary
testxlog:
go test -v xlog
testproto:
go test -v proto
testlibrary:
go test -v library
testserver:
go test -v server
# code coverage
allpkgs = xlog proto library server
coverage:
go build -v -o bin/gotestcover \
src/vendor/github.com/pierrre/gotestcover/*.go;
bin/gotestcover -coverprofile=coverage.out -v $(allpkgs)
go tool cover -html=coverage.out
check:
go get -v github.com/golangci/golangci-lint/cmd/golangci-lint
bin/golangci-lint run -D errcheck src/proto/... src/library/... src/server/... ../src/client/...
.PHONY: build clean install fmt test coverage