Skip to content
Snippets Groups Projects
Commit f6e89d57 authored by kamischi's avatar kamischi
Browse files

Update Makefile

add coverage option and cleanup
parent 9d1d011e
No related branches found
No related tags found
No related merge requests found
.SUFFIXES: .c .f90 .F90 .o
.SUFFIXES: .f90 .F90 .o
# fortran compiler
FC = gfortran
# fortran compiler options
# FFLAGS = -O3 -ff2c -gw
FFLAGS = -g -gdwarf-2 -fbounds-check -fcheck=all
FFLAGS = -g -gdwarf-2 -fbounds-check -fcheck=all --coverage
# gfortran version 4.8 does not know -fdiagnostics-color
# safeguard for major version >= 5
GFORTAN_VERSION_GT_5 := $(shell echo `gcc -dumpversion | cut -f1 -d. ` \>= 5 | bc)
......@@ -13,15 +13,11 @@ ifeq "$(GFORTAN_VERSION_GT_5)" "1"
FFLAGS += -fdiagnostics-color=auto
endif
# Stuff for the python modules
# Python3 and its numpy must be installed.
PYTHON3 = python3
# implicit rules for compiling fortran files
%.o: %.f90 ; $(FC) $(FFLAGS) -c $<
%_mod.mod: %.f90 ; $(FC) $(FFLAGS) -c $<
all: boson eels eels-boson pylibs
all: boson eels eels-boson
bosonmods = sicot_mod.mod sintr_mod.mod rcffi_mod.mod
doboson.o: doboson.f90 $(bosonmods)
......@@ -48,14 +44,6 @@ eels: eels.f90 change_working_dir.o $(eelssubs) $(eelsmods)
eels-boson: eels-boson.f90 change_working_dir.o $(eelssubs) $(eelsmods) $(bosonsubs) $(bosonmods)
$(FC) $(FFLAGS) -o eels-boson eels-boson.f90 change_working_dir.o $(eelssubs) $(bosonsubs)
pylibs: doeels-py doboson-py
doeels-py: doeels.f90 quanc8.f90 surlos.f90 fint1.f90 fint2.f90 fint3.f90 queels.f90 phint.f90 qrat.f90 usurlo.f90
$(PYTHON3) -m numpy.f2py -c seteps.f90 doeels.f90 quanc8.f90 surlos.f90 fint1.f90 fint2.f90 fint3.f90 queels.f90 phint.f90 qrat.f90 usurlo.f90 -m doeels
doboson-py: doboson.f90 sicot.f90 sintr.f90 rcffi.f90 respon.f90 o1.f90 o2.f90
$(PYTHON3) -m numpy.f2py -c o1.f90 o2.f90 sintr.f90 rcffi.f90 respon.f90 sicot.f90 doboson.f90 -m doboson
clean:
rm -f *.o
rm -rf *.dSYM
......@@ -65,5 +53,5 @@ clean:
rm -f eelsf90 eelsf90.exe
rm -f eels-boson eels-boson.exe
.PHONY: all clean pylibs
.PHONY: all clean
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment