Skip to content
Snippets Groups Projects
Makefile 1.24 KiB
Newer Older
# 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)


all:
	@echo Building python interface for PLUMED 
	unset CXX && unset CC && unset CFLAGS && unset CXXFLAGS && unset LDSHARED && \
          plumed_program_name=plumed \
          plumed_version=$(VERSION) \
          plumed_include_dir=../src/wrapper \
          plumed_default_kernel="$$PWD/../src/lib/libplumedKernel.$(SOEXT)" \
          $(python_bin) setup.py build_ext -i
	@echo Python support was not configure
pip:
	cp ../VERSION .
	mkdir -p include
	cp ../src/wrapper/Plumed.h include/
Giovanni Bussi's avatar
Giovanni Bussi committed
ifndef python_bin
python_bin=python
endif

.PHONY: pypi

pypi:
	mkdir -p pypi
	mkdir -p pypi/include
Giovanni Bussi's avatar
Giovanni Bussi committed
	cp -r test pypi/
	cp ../src/wrapper/Plumed.h pypi/include/
	cp README.rst MANIFEST.in cplumed.pxd plumed.pyx setup.py ../VERSION pypi/
Giovanni Bussi's avatar
Giovanni Bussi committed
	cd pypi ; $(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