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

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

# define the targets

PRGM		:=	${LocalBin}/filestat

# set the architecture dependent variables

CCFlags	:=      -O

CSrcs		:=	filestat.c

Libes		:=	-lieeeio -lut -lcu

Libes		:= ${${TargetArch}Libes} ${Libes}

SafeFiles	:=	${AllSrcs} Makefile ${wildcard *.h}

.PHONY:	all safe remotes targets

targets:	${PRGM}

all:	safe targets remotes install

${PRGM}:		${CObjs}
	${LinkC} -o $@ ${CObjs} ${Libes}

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

remotes:	RemoteCopies  RemoteMakes

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

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

include ${TArchDir}/included.files

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

safe:	.safe.${jdate}.Z

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

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