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

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

Libes	:=	-lut -lcu -lieeeio
Libes	:=	${Libes} ${${TArchDir}Libes}

# define the targets

PRGM		:=	${LocalBin}/clean_green

# set the architecture dependent variables

CCFlags	:=      -O

CSrcs		:=	clean_green.c

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

.PHONY:	all safe remotes targets

targets:	${PRGM}

all:	safe clean targets remotes install

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

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