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


F77Srcs		:= cithickness.F cmdln.F help.F dsmoth.F wedgestgrad.F  \
                   wedgestfun.F truewedge.F wedgest.F \
                   tolmin.F minfun.F lsrch.F \
                   addcon.F adjtol.F conres.F \
                   delcon.F eqcons.F getd.F getfes.F \
                   initzu.F ktvec.F newcon.F satact.F \
                   sdegen.F sdirn.F stepbd.F zbfgs.F \
                   ddot.F dilalg.F dzero.F dmmove.F \
                   dscalm.F dscald.F dmxadd.F dmxsub.F getamp.F

SafeFiles	:= ${AllSrcs} ${wildcard *.1} Makefile  \
			cithickness.pattern

PRGM		:= ${LocalBin}/cithickness

targets : ${PRGM}

all :  safe clean targets install remotes

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

remotes:	RemoteCopies RemoteMakes

install:
	mancopy 1 cithickness
	execopy  cithickness
	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*}
