source: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp/util/Makefile.f90 @ 4901

Last change on this file since 4901 was 2696, checked in by kanani, 6 years ago

Merge of branch palm4u into trunk

File size: 5.2 KB
Line 
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
8COMPILER = INTEL
9#COMPILER = PGF
10#COMPILER = HPUX
11#COMPILER = GFORTRAN
12
13FC_G95     = g95
14FOPT_G95   = -cpp -O -pg -fbounds-check -fimplicit-none  -Wall -ftrace=full
15
16FC_LAHEY   = lf95
17# More aggressive for production runs:
18#FOPT_LAHEY = -Cpp --pca -O
19# More checking for debugging:
20FOPT_LAHEY = -Cpp --chk a,e,s,u --pca --ap -O0 -g --trap --trace --chkglobal
21
22FC_INTEL   = ifort 
23# More aggressive for production runs:
24#FOPT_INTEL = -cpp -O -fp-model precise -pc80 -prec_div
25# More checking for debugging:
26FOPT_INTEL = -cpp -O0 -fp-model strict -implicitnone -ftrapuv \
27              -debug all -check all -warn all
28
29FC_PGF     = pgf90
30# More aggressive for production runs:
31FOPT_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
36FC_HPUX    = f90
37FOPT_HPUX  = -O -u +Oall +check=on
38
39FC_GFORTRAN     = gfortran
40FOPT_GFORTRAN   = -cpp -O
41
42# define FULL_ALGEBRA for non-sparse integration
43FC   = $(FC_$(COMPILER))
44FOPT = $(FOPT_$(COMPILER)) # -DFULL_ALGEBRA
45
46LIBS =
47#LIBS = -llapack -lblas
48
49# Command to create Matlab mex gateway routines 
50# Note: use $(FC) as the mex Fortran compiler
51MEX  = mex
52
53GENSRC = KPP_ROOT_Precision.f90  \
54         KPP_ROOT_Parameters.f90     \
55         KPP_ROOT_Global.f90 
56
57GENOBJ = KPP_ROOT_Precision.o    \
58         KPP_ROOT_Parameters.o       \
59         KPP_ROOT_Global.o     
60
61FUNSRC = KPP_ROOT_Function.f90 
62FUNOBJ = KPP_ROOT_Function.o 
63
64JACSRC = KPP_ROOT_JacobianSP.f90  KPP_ROOT_Jacobian.f90
65JACOBJ = KPP_ROOT_JacobianSP.o    KPP_ROOT_Jacobian.o
66
67HESSRC = KPP_ROOT_HessianSP.f90   KPP_ROOT_Hessian.f90
68HESOBJ = KPP_ROOT_HessianSP.o     KPP_ROOT_Hessian.o
69
70STMSRC = KPP_ROOT_StoichiomSP.f90 KPP_ROOT_Stoichiom.f90 
71STMOBJ = KPP_ROOT_StoichiomSP.o   KPP_ROOT_Stoichiom.o
72
73UTLSRC = KPP_ROOT_Rates.f90 KPP_ROOT_Util.f90 KPP_ROOT_Monitor.f90
74UTLOBJ = KPP_ROOT_Rates.o   KPP_ROOT_Util.o   KPP_ROOT_Monitor.o
75
76LASRC  = KPP_ROOT_LinearAlgebra.f90 
77LAOBJ  = KPP_ROOT_LinearAlgebra.o   
78
79STOCHSRC = KPP_ROOT_Stochastic.f90 
80STOCHOBJ = KPP_ROOT_Stochastic.o 
81
82MAINSRC = KPP_ROOT_Main.f90   KPP_ROOT_Initialize.f90   KPP_ROOT_Integrator.f90 KPP_ROOT_Model.f90
83MAINOBJ = KPP_ROOT_Main.o     KPP_ROOT_Initialize.o     KPP_ROOT_Integrator.o   KPP_ROOT_Model.o 
84
85#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86# User: modify the line below to include only the
87#       objects needed by your application
88#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89ALLOBJ = $(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#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96all:    exe
97
98exe:    $(ALLOBJ) $(MAINOBJ) 
99        $(FC) $(FOPT) $(ALLOBJ) $(MAINOBJ) $(LIBS) -o KPP_ROOT.exe
100
101stochastic:$(ALLOBJ) $(STOCHOBJ) $(MAINOBJ)
102        $(FC) $(FOPT) $(ALLOBJ) $(STOCHOBJ) $(MAINOBJ) $(LIBS) \
103        -o KPP_ROOT_stochastic.exe
104
105mex:    $(ALLOBJ)
106        $(MEX) FC#$(FC) -fortran -O KPP_ROOT_mex_Fun.f90     $(ALLOBJ)
107        $(MEX) FC#$(FC) -fortran -O KPP_ROOT_mex_Jac_SP.f90  $(ALLOBJ)
108        $(MEX) FC#$(FC) -fortran -O KPP_ROOT_mex_Hessian.f90 $(ALLOBJ)
109
110clean:
111        rm -f KPP_ROOT*.o KPP_ROOT*.mod \
112        KPP_ROOT*.dat KPP_ROOT.exe KPP_ROOT*.mexglx \
113        KPP_ROOT.map
114
115distclean:
116        rm -f KPP_ROOT*.o KPP_ROOT*.mod \
117        KPP_ROOT*.dat KPP_ROOT.exe KPP_ROOT.map \
118        KPP_ROOT*.f90 KPP_ROOT_*.mexglx
119
120KPP_ROOT_Precision.o: KPP_ROOT_Precision.f90 
121        $(FC) $(FOPT) -c $<
122
123KPP_ROOT_Parameters.o: KPP_ROOT_Parameters.f90 \
124                    KPP_ROOT_Precision.o
125        $(FC) $(FOPT) -c $<
126
127KPP_ROOT_Monitor.o: KPP_ROOT_Monitor.f90 \
128                     KPP_ROOT_Precision.o
129        $(FC) $(FOPT) -c $<
130
131KPP_ROOT_Global.o: KPP_ROOT_Global.f90 \
132                    KPP_ROOT_Parameters.o KPP_ROOT_Precision.o
133        $(FC) $(FOPT) -c $<
134
135KPP_ROOT_Initialize.o: KPP_ROOT_Initialize.f90  $(GENOBJ) 
136        $(FC) $(FOPT) -c $<
137
138KPP_ROOT_Function.o: KPP_ROOT_Function.f90  $(GENOBJ) 
139        $(FC) $(FOPT) -c $<
140
141KPP_ROOT_Stochastic.o: KPP_ROOT_Stochastic.f90  $(GENOBJ) 
142        $(FC) $(FOPT) -c $<
143
144KPP_ROOT_JacobianSP.o: KPP_ROOT_JacobianSP.f90 $(GENOBJ)
145        $(FC) $(FOPT) -c $<
146
147KPP_ROOT_Jacobian.o: KPP_ROOT_Jacobian.f90  $(GENOBJ) KPP_ROOT_JacobianSP.o
148        $(FC) $(FOPT) -c $<
149
150KPP_ROOT_LinearAlgebra.o: KPP_ROOT_LinearAlgebra.f90 $(GENOBJ) KPP_ROOT_JacobianSP.o
151        $(FC) $(FOPT) -c $<
152
153KPP_ROOT_Rates.o: KPP_ROOT_Rates.f90  $(GENOBJ) 
154        $(FC) $(FOPT) -c $<
155
156KPP_ROOT_HessianSP.o: KPP_ROOT_HessianSP.f90  $(GENOBJ)
157        $(FC) $(FOPT) -c $<
158
159KPP_ROOT_Hessian.o:  KPP_ROOT_Hessian.f90 $(GENOBJ) KPP_ROOT_HessianSP.o
160        $(FC) $(FOPT) -c $<
161
162KPP_ROOT_StoichiomSP.o: KPP_ROOT_StoichiomSP.f90 $(GENOBJ)
163        $(FC) $(FOPT) -c $<
164
165KPP_ROOT_Stoichiom.o: KPP_ROOT_Stoichiom.f90  $(GENOBJ) KPP_ROOT_StoichiomSP.o
166        $(FC) $(FOPT) -c $<
167
168KPP_ROOT_Util.o: KPP_ROOT_Util.f90  $(GENOBJ) KPP_ROOT_Monitor.o
169        $(FC) $(FOPT) -c $<
170
171KPP_ROOT_Main.o: KPP_ROOT_Main.f90  $(ALLOBJ) KPP_ROOT_Initialize.o KPP_ROOT_Model.o KPP_ROOT_Integrator.o
172        $(FC) $(FOPT) -c $<
173
174KPP_ROOT_Model.o: KPP_ROOT_Model.f90  $(ALLOBJ) KPP_ROOT_Integrator.o
175        $(FC) $(FOPT) -c $<
176
177KPP_ROOT_Integrator.o: KPP_ROOT_Integrator.f90  $(ALLOBJ)
178        $(FC) $(FOPT) -c $<
Note: See TracBrowser for help on using the repository browser.