########################################################################
#                 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

crayFCFlags	:=	${crayFCFlags} -DCRAY -Wf"-astack" -Wf"-es" -Wf"-dp"
sgiFCFlags      :=      ${sgiFCFlags} -OPT:fold_arith_limit=1400

Libes	:=	${MathAdvO} -lut -lieeeio -lfu -lm
Libes	+=	 ${${TArchDir}Libes}

F77Srcs	:=	fkkstrip.F cmdln.F help.F CutPadTaper.F FKKFilter.F XYFilter.F \
		PadOff.F SliceOut.F j0.F verbal.F clr2D.F avemed.F isort.F \
		nlmean.F gaussmask.F fit3.F surfgen.F fitslice.F \
		mednf.F medon.F medroll.F medoff.F rsort.F median1.F

SafeFiles :=	${F77Srcs} ${wildcard *.1} Makefile  fkkstrip.pattern

PRGM	:=	${LocalBin}/fkkstrip

targets : ${PRGM}

all :  safe clean targets remotes install

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

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

remotes:	RemoteCopies RemoteMakes

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

RemoteMakes:	${SafeFiles}
	shadowexec ${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*}  
