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


# gmake Makefile for ~usp/src/lib/csm

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

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

LIB		:=	${LocalLib}/libcsm.a

CSrcs :=		\
	complex.c \
	dsinc.c \
	intlin.c \
	ints8c.c \
	intt8c.c \
	mksinc.c \
	npfa.c \
	pfa2cc.c \
	pfa2cr.c \
	pfa2rc.c \
	pfacc.c \
	pfamcc.c \
	sblas.c \
	sge.c \
	stoepd.c \
	xindex.c \
	yxtoxy.c

SafeFiles	:=	${CSrcs} Makefile


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

.PHONY:	all remotes safe targets

targets:	${LIB}

all :  safe clean targets remotes

remotes:	RemoteCopies RemoteMakes

RemoteCopies:	${SafeFiles}
	shadowcopy -v $? && touch RemoteCopies

RemoteMakes:	${SafeFiles}
	shadowexec -v ${MAKE} && touch RemoteMakes

safe:	.safe.${jdate}.Z

.safe.${jdate}.Z:	${SafeFiles}
	${MakeSafe}

include ${TArchDir}/included.files

#  generate include files
#  date stamp source

${TArchDir}/included.files: ${AllSrcs}
	${FindIncludes}

clean:
	-rm ${TArchDir}/included.files ${AllObjs} RemoteCopies RemoteMakes ${wildcard ShdCpy*}
