-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (47 loc) · 1.62 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
61
62
63
64
65
################################################################################
# ____ #
# _||__| | ______ ______ ______ HOMELESS DIGITAL LOCOMOTIVE #
# ( | | H | | D | | L | #
# /-()---() ~ ()--() ~ ()--() ~ ()--() ksever & vletarou #
################################################################################
GOPATH := ${PWD}:${PWD}/_vendor:${GOPATH}
export GOPATH
NAME = gomoku
default: ./bin/$(NAME)
./bin/$(NAME):
go vet ./src/...
go build -v -o ./bin/$(NAME) ./src/$(NAME)
re: clean ./bin/$(NAME)
doc:
godoc -http=:6060 -index
fmt:
go fmt ./src/...
run: build
./bin/$(NAME)
windowed: build
./bin/gomoku -f=0 -w 1440 -h 900
test:
go test ./src/...
benchmark:
go test -bench=. ./src/...
profile:
go build -v -o ./bin/$(NAME) ./src/$(NAME)
GODEBUG=gctrace=1 ./bin/$(NAME) -prof=1
clean:
rm -f ./bin/$(NAME)
vendor_clean:
rm -dvRf ./_vendor/src
vendor_get: vendor_clean
GOPATH=${PWD}/_vendor go get -u -v \
github.com/davecheney/profile \
github.com/veandco/go-sdl2/sdl \
github.com/veandco/go-sdl2/sdl_mixer \
github.com/veandco/go-sdl2/sdl_image \
github.com/veandco/go-sdl2/sdl_ttf
vendor_update: vendor_get
rm -rf `find ./_vendor/src -type d -name .git` \
&& rm -rf `find ./_vendor/src -type d -name .hg` \
&& rm -rf `find ./_vendor/src -type d -name .bzr` \
.PHONY: build doc fmt lint run test clean vendor_clean vendor_get vendor_update
# This project requires the sdl2 library to be installed
# brew install sdl2{,_image,_ttf,_mixer}