[2696] | 1 | # Set here the Fortran77 compiler and the desired optimization options |
---|
| 2 | COMPILER = GNU |
---|
| 3 | |
---|
| 4 | FC_INTEL = ifort |
---|
| 5 | FOPT_INTEL = -O -f77rtl -mp -pc80 -prec_div -tpp7 |
---|
| 6 | FC_PGF = pgf77 |
---|
| 7 | FOPT_PGF = -O -fast -pc 80 -Kieee |
---|
| 8 | FC_GNU = g77 |
---|
| 9 | FOPT_GNU = -O -Wall -Wimplicit -ffast-math -funroll-loops \ |
---|
| 10 | -malign-double -ffortran-bounds-check |
---|
| 11 | FC_HPUX = f90 |
---|
| 12 | FOPT_HPUX = -O |
---|
| 13 | |
---|
| 14 | FC = $(FC_$(COMPILER)) |
---|
| 15 | FOPT = $(FOPT_$(COMPILER)) |
---|
| 16 | |
---|
| 17 | # Mathematical libraries: blas and lapack |
---|
| 18 | # MATHLIB = -L/usr/local/lib -llapack_g77 -L/usr/lib -lblas_g77 |
---|
| 19 | MATHLIB = -llapack -lblas |
---|
| 20 | |
---|
| 21 | # To create Matlab mex gateway routines |
---|
| 22 | # Note: use $(FC) as the mex Fortran compiler |
---|
| 23 | MEX = mex |
---|
| 24 | |
---|
| 25 | HEADERS = KPP_ROOT_Global.h KPP_ROOT_Parameters.h KPP_ROOT_Sparse.h |
---|
| 26 | |
---|
| 27 | SPSRC = KPP_ROOT_JacobianSP.f \ |
---|
| 28 | KPP_ROOT_HessianSP.f \ |
---|
| 29 | KPP_ROOT_StoichiomSP.f |
---|
| 30 | |
---|
| 31 | SPOBJ = KPP_ROOT_JacobianSP.o \ |
---|
| 32 | KPP_ROOT_HessianSP.o \ |
---|
| 33 | KPP_ROOT_StoichiomSP.o |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | SRC = KPP_ROOT_Main.f KPP_ROOT_Integrator.f \ |
---|
| 37 | KPP_ROOT_Function.f KPP_ROOT_Initialize.f \ |
---|
| 38 | KPP_ROOT_Jacobian.f KPP_ROOT_LinearAlgebra.f\ |
---|
| 39 | KPP_ROOT_Rates.f KPP_ROOT_Hessian.f \ |
---|
| 40 | KPP_ROOT_Stoichiom.f KPP_ROOT_Util.f \ |
---|
| 41 | KPP_ROOT_Monitor.f |
---|
| 42 | |
---|
| 43 | OBJ = KPP_ROOT_Main.o KPP_ROOT_Integrator.o \ |
---|
| 44 | KPP_ROOT_Function.o KPP_ROOT_Initialize.o \ |
---|
| 45 | KPP_ROOT_Jacobian.o KPP_ROOT_LinearAlgebra.o\ |
---|
| 46 | KPP_ROOT_Rates.o KPP_ROOT_Hessian.o \ |
---|
| 47 | KPP_ROOT_Stoichiom.o KPP_ROOT_Util.o \ |
---|
| 48 | KPP_ROOT_Monitor.o |
---|
| 49 | |
---|
| 50 | all: exe mex |
---|
| 51 | |
---|
| 52 | exe: $(HEADERS) $(SPOBJ) $(OBJ) |
---|
| 53 | $(FC) $(FOPT) $(SPOBJ) $(OBJ) $(MATHLIB) -o KPP_ROOT.exe |
---|
| 54 | |
---|
| 55 | mex: $(HEADERS) $(SPOBJ) $(OBJ) |
---|
| 56 | $(MEX) FC#$(FC) -fortran -O KPP_ROOT_mex_Fun.f $(SPOBJ) $(OBJ) |
---|
| 57 | $(MEX) FC#$(FC) -fortran -O KPP_ROOT_mex_Jac_SP.f $(SPOBJ) $(OBJ) |
---|
| 58 | $(MEX) FC#$(FC) -fortran -O KPP_ROOT_mex_Hessian.f $(SPOBJ) $(OBJ) |
---|
| 59 | |
---|
| 60 | clean: |
---|
| 61 | rm -f $(SPOBJ) $(OBJ) KPP_ROOT.exe KPP_ROOT.map \ |
---|
| 62 | KPP_ROOT.dat |
---|
| 63 | |
---|
| 64 | distclean: |
---|
| 65 | rm -f $(SPOBJ) $(OBJ) KPP_ROOT.exe KPP_ROOT.map \ |
---|
| 66 | KPP_ROOT.dat KPP_ROOT*.f KPP_ROOT*.h |
---|
| 67 | |
---|
| 68 | KPP_ROOT_Monitor.o: KPP_ROOT_Monitor.f $(HEADERS) |
---|
| 69 | $(FC) $(FOPT) -c $< |
---|
| 70 | |
---|
| 71 | KPP_ROOT_JacobianSP.o: KPP_ROOT_JacobianSP.f $(HEADERS) |
---|
| 72 | $(FC) $(FOPT) -c $< |
---|
| 73 | |
---|
| 74 | KPP_ROOT_HessianSP.o: KPP_ROOT_HessianSP.f $(HEADERS) |
---|
| 75 | $(FC) $(FOPT) -c $< |
---|
| 76 | |
---|
| 77 | KPP_ROOT_StoichiomSP.o: KPP_ROOT_StoichiomSP.f $(HEADERS) |
---|
| 78 | $(FC) $(FOPT) -c $< |
---|
| 79 | |
---|
| 80 | KPP_ROOT_Main.o: KPP_ROOT_Main.f KPP_ROOT_Initialize.o $(HEADERS) $(SPOBJ) |
---|
| 81 | $(FC) $(FOPT) -c $< |
---|
| 82 | |
---|
| 83 | KPP_ROOT_Integrator.o: KPP_ROOT_Integrator.f $(HEADERS) $(SPOBJ) |
---|
| 84 | $(FC) $(FOPT) -c $< |
---|
| 85 | |
---|
| 86 | KPP_ROOT_Initialize.o: KPP_ROOT_Initialize.f $(HEADERS) $(SPOBJ) |
---|
| 87 | $(FC) $(FOPT) -c $< |
---|
| 88 | |
---|
| 89 | KPP_ROOT_Function.o: KPP_ROOT_Function.f $(HEADERS) $(SPOBJ) |
---|
| 90 | $(FC) $(FOPT) -c $< |
---|
| 91 | |
---|
| 92 | KPP_ROOT_Jacobian.o: KPP_ROOT_Jacobian.f $(HEADERS) $(SPOBJ) |
---|
| 93 | $(FC) $(FOPT) -c $< |
---|
| 94 | |
---|
| 95 | KPP_ROOT_LinearAlgebra.o: KPP_ROOT_LinearAlgebra.f $(HEADERS) $(SPOBJ) |
---|
| 96 | $(FC) $(FOPT) -c $< |
---|
| 97 | |
---|
| 98 | KPP_ROOT_Rates.o: KPP_ROOT_Rates.f $(HEADERS) $(SPOBJ) |
---|
| 99 | $(FC) $(FOPT) -c $< |
---|
| 100 | |
---|
| 101 | KPP_ROOT_Hessian.o: KPP_ROOT_Hessian.f $(HEADERS) $(SPOBJ) |
---|
| 102 | $(FC) $(FOPT) -c $< |
---|
| 103 | |
---|
| 104 | KPP_ROOT_Stoichiom.o: KPP_ROOT_Stoichiom.f $(HEADERS) $(SPOBJ) |
---|
| 105 | $(FC) $(FOPT) -c $< |
---|
| 106 | |
---|
| 107 | KPP_ROOT_Util.o: KPP_ROOT_Util.f $(HEADERS) $(SPOBJ) |
---|
| 108 | $(FC) $(FOPT) -c $< |
---|
| 109 | |
---|