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


# gmake Makefile for ~usp/src/lib/flib
# 89/5/8	Bill Done

#
#	libflib
#
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}/libflib.a

ASrcs		:=	${${TArchDir}ASrcs}

F77Srcs		:=	strend.F strdot.F strscr.F

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

targets:	${LIB}

${LIB}:  ${CObjs} ${F77Objs} ${AObjs}
	-rm -f ${LIB}
	${AR} r ${LIB} ${CObjs} ${F77Objs} ${AObjs}
	${RANLIB} ${LIB}

.PHONY:	all remotes safe targets

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