# Variables and flags for the compiler(s) and linker. F77COMPILER= gfortran LINKER= gfortran #Original makefile (absoft compiler) used option -N109 # From the web: # -N109 disables the distinction between upper and lower case characters; # gfortran has that by default in line with the Fortran 77/90/95/2003/2008 # standards; #F77_FLAGS= -g -c #For double precision, use F77_FLAGS= -g -c -fdefault-real-8 # Name of the executable. TARGET= WaSSI OUTDIR= bin OBJDIR= objs # Files for this executable. FFILES= General.for PET.for WARMUP.for WATERBAL.for \ OUTPUT.for SUMMARY.for CARBONBAL.for \ FLOWROUTING_US.for FLOWROUTING_RW.for MKFILE= Makefile OBJFILES= $(OBJDIR)/General.o $(OBJDIR)/PET.o \ $(OBJDIR)/WARMUP.o $(OBJDIR)/WATERBAL.o \ $(OBJDIR)/OUTPUT.o $(OBJDIR)/SUMMARY.o \ $(OBJDIR)/CARBONBAL.o $(OBJDIR)/FLOWROUTING_US.o \ $(OBJDIR)/FLOWROUTING_RW.o # Default dependency for this makefile default: $(OUTDIR)/$(TARGET) all: $(OUTDIR)/$(TARGET) $(OUTDIR)/$(TARGET): $(OUTDIR) $(OBJDIR) $(MKFILE) $(OBJFILES) $(LINKER) -o $(OUTDIR)/$(TARGET) $(OBJFILES) $(OUTDIR): [ -d $(OUTDIR) ] || mkdir -p $(OUTDIR) $(OBJDIR): [ -d $(OBJDIR) ] || mkdir -p $(OBJDIR) $(OBJDIR)/General.o: General.for $(F77COMPILER) -o $(OBJDIR)/General.o $(F77_FLAGS) General.for $(OBJDIR)/PET.o: PET.for $(F77COMPILER) -o $(OBJDIR)/PET.o $(F77_FLAGS) PET.for $(OBJDIR)/WARMUP.o: WARMUP.for $(F77COMPILER) -o $(OBJDIR)/WARMUP.o $(F77_FLAGS) WARMUP.for $(OBJDIR)/WATERBAL.o: WATERBAL.for $(F77COMPILER) -o $(OBJDIR)/WATERBAL.o $(F77_FLAGS) WATERBAL.for $(OBJDIR)/OUTPUT.o: OUTPUT.for $(F77COMPILER) -o $(OBJDIR)/OUTPUT.o $(F77_FLAGS) OUTPUT.for $(OBJDIR)/SUMMARY.o: SUMMARY.for $(F77COMPILER) -o $(OBJDIR)/SUMMARY.o $(F77_FLAGS) SUMMARY.for $(OBJDIR)/CARBONBAL.o: CARBONBAL.for $(F77COMPILER) -o $(OBJDIR)/CARBONBAL.o $(F77_FLAGS) CARBONBAL.for $(OBJDIR)/FLOWROUTING_US.o: FLOWROUTING_US.for $(F77COMPILER) -o $(OBJDIR)/FLOWROUTING_US.o $(F77_FLAGS) FLOWROUTING_US.for $(OBJDIR)/FLOWROUTING_RW.o: FLOWROUTING_RW.for $(F77COMPILER) -o $(OBJDIR)/FLOWROUTING_RW.o $(F77_FLAGS) FLOWROUTING_RW.for clean: rm -v $(OBJDIR)/General.o rm -v $(OBJDIR)/PET.o rm -v $(OBJDIR)/WARMUP.o rm -v $(OBJDIR)/WATERBAL.o rm -v $(OBJDIR)/OUTPUT.o rm -v $(OBJDIR)/SUMMARY.o rm -v $(OBJDIR)/CARBONBAL.o rm -v $(OBJDIR)/FLOWROUTING_US.o rm -v $(OBJDIR)/FLOWROUTING_RW.o rm -v $(OUTDIR)/$(TARGET)