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


# gmake Makefile for src/cmd/rost
# Bill Done	89/6/22
 
include ${DEPTROOT}/usp/etc/gmake.init

# get the qtc math advantage directory and file name.
#   place overrides after the include statement.
include ${DEPTROOT}/etc/gmake.mathadv

# define the targets

PRGM		:=	${LocalBin}/rost

# set the architecture dependent variables

sunCCFlags	:=	${sunCCFlags} -DSUN -O 
crayCCFlags	:=	${crayCCFlags} -DCRAY

sun4FCFlags	:=	${sun4FCFlags} -DSUN -O
crayFCFlags	:=	${crayFCFlags} -DCRAY -Wf"-es" -Wf"-dp"

hpFLFlags	:=	${hpFLFlags} +U77

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

crayLibes	:= 	-lnet

Libes		:=	${CommonLibes} ${Libes}

F77Srcs		:=	rostae.F  alftms.F  detmut.F  mdians.F  rngtms.F \
			srtint.F  asrtms.F  rdparmae.F  srtqkp.F

SafeFiles	:=	${AllSrcs} ${wildcard *.1} Makefile ${wildcard *.h}  rost.pattern

.PHONY:	all safe remotes targets

targets:	${PRGM}

all:	safe clean targets remotes install

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

remotes:	RemoteCopies  RemoteMakes

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

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

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

include ${TArchDir}/included.files

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

safe:	.safe.${jdate}.Z

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

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