-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
60 lines (48 loc) · 1.1 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
57
58
59
60
.PHONY: help
help:
@echo make fmt runs go fmt. Read the Makefile for the rest.
.PHONY: check
check:
go test ./...
.PHONY: cover
cover:
go test -coverprofile coverprofile.out ./... && go tool cover -html=coverprofile.out
.PHONY: bench
bench:
go test -run ZZZ -bench=. ./...
.PHONY: fmt
fmt:
go fmt ./...
.PHONY: vet
vet:
go vet ./...
.PHONY: build
build:
go build .
# NB: You must 'make clean' when you 'go get -u github.com/chandler37/gobackgammon && go mod tidy' to upgrade deps.
gobackgammond: main.go svg/*.go handlers/*.go
go build .
.PHONY: run
run: gobackgammond
./gobackgammond
.PHONY: srv
srv: gobackgammond
./gobackgammond -port=8000
# TODO(chandler37): Before using go 1.11 modules (see go.mod), this worked. Fix it.
.PHONY: doc
doc:
godoc -http=:6060
.PHONY: textdoc
textdoc:
go doc github.com/chandler37/gobackgammon/ai
@echo " "
go doc github.com/chandler37/gobackgammon/brd
@echo " "
go doc github.com/chandler37/gobackgammond/svg
@echo " "
go doc github.com/chandler37/gobackgammond/handlers
.PHONY: clean
clean:
rm -fr bin/ pkg/ coverprofile.out
go clean -cache
go clean ./...