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

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

# define the targets

PRGM		:=	${LocalBin}/disco_fix

# set the architecture dependent variables

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

CommonLibes	:=	${CommonLibes} -lcu

LIBES           :=      ${${TArchDir}Libes} ${CommonLibes}

CSrcs		:=	disco_fix.c

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

.PHONY:	all safe remotes targets

targets:	${PRGM}

all:	safe clean targets remotes install

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


remotes:	RemoteCopies  RemoteMakes

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

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*}
