From 71671b13b069e5c5a66bac820d76915395dd232d Mon Sep 17 00:00:00 2001 From: Nic Hannah Date: Fri, 27 Apr 2018 11:39:50 +1000 Subject: [PATCH] ACCESS-OM build for libaccessom2. https://github.com/OceansAus/access-om2/issues/88 --- bin/mkmf.template.nci | 10 ++++++++++ exp/MOM_compile.csh | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bin/mkmf.template.nci b/bin/mkmf.template.nci index 033dcf6145..2ca4427fb5 100644 --- a/bin/mkmf.template.nci +++ b/bin/mkmf.template.nci @@ -25,6 +25,12 @@ MAKEFLAGS += --jobs=4 INCLUDE = -I$(NETCDF_ROOT)/include +ifneq ($(LIBACCESSOM2_ROOT),) +INCLUDE += -I$(LIBACCESSOM2_ROOT)/build/oasis3-mct-prefix/src/oasis3-mct/Linux/build/lib/psmile.MPI1 \ + -I$(LIBACCESSOM2_ROOT)/build/oasis3-mct-prefix/src/oasis3-mct/Linux/build/lib/mct \ + -I$(LIBACCESSOM2_ROOT)/build/include +endif + ifneq ($(OASIS_ROOT),) INCLUDE += -I$(OASIS_ROOT)/Linux/build/lib/psmile.MPI1 \ -I$(OASIS_ROOT)/Linux/build/lib/pio \ @@ -70,6 +76,10 @@ ifneq ($(OASIS_ROOT),) LIBS += -L$(OASIS_ROOT)/Linux/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip endif +ifneq ($(LIBACCESSOM2_ROOT),) +LIBS += -L$(LIBACCESSOM2_ROOT)/build/lib -laccessom2 +endif + LDFLAGS += $(LIBS) #--------------------------------------------------------------------------- diff --git a/exp/MOM_compile.csh b/exp/MOM_compile.csh index d594db5849..9576e4c346 100755 --- a/exp/MOM_compile.csh +++ b/exp/MOM_compile.csh @@ -167,14 +167,14 @@ if( $type == MOM_solo ) then set libs = "$executable:h:h/lib_ocean/lib_ocean.a $executable:h:h/lib_FMS/lib_FMS.a" else if( $type == ACCESS-CM ) then set srcList = ( accesscm_coupler ) - set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/$type/lib_ocean" + set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/$type/lib_ocean" set libs = "$executable:h:h/$type/lib_ocean/lib_ocean.a $executable:h:h/lib_FMS/lib_FMS.a" setenv OASIS true else if( $type == ACCESS-OM ) then set srcList = ( accessom_coupler ) - set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/$type/lib_ocean" + set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/$type/lib_ocean" set libs = "$executable:h:h/$type/lib_ocean/lib_ocean.a $executable:h:h/lib_FMS/lib_FMS.a" - setenv OASIS true + setenv LIBACCESSOM2_ROOT $ACCESS_OM_DIR/src/libaccessom2 else if( $type == MOM_SIS ) then set srcList = ( coupler ) set includes = "$includes -I$executable:h:h/lib_ice -I$executable:h:h/lib_atmos_null -I$executable:h:h/lib_land_null"