forked from mumax/3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (28 loc) · 1014 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
# Use the default go compiler
GO_BUILDFLAGS=-compiler gc
# Or uncomment the line below to use the gccgo compiler, which may
# or may not be faster than gc and which may or may not compile...
# GO_BUILDFLAGS=-compiler gccgo -gccgoflags '-static-libgcc -O4 -Ofast -march=native'
CGO_CFLAGS_ALLOW='(-fno-schedule-insns|-malign-double|-ffast-math)'
.PHONY: all cudakernels clean realclean checktests runtests hooks
all: cudakernels hooks
go install -v $(GO_BUILDFLAGS) github.com/mumax/3/...
cudakernels:
cd cuda && $(MAKE)
doc:
cd doc && $(MAKE)
test: all
go test -vet=off -i github.com/mumax/3/...
go test -vet=off $(PKGS) github.com/mumax/3/...
cd test && ./run.bash
hooks: .git/hooks/post-commit .git/hooks/pre-commit
.git/hooks/post-commit: post-commit
ln -sf $(CURDIR)/$< $@
.git/hooks/pre-commit: pre-commit
ln -sf $(CURDIR)/$< $@
clean:
rm -frv $(GOPATH)/pkg/*/github.com/mumax/3/*
rm -frv $(GOPATH)/bin/mumax3*
cd cuda && $(MAKE) clean
realclean: clean
cd cuda && ${MAKE} realclean