forked from plumed/plumed2
/
Makefile
52 lines (39 loc) · 1.3 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
# include the machine dependent configuration
ifneq ($(MAKECMDGOALS),clean)
-include ../Makefile.conf
endif
VERSION = $(shell if test -f ../VERSION ; then grep -v \\\# ../VERSION ; else echo "Unknown" ; fi )
.PHONY: all clean install
plumed_compiled := $(wildcard ../src/lib/plumed)
ifdef python_bin
all:
@echo Building python interface for PLUMED
unset CXX && unset CC && unset CFLAGS && unset CXXFLAGS && unset LDSHARED && \
plumed_program_name=plumed \
plumed_force_cython=yes \
plumed_version=$(VERSION) \
plumed_include_dir=../src/wrapper \
plumed_default_kernel="$$PWD/../src/lib/libplumedKernel.$(SOEXT)" \
$(python_bin) setup.py build_ext -i
else
all:
@echo Python support was not configure
endif
pip:
cp ../VERSION .
mkdir -p include
cp ../src/wrapper/Plumed.h include/
ifndef python_bin
python_bin=python
endif
.PHONY: pypi
pypi:
mkdir -p pypi
mkdir -p pypi/include
cp -r test pypi/
cp ../src/wrapper/Plumed.h pypi/include/
cp README.rst MANIFEST.in cplumed.pxd plumed.pyx setup.py ../VERSION pypi/
cd pypi ; plumed_language_level=2 $(python_bin) setup.py sdist
echo "now use: $(python_bin) -m twine upload dist/plumed-$(VERSION).tar.gz"
clean:
rm -fr *.so plumed.cpp build Plumed.h VERSION pypi test/logfile test/bck* pypi include