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

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

sunCCFlags	:=	${CCFlags} -DSUN -O
convexCCFlags	:=	${convexCCFlags} -re -O2 -pa

sunFCFlags	:=	${sunFCFlags} -DSUN -O
convexCCFlags	:=	${convexCCFlags} -re -O2 -pa

LIB		:=	${LocalLib}/libtattle.a

CSrcs		:=	launch.c

F77Srcs		:=	tattle.F basename.f fatal.f fixstr.f itrim.f

SafeFiles	:=	${AllSrcs} Makefile

${LIB}:  ${AllObjs}
	rm -f ${LIB}
	${AR} r ${LIB} ${AllObjs} 
	${RANLIB} ${LIB}

.PHONY:	all remotes safe targets

targets:	${LIB}

all :	safe targets remotes

remotes:	RemoteCopies RemoteMakes

RemoteCopies:	${SafeFiles}
	shadowcopy -v $?
	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} ${LIB} \
		RemoteCopies RemoteMakes ${wildcard ShdCpy*}
