FC     = pgf95
FFLAGS = -fastsse -Mbounds
NCPATH = /usr/local
GTPATH = /usr/local/gtool5
INCPATH= -I$(GTPATH)/include -I$(NCPATH)/include
LIBPATH= -L$(GTPATH)/lib -L$(NCPATH)/lib
LIB    = -lgtool5 -lnetcdf
DEF    =

LM = a.out

SRC = calc_heatrate.f90 mod_HR.f90 planetconst.f90

OBJ = $(SRC:.f90=.o)

OBJ_ALL = $(OBJ) 


.SUFFIXES : .f90 .o

VPATH = src/analysis :src/util

$(LM): $(OBJ_ALL)
	$(FC) $(FFLAGS) $(LIBPATH) $(DEF) -o $@ $(OBJ_ALL) $(LIB)

.f90.o:
	$(FC) $(FFLAGS) $(INCPATH) $(DEF) -c $<

clean:
	rm -f $(LM) $(OBJ_ALL) *~ *.mod

realclean: clean

mod_HR.o: planetconst.o
calc_heatrate.o: planetconst.o mod_HR.o
