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

#
include ${DEPTROOT}/xaprtools/etc/gmake.init
ifneq "${SOLARIS}"  ""
include ${DEPTROOT}/etc/gmake.apps.X11R6
include ${DEPTROOT}/etc/gmake.apps.motif1.2
else
# include ${DEPTROOT}/etc/gmake.motif1.2
include ${DEPTROOT}/etc/gmake.motif2.0
endif

CFlags		=	-O
convexCFlags	=	-O2 -re -pa
LIB		=	$(LocalLib)/libxaprtools.a

CSrcs		=	basename.c centermap.c getclass.c getroot.c \
			gettags.c xmstring.c runcmd.c canexec.c \
			cmdname.c alert2.c stdCB.c ljust.c \
			trim.c allwhite.c nonp2sp.c tidystr.c sp2undr.c \
			getclass.c seticon.c getroot.c getVroot.c \
			strsav.c

SafeFiles	=	${CSrcs} Makefile ${wildcard *.h}

${LIB}:	${CObjs}
	${AR} rv ${LIB} $?
	${RANLIB} $(LIB)

.PHONY: all safe remotes targets

targets:	${LIB}

all:	safe ${LIB} remotes

include ${TArchDir}/included.files

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

safe:	.safe.${jdate}.Z

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

remotes: RemoteCopies RemoteMakes

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

RemoteMakes:	${SafeFiles}
	shadowexec -R DEPT gmake &&  touch RemoteMakes

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