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

include ${DEPTROOT}/chd/etc/gmake.init
include ${DEPTROOT}/etc/gmake.motif1.2

PRGM		:= ${LocalBin}/exbcomm


Libes		:= ${Libes} -lchd -lcu

ifneq "${Vendor}" "sun"
${Vendor}Libes := -lXm -lXt -lX11
endif

sunLibes	:= ${sunLibes} -lgen -lsocket \
			-Bdynamic -lSM -lICE -lXm -lXt -lX11 \
			-ldl -Bstatic -lform -lintl

#
# 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}

CSrcs	:=	exbcomm.c

SafeFiles	:= ${AllSrcs} Makefile

targets : ${PRGM}

all :  clean safe targets remotes install

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


remotes:	RemoteCopies RemoteMakes

install:
#	mancopy 1 exb_10
	apps-execopy  chd prod exbcomm
	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}

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

include ${TArchDir}/included.files

#  generate include files
#  date stamp source

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