forked from mpi4py/mpi4py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
46 lines (38 loc) · 1 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
.PHONY: default
default: build
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* _skbuild
-$(RM) -r conf/__pycache__ test/__pycache__
-$(RM) -r demo/__pycache__ src/mpi4py/__pycache__
fullclean: distclean srcclean
-find . -name '*~' -exec rm -f {} ';'
# ----
.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
# ----