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

# gmake Makefile for ~usp/Ncomp/src/cmd
#
#	make everybody
#
include ${DEPTROOT}/usp/etc/gmake.init

SafeFiles	:=	Makefile

.PHONY:	all targets remotes safe

targets:
	(cd aps_usp;	${MAKE} targets);
	(cd compsort;	${MAKE} targets);
#	(cd gcurves;	${MAKE} targets);
	(cd grot;	${MAKE} targets);
	(cd gthrplot;	${MAKE} targets);
	(cd hodo;	${MAKE} targets);
	(cd instpl;	${MAKE} targets);
	(cd mctshift;	${MAKE} targets);
	(cd mctsqueeze;	${MAKE} targets);
	(cd presortc;	${MAKE} targets);
	(cd postsort;	${MAKE} targets);
	(cd regsys;	${MAKE} targets);
	(cd rottnsr;	${MAKE} targets);
	(cd rotvctr;	${MAKE} targets);
	(cd sps_aps;	${MAKE} targets);
	(cd stackc;	${MAKE} targets);
	(cd toolort;	${MAKE} targets);
	(cd usp_aqp;	${MAKE} targets);
	(cd usp_sps;	${MAKE} targets);

all:	safe RemoteCopies
	(cd aps_usp;	${MAKE} all);
	(cd compsort;	${MAKE} all);
#	(cd gcurves;	${MAKE} all);
	(cd grot;	${MAKE} all);
	(cd gthrplot;	${MAKE} all);
	(cd hodo;	${MAKE} all);
	(cd instpl;	${MAKE} all);
	(cd mctshift;	${MAKE} all);
	(cd mctsqueeze;	${MAKE} all);
	(cd presortc;	${MAKE} all);
	(cd postsort;	${MAKE} all);
	(cd regsys;	${MAKE} all);
	(cd rottnsr;	${MAKE} all);
	(cd rotvctr;	${MAKE} all);
	(cd sps_aps;	${MAKE} all);
	(cd stackc;	${MAKE} all);
	(cd toolort;	${MAKE} all);
	(cd usp_aqp;	${MAKE} all);
	(cd usp_sps;	${MAKE} all);

remotes:	RemoteCopies
	(cd aps_usp;	${MAKE} remotes);
	(cd compsort;	${MAKE} remotes);
#	(cd gcurves;	${MAKE} remotes);
	(cd grot;	${MAKE} remotes);
	(cd gthrplot;	${MAKE} remotes);
	(cd hodo;	${MAKE} remotes);
	(cd instpl;	${MAKE} remotes);
	(cd mctshift;	${MAKE} remotes);
	(cd mctsqueeze;	${MAKE} remotes);
	(cd presortc;	${MAKE} remotes);
	(cd postsort;	${MAKE} remotes);
	(cd regsys;	${MAKE} remotes);
	(cd rottnsr;	${MAKE} remotes);
	(cd rotvctr;	${MAKE} remotes);
	(cd sps_aps;	${MAKE} remotes);
	(cd stackc;	${MAKE} remotes);
	(cd toolort;	${MAKE} remotes);
	(cd usp_aqp;	${MAKE} remotes);
	(cd usp_sps;	${MAKE} remotes);

install:	RemoteCopies
	(cd aps_usp;	${MAKE} install);
	(cd compsort;	${MAKE} install);
#	(cd gcurves;	${MAKE} install);
	(cd grot;	${MAKE} install);
	(cd gthrplot;	${MAKE} install);
	(cd hodo;	${MAKE} install);
	(cd instpl;	${MAKE} install);
	(cd mctshift;	${MAKE} install);
	(cd mctsqueeze;	${MAKE} install);
	(cd presortc;	${MAKE} install);
	(cd postsort;	${MAKE} install);
	(cd regsys;	${MAKE} install);
	(cd rottnsr;	${MAKE} install);
	(cd rotvctr;	${MAKE} install);
	(cd sps_aps;	${MAKE} install);
	(cd stackc;	${MAKE} install);
	(cd toolort;	${MAKE} install);
	(cd usp_aqp;	${MAKE} install);
	(cd usp_sps;	${MAKE} install);


clean:  
	(cd aps_usp;	${MAKE} clean);
	(cd compsort;	${MAKE} clean);
#	(cd gcurves;	${MAKE} clean);
	(cd grot;	${MAKE} clean);
	(cd gthrplot;	${MAKE} clean);
	(cd hodo;	${MAKE} clean);
	(cd instpl;	${MAKE} clean);
	(cd mctshift;	${MAKE} clean);
	(cd mctsqueeze;	${MAKE} clean);
	(cd presortc;	${MAKE} clean);
	(cd postsort;	${MAKE} clean);
	(cd regsys;	${MAKE} clean);
	(cd rottnsr;	${MAKE} clean);
	(cd rotvctr;	${MAKE} clean);
	(cd sps_aps;	${MAKE} clean);
	(cd stackc;	${MAKE} clean);
	(cd toolort;	${MAKE} clean);
	(cd usp_aqp;	${MAKE} clean);
	(cd usp_sps;	${MAKE} clean);
	-rm RemoteCopies RemoteMakes ${wildcard ShdCpy*}

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

safe:	.safe.${jdate}.Z
	(cd aps_usp;	${MAKE} safe);
	(cd compsort;	${MAKE} safe);
#	(cd gcurves;	${MAKE} safe);
	(cd grot;	${MAKE} safe);
	(cd gthrplot;	${MAKE} safe);
	(cd hodo;	${MAKE} safe);
	(cd instpl;	${MAKE} safe);
	(cd mctshift;	${MAKE} safe);
	(cd mctsqueeze;	${MAKE} safe);
	(cd presortc;	${MAKE} safe);
	(cd postsort;	${MAKE} safe);
	(cd regsys;	${MAKE} safe);
	(cd rottnsr;	${MAKE} safe);
	(cd rotvctr;	${MAKE} safe);
	(cd sps_aps;	${MAKE} safe);
	(cd stackc;	${MAKE} safe);
	(cd toolort;	${MAKE} safe);
	(cd usp_aqp;	${MAKE} safe);
	(cd usp_sps;	${MAKE} safe);

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

