########################################################################
#                 copyright 2001, Amoco Production Company             #
#                             All Rights Reserved                      #
#                     an affiliate of BP America Inc.                  #
########################################################################

# Template gmake makefile for usp programs.
# 07/18/89	Terri Fischer

include ${DEPTROOT}/usp/etc/gmake.init
include ${DEPTROOT}/etc/gmake.mathadv

Libes   :=       ${MathAdvO} -lut -lieeeio -lfu
#
# Add an architecture library variable which may be set in one of the gmake
# rules files referenced above. Initialized with SOLARIS port.. - jmw 8/9/93
#
Libes	:=	${Libes} ${${TArchDir}Libes}


sun4CCFlags	:=	${sun4CCFlags} -DSUN -O
cray2CCFlags	:=	${cray2CCFlags} -DCRAY

sun4FCFlags	:=	${sun4FCFlags} -DSUN -O
cray2FCFlags	:=	${cray2FCFlags} -DCRAY -Wf"-astack" -Wf"-es" -Wf"-dp"

F77Srcs	:=	tvdnmo.F tvdsubs.F ceez.F curve1.F curve2.F
SafeFiles :=	${F77Srcs} tvdnmo.1 Makefile  tvdnmo.pattern

PRGM  :=      ${LocalBin}/tvdnmo

targets : ${PRGM}

all :  safe clean targets install remotes

${PRGM}    :  ${F77Objs}
	${LinkF} -o $@ ${F77Objs} ${Libes}

install:
	mancopy 1 tvdnmo
	execopy  tvdnmo
	shadowexec -v ${MAKE} install

remotes:	RemoteCopies RemoteMakes

RemoteCopies:	${SafeFiles}
	shadowcopy -v $?
	touch RemoteCopies

RemoteMakes:	${SafeFiles}
	shadowexec ${MAKE}
	touch RemoteMakes

safe:	.safe.${jdate}.Z

.safe.${jdate}.Z:	${SafeFiles}
	${MakeSafe}

include ${TArchDir}/included.files

${TArchDir}/included.files: ${F77Srcs}
	usp_d_stamp
	${FindIncludes}

clean:
	-rm ${TArchDir}/included.files ${AllObjs} ${PRGM} \
		date.h RemoteCopies RemoteMakes ${wildcard ShdCpy*}
