-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
75 lines (64 loc) · 1.51 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
73
include src/Make.inc
export GOPATH=$(CURDIR)/
ifndef SystemRoot
LIBNAME=libmumax2.so
export CUDAROOT=/usr/local/cuda
export NVROOT=/usr/lib64/nvidia
export CUDA_INC_PATH=$(CUDAROOT)/include/
export CUDA_LIB_PATH=$(NVROOT):$(CUDAROOT)/lib64/
else
LIBNAME=libmumax2.dll
endif
all:
@echo $(GOPATH)
$(MAKE) --no-print-directory --directory=src/libmumax2
cp src/libmumax2/$(LIBNAME) src/mumax/gpu/
cp src/libmumax2/$(LIBNAME) .
go run src/cuda/setup-cuda-paths.go -dir=src/cuda/
go install -race -compiler=gccgo -gccgoflags='-static-libgcc -L /home/mykola/mumax2/pkg/gccgo -L /usr/local/cuda/lib64/ -Ofast -march=native' -v mumax2-bin
#go install -v mumax2-bin
go install -v apigen
go install -v texgen
go install -v template
make -C src/python
ifndef SystemRoot
make -C src/libomf
make -C src/muview
endif
.PHONY: clean
clean:
rm -rf pkg/*
rm -rf src/mumax/gpu/$(LIBNAME)
rm $(LIBNAME)
ifndef SystemRoot
rm -rf bin/mumax2-bin
rm -rf bin/apigen
rm -rf bin/texgen
else
rm -rf bin/mumax2-bin.exe
rm -rf bin/apigen.exe
rm -rf bin/texgen.exe
rm -rf bin/libmumax2.dll
endif
make clean -C src/python
make clean -C src/libmumax2
make clean -C src/libomf
make clean -C src/muview
.PHONY: test
test:
echo todo
.PHONY: tidy
tidy:
@find * | egrep "#" | xargs rm -f
@find * | egrep "\~" | xargs rm -f
.PHONY: love
love:
@echo Oh, yeah
@echo Do it again to MuMax2!
.PHONY: doc
doc:
make -C doc
ln -sf doc/manual/manual.pdf mumax2-manual.pdf
.PHONY: githooks
githooks:
ln -sf $(CURDIR)/misc/pre-commit .git/hooks