# 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 F90FLAGS = #-ef #-Rabc -m0 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 $(F90FLAGS) -c $< .f.o: f90 $(FFLAGS) -c $< # search path where gnu make will look for files: VPATH = ./src FC = f90 all: itgc postc FOBS_itg = aborter.o bcon.o init.o pertb.o itg.o itgc.o kparfft.o \ nonlin.o nonline.o poisson.o filter.o connect.o xmcfft.o \ baphi.o kapav.o pcons.o geo.o fitpack.o # dependencies: compare.o init.o itgc.o nc2res.o postc.o res2nc.o baphi.o bcon.o \ connect.o diagnostics.o filter.o flr_terms.o geo.o in.o io.o \ itg.o kapav.o kparfft.o nl.o nonlin.o nonline.o nsumavp.o \ pcons.o pertb.o plots.o poisson.o step.o timeavp.o: itg_data.o compare.o init.o itgc.o nc2res.o postc.o res2nc.o: io.o itg.o init.o nonlin.o nonline.o: nl.o itg.o step.o nl.o nonlin.o diagnostics.o init.o: flr_terms.o itg.o init.o: in.o itg.o: step.o diagnostics.o io.o: convert.o FOBS_p = aborter.o cplogp.o mnmx.o nsumavp.o postc.o timeavp.o plots.o : graphics.o postc.o : plots.o graphics.o FOBS_compare = compare.o 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 -lnetcdf -Wl"$$NCAR $$NCARGKS" postc: $(FOBS_p) $(FC) $(FFLAGS) -o postc $(FOBS_p) $(FLIBS_p) compare:$(FOBS_compare) $(FC) $(FFLAGS) -o compare $(FOBS_compare) %.o : %.f $(FC) $(FFLAGS) -c $< clean: rm -f *.o *~ SRC_res2nc = res2nc.f FOBS_res2nc = res2nc.o res2nc: $(FOBS_res2nc) $(FC) $(FFLAGS) -o res2nc $(FOBS_res2nc) -lnetcdf SRC_nc2res = nc2res.f FOBS_nc2res = nc2res.o nc2res: $(FOBS_nc2res) $(FC) $(FFLAGS) -o nc2res $(FOBS_nc2res) -lnetcdf