forked from mpi4py/mpi4py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
57 lines (47 loc) · 1.28 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
.PHONY: default
default: build
default: opt=--inplace
PYTHON = python$(py)
MPIEXEC = mpiexec
# ----
.PHONY: config build test
config:
$(PYTHON) setup.py config $(opt)
build:
$(PYTHON) setup.py build $(opt)
test:
$(VALGRIND) $(PYTHON) $(PWD)/test/runtests.py $(opt)
test-%:
$(MPIEXEC) -n $* $(VALGRIND) $(PYTHON) $(PWD)/test/runtests.py $(opt)
.PHONY: srcbuild srcclean
srcbuild:
$(PYTHON) setup.py build_src $(opt)
srcclean:
$(RM) src/mpi4py/MPI.c
$(RM) src/mpi4py/MPI.h
$(RM) src/mpi4py/MPI_api.h
.PHONY: clean distclean fullclean
clean:
$(PYTHON) setup.py clean --all
distclean: clean
-$(RM) -r build _configtest*
-$(RM) -r .ruff_cache .mypy_cache
-$(RM) -r htmlcov .coverage .coverage.*
-$(RM) -r conf/__pycache__ test/__pycache__
-$(RM) -r demo/__pycache__ src/mpi4py/__pycache__
fullclean: distclean srcclean
-find . -name '*~' -exec rm -f {} ';'
# ----
.PHONY: develop develop-uninstall
develop:
$(PYTHON) setup.py develop --prefix='' --user $(opt)
develop-uninstall:
$(PYTHON) setup.py develop --prefix='' --user --uninstall $(opt)
# ----
.PHONY: install uninstall
install:
$(PYTHON) setup.py install --prefix='' --user $(opt)
uninstall:
-$(RM) -r $(shell $(PYTHON) -m site --user-site)/mpi4py
-$(RM) -r $(shell $(PYTHON) -m site --user-site)/mpi4py-*-py*.egg-info
# ----