source: CPL/oasis3-mct/branches/OASIS3-MCT_5.0_branch/examples/tutorial_communication/Makefile @ 6331

Last change on this file since 6331 was 6331, checked in by aclsce, 17 months ago

Moved oasis-mct_5.0 in oasis3-mct/branches directory.

File size: 2.5 KB
Line 
1#
2include ../../util/make_dir/make.inc
3LIBPSMILE = $(ARCHDIR)/lib/libpsmile.${CHAN}.a $(ARCHDIR)/lib/libmct.a $(ARCHDIR)/lib/libmpeu.a $(ARCHDIR)/lib/libscrip.a
4#
5##### User configurable options #####
6#
7# CPP keys for type of decomposition for ocean (_M1) and for atmos (_M2)
8# DECOMP_APPLE for 1D decomposition, DECOMP_BOX for 2D decomposition
9CPPKEYDECOMP_M1=DECOMP_APPLE
10CPPKEYDECOMP_M2=DECOMP_APPLE
11#
12### End User configurable options ###
13#
14CPPLOCAL_M1 =  -D${CPPKEYDECOMP_M1}
15CPPLOCAL_M2 = -D${CPPKEYDECOMP_M2}
16#
17OBJ_M1 =  read_grid.o def_parallel_decomposition.o
18OBJ_M2 =  read_grid.o def_parallel_decomposition_m2.o
19#-------------------------------------------------------------------------------
20# General rules
21#-------------------------------------------------------------------------------
22#
23default: all
24#
25all: oasis3_psmile ocean atmos
26#
27# Compile and link libaries
28oasis3_psmile:
29        (cd ../../util/make_dir ; $(MAKE) oasis3_psmile -f TopMakefileOasis3)
30#
31#
32#-------------------------------------------------------------------------------
33# Rules for executables
34#-------------------------------------------------------------------------------
35#
36ocean: $(OBJ_M1) ocean.o $(LIBPSMILE) Makefile
37        $(LD) $(LDFLAGS) -o $@ $(OBJ_M1) ocean.o $(LIBPSMILE) $(FLIBS) $(NETCDF_LIBRARY)
38atmos: $(OBJ_M2) atmos.o $(LIBPSMILE) Makefile
39        $(LD) $(LDFLAGS) -o $@ $(OBJ_M2) atmos.o $(LIBPSMILE) $(FLIBS) $(NETCDF_LIBRARY)
40#
41#-------------------------------------------------------------------------------
42# Rules for compilation
43#-------------------------------------------------------------------------------
44#
45read_grid.o :           read_grid.F90
46                                $(F90) $(F90FLAGS) -c read_grid.F90
47def_parallel_decomposition.o :          def_parallel_decomposition.F90
48                                $(F90) $(F90FLAGS) $(CPPLOCAL_M1) -c def_parallel_decomposition.F90
49def_parallel_decomposition_m2.o :       def_parallel_decomposition.F90
50                                $(F90) $(F90FLAGS) $(CPPLOCAL_M2) -o def_parallel_decomposition_m2.o -c def_parallel_decomposition.F90
51ocean.o :       ocean.F90 Makefile
52                $(F90) $(F90FLAGS) $(CPPLOCAL_M1) -c ocean.F90
53atmos.o :       atmos.F90 Makefile
54                $(F90) $(F90FLAGS) $(CPPLOCAL_M2) -c atmos.F90
55#
56#-------------------------------------------------------------------------------
57# Utilities
58#-------------------------------------------------------------------------------
59#
60help:
61        more Make.help
62#
63# Clean directory
64#
65clean:
66        -rm -f *.o *.mod *.MOD ocean atmos
67        -rm -f i.*.F90 *.L
68        -rm -f core core.*
69#
70# Make sure to recompile everything
71#
72realclean: clean remove
73remove:
74        (cd ../../util/make_dir ; $(MAKE) realclean -f TopMakefileOasis3)
Note: See TracBrowser for help on using the repository browser.