Makefile.config.ecconf.tmpl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. $(info --> Reading configuration from $(lastword $(MAKEFILE_LIST)))
  2. # ============================================================================
  3. # *** Configuration for gimle-intel-scampi
  4. # ============================================================================
  5. COUPLE := [[[PLT:ACTIVE:ECEARTH_SRC_DIR]]]/oasis3-mct
  6. # CHAN : MPI1/MPI2
  7. CHAN := MPI1
  8. # MPI library
  9. MPIDIR := [[[PLT:ACTIVE:MPI_BASE_DIR]]]
  10. ifneq ($(strip $(MPIDIR)),)
  11. MPIBIN := $(MPIDIR)/bin
  12. MPI_INCLUDE := $(MPIDIR)$(addprefix /,[[[PLT:ACTIVE:MPI_INC_SUBDIR]]])
  13. MPILIB := -L$(MPIDIR)$(addprefix /,[[[PLT:ACTIVE:MPI_LIB_SUBDIR]]])
  14. endif
  15. MPILIB += $(addprefix -l,[[[PLT:ACTIVE:MPI_LIBS_WITHOUT_L]]])
  16. # NETCDF library
  17. NETCDF_DIR := [[[PLT:ACTIVE:NETCDF_BASE_DIR]]]
  18. NETCDF_INCLUDE := $(addprefix $(addsuffix /,$(NETCDF_DIR)),[[[PLT:ACTIVE:NETCDF_INC_SUBDIR]]])
  19. NETCDF_LIBRARY := $(addprefix -L,$(addprefix $(addsuffix /,$(NETCDF_DIR)),[[[PLT:ACTIVE:NETCDF_LIB_SUBDIR]]]))
  20. NETCDF_LIBRARY += $(addprefix -l,[[[PLT:ACTIVE:NETCDF_LIBS_WITHOUT_L]]])
  21. # Compiling and other commands
  22. MAKE := [[[PLT:ACTIVE:MAKE]]]
  23. F90 := [[[PLT:ACTIVE:FC]]] [[[PLT:ACTIVE:FFLAGS_FREEFORM]]]
  24. F := [[[PLT:ACTIVE:FC]]] [[[PLT:ACTIVE:FFLAGS_FIXEDFORM]]]
  25. f90 := $(F90)
  26. f := $(F)
  27. CC := [[[PLT:ACTIVE:CC]]]
  28. LD := [[[PLT:ACTIVE:LD]]]
  29. AR := [[[PLT:ACTIVE:AR]]]
  30. ARFLAGS := [[[PLT:ACTIVE:ARFLAGS]]]
  31. # CPP/FPP macros
  32. MACROS := use_libMPI use_comm_$(CHAN) use_netCDF TREAT_OVERLAY
  33. MACROS += [[[PLT:ACTIVE:OASIS_ADD_PPDEFS]]]
  34. # Compiler options
  35. F90FLAGS := [[[PLT:ACTIVE:FFLAGS]]]
  36. F90FLAGS += [[[PLT:ACTIVE:OASIS_ADD_FFLAGS]]]
  37. F90FLAGS += $(addprefix [[[PLT:ACTIVE:FFLAGS_FPP_PREFIX]]],$(MACROS))
  38. F90FLAGS += $(addprefix -I,$(MPI_INCLUDE))
  39. F90FLAGS += $(addprefix -I,$(NETCDF_INCLUDE))
  40. f90FLAGS := $(F90FLAGS)
  41. FFLAGS := $(F90FLAGS)
  42. fFLAGS := $(F90FLAGS)
  43. CCFLAGS := [[[PLT:ACTIVE:CFLAGS]]]
  44. CCFLAGS += $(addprefix [[[PLT:ACTIVE:CFLAGS_CPP_PREFIX]]],$(MACROS))
  45. CCFLAGS := $(addprefix -I,$(MPI_INCLUDE))
  46. CCFLAGS += $(addprefix -I,$(NETCDF_INCLUDE))
  47. LDFLAGS := [[[PLT:ACTIVE:LDFLAGS]]]
  48. LDFLAGS += [[[PLT:ACTIVE:OASIS_ADD_LDFLAGS]]]
  49. # MPP_IOOPT needed for compiling mpp_io
  50. MPP_IOOPT :=