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

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

Libes		:= -lcu
Libes		+= ${${TArchDir}Libes}

CSrcs		:= bytknt.c

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

PRGM		:= ${LocalBin}/bytknt

targets : ${PRGM}

all :  safe targets remotes install

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

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

remotes:	RemoteCopies RemoteMakes

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

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

clean:
	-rm ${TArchDir}/included.files ${AllObjs} ${PRGM}
