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

# Joe M Wade      04/01/91
 
include ${DEPTROOT}/usp/etc/gmake.init

# define the targets

PRGM		:=	${LocalBin}/endjob

# set the architecture dependent variables

CCFlags		:=	-O

CSrcs		:=	endjob.c 

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

.PHONY:	all

targets:	${PRGM}

sun3targets:	dummy
sun4targets:	${PRGM}
cray2targets:	dummy
crayxeatargets:	dummy
crayymptargets:	dummy
crayc90targets:	dummy
HP-PAtargets:	${PRGM}
HP-UXtargets:	${PRGM}
RS6000targets:	${PRGM}
c34targets:	${PRGM}

all:	safe clean targets install remotes

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

dummy:
	@echo this endjob is not built on the ${TArchDir} architecture
install:
	mancopy 1 beginjob
	execopy endjob
	shadowexec -v ${MAKE} install

remotes:	RemoteCopies  RemoteMakes

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

RemoteMakes:	${SafeFiles}
	shadowexec ${MAKE} && 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*}
