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

Libes		:= ${Libes} -lut -lfu -lieeeio ${MathAdvO}
#
# 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}


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


sun3FCFlags	:=	${sun3FCFlags} -DSUN -O2
sun3fpaFCFlags	:=	${sun3fpaFCFlags} -DSUN -ffpa -O
sun4FCFlags	:=	${sun4FCFlags} -DSUN -O
alpha-V3.2FCFlags :=	${alpha-V3.2FCFlags} -DSUN -O -align norecords
crayFCFlags	:=	${crayFCFlags} -DCRAY -Wf"-astack" -Wf"-es" -Wf"-dp"

# i86pc_solFLFlags :=	${i86pc_solFLFlags} -a -r

F77Srcs		:= scan.F
CSrcs		:= filesize.c

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

PRGM		:= ${LocalBin}/scan

targets : ${PRGM}

all :  safe clean targets remotes install

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

remotes:	RemoteCopies RemoteMakes

install: 
	mancopy 1 scan
	execopy scan
	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} \
	RemoteCopies RemoteMakes ${wildcard ShdCpy*} date.h
