-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (54 loc) · 1.23 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
66
67
68
69
70
71
72
all: nvcc githook 6g mx3 tools
PREFIX=code.google.com/p/mx3
PKGS=\
$(PREFIX)/engine\
$(PREFIX)/cuda\
$(PREFIX)/util\
$(PREFIX)/draw\
$(PREFIX)/mag\
$(PREFIX)/data\
$(PREFIX)/prof\
$(PREFIX)/cuda: nvcc
.PHONY: mx3
mx3:
go install -v
go build -o mx3 main.go
.PHONY: nvcc
nvcc:
make -C cuda -j8
6g:
go install -v $(PKGS)
tools:
go install -v $(PREFIX)/tools/mx3-convert
GCCGO=gccgo -gccgoflags '-static-libgcc -O4 -Ofast -march=native'
gccgo:
go install -v -compiler $(GCCGO) $(PKGS)
go install -v -compiler $(GCCGO)
githook:
ln -sf $(CURDIR)/pre-commit .git/hooks/pre-commit
ln -sf $(CURDIR)/post-commit .git/hooks/post-commit
racetest:
go test -race $(PKGS)
make -C test
.PHONY: test
test: 6gtest unittest #gccgotest #re-enable gccgotest when gcc up to date with go 1.1
unittest:
(cd examples && ./build.bash)
(cd test && ./run.bash)
6gtest: 6g
go test -i $(PKGS)
go test $(PKGS)
gccgotest: gccgo
go test -i -compiler=$(gccgo) $(PKGS)
go test -compiler=$(gccgo) $(PKGS)
.PHONY: bench
bench: 6g
go test -test.bench $(PKGS)
.PHONY: gccgobench
gccgobench: gccgo
go test -compiler=$(gccgo) -test.bench $(PKGS)
.PHONY: clean
clean:
go clean -i -x $(PKGS)
rm -rf $(GOPATH)/pkg/gccgo/$(PREFIX)/
make clean -C cuda