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

#
#       General purpose library gmakefile
#
#	Bob Mars -- 8/2/89
#
#	To modify for other libraries:
#		change CSrcs, CSQLSrcs, F77Srcs, F8xSrcs, and FSQLSrcs.
#
include ${DEPTROOT}/etc/gmake.init
include ${DEPTROOT}/etc/gmake.motif1.2

CSrcs		:=	CBl.c CBlist.c XMstr.c
CSQLSrcs	:=
F77Srcs		:=
F8xSrcs		:=
FSQLSrcs	:=

LIB		:=      ${LocalLib}/libXgoodies.a

sun4cg92CCFlags	:=	${sun4cg92CCFlags} -vc
IRIX64CCFlags	:=	${IRIX64CCFlags} -DWORD64
CCFlags         :=      ${CCFlags} -g
FCFlags		:=	${FCFlags} -O -nodoc
FLFlags         :=      ${FLFlags} -s

SafeFiles	:=	${AllSrcs} Makefile ${wildcard *.h *.inc *.include}

${LIB}:	${AllObjs}
	${AR} r ${LIB}  $?
	${RANLIB} $@

.PHONY:	all remotes safe targets flow xflow

targets:	${LIB}

all:	safe targets remotes

remotes:	safe RemoteCopies RemoteMakes

flow:
	cflow ${CIncludes} ${CSrcs} | lpr

xflow:
	cflow -ix ${CIncludes} ${CSrcs} | lpr

RemoteCopies:	${SafeFiles}
	shadowcopy $?
	touch RemoteCopies
 
RemoteMakes:	${SafeFiles}
	shadowexec ${MAKE}
	touch RemoteMakes

safe:	.safe.${jdate}.Z

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

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