10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-12-21 11:53:32 +01:00
irpf90/src/Makefile

24 lines
501 B
Makefile
Raw Normal View History

2011-12-19 14:24:52 +01:00
PYTHON=python
PYVERSION=$(shell $(PYTHON) -c "import sys; print(sys.version[:3])")
HAS_CYTHON=$(shell which cython &> /dev/null && echo 1 || echo 0)
ifeq ($(HAS_CYTHON),0)
irpf90.exe:
2012-06-04 17:11:10 +02:00
cp -f irpf90_python.exe irpf90.exe
else
2011-12-19 14:24:52 +01:00
irpf90.exe: irpf90.so
2012-05-15 18:01:27 +02:00
gcc build/*/irpf90.o -L/usr/lib64 -lpython$(PYVERSION) -o irpf90.exe
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
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