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

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

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

CFlags	:=	${Includes} -I${DEPTROOT}/usp/include/c -O
appleCFlags	:= ${Includes} -D_USE_NINT_MACRO
intelCFlags	:= ${Includes} -D_USE_NINT_MACRO
sgiCFlags	:= ${Includes} -D_USE_NINT_MACRO
sunCFlags	:= ${sunCFlags} ${Includes} -D_USE_NINT_MACRO

CSrcs		:= cogeom2d.c

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

PRGM	:= ${LocalBin}/cogeom2d
 
targets : ${PRGM}
 
all :  safe clean targets remotes install

${PRGM}	: ${CObjs}
	${LinkC} -o $@ ${CObjs} ${Libes}

#  do remote make (i.e. in our case the cray, hp, convex, etc...)
 
remotes:	RemoteCopies RemoteMakes
 
install:
	mancopy 1 cogeom2d
	execopy  cogeom2d
	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
 
#  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*}
