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


# gmake Makefile for ~usp/src/lib/mxprt
# Nested Dissection Library.
#

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

sun3CCFlags	:=	${sun3CCFlags} -DSUN -O
sun3fpaCCFlags	:=	${sun3fpaCCFlags} -DSUN -ffpa -O
sun4CCFlags	:=	${sun4CCFlags} -DSUN -O
crayCCFlags	:=	${crayCCFlags} -DCRAY
convexCCFlags	:=	${convexCCFlags} -re -O2

sun3FCFlags	:=	${sun3FCFlags} -DSUN -O
sun3fpaFCFlags	:=	${sun3fpaFCFlags} -DSUN -ffpa -O
sun4FCFlags	:=	${sun4FCFlags} -DSUN -O
crayFCFlags	:=	${crayFCFlags} -DCRAY -Wf"-i64" -Wf"-dp" -Wf"-astack"
convexCCFlags	:=	${convexCCFlags} -re -O2

LIB	:=	${LocalLib}/libmxprt.a

F77Srcs		:=	cmprnt.F \
fmprnt.F        imprnt.F        zmprnt.F \
fcprnt.F        icprnt.F        smprnt.F \
scprnt.F	pmprnt.F

SafeFiles	:=	${F77Srcs} Makefile

${LIB}:  ${F77Objs}
	rm -f ${LIB}
	${AR} r ${LIB} ${F77Objs}
	${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*}
