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

Last change on this file since 1410 was 1165, checked in by lfita, 8 years ago

Fixing compilation of the interpolation functions and Fortran routines

File size: 2.1 KB
Line 
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
4
5# FOLLOWING: http://stackoverflow.com/questions/17156125/f2py-exposing-parameters-from-used-modules
6# FOLLOWING: http://osdir.com/ml/python.f2py.user/2006-08/msg00019.html
7# module load python/2.7.6-canopy-1.3
8# Diagnostics compilation _______
9# f2py -m module_ForDiag -h module_ForDiag.pyf module_generic.F90 module_ForDiagnosticsVars.F90 module_ForDiagnostics.F90 >& run_f2py_ForDiag_wrapper.log
10# make
11# f2py -L/opt/canopy-1.3.0/Canopy_64bit/System/lib/ -L/usr/lib64/ -L/opt/canopy-1.3.0/Canopy_64bit/System/lib/ -m module_ForDiag -c --fcompiler=gnu95 module_ForDiag.pyf module_generic.F90 module_ForDiagnosticsVars.F90 module_ForDiagnostics.F90 >& run_f2py_ForDiag_compile.log
12# Interpolation compilation _______
13# f2py -m module_ForInt -h module_ForInt.pyf module_generic.F90 module_ForInterpolate.F90  >& run_f2py_ForInt_wrapper.log
14# f2py -L/opt/canopy-1.3.0/Canopy_64bit/System/lib/ -L/usr/lib64/ -L/opt/canopy-1.3.0/Canopy_64bit/System/lib/ -m module_ForInt -c --fcompiler=gnu95 module_ForInt.pyf module_generic.F90 module_ForInterpolate.F90  >& run_f2py_ForInt_compile.log
15#
16
17FC              = gfortran
18FCFLAGS         = -c -fPIC
19LIB_INC         = -L/opt/canopy-1.3.0/Canopy_64bit/System/lib/ -L/usr/lib64/ -L/opt/canopy-1.3.0/Canopy_64bit/System/lib/
20RM              = rm -f
21NCFOLD          = /usr
22LIB_NETCDF      = -L$(NCFOLD)/lib -lnetcdff -lnetcdf -I$(NCFOLD)/include
23
24####### ###### ##### #### ### ## #
25
26MODULES = \
27        module_generic.o
28
29all : \
30        interpolate.o \
31        module_ForDiagnostics.o
32
33diags : \
34        module_ForDiagnostics.o
35clean :
36        $(RM) *.mod *.o interpolate
37
38########    #######
39##
40    ########
41
42module_generic.o:
43        $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_generic.F90
44
45module_ForDiagnosticsVars.o: module_generic.o
46        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.F90
47
48module_ForDiagnostics.o: module_generic.o module_ForDiagnosticsVars.o
49        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.F90
50
51FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC)
52
53interpolate.o: module_generic.o
54        $(FC) $(FCEXECFLAGS) interpolate.F90 -o interpolate
55
56
Note: See TracBrowser for help on using the repository browser.