1 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
2 | # User: Set here the F90 compiler and options |
---|
3 | # Pedefined compilers: INTEL, PGF, HPUX, LAHEY |
---|
4 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
5 | |
---|
6 | #COMPILER = G95 |
---|
7 | #COMPILER = LAHEY |
---|
8 | COMPILER = INTEL |
---|
9 | #COMPILER = PGF |
---|
10 | #COMPILER = HPUX |
---|
11 | #COMPILER = GFORTRAN |
---|
12 | |
---|
13 | FC_G95 = g95 |
---|
14 | FOPT_G95 = -cpp -O -pg -fbounds-check -fimplicit-none -Wall -ftrace=full |
---|
15 | |
---|
16 | FC_LAHEY = lf95 |
---|
17 | # More aggressive for production runs: |
---|
18 | #FOPT_LAHEY = -Cpp --pca -O |
---|
19 | # More checking for debugging: |
---|
20 | FOPT_LAHEY = -Cpp --chk a,e,s,u --pca --ap -O0 -g --trap --trace --chkglobal |
---|
21 | |
---|
22 | FC_INTEL = ifort |
---|
23 | # More aggressive for production runs: |
---|
24 | FOPT_INTEL = -cpp -O -fp-model precise -pc80 -prec_div |
---|
25 | # More checking for debugging: |
---|
26 | #FOPT_INTEL = -cpp -O0 -fp-model strict -implicitnone -ftrapuv \ |
---|
27 | # -debug all -check all -warn all |
---|
28 | |
---|
29 | FC_PGF = pgf90 |
---|
30 | # More aggressive for production runs: |
---|
31 | FOPT_PGF = -Mpreprocess -O -fast -pc 80 -Kieee |
---|
32 | # More checking for debugging: |
---|
33 | #FOPT_PGF = -Mpreprocess -O0 -Mbounds -Mchkfpstk -Mchkptr -Mchkstk \ |
---|
34 | # -Ktrap=fp -pc 80 -Kieee |
---|
35 | |
---|
36 | FC_HPUX = f90 |
---|
37 | FOPT_HPUX = -O -u +Oall +check=on |
---|
38 | |
---|
39 | FC_GFORTRAN = gfortran |
---|
40 | FOPT_GFORTRAN = -cpp -O |
---|
41 | |
---|
42 | # define FULL_ALGEBRA for non-sparse integration |
---|
43 | FC = $(FC_$(COMPILER)) |
---|
44 | FOPT = $(FOPT_$(COMPILER)) # -DFULL_ALGEBRA |
---|
45 | |
---|
46 | LIBS = |
---|
47 | #LIBS = -llapack -lblas |
---|
48 | |
---|
49 | # Command to create Matlab mex gateway routines |
---|
50 | # Note: use $(FC) as the mex Fortran compiler |
---|
51 | MEX = mex |
---|
52 | |
---|
53 | GENSRC = saprc_f90_Precision.f90 \ |
---|
54 | saprc_f90_Parameters.f90 \ |
---|
55 | saprc_f90_Global.f90 |
---|
56 | |
---|
57 | GENOBJ = saprc_f90_Precision.o \ |
---|
58 | saprc_f90_Parameters.o \ |
---|
59 | saprc_f90_Global.o |
---|
60 | |
---|
61 | FUNSRC = saprc_f90_Function.f90 |
---|
62 | FUNOBJ = saprc_f90_Function.o |
---|
63 | |
---|
64 | JACSRC = saprc_f90_JacobianSP.f90 saprc_f90_Jacobian.f90 |
---|
65 | JACOBJ = saprc_f90_JacobianSP.o saprc_f90_Jacobian.o |
---|
66 | |
---|
67 | HESSRC = saprc_f90_HessianSP.f90 saprc_f90_Hessian.f90 |
---|
68 | HESOBJ = saprc_f90_HessianSP.o saprc_f90_Hessian.o |
---|
69 | |
---|
70 | STMSRC = saprc_f90_StoichiomSP.f90 saprc_f90_Stoichiom.f90 |
---|
71 | STMOBJ = saprc_f90_StoichiomSP.o saprc_f90_Stoichiom.o |
---|
72 | |
---|
73 | UTLSRC = saprc_f90_Rates.f90 saprc_f90_Util.f90 saprc_f90_Monitor.f90 |
---|
74 | UTLOBJ = saprc_f90_Rates.o saprc_f90_Util.o saprc_f90_Monitor.o |
---|
75 | |
---|
76 | LASRC = saprc_f90_LinearAlgebra.f90 |
---|
77 | LAOBJ = saprc_f90_LinearAlgebra.o |
---|
78 | |
---|
79 | STOCHSRC = saprc_f90_Stochastic.f90 |
---|
80 | STOCHOBJ = saprc_f90_Stochastic.o |
---|
81 | |
---|
82 | MAINSRC = saprc_f90_Main.f90 saprc_f90_Initialize.f90 saprc_f90_Integrator.f90 saprc_f90_Model.f90 |
---|
83 | MAINOBJ = saprc_f90_Main.o saprc_f90_Initialize.o saprc_f90_Integrator.o saprc_f90_Model.o |
---|
84 | |
---|
85 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
86 | # User: modify the line below to include only the |
---|
87 | # objects needed by your application |
---|
88 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
89 | ALLOBJ = $(GENOBJ) $(FUNOBJ) $(JACOBJ) $(HESOBJ) $(STMOBJ) \ |
---|
90 | $(UTLOBJ) $(LAOBJ) |
---|
91 | |
---|
92 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
93 | # User: modify the line below to include only the |
---|
94 | # executables needed by your application |
---|
95 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
96 | all: exe |
---|
97 | |
---|
98 | exe: $(ALLOBJ) $(MAINOBJ) |
---|
99 | $(FC) $(FOPT) $(ALLOBJ) $(MAINOBJ) $(LIBS) -o saprc_f90.exe |
---|
100 | |
---|
101 | stochastic:$(ALLOBJ) $(STOCHOBJ) $(MAINOBJ) |
---|
102 | $(FC) $(FOPT) $(ALLOBJ) $(STOCHOBJ) $(MAINOBJ) $(LIBS) \ |
---|
103 | -o saprc_f90_stochastic.exe |
---|
104 | |
---|
105 | mex: $(ALLOBJ) |
---|
106 | $(MEX) FC#$(FC) -fortran -O saprc_f90_mex_Fun.f90 $(ALLOBJ) |
---|
107 | $(MEX) FC#$(FC) -fortran -O saprc_f90_mex_Jac_SP.f90 $(ALLOBJ) |
---|
108 | $(MEX) FC#$(FC) -fortran -O saprc_f90_mex_Hessian.f90 $(ALLOBJ) |
---|
109 | |
---|
110 | clean: |
---|
111 | rm -f saprc_f90*.o saprc_f90*.mod \ |
---|
112 | saprc_f90*.dat saprc_f90.exe saprc_f90*.mexglx \ |
---|
113 | saprc_f90.map |
---|
114 | |
---|
115 | distclean: |
---|
116 | rm -f saprc_f90*.o saprc_f90*.mod \ |
---|
117 | saprc_f90*.dat saprc_f90.exe saprc_f90.map \ |
---|
118 | saprc_f90*.f90 saprc_f90_*.mexglx |
---|
119 | |
---|
120 | saprc_f90_Precision.o: saprc_f90_Precision.f90 |
---|
121 | $(FC) $(FOPT) -c $< |
---|
122 | |
---|
123 | saprc_f90_Parameters.o: saprc_f90_Parameters.f90 \ |
---|
124 | saprc_f90_Precision.o |
---|
125 | $(FC) $(FOPT) -c $< |
---|
126 | |
---|
127 | saprc_f90_Monitor.o: saprc_f90_Monitor.f90 \ |
---|
128 | saprc_f90_Precision.o |
---|
129 | $(FC) $(FOPT) -c $< |
---|
130 | |
---|
131 | saprc_f90_Global.o: saprc_f90_Global.f90 \ |
---|
132 | saprc_f90_Parameters.o saprc_f90_Precision.o |
---|
133 | $(FC) $(FOPT) -c $< |
---|
134 | |
---|
135 | saprc_f90_Initialize.o: saprc_f90_Initialize.f90 $(GENOBJ) |
---|
136 | $(FC) $(FOPT) -c $< |
---|
137 | |
---|
138 | saprc_f90_Function.o: saprc_f90_Function.f90 $(GENOBJ) |
---|
139 | $(FC) $(FOPT) -c $< |
---|
140 | |
---|
141 | saprc_f90_Stochastic.o: saprc_f90_Stochastic.f90 $(GENOBJ) |
---|
142 | $(FC) $(FOPT) -c $< |
---|
143 | |
---|
144 | saprc_f90_JacobianSP.o: saprc_f90_JacobianSP.f90 $(GENOBJ) |
---|
145 | $(FC) $(FOPT) -c $< |
---|
146 | |
---|
147 | saprc_f90_Jacobian.o: saprc_f90_Jacobian.f90 $(GENOBJ) saprc_f90_JacobianSP.o |
---|
148 | $(FC) $(FOPT) -c $< |
---|
149 | |
---|
150 | saprc_f90_LinearAlgebra.o: saprc_f90_LinearAlgebra.f90 $(GENOBJ) saprc_f90_JacobianSP.o |
---|
151 | $(FC) $(FOPT) -c $< |
---|
152 | |
---|
153 | saprc_f90_Rates.o: saprc_f90_Rates.f90 $(GENOBJ) |
---|
154 | $(FC) $(FOPT) -c $< |
---|
155 | |
---|
156 | saprc_f90_HessianSP.o: saprc_f90_HessianSP.f90 $(GENOBJ) |
---|
157 | $(FC) $(FOPT) -c $< |
---|
158 | |
---|
159 | saprc_f90_Hessian.o: saprc_f90_Hessian.f90 $(GENOBJ) saprc_f90_HessianSP.o |
---|
160 | $(FC) $(FOPT) -c $< |
---|
161 | |
---|
162 | saprc_f90_StoichiomSP.o: saprc_f90_StoichiomSP.f90 $(GENOBJ) |
---|
163 | $(FC) $(FOPT) -c $< |
---|
164 | |
---|
165 | saprc_f90_Stoichiom.o: saprc_f90_Stoichiom.f90 $(GENOBJ) saprc_f90_StoichiomSP.o |
---|
166 | $(FC) $(FOPT) -c $< |
---|
167 | |
---|
168 | saprc_f90_Util.o: saprc_f90_Util.f90 $(GENOBJ) saprc_f90_Monitor.o |
---|
169 | $(FC) $(FOPT) -c $< |
---|
170 | |
---|
171 | saprc_f90_Main.o: saprc_f90_Main.f90 $(ALLOBJ) saprc_f90_Initialize.o saprc_f90_Model.o saprc_f90_Integrator.o |
---|
172 | $(FC) $(FOPT) -c $< |
---|
173 | |
---|
174 | saprc_f90_Model.o: saprc_f90_Model.f90 $(ALLOBJ) saprc_f90_Integrator.o |
---|
175 | $(FC) $(FOPT) -c $< |
---|
176 | |
---|
177 | saprc_f90_Integrator.o: saprc_f90_Integrator.f90 $(ALLOBJ) |
---|
178 | $(FC) $(FOPT) -c $< |
---|