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

include ${DEPTROOT}/etc/gmake.init

CSrcs		:=	symname.c debug.c

ifneq "${SOLARIS}"  ""
sunLibes	:= -Bdynamic -ldl -Bstatic
endif

Libes		:=	${Libes} ${${TArchDir}Libes} ${${Vendor}Libes}

PRGM	:=	${LocalBin}/symname
SafeFiles	:=	${CSrcs} Makefile symname.h buildsymlist

.PHONY: targets all safe remotes

targets: ${PRGM}

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

all : safe clean targets remotes

safe:	.safe.${jdate}.Z

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

remotes:	RemoteMakes		# this doesn't need cray portability

install:	RemoteCopies RemoteMakes
		shadowexec -v ${MAKE} && touch RemoteMakes

RemoteCopies:	${SafeFiles}
	shadowcopy $?
	touch RemoteCopies

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

include ${TArchDir}/included.files

${TArchDir}/included.files: ${CSrcs}
	./buildsymlist
	${MakeTArchDir}
	${FindIncludes}

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