2018-04-27 15:18:22 +02:00
|
|
|
PYTHON=python2
|
2011-12-19 14:24:52 +01:00
|
|
|
PYVERSION=$(shell $(PYTHON) -c "import sys; print(sys.version[:3])")
|
2013-10-03 11:20:58 +02:00
|
|
|
HAS_CYTHON=$(shell bash -c "which cython &> /dev/null && echo 1 || echo 0")
|
2012-07-31 14:24:52 +02:00
|
|
|
ifneq ($(HAS_CYTHON),0)
|
2012-06-04 17:10:23 +02:00
|
|
|
|
2013-12-11 14:49:02 +01:00
|
|
|
../bin/irpf90: irpf90.so
|
|
|
|
rm ../bin/irpf90 ; cd ../bin ; ln -s ../src/irpf90_python.exe irpf90
|
2011-12-19 14:24:52 +01:00
|
|
|
|
2012-05-15 18:01:27 +02:00
|
|
|
irpf90.so : $(wildcard *.py) irpf90.c
|
2011-11-28 22:12:45 +01:00
|
|
|
./cython_setup.py build_ext --inplace
|
|
|
|
|
2011-12-19 14:24:52 +01:00
|
|
|
irpf90.c: irpf90.py
|
|
|
|
cython --embed irpf90.py
|
|
|
|
|
2012-07-31 14:24:52 +02:00
|
|
|
else
|
|
|
|
../bin/irpf90: irpf90_python.exe
|
|
|
|
rm ../bin/irpf90 ; cd ../bin ; ln -s ../src/irpf90_python.exe irpf90
|
2012-06-04 17:10:23 +02:00
|
|
|
endif
|
|
|
|
|
2011-11-28 22:12:45 +01:00
|
|
|
clean:
|
2012-06-04 17:11:10 +02:00
|
|
|
rm -f *.c *.so *.pyc *.pyo 2>/dev/null
|