# Makefile for the Gryffin Gyrofluid Turbulence code (requires GNU's # gmake). # # type "make" to build an optimized version of Gryffin. # type "make debug=on" to compile modified subroutines with debugger... # # Or set defaults by uncommenting one of the following lines: # # debug = on # ######################################################################## # FFLAGS= -F -N80 -g -R abc FFLAGS = -N80 ifdef debug FFLAGS = -g -N80 endif # Cray Fortran Compiler Options: # -Rabc, run time checks for arguments, bounds, array conformance # -N80 accepts 80 character lines # -g debug with no optimization .SUFFIXES: .f90 .f .f90.o: f90 $(FFLAGS) -c $< .f.o: f90 $(FFLAGS) -c $< # search path where gnu make will look for files: VPATH = .:src FC = f90 all: itgc postc compare FOBS_itg = aborter.o average.o bcon.o courant.o echoin.o filter.o flr.o \ flrcow.o flrinit.o init.o input.o itg.o itgc.o kparfft.o kxspacec.o \ kyspace.o nlpmp.o nlpsc.o nonlin.o pertb.o poisson.o \ posten.o preenr.o prstep.o real_comp.o timestep.o volsq.o \ wframe.o wpunchnc.o wreadnc.o yspace.o xmcfft.o xspacec.o connect.o \ nonline.o nlpsce.o xspacece.o kxspacece.o yspacee.o kyspacee.o \ baphi.o kapav.o ecollis.o volsqk.o pcons.o critical.o tc_out.o \ dm_calc.o geometry.o volflux.o volkflux.o fitpack.o \ bwread.o bwpunch.o rdiffset.o # special dependencies: bwread.o bwpunch.o wreadnc.o wpunchnc.o: itg.par itg.cmn itg_ri.cmn hmplot.o hmplotc.o hmplotk.o postc.o: itg.par itg.cmn post2.cmn aborter.o: geometry.o: itg.par itg.cmn # BD: This problem should be fixed now. # GWH: The special dependencies list isn't completely up to date. # For example, the following lines should be added: # # echoin.o: itg.par itg.cmn wdat.nml # ecollis.o: itg.par itg.cmn itg.mom # # plus other similar lines. If itg.par is # being changed, then this Makefile will recompile the proper list # of routines. But if some other include file is edited, one should # delete all *.o and executable files and force a complete recompile. # generic dependencies: $(FOBS_itg): itg.cmn itg.par FOBS_p = aborter.o ceil.o cnplot0.o cplogp.o finish.o floor.o hmplot.o \ hmplotc.o bwread.o \ hmplot2.o kenrgyp.o maps.o mnmx.o nicer.o nsumavp.o penrgyp.o \ postc.o saplot.o setzer.o timeavp.o wgrad.o \ cnplotk.o hmplotk.o wreadnc.o $(FOBS_p): itg.par itg.cmn FOBS_compare = compare.o wread1.o $(FOBS_compare): itg.cmn itg.par itg_ri.cmn FLIBS_itg = -L/usr/local/lib -lnag15 -ldf -lnetcdf itgc: $(FOBS_itg) $(FC) $(FFLAGS) -o itgc $(FOBS_itg) $(FLIBS_itg) # $$ translates to $ in gnu make: FLIBS_p = -L/usr/local/lib -lnag15 -Wl"$$NCAR $$NCARGKS" -lnetcdf postc: $(FOBS_p) $(FC) $(FFLAGS) -o postc $(FOBS_p) $(FLIBS_p) compare:$(FOBS_compare) $(FC) $(FFLAGS) -o compare $(FOBS_compare) input.o echoin.o: wdat.nml ecollis.o filter.o nonlin.o nonline.o timestep.o: itg.mom %.o : %.f $(FC) $(FFLAGS) -c $< clean: rm -f *.o *~ hmplot.o hmplotc.o hmplotk.o postc.o: post2.cmn SRC_res2nc = res2nc.f wread.f wpunchnc.f FOBS_res2nc = res2nc.o wread.o wpunchnc.o $(FOBS_res2nc): itg.par itg.cmn res2nc: $(FOBS_res2nc) $(FC) $(FFLAGS) -o res2nc $(FOBS_res2nc) -lnetcdf SRC_nc2res = nc2res.f wreadnc.f wpunch.f FOBS_nc2res = nc2res.o wreadnc.o wpunch.o $(FOBS_res2nc): itg.par itg.cmn nc2res: $(FOBS_nc2res) $(FC) $(FFLAGS) -o nc2res $(FOBS_nc2res) -lnetcdf