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

include ${DEPTROOT}/usp/etc/gmake.init
include ${DEPTROOT}/etc/gmake.mathadv

Libes		:=  ${MathAdvO} -lut -lieeeio -lfu
#
# Add an architecture library variable which may be set in one of the gmake
# rules files referenced above. Initialized with SOLARIS port.. - jmw 8/9/93
#
Libes	:=	${Libes} ${${TArchDir}Libes}

CCFlags		:=	${CCFlags} -O


FCFlags		:=	${FCFlags}

F77Srcs         := partition.F breakup.F restore.F

SafeFiles	:= ${AllSrcs} Makefile partition.pattern partition.1  partition.pattern

PRGM		:= ${LocalBin}/partition

targets : ${PRGM}

all :  safe clean targets remotes

${PRGM}    :  ${AllObjs}
	${LinkF} -o $@ ${AllObjs} ${Libes}

remotes:	RemoteCopies RemoteMakes

install:
	mancopy 1 partition
	execopy  partition
	shadowexec -v ${MAKE} install

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

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

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