#
# High level Stingray utility makefile
#
# @(#) $Header: makefile,v 78.2 96/03/26 19:36:16 ssa Exp $
#
# $Source: /hpux/shared/supp//usr/src/cmd/c2400_util/./hutil/src/makefile,v $
#
# $Log:	makefile,v $
# Revision 78.2  96/03/26  19:36:16  19:36:16  ssa (RCS Manager)
# Author: daveg@hpucsb2.cup.hp.com
# added devlists.o from lutil/obj 
# 
# Revision 78.1  96/02/08  19:31:07  19:31:07  ssa (RCS Manager)
# Author: larrym@hpucsb2.cup.hp.com
# Removed the compile for ARRAYSCAN, moved new source to arrayscn/src.
# Dave Groves/SSD
# 
# Revision 72.5  94/08/17  15:44:06  15:44:06  ssa (RCS Manager)
# Author: larrym@hpucsb2.cup.hp.com
# Added the errs.h file.  Error information was moved from defs.h to errs.h.  This
# necessitated this inclusion.
# 
# Revision 72.4  94/03/01  14:03:26  14:03:26  ssa (RCS Manager)
# Author: larrym@hpucsb2.cup.hp.com
# Added libIO library.
# 
# Revision 72.3  94/02/22  09:13:33  09:13:33  ssa (RCS Manager)
# Author: larrym@hpucsb2.cup.hp.com
# removed reference to -lIO for 700 compile.
# 
# Revision 72.2  94/02/17  12:38:27  12:38:27  ssa (RCS Manager)
# Author: larrym@hpucsb2.cup.hp.com
# Added defs.h include for arrayscan.o.
# 
# Revision 72.1  94/02/16  13:51:29  13:51:29  ssa (RCS Manager)
# Author: larrym@hpucsb2.cup.hp.com
# Modified dlib800 to dlibhpux.
# 
# Revision 70.5  94/02/03  12:59:25  12:59:25  ssa (RCS Manager)
# Author: dhosking@hpuxsrc.cup.hp.com
# DSDe414345 - dummy checkin to allow branching of makefile for BLS
# 
# Revision 70.4  94/02/03  12:57:22  12:57:22  ssa (RCS Manager)
# Author: dhosking@hpuxsrc.cup.hp.com
# DSDe414345 - dummy checkin to allow branching of makefile for BLS
# 
# Revision 70.3  93/10/15  07:12:58  07:12:58  ssa (RCS Manager)
# Author: larrym@hpucsb2.cup.hp.com
# Modified to remove compile options.  These are passed in by the build
# command.
# 
# Revision 70.2  93/07/12  10:30:07  10:30:07  ssa (RCS Manager)
# Author: larrym@hpucsb2.cup.hp.com
# Deleted 700 comments and the call to make buildfs.
# 
# Revision 70.1  93/07/02  15:08:04  15:08:04  ssa (RCS Manager)
# Author: markd@hpucsb2.cup.hp.com
# Initial revision
# 

OBJ = ../obj
BIN = ../bin

#
# Note:
#
# The high level utils have dependencies on source and object files
# from the low level utils.  The dependencies are stated here but the
# links to trigger rebuilding of the low level utils are not.  They are
# in the low level util makefile.  Thus, the master makefile must first
# invoke the low util makefile then the high level makefile to insure
# that these dependencies are accurate.
#

LIN = ../../lutil/src
LOB = ../../lutil/obj
DLIB = dlibhpux
LIB_IO = -lIO

all:			$(BIN)/newarray				\
			$(BIN)/arrayinfo

$(BIN)/newarray:	$(OBJ)/newarray.o $(OBJ)/ainfo700.o	\
			$(LOB)/$(DLIB).o $(LOB)/common.o	\
			$(LOB)/u_common.o $(LOB)/scsilib.o
			cc 					\
			$(OBJ)/newarray.o $(OBJ)/ainfo700.o	\
			$(LOB)/$(DLIB).o $(LOB)/common.o	\
			$(LOB)/u_common.o $(LOB)/scsilib.o	\
			$(LOB)/devlists.o $(LIB_IO)		\
			-o $(BIN)/newarray

$(OBJ)/newarray.o:	$(LIN)/defs.h $(LIN)/errs.h errdef.h 	\
			arraytab.h newarray.h array.h 		\
			srayscsi.h newarray.c
			cc -I$(LIN) -I. -c newarray.c
			mv newarray.o $(OBJ)

$(OBJ)/ainfo700.o:	$(LIN)/defs.h $(LIN)/errs.h array.h 	\
			srayscsi.h arraytab.h newarray.h 	\
			errdef.h ainfo700.c
		
			cc -I$(LIN) -I. -c ainfo700.c
			mv ainfo700.o $(OBJ)

$(BIN)/arrayinfo:	$(OBJ)/arrayinfo.o	\
			$(LOB)/$(DLIB).o $(LOB)/common.o	\
			$(LOB)/u_common.o $(LOB)/scsilib.o
			cc 					\
			$(OBJ)/arrayinfo.o 	\
			$(LOB)/$(DLIB).o $(LOB)/common.o	\
			$(LOB)/u_common.o $(LOB)/scsilib.o	\
			$(LOB)/devlists.o $(LIB_IO)		\
			-o $(BIN)/arrayinfo

$(OBJ)/arrayinfo.o:	array.h srayscsi.h $(LIN)/defs.h 	\
			$(LIN)/errs.h edef.h arrayinfo.c
			cc -I$(LIN) -I. -c arrayinfo.c
			mv arrayinfo.o $(OBJ)
