diff --git a/config/compiler.gfortran.mk b/config/compiler.gfortran.mk index 2bf9e41..007a335 100644 --- a/config/compiler.gfortran.mk +++ b/config/compiler.gfortran.mk @@ -27,14 +27,15 @@ CPPFLAGS += -DCOMPILER_G95 FFLAGS = -g -cpp -fconvert=big-endian -O2 -fno-range-check -fallow-argument-mismatch F90FLAGS = $(FFLAGS) -ffree-line-length-none LFLAGS = -ifeq ($(GC),YES) -LFLAGS += -nostartfiles -Wno-main -endif ifeq ($(MP),YES) FFLAGS += -fopenmp F90FLAGS += -fopenmp LFLAGS += -fopenmp endif +CTM_LFLAGS = $(LFLAGS) +ifeq ($(GC),YES) +CTM_LFLAGS += -nostartfiles -Wno-main +endif F90_VERSION = $(shell $(F90) --version | head -1) diff --git a/config/compiler.intel.mk b/config/compiler.intel.mk index 1c312a2..9f1fde9 100644 --- a/config/compiler.intel.mk +++ b/config/compiler.intel.mk @@ -7,9 +7,6 @@ CMP_MOD = $(SCRIPTS_DIR)/compare_module_file.pl -compiler INTEL-ifort-9-0-on-LIN FFLAGS = -fpp -O2 -ftz -convert big_endian F90FLAGS = $(FFLAGS) -free LFLAGS = -O2 -ftz -ifeq ($(GC),YES) -LFLAGS += -nostartfiles -nofor-main -endif CPPFLAGS += -DCOMPILER_Intel8 -DCONVERT_BIGENDIAN F90_VERSION = $(shell $(F90) --version 2>&1) ifeq ($(MP),YES) @@ -17,6 +14,10 @@ FFLAGS += -qopenmp F90FLAGS += -qopenmp LFLAGS += -qopenmp endif +CTM_FLAGS = $(LFLAGS) +ifeq ($(GC),YES) +CTM_LFLAGS += -nostartfiles -nofor-main +endif R8 = -r8 EXTENDED_SOURCE = -extend_source diff --git a/decks/Makefile b/decks/Makefile index bd36547..4d2791a 100644 --- a/decks/Makefile +++ b/decks/Makefile @@ -139,7 +139,7 @@ ifeq ($(GC),YES) -DCMAKE_CXX_COMPILER="$(CXX)" \ -DCMAKE_Fortran_COMPILER="$(F90)" \ -DCMAKE_Fortran_FLAGS="$(F90FLAGS)" \ - -DCMAKE_EXE_LINKER_FLAGS="$(LFLAGS)" + -DCMAKE_EXE_LINKER_FLAGS="$(CTM_LFLAGS)" cd $(GC_BUILD_DIR) && make -j install cp $(GC_BUILD_DIR)/mod/*.mod $(MODEL_DIR)/mod/ cp $(GC_BUILD_DIR)/src/HEMCO/mod/*.mod $(MODEL_DIR)/mod/