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


# gmake Makefile for ~usp/src
# 89/4/24	Bill Done

#
#	make everybody
#
#	Make the libraries first - the commands may need them.
#
include ${DEPTROOT}/usp/etc/gmake.init

SafeFiles	:=	Makefile

.PHONY:	all targets remotes safe

targets:
	(cd lib; ${MAKE} targets);
	(cd cmd; ${MAKE} targets);

all:	safe RemoteCopies
	(cd lib; ${MAKE} all);
	(cd cmd; ${MAKE} all);

remotes:	RemoteCopies
	(cd lib; ${MAKE} remotes);
	(cd cmd; ${MAKE} remotes);

clean:
	(cd lib; ${MAKE} clean);
	(cd cmd; ${MAKE} clean);
	-rm RemoteCopies

install:	RemoteCopies
	(cd cmd; ${MAKE} install);

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

safe:	.safe.${jdate}.Z
	(cd lib; ${MAKE} safe);
	(cd cmd; ${MAKE} safe);

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

