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

# gmake Makefile for hlhedit
# Joe M Wade     
 
include ${DEPTROOT}/usp/etc/gmake.init
include ${DEPTROOT}/etc/gmake.motif1.2

# define the targets

PRGM		:=	${LocalBin}/hlhedit

# set the architecture dependent variables

CCFlags		+=	-O -D_NO_PROTO
# CCFlags		+=	 -DDEBUG
CCFlags		+=	 -DDEBUG2
CCFlags		+=	 -DQUERY

ifneq "${SOLARIS}"  ""
 CommonLibes	+=	-Bdynamic -lXm -lXt -lXext -lX11 -Bstatic
 sunLibes	:= 	${sunLibes} -lgen -lsocket -B dynamic \
			-ldl -B static -lform -lnsl -lintl -Bdynamic
else
 CommonLibes	+=	-lXm -lXt -lXext -lX11
endif

CommonLibes	+=	-lieeeio -lcu -lut

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

CSrcs		:=	hlhedit.c HelpObject.c XuCrHelpPD.c

SafeFiles	:=	${AllSrcs} Makefile ${wildcard *.h} \
			${wildcard *.xbm} ${wildcard *.help} hlhedit.1

.PHONY:	all safe remotes targets

targets:	${PRGM}

all:	safe clean targets remotes install

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

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

remotes:	RemoteCopies  RemoteMakes

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

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

include ${TArchDir}/included.files

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

safe:	.safe.${jdate}.Z

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

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