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


# get the initialization files from .../etc
#

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

#  the libraray names (e.g. "ut") get translated into full path names
#  via the info in the initialization files above
#
Libes		:=	${Libes} -lut ${MathAdvO} -lieeeio -lfu  
Libes		:=	${Libes} ${${TArchDir}Libes} 

SafeFiles	:= ${AllSrcs} Makefile fxydecon.1 fxydecon.pattern

F77Srcs		:= fxydecon.F subs.F  fsubs.F ft3d.F windowsubs.F gsubs.F \
		   fxysub.F

CSrcs		:= dwrite.c

PRGM		:= ${LocalBin}/fxydecon

targets : ${PRGM}

all :  safe targets remotes install

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


remotes:	RemoteCopies RemoteMakes

install:
	mancopy 1 fxydecon
	execopy  fxydecon
	shadowexec -v execopy fxydecon

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

RemoteMakes:	${SafeFiles}
	shadowexec -v ${MAKE} && touch RemoteMakes

safe:	.safe.${jdate}.Z

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

include ${TArchDir}/included.files

#  generate include files
#  date stamp source

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

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