FC     = frt
FFLAGS = -Am -Haesux
NCDIR  = /home/yot/local/netcdf-3.6.1-frt-gnu
GT5DIR = /work02/yot/work/dcmodel/local/gtool5-20101228-1-frt-Haesux

FC     = frt
FFLAGS = -Am -Haesux
NCDIR  = /home/yot/local/netcdf-3.6.3-frt-gnu
GT5DIR = /home/yot/work/dcmodel/local/gtool5-20101228-1-Fujitsu


NCINC  = -I$(NCDIR)/include
NCLIB  = -L$(NCDIR)/lib
GT5INC = -I$(GT5DIR)/include
GT5LIB = -L$(GT5DIR)/lib
DEF    = 
LIBS   = -lgtool5 -lnetcdf

LM  = a.out
SRC = main.f90 set_1d_profile.f90 interpolate.f90
OBJ = $(SRC:.f90=.o)

ALL_OBJ = $(OBJ)
ALL_LM  = $(LM)


VPATH = src


.SUFFIXES : .f90 .o

all: $(ALL_LM)

$(LM): $(OBJ)
	$(FC) $(FFLAGS) $(DEF) $(NCLIB) $(GT5LIB) -o $@ $(OBJ) $(LIBS)

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

clean:
	rm -f $(ALL_LM) $(ALL_OBJ) *.mod *~

distclean: clean
realclean: distclean


main.o: set_1d_profile.o
set_1d_profile.o: interpolate.o
