source: lmdz_wrf/trunk/tools/Makefile.llamp @ 2151

Last change on this file since 2151 was 1933, checked in by lfita, 6 years ago

Right version of Makefiles

File size: 3.8 KB
Line 
1# L. Fita, LMD. January 2017
2# Compilation of all required Fortran modules in `llamp' (debian 9) with gcc compilers
3# A following python 'library' creation is required
4## Compilation
5# make >& run_make.log
6
7FC              = gfortran
8FCF     = -c
9LIB_INC =
10RM              = rm -f
11F2PY    = /usr/bin/f2py
12F2PYF   =
13DBGFLAGS = -g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
14NCLIBFOLD       = /usr/lib/x86_64-linux-gnu
15NCINCFOLD       = /usr/include
16LIB_NETCDF      = -L$(NCLIBFOLD) -lnetcdff -lnetcdf -I$(NCINCFOLD)
17
18FCFLAGS = $(FCF) $(DBGFLAGS)
19
20# Sources for f2py
21srcs = module_definitions.f90 module_basic.f90 module_generic.f90 module_scientific.f90
22distrisrcs = $(srcs) module_DistriCorrection.f90
23diagsrcs = $(srcs) module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90
24intsrcs = $(srcs) module_ForInterpolate.f90
25scisrcs = $(srcs)
26defsrcs = module_definitions.f90
27
28####### ###### ##### #### ### ## #
29
30MODULES = \
31        module_definitions.o \
32        module_basic.o \
33        module_generic.o \
34        module_NCgeneric.o \
35        module_scientific.o \
36        module_ForInterpolate.o \
37        module_ForDiagnosticsVars.o \
38        module_ForDiagnostics.o \
39        module_DistriCorrection.o
40
41FINTMODULES = \
42        module_definitions.o \
43        module_basic.o \
44        module_generic.o \
45        module_scientific.o \
46        module_ForInterpolate.o
47
48all : \
49        module_ForDiagnostics.o \
50        interpolate.o \
51        DistriCorrection.o \
52        pydistrimods.o \
53        pydiagmods.o \
54        pyintmods.o \
55        pyscimods.o \
56        pydefmods.o \
57        trajectories_overlap.o
58
59diags : \
60        module_ForDiagnostics.o
61
62clean :
63        $(RM) *.mod *.o interpolate module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so module_ForSci.so module_ForDef.so
64
65########    #######
66##
67    ########
68
69module_definitions.o:
70        $(FC) $(FCFLAGS) module_definitions.f90
71
72module_basic.o: module_definitions.o
73        $(FC) $(FCFLAGS) module_basic.f90
74
75module_generic.o: module_definitions.o module_basic.o
76        $(FC) $(FCFLAGS) $(LIB_INC) module_generic.f90
77
78module_NCgeneric.o: module_definitions.o module_basic.o module_generic.o
79        $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_NCgeneric.f90
80
81module_scientific.o: module_definitions.o module_basic.o module_generic.o
82        $(FC) $(FCFLAGS) module_scientific.f90
83
84module_ForInterpolate.o: module_definitions.o module_generic.o
85        $(FC) $(FCFLAGS) $(LIB_INC) module_ForInterpolate.f90
86
87module_ForDiagnosticsVars.o: module_definitions.o module_basic.o module_generic.o
88        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.f90
89
90module_ForDiagnostics.o: module_definitions.o module_basic.o module_generic.o module_ForDiagnosticsVars.o
91        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.f90
92
93module_DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_scientific.o
94        $(FC) $(FCFLAGS) module_DistriCorrection.f90
95
96FCEXEFINTCFLAGS = $(FINTMODULES) $(LIB_NETCDF) $(LIB_INC)
97FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC)
98
99interpolate.o: module_definitions.o module_basic.o module_generic.o module_scientific.o module_ForInterpolate.o
100        $(FC) $(FCEXEFINTCFLAGS) interpolate.f90 -o interpolate
101
102DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o module_DistriCorrection.o
103        $(FC) $(FCEXECFLAGS) DistriCorrection.f90 -o DistriCorrection
104
105pydistrimods.o:
106        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForDistriCorrect $(distrisrcs) -L$(NCLIBFOLD)
107
108pydiagmods.o:
109        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForDiag $(diagsrcs) -L$(NCLIBFOLD)
110
111pyintmods.o:
112        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForInt $(intsrcs) -L$(NCLIBFOLD)
113
114pyscimods.o:
115        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForSci $(scisrcs) -L$(NCLIBFOLD)
116
117pydefmods.o:
118        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForDef $(defsrcs) -L$(NCLIBFOLD)
119
120trajectories_overlap.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o
121        $(FC) $(FCEXECFLAGS) trajectories_overlap.f90 -o trajectories_overlap
122
Note: See TracBrowser for help on using the repository browser.