# MAKEFILE for firstguess
#
# Function: builds the executable for firstguess  
#

# Define the fortran compiler and options

FFLAGS= -free -convert big_endian

DEBUG_OPT ?= 1
ifeq ($(DEBUG_OPT), 1)
   FFLAGS +=  -g -traceback
endif

CMD = rtma_firstguess
LIBS = ${W3NCO_LIB4}

FC = ${COMP}

OBJS = kinds.o constants.o generalized_transf.o blendwind.o \
       domain_dims.o process_allrjlists.o pkind.o pietc.o pbend.o firstguess.o 

# clear out all suffixes
 .SUFFIXES:
# # list only those we use
 .SUFFIXES: .o .f .f90
#

.f.o :
	${FC} ${FFLAGS} -c $<
.f90.o :
	${FC} ${FFLAGS} -c $<

LINK-OBJS = ${OBJS} 


all: $(CMD)

$(CMD): ${LINK-OBJS} 
	${FC} -o $(CMD) ${LINK-OBJS} ${LIBS}

clean:
	/bin/rm -f *.o *.mod $(CMD)