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


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

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

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

sun3FCFlags	:=	${sun3FCFlags} -DSUN -O
sun3fpaFCFlags	:=	${sun3fpaFCFlags} -DSUN -ffpa -O
sun4FCFlags	:=	${sun4FCFlags} -DSUN -O
crayFCFlags	:=	${crayFCFlags} -DCRAY -Wf"-es" -Wf"-dp" -Wf"-astack"

LIB		:=	${LocalLib}/libcalplot.a
# LIB		:=	${LocalLib}/libcaltek.a

CSrcs		:=	CLcplt.c

F77Srcs		:=	CLfplt.F axis.F factor.F frame.F line.F newpen.F number.F \
			pend.F pinit.F pinitf.F plots.F plot.F scale.F \
			symbol.F where.F algaxe.F curuxy.F pltlog.F pltscl.F \
			plotd.F lined.F pltlgd.F shdsei.F shader.F shadet.F

SafeFiles	:=	${F77Srcs} ${CSrcs} Makefile 

${LIB}:  ${CObjs} ${F77Objs}
	rm -f ${LIB}
#	ar r ${LIB} `lorder ${CObjs} ${F77Objs} | tsort `
	ar r ${LIB} ${CObjs} ${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*}
