SHELL=/bin/sh
#
# This makefile was produced by /usr/bin/fmgen at 11:21:32 AM on 04/12/96
# If it is invoked by the command line
#	make -f makefile
# it will compile the fortran modules indicated by SRCS into the object
# modules indicated by OBJS and produce an executable named a.out.
#
# If it is invoked by the command line
#	make -f makefile a.out.prof
# it will compile the fortran modules indicated by SRCS into the object
# modules indicated by OBJS and produce an executable which profiles
# named a.out.prof.
#
# To remove all the objects but leave the executables use the command line
#	make -f makefile clean
#
# To remove everything but the source files use the command line
#	make -f makefile clobber
#
# To remove the source files created by /usr/bin/fmgen and this makefile
# use the command line
#	make -f makefile void
#
# The parameters SRCS and OBJS should not need to be changed.  If, however,
# you need to add a new module add the name of the source module to the
# SRCS parameter and add the name of the resulting object file to the OBJS
# parameter.  The new modules are not limited to fortran, but may be C, YACC,
# LEX, or CAL.  An explicit rule will need to be added for PASCAL modules.
#
SRCS=	fcstpost.f int910.f u910.f rdstal2.f lpoppp.f lpqpfpp.f mpoppp.f compid.f dc2pct.f cnchkpqpf.f optx.f xpval1h.f catgr1.f opfcstid.f \
        blmp_1hcnvpp.f blmp_1hltgpp.f meld_1hcnvpp.f meld_1hltgpp.f mos_1hcnvpp.f mos_1hltgpp.f rap_1hcnvpp.f rap_1hltgpp.f cnvpot_cnv-ltg_ak.f

OBJS=	fcstpost.o int910.o u910.o rdstal2.o lpoppp.o lpqpfpp.o mpoppp.o compid.o dc2pct.o cnchkpqpf.o optx.o xpval1h.o catgr1.o opfcstid.o \
        blmp_1hcnvpp.o blmp_1hltgpp.o meld_1hcnvpp.o meld_1hltgpp.o mos_1hcnvpp.o mos_1hltgpp.o rap_1hcnvpp.o rap_1hltgpp.o cnvpot_cnv-ltg_ak.o

#
# Tunable parameters
#
# FC		Name of the fortran compiling system to use
# LDFLAGS	Flags to the loader
# LIBS		List of libraries
# CMD		Name of the executable
# PROFLIB	Library needed for profiling
#
FC =	        ${COMP}    # Use Intel FORTRAN Compiler, ifort
LDFLAGS =	
LIBS = ${LMPMDL_LIB4} ${LMP_LIB4} ${W3NCO_LIB4}
CMD =		lmp_fcstpost

PROFLIB =	

FFLAGS = -O3 -nofree -xHost -i4 -real-size 32 -fpscomp logicals -fp-model strict -assume byterecl -g -traceback -check bounds

# Lines from here on down should not need to be changed.  They are the
# actual rules which make uses to build a.out.
#
all:		$(CMD)

$(CMD):		$(OBJS)
	$(FC) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS)

# Make the profiled version of the command and call it a.out.prof
#
$(CMD).prof:	$(OBJS)
	$(FC) $(LDFLAGS) -o $(@) $(OBJS) $(PROFLIB) $(LIBS)

clean:
	-rm -f $(OBJS)

clobber:	clean
	-rm -f $(CMD) $(CMD).prof

void:	clobber
	-rm -f $(SRCS) makefile