Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 148 lines (125 sloc) 4.918 kB
#-----------------------------------------------------------------------
# All user configurable options are in the configs/make.xyz file
#
# Set the environmental variable WPPMAKE to point to the correct file
#
# The configuration file must set the variables
# etree = [ yes | no ]
# CXX = C++ compiler
# CC = C-compiler (really needed?)
# FC = Fortran-77 compiler
# WPPROOT = path to wpp third party libraries
#
# As needed, the config file may set the following variables:
#
# MPIROOT = path to mpi library install point
# EXTRA_CXX_FLAGS = Give additional c++ compiler flags
# EXTRA_FORT_FLAGS = Give additional fortran compiler flags
# EXTRA_LINK_FLAGS = Give additional arguments to the linker
# LIBLAPACK = path to lapack and blas libraries. Tries to use
# the system default lapack library if undefined.
#
#-----------------------------------------------------------------------
# Set the WPP config file to use
#WPPMAKE = configs/loni.mk
#-----------------------------------------------------------------------
# Do not make changes below this line (don't blame us if you do!)
#-----------------------------------------------------------------------
ifndef debug
optlevel = OPTIMIZE
else
optlevel = DEBUG
endif
debugdir := debug_v2.1
optdir := optimize_v2.1
HOSTNAME := $(shell hostname)
UNAME := $(shell uname)
emptystring := ""
foundincfile := $(emptystring)
ifdef WPPMAKE
include $(WPPMAKE)
foundincfile := $(WPPMAKE)
else
ifeq ($(UNAME),Darwin)
include configs/make.amac
foundincfile := "configs/make.amac"
endif
ifeq ($(UNAME),Linux)
ifeq ($(findstring sierra,$(HOSTNAME)),sierra)
include configs/make.sierra
foundincfile := "configs/make.sierra"
endif
ifeq ($(findstring tux,$(HOSTNAME)),tux)
include configs/make.tux
foundincfile := "configs/make.tux"
endif
endif
endif
WPPINC = $(WPPROOT)/include
WPPLIB = $(WPPROOT)/lib64
ifdef LIBLAPACK
linklibs = $(LIBLAPACK)/liblapack.a $(LIBLAPACK)/libblas.a
else
linklibs = -llapack -lblas
endif
ifeq ($(optlevel),DEBUG)
FFLAGS = -g
CXXFLAGS = -g -I$(WPPINC)
else
FFLAGS = -O3
CXXFLAGS = -O3 -I$(WPPINC)
endif
ifdef EXTRA_FORT_FLAGS
FFLAGS += $(EXTRA_FORT_FLAGS)
endif
ifeq ($(etree),yes)
CXXFLAGS += -DENABLE_ETREE
linklibs += -lcencalvm -lproj
endif
ifdef EXTRA_CXX_FLAGS
CXXFLAGS += $(EXTRA_CXX_FLAGS)
endif
ifdef EXTRA_LINK_FLAGS
linklibs += $(EXTRA_LINK_FLAGS)
endif
ifeq ($(optlevel),DEBUG)
builddir = $(debugdir)
else
builddir = $(optdir)
endif
OBJ = main.o version.o WPP2.o FileInput.o run.o \
Forcing.o SAC.o sacsubc.o Image.o processGrid.o \
GeographicCoord.o Sarray.o ForcingTwilight.o processImage.o processSAC.o \
processSource.o Source.o MaterialBlock.o processMaterialBlock.o processMaterialPfile.o \
MaterialPfile.o ppmod.o processMaterialEtree.o EtreeFile.o MaterialData.o \
GeographicBox.o UTMProjector.o curlcurl.o avisc_d4ts.o bcsf.o \
bc-new.o bc-new-c.o ForcingLamb.o ForcingPointSource.o curvilinear_accumulate_operator.o \
curvilinear_bc_forcing.o impose_curvilinear_bc.o impose_cartesian_bc.o SuperGrid.o \
consinterface.o ForcingEnergy.o processMaterialIfile.o MaterialIfile.o MaterialProperty.o \
Wpp_pio.o geodyn.o inner_loop9.o sides-onesided.o curvilinear_inner_loop.o \
accumulate-operator.o update-u.o update-att.o accumulate-onesided.o eval_curvilinear_bc_stress.o
FOBJ = $(addprefix $(builddir)/,$(OBJ))
ifeq ($(foundincfile), $(emptystring))
wpp:: $(FOBJ)
@echo "Please assign the WPPMAKE environment variable to point to your configuration file"
else
wpp: $(FOBJ)
/bin/mkdir -p $(builddir);
cd $(builddir); $(CXX) -o $@ $(OBJ) -L$(WPPLIB) $(linklibs)
@cat wave.txt
@echo "*** Configuration file: " $(foundincfile) "***"
@echo "*** Build directory: " $(builddir) " ***"
endif
$(builddir)/version.o:src/version.C
/bin/mkdir -p $(builddir)
cd $(builddir); $(CXX) $(CXXFLAGS) -DWPP_MADEBY=\"$(USER)\" -DWPP_OPT_LEVEL=\"$(optlevel)\" -DWPP_COMPILER=\""$(shell which $(CXX))"\" -DWPP_BASEDIR=\"$(WPPROOT)\" -DWPP_HOSTNAME=\"$(HOSTNAME)\" -DWPP_WHEN=\""$(shell date)"\" -c ../$<
$(builddir)/%.o:src/%.f
/bin/mkdir -p $(builddir)
cd $(builddir); $(FC) $(FFLAGS) -c ../$<
$(builddir)/%.o:src/%.C
/bin/mkdir -p $(builddir)
cd $(builddir); $(CXX) $(CXXFLAGS) -c ../$<
clean:
/bin/mkdir -p $(optdir)
/bin/mkdir -p $(debugdir)
cd $(optdir); /bin/rm -f wpp $(OBJ); cd ../$(debugdir); /bin/rm -f wpp $(OBJ)
Jump to Line
Something went wrong with that request. Please try again.