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

# gmake makefile for usp program.
# 09/27/89	Terri Fischer

# get the initialization files from .../etc
include ${DEPTROOT}/usp/etc/gmake.init
include ${DEPTROOT}/etc/gmake.mathadv

#  the libraray names (e.g. "ut") get translated into full path names
#  via the info in the initialization files above

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}

#  define compiler flag overrides if desired



F77Srcs		:= vomit.F cmdln.F help.F verbal.F EchoFunction.F \
		   Memory.F OpenVelData.F ReadNextFcn.F TdfnReadCards.F \
		   UniqueIntervalVelocity.F Units.F UnitsBack.F \
		   VXOSinitialize.F MakeVelocity.F \
		   VxosReadPicks.F WriteFcn.F WriteHeader.F \
		   XSDInitialize.F XsdReadHeader.F \
		   XsdReadPicks.F UspTrace.F BuildOtherVelocity.F  \
		   BuildIntervalVelocity.F bd_vel.F d2t.F da2t.F drms2t.F \
		   t2d.F ta2ti.F ti2da.F ti2dr.F ti2ta.F ti2tr.F \
		   tr2ti.F sloper.F UspResampTrace.F \
		   spline.F splint.F Vds3dReadCards.F EchoVds3dFunction.F  \
		   ConversionCheck.F EchoFlat3dFunction.F ReadEv3d.F \
		   ReadEv2d.F EchoWestern3dFunction.F  \
		   EchoUkooaFunction.F GecoReadCards.F \
		   digicon.F EchoDigiconFunction.F essov2.F \
		   EchoEssov2Function.F \
		   ReadOmnivel.F TimeDepthCurve.F DepthTimeCurve.F \
		   Kelman_redatum.F Fairfield.F

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

PRGM		:= ${LocalBin}/vomit

targets : ${PRGM}

all :  safe clean targets install remotes

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

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

remotes:	RemoteCopies RemoteMakes

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

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

#  archive sources

safe:	.safe.${jdate}.Z

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

include ${TArchDir}/included.files

#  generate include files
#  date stamp source

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

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