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
|
.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/main.py $(opt)
test-%:
$(MPIEXEC) -n $* $(VALGRIND) $(PYTHON) $(PWD)/test/main.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 srcclean
$(RM) -r build _configtest*
$(RM) -r .*_cache .eggs .tox
$(RM) -r htmlcov .coverage .coverage.*
$(RM) src/mpi4py/MPI.*.so
find . -name __pycache__ | xargs $(RM) -r
fullclean: distclean
find . -name '*~' -exec $(RM) -f {} ';'
# ----
.PHONY: install editable uninstall
install:
$(PYTHON) -m pip install $(opt) .
editable:
$(PYTHON) -m pip install --editable $(opt) .
uninstall:
$(PYTHON) -m pip uninstall $(opt) mpi4py
# ----
|