source: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp/util/Makefile.f @ 2696

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

Merge of branch palm4u into trunk

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