#	START NEW ARIX SCCS HEADER
#
#	@(#) Makefile: version 25.1 created on 12/2/91 at 15:04:17
#
#	Copyright (c) 1990 by Arix Corporation
#	All Rights Reserved
#
#	@(#)Makefile	25.1	12/2/91 Copyright (c) 1990 by Arix Corporation
#
#	END NEW ARIX SCCS HEADER
#
#	Copyright (c) 1984 AT&T
#	  All Rights Reserved

#	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
#	The copyright notice above does not evidence any
#	actual or intended publication of such source code.

#	ATT:ident	"graf:src/Makefile	1.9"

#ident	"@(#)graf/src:Makefile	25.1"

include	$(IROOT)/macdefs

###
### Standard Constants 
###

LROOT    =
BIN1     = $(ROOT)/$(LROOT)/usr/bin
BIN      = $(ROOT)/$(LROOT)/usr/bin/graf

GRAFMAKE = $(MAKE) ROOT=$(ROOT) BIN=$(BIN) LROOT=$(LROOT) -$(MAKEFLAGS)e

###
### Local Constants
###

LOGDIR = $(ROOT)/$(LROOT)/usr/adm
USRLIB = $(ROOT)/$(LROOT)/usr/lib

#### Dependencies

all  : 
	cd glib.d;   $(GRAFMAKE)
	cd gutil.d;  $(GRAFMAKE)
	cd dev.d;    $(GRAFMAKE) 
	cd gtop.d;   $(GRAFMAKE)
	cd ptog.d;   $(GRAFMAKE)
	cd stat.d;   $(GRAFMAKE)
	cd toc.d;    $(GRAFMAKE)
	cd vtoc.d;   $(GRAFMAKE)
	cd whatis.d; $(GRAFMAKE)
	
install  : graphics whatis
	$(INS) /dev/null $(LOGDIR)/graflog
	-chmod 644 $(LOGDIR)/graflog
	chgrp bin $(LOGDIR)/graflog
	chown bin $(LOGDIR)/graflog
	$(INS) graphics $(BIN1)/graphics
	chmod 755 $(BIN1)/graphics
	chgrp bin $(BIN1)/graphics
	chown bin $(BIN1)/graphics
	-if test ! -d $(USRLIB)/graf/whatis; then  \
	 mkdir $(USRLIB)/graf/whatis;              \
	 chmod 755 $(USRLIB)/graf/whatis;         \
	 chgrp bin $(USRLIB)/graf/whatis;         \
	 chown bin $(USRLIB)/graf/whatis;         \
	fi
	$(INS) whatis $(BIN)/whatis
	chmod 755 $(BIN)/whatis
	chgrp bin $(BIN)/whatis
	chown bin $(BIN)/whatis
	
	cd glib.d;   $(GRAFMAKE) install
	cd gutil.d;  $(GRAFMAKE) install
	cd dev.d;    $(GRAFMAKE) install
	cd gtop.d;   $(GRAFMAKE) install
	cd ptog.d;   $(GRAFMAKE) install
	cd stat.d;   $(GRAFMAKE) install
	cd toc.d;    $(GRAFMAKE) install
	cd vtoc.d;   $(GRAFMAKE) install
	cd whatis.d; $(GRAFMAKE) install
	
graphics  :  graphics.sh
	cp graphics.sh graphics
	chmod 555 graphics

whatis    :
	cp whatis.sh whatis
	chmod 555 whatis

########

clobber   :
	-rm -f whatis graphics
	cd dev.d;    $(GRAFMAKE) clobber
	cd glib.d;   $(GRAFMAKE) clobber
	cd gtop.d;   $(GRAFMAKE) clobber
	cd gutil.d;  $(GRAFMAKE) clobber
	cd ptog.d;   $(GRAFMAKE) clobber
	cd stat.d;   $(GRAFMAKE) clobber
	cd toc.d;    $(GRAFMAKE) clobber
	cd vtoc.d;   $(GRAFMAKE) clobber
	cd whatis.d; $(GRAFMAKE) clobber

clean:
	cd dev.d;    $(GRAFMAKE) clean
	cd glib.d;   $(GRAFMAKE) clean
	cd gtop.d;   $(GRAFMAKE) clean
	cd gutil.d;  $(GRAFMAKE) clean
	cd ptog.d;   $(GRAFMAKE) clean
	cd stat.d;   $(GRAFMAKE) clean
	cd toc.d;    $(GRAFMAKE) clean
	cd vtoc.d;   $(GRAFMAKE) clean
	cd whatis.d; $(GRAFMAKE) clean
	
listings  :
	pr -h "   src top level files   " whatis graphics | pr
	cd dev.d;    $(GRAFMAKE) listings
	cd glib.d;   $(GRAFMAKE) listings
	cd gtop.d;   $(GRAFMAKE) listings
	cd gutil.d;  $(GRAFMAKE) listings
	cd ptog.d;   $(GRAFMAKE) listings
	cd stat.d;   $(GRAFMAKE) listings
	cd vtoc.d;   $(GRAFMAKE) listings
	cd toc.d;    $(GRAFMAKE) listings
	cd whatis.d; $(GRAFMAKE) listings
