27 lines
759 B
Makefile
27 lines
759 B
Makefile
|
COMP=gfortran
|
||
|
OPTS := -g -Wall -Wextra -Warray-temporaries -Wconversion -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
|
||
|
OPTs :=
|
||
|
|
||
|
objects_src := phagen_scf.f
|
||
|
objects := $(patsubst %.f,%.o, $(objects_src))
|
||
|
|
||
|
|
||
|
.PHONY: clean
|
||
|
|
||
|
all: pybinding clean
|
||
|
|
||
|
pybinding: $(objects) main.f
|
||
|
@echo "building Python binding..."
|
||
|
f2py3 -I. $(objects) -c -m libphagen main.f
|
||
|
#f2py3 -I. $(objects) --debug-capi --debug -c -m libphagen main.f
|
||
|
cp libphagen.cpython*.so ../
|
||
|
|
||
|
$(objects): $(objects_src)
|
||
|
@echo "compiling subroutines and functions..."
|
||
|
$(COMP) $(OPTS) -fPIC -c $^
|
||
|
|
||
|
clean:
|
||
|
@echo "cleaning..."
|
||
|
rm -rf *.so *.o *.mod
|
||
|
|