[5725] | 1 | # Added -ffree-line-length-512 flag to compute Fortran code on |
---|
| 2 | # other systems |
---|
| 3 | |
---|
| 4 | # |
---|
| 5 | # Include file for OASIS3 Makefile for a Linux system using |
---|
| 6 | # Gnu compilers with OpenMPI 4 |
---|
| 7 | # |
---|
| 8 | ############################################################################### |
---|
| 9 | # |
---|
| 10 | # CHAN : communication technique used in OASIS3 (MPI1/MPI2/NONE) |
---|
| 11 | CHAN = MPI1 |
---|
| 12 | # |
---|
| 13 | # Paths for libraries, object files and binaries |
---|
| 14 | # |
---|
| 15 | # COUPLE : path for oasis3-mct main directory |
---|
| 16 | COUPLE = $(HOME)/oasis3-mct |
---|
| 17 | # |
---|
| 18 | # ARCHDIR : directory created when compiling |
---|
| 19 | ARCHDIR = $(COUPLE)/../compile_oa3-mct |
---|
| 20 | # |
---|
| 21 | # MPI library |
---|
| 22 | MPIDIR = /usr/local |
---|
| 23 | MPIBIN = $(MPIDIR)/bin |
---|
| 24 | MPI_INCLUDE = |
---|
| 25 | MPILIB = |
---|
| 26 | MPIRUN = mpirun --oversubscribe |
---|
| 27 | # |
---|
| 28 | # NETCDF library |
---|
| 29 | NETCDF_INCLUDE = /usr/local/include |
---|
| 30 | NETCDF_LIBRARY = -lnetcdff -lnetcdf |
---|
| 31 | # |
---|
| 32 | # Compiling and other commands |
---|
| 33 | MAKE = gmake |
---|
| 34 | F90 = $(MPIBIN)/mpif90 -Wall |
---|
| 35 | F = $(F90) |
---|
| 36 | f90 = $(F90) |
---|
| 37 | f = $(F90) |
---|
| 38 | CC = $(MPIBIN)/mpicc |
---|
| 39 | LD = $(MPIBIN)/mpif90 |
---|
| 40 | DYNOPT = -fPIC |
---|
| 41 | LDDYNOPT = -shared |
---|
| 42 | AR = ar |
---|
| 43 | ARFLAGS = -ruv |
---|
| 44 | # |
---|
| 45 | # CPP keys and compiler options |
---|
| 46 | # |
---|
| 47 | CPPDEF = -Duse_comm_$(CHAN) -D__VERBOSE -DTREAT_OVERLAY |
---|
| 48 | # |
---|
| 49 | # |
---|
| 50 | F90FLAGS_1 = -O2 -ffree-line-length-512 |
---|
| 51 | f90FLAGS_1 = $(F90FLAGS_1) |
---|
| 52 | FFLAGS_1 = $(F90FLAGS_1) |
---|
| 53 | fFLAGS_1 = $(F90FLAGS_1) |
---|
| 54 | CCFLAGS_1 = |
---|
| 55 | LDFLAGS = -O2 |
---|
| 56 | # |
---|
| 57 | ################### |
---|
| 58 | # |
---|
| 59 | # Additional definitions that should not be changed |
---|
| 60 | # |
---|
| 61 | FLIBS = $(NETCDF_LIBRARY) |
---|
| 62 | # BINDIR : directory for executables |
---|
| 63 | BINDIR = $(ARCHDIR)/bin |
---|
| 64 | # LIBBUILD : contains a directory for each library |
---|
| 65 | LIBBUILD = $(ARCHDIR)/build/lib |
---|
| 66 | # LIBBUILDSHARED : contains a directory for each shared library |
---|
| 67 | LIBBUILDSHARED = $(ARCHDIR)/build-shared/lib |
---|
| 68 | # INCPSMILE : includes all *o and *mod for each library |
---|
| 69 | INCPSMILE = -I$(ARCHDIR)/include |
---|
| 70 | |
---|
| 71 | F90FLAGS = $(F90FLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
| 72 | f90FLAGS = $(f90FLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
| 73 | FFLAGS = $(FFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
| 74 | fFLAGS = $(fFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
| 75 | CCFLAGS = $(CCFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
| 76 | # |
---|
| 77 | ############################################################################# |
---|