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

include ${DEPTROOT}/etc/gmake.init

CSrcs		:=	env_val.c debug.c
PRGM		:=	${LocalBin}/env_val
SafeFiles	:=	${CSrcs} ${wildcard *.1} Makefile

.PHONY: targets all safe remotes

targets:	${PRGM}

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

all : safe clean targets remotes

safe:	.safe.${jdate}.Z

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

remotes:	RemoteCopies RemoteMakes

install:RemoteCopies RemoteMakes
		mancopy 1 env_val
		shadowexec -v env_val && touch RemoteMakes

RemoteCopies:	${SafeFiles}
	shadowcopy $?
	touch RemoteCopies

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

include ${TArchDir}/included.files

${TArchDir}/included.files: ${CSrcs}
	${MakeTArchDir}
	${FindIncludes}

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