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


# gmake Makefile for ~usp/Converted/libs  ("yzpick")

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

sunCCFlags	:=	${sun4CCFlags} -DSUN -g
#sunCCFlags	:=	${sun4CCFlags} -DSUN -O
crayCCFlags	:=	${crayCCFlags} -DCRAY
convexCCFlags	:=	${convexCCFlags} -re -O2 -pa

sunFCFlags	:=	${sun4FCFlags} -DSUN -g
#sunFCFlags	:=	${sun4FCFlags} -DSUN -O
cray2FCFlags	:=	${cray2FCFlags} -Wf"-eP"
cray2CCFlags	:=	${cray2CCFlags} -h pagelm
crayFCFlags	:=	${crayFCFlags} -DCRAY -Wf"-i64" -Wf"-dp" -Wf"-astack"
convexCCFlags	:=	${convexCCFlags} -re -O2 -pa

LIB		:=	${LocalLib}/libyzpick.a

CSrcs		:=	RdPvPiks.c      picksub.c

F77Srcs		:=	preinterp.F psvsub2.F tsinterp.F

SafeFiles	:=	${CSrcs} ${F77Srcs} ${ASrcs} \
			${sunF77Srcs} ${cray2ASrcs} Makefile


${LIB}:  ${CObjs} ${F77Objs} ${AObjs}
	rm -f ${LIB}
	${AR} r ${LIB} ${CObjs} ${F77Objs} ${AObjs}
	${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} \
		RemoteCopies RemoteMakes ${wildcard ShdCpy*}
