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


# gmake Makefile for src/cmd/cram
 
include ${DEPTROOT}/usp/etc/gmake.init

# define the targets

PRGM	:=	${LocalBin}/cram

# set the architecture dependent variables


LIBES	:=	-lm

CSrcs		:=	cram.c yank.c main.c

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

.PHONY:	all safe remotes targets

targets:	${PRGM}

all:	safe clean targets remotes install

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

remotes:	RemoteCopies  RemoteMakes

install:
	mancopy 1 cram
	execopy  cram
	shadowexec -v ${MAKE} install

RemoteCopies:	${SafeFiles}
	shadowcopy -v $?
	touch RemoteCopies

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