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

#
# Makefile for streamjob - a job file parser called by startjob
# ( previously named filter - renamed for obvious reasons - j.m.wade 9/26/91 ) 
#
include ${DEPTROOT}/usp/etc/gmake.init

# define the targets

PRGM		:=	${LocalBin}/streamjob

# set the architecture dependent variables

sunCCFlags	:=	${sunCCFlags} -DSUN -O
crayCCFlags	:=	${crayCCFlags} -DCRAY -O
crayFCFlags	:=      -DCRAY -Wf"-i64"

LIBES           :=      ${${TArchDir}LIBES}

CSrcs		:=	streamjob.c

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

.PHONY:	all

targets:	${PRGM}

all:	safe clean targets install remotes

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

install:
	mancopy 1 streamjob
	execopy streamjob
	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*}
