source: lmdz_wrf/trunk/tools/Makefile.ciclad.gcc @ 2010

Last change on this file since 2010 was 1824, checked in by lfita, 7 years ago

Updating Makefiles

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