1 # Set here the Fortran77 compiler and the desired optimization options
5 FOPT_INTEL
= -O
-f77rtl
-mp
-pc80
-prec_div
-tpp7
7 FOPT_PGF
= -O
-fast
-pc
80 -Kieee
9 FOPT_GNU
= -O
-Wall
-Wimplicit
-ffast
-math
-funroll
-loops \
10 -malign
-double -ffortran
-bounds
-check
14 FC
= $
(FC_$
(COMPILER
))
15 FOPT
= $
(FOPT_$
(COMPILER
))
17 # Mathematical libraries
: blas and lapack
18 # MATHLIB
= -L
/usr
/local
/lib
-llapack_g77
-L
/usr
/lib
-lblas_g77
19 MATHLIB
= -llapack
-lblas
21 #
To create Matlab mex gateway routines
22 # Note
: use $
(FC
) as the mex Fortran compiler
25 HEADERS
= KPP_ROOT_Global
.h KPP_ROOT_Parameters
.h KPP_ROOT_Sparse
.h
27 SPSRC
= KPP_ROOT_JacobianSP
.f \
28 KPP_ROOT_HessianSP
.f \
29 KPP_ROOT_StoichiomSP
.f
31 SPOBJ
= KPP_ROOT_JacobianSP
.o \
32 KPP_ROOT_HessianSP
.o \
33 KPP_ROOT_StoichiomSP
.o
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 \
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 \
52 exe
: $
(HEADERS
) $
(SPOBJ
) $
(OBJ
)
53 $
(FC
) $
(FOPT
) $
(SPOBJ
) $
(OBJ
) $
(MATHLIB
) -o KPP_ROOT
.exe
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
)
61 rm
-f $
(SPOBJ
) $
(OBJ
) KPP_ROOT
.exe KPP_ROOT
.map \
65 rm
-f $
(SPOBJ
) $
(OBJ
) KPP_ROOT
.exe KPP_ROOT
.map \
66 KPP_ROOT
.dat KPP_ROOT*
.f KPP_ROOT*
.h
68 KPP_ROOT_Monitor
.o
: KPP_ROOT_Monitor
.f $
(HEADERS
)
71 KPP_ROOT_JacobianSP
.o
: KPP_ROOT_JacobianSP
.f $
(HEADERS
)
74 KPP_ROOT_HessianSP
.o
: KPP_ROOT_HessianSP
.f $
(HEADERS
)
77 KPP_ROOT_StoichiomSP
.o
: KPP_ROOT_StoichiomSP
.f $
(HEADERS
)
80 KPP_ROOT_Main
.o
: KPP_ROOT_Main
.f KPP_ROOT_Initialize
.o $
(HEADERS
) $
(SPOBJ
)
83 KPP_ROOT_Integrator
.o
: KPP_ROOT_Integrator
.f $
(HEADERS
) $
(SPOBJ
)
86 KPP_ROOT_Initialize
.o
: KPP_ROOT_Initialize
.f $
(HEADERS
) $
(SPOBJ
)
89 KPP_ROOT_Function
.o
: KPP_ROOT_Function
.f $
(HEADERS
) $
(SPOBJ
)
92 KPP_ROOT_Jacobian
.o
: KPP_ROOT_Jacobian
.f $
(HEADERS
) $
(SPOBJ
)
95 KPP_ROOT_LinearAlgebra
.o
: KPP_ROOT_LinearAlgebra
.f $
(HEADERS
) $
(SPOBJ
)
98 KPP_ROOT_Rates
.o
: KPP_ROOT_Rates
.f $
(HEADERS
) $
(SPOBJ
)
101 KPP_ROOT_Hessian
.o
: KPP_ROOT_Hessian
.f $
(HEADERS
) $
(SPOBJ
)
104 KPP_ROOT_Stoichiom
.o
: KPP_ROOT_Stoichiom
.f $
(HEADERS
) $
(SPOBJ
)
107 KPP_ROOT_Util
.o
: KPP_ROOT_Util
.f $
(HEADERS
) $
(SPOBJ
)