# # --- HYCOM 2.2 makefile # # --- Stand-alone HYCOM, or HYCOM ESMF component, or HYCOM+CICE. # # --- Tunable parameters in ../config/$(ARCH)_$(TYPE) # VPATH = ../src_2.2.37/:../src_2.2.37/nersc/:../src_2.2.37/nersc/EVP/:../src_2.2.37/nersc/ICESTATE/ .SUFFIXES: .SUFFIXES: .c .F .F90 .f .o .F: @echo "Must have an explicit rule for" $* .f: @echo "Must have an explicit rule for" $* .c: @echo "Must have an explicit rule for" $* include ./flags include ../config/$(ARCH)_$(TYPE) #KAL - redefine rules. Only difference from config file is that file from VPATH is used in stead of local CPPFLAGS := $(CPPFLAGS) $(CPPFLAGSNERSC) CPPFLAGS2 := $(CPPFLAGS) # AIX (xlf) peculiarities. NB: Only necessary for Fortran files ifneq (,$(findstring -DAIX,$(CPPFLAGS))) subs=-WF,- CPPFLAGS:=$(subst -,$(subs),$(CPPFLAGS)) endif FCFFLAGS := $(FCFFLAGS) $(FCFFLAGSNERSC) .c.o: $(CC) $(CPPFLAGS2) $(CCFLAGS) -c $< .f.o: $(FC) $(FCFFLAGS) -c $< .F.o: $(FC) $(CPPFLAGS) $(FCFFLAGS) -c $< .F90.o: $(FC) $(CPPFLAGS) $(F90FLAGS) -c $< MODS = mod_dimensions.o mod_xc.o mod_za.o mod_pipe.o mod_incupd.o \ m_get_erfc.o mod_stokes.o mod_floats.o mod_tides.o mod_mean.o mod_archiv.o mod_hycom.o OBJS = archiv.o barotp.o bigrid.o blkdat.o cnuity.o convec.o \ diapfl.o dpthuv.o dpudpv.o forfun.o geopar.o hybgen.o \ icloan.o inicon.o inigiss.o inikpp.o inimy.o latbdy.o \ matinv.o momtum.o mxkprf.o mxkrt.o mxkrtm.o mxpwp.o \ overtn.o poflat.o prtmsk.o psmoo.o restart.o \ thermf.o trcupd.o tsadvc.o \ machine.o wtime.o machi_c.o isnan.o \ $(OBJECTSNERSC) hycom: $(MODS) $(OBJS) hycom.o $(LD) $(LDFLAGS) -o hycom hycom.o $(MODS) $(OBJS) $(EXTRALIBS) esmf: $(MODS) $(OBJS) @echo "--- ESMF hycom component has been built ---" hycom_cice: $(MODS) $(OBJS) mod_OICPL.o hycom_cice.o $(LD) $(LDFLAGS) -o hycom_cice \ hycom_cice.o mod_OICPL.o \ $(MODS) $(OBJS) \ ${CICE_DIR}/esmf/compile/*.o \ $(EXTRALIBS) hycom.o: hycom.F mod_hycom.o hycom_cice.o: hycom_cice.F mod_hycom.o mod_OICPL.o archiv.o: archiv.F mod_xc.o common_blocks.h mod_za.o \ mod_stokes.o barotp.o: barotp.F mod_xc.o common_blocks.h mod_pipe.o \ mod_tides.o \ mod_stokes.o bigrid.o: bigrid.f mod_xc.o blkdat.o: blkdat.F mod_xc.o common_blocks.h stmt_fns.h mod_incupd.o \ mod_floats.o \ mod_tides.o \ mod_stokes.o cnuity.o: cnuity.F mod_xc.o common_blocks.h mod_pipe.o \ mod_stokes.o convec.o: convec.f mod_xc.o common_blocks.h stmt_fns.h diapfl.o: diapfl.F mod_xc.o common_blocks.h stmt_fns.h mod_stokes.o dpthuv.o: dpthuv.f mod_xc.o common_blocks.h dpudpv.o: dpudpv.f mod_xc.o forfun.o: forfun.F mod_xc.o common_blocks.h mod_za.o geopar.o: geopar.F mod_xc.o common_blocks.h stmt_fns.h mod_za.o hybgen.o: hybgen.f mod_xc.o common_blocks.h stmt_fns.h mod_pipe.o icloan.o: icloan.f mod_xc.o common_blocks.h stmt_fns.h inicon.o: inicon.f mod_xc.o common_blocks.h stmt_fns.h mod_pipe.o inigiss.o: inigiss.f mod_xc.o common_blocks.h stmt_fns.h inikpp.o: inikpp.f mod_xc.o common_blocks.h stmt_fns.h inimy.o: inimy.f mod_xc.o common_blocks.h stmt_fns.h isnan.o: isnan.F latbdy.o: latbdy.F mod_xc.o common_blocks.h mod_tides.o machine.o: machine.F machi_c.o: machi_c.c matinv.o: matinv.f mod_xc.o common_blocks.h momtum.o: momtum.F mod_xc.o common_blocks.h stmt_fns.h mod_pipe.o \ mod_tides.o \ mod_stokes.o mxkprf.o: mxkprf.F mod_xc.o common_blocks.h stmt_fns.h mod_pipe.o \ mod_stokes.o mxkrt.o: mxkrt.f mod_xc.o common_blocks.h stmt_fns.h mxkrtm.o: mxkrtm.f mod_xc.o common_blocks.h stmt_fns.h mxpwp.o: mxpwp.f mod_xc.o common_blocks.h stmt_fns.h overtn.o: overtn.f mod_xc.o common_blocks.h poflat.o: poflat.f prtmsk.o: prtmsk.f psmoo.o: psmoo.f mod_xc.o restart.o: restart.f mod_xc.o common_blocks.h mod_za.o mod_tides.o thermf.o: thermf.F mod_xc.o common_blocks.h stmt_fns.h trcupd.o: trcupd.F mod_xc.o common_blocks.h mod_pipe.o tsadvc.o: tsadvc.f mod_xc.o common_blocks.h stmt_fns.h mod_pipe.o wtime.o: wtime.F mod_archiv.o: \ mod_archiv.F mod_xc.o common_blocks.h mod_za.o mod_stokes.o mod_hycom.o: \ mod_hycom.F mod_xc.o common_blocks.h mod_za.o mod_pipe.o \ mod_incupd.o \ mod_mean.o \ mod_stokes.o \ mod_archiv.o \ mod_floats.o mod_incupd.o: \ mod_incupd.F mod_xc.o common_blocks.h mod_za.o mod_floats.o: \ mod_floats.F mod_xc.o common_blocks.h mod_za.o mod_pipe.o mod_year_info.o\ mod_stokes.o \ mod_hycom_nersc.o mod_pipe.o: \ mod_pipe.F mod_xc.o common_blocks.h mod_stokes.o mod_stokes.o: \ mod_stokes.F mod_xc.o common_blocks.h mod_za.o m_get_erfc.o mod_tides.o: \ mod_tides.F mod_xc.o common_blocks.h mod_za.o mod_mean.o: \ mod_mean.F mod_xc.o common_blocks.h mod_za.o mod_stokes.o mod_dimensions.o: mod_dimensions.F dimensions.h mod_xc.o: mod_xc.F mod_dimensions.o mod_xc_sm.h mod_xc_mp.h mod_za.o: mod_za.F mod_xc.o mod_za_sm.h mod_za_mp.h mod_za_mp1.h mod_za_zt.h mod_OICPL.o: mod_OICPL.F clean: rm *.o *.mod include ./dependencies