#
# 	Makefile for cutview
#
#

#               Copyright (C) 1993, 1998 Hewlett-Packard Company
#                          ALL RIGHTS RESERVED.
# 
#	THIS MATERIAL IS PROVIDED "AS IS".  THERE ARE
#	NO WARRANTIES OF ANY KIND WITH REGARD TO THIS
#	MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE
#	IMPLIED WARRANTIES OF MERCHANTABILITY AND
#	FITNESS FOR A PARTICULAR PURPOSE.  Neither
#	Hewlett-Packard nor Hugh Mahon shall be liable
#	for errors contained herein, nor for
#	incidental or consequential damages in
#	connection with the furnishing, performance or
#	use of this material.  Neither Hewlett-Packard
#	nor Hugh Mahon assumes any responsibility for
#	the use or reliability of this software or
#	documentation.  This software and
#	documentation is totally UNSUPPORTED.  There
#	is no support contract available.  Hewlett-
#	Packard has done NO Quality Assurance on ANY
#	of the program or documentation.  You may find
#	the quality of the materials inferior to
#	supported materials.
# 

# This is the main makefile for cutview.  It invokes a script, create.make, 
# to generate a makefile (make.local) which takes into account the specifics 
# of the system on which the make is occurring.  If make.local does not 
# succeed in building cutview, the user can edit and use the file make.default
# to build cutview.  

# $Source: /home/hugh/sources/cview/RCS/Makefile,v $
# $Revision: 1.6 $  $Author: hugh $
# $State: Exp $  $Locker:  $
# $Date: 1998/08/14 16:07:44 $

# for debuging use:
#CFLAGS =	-DDEBUG -g
# for pre HP-UX 7.0 systems, include -DPRE_70 in the CFLAGS
#
BIN_DIR =	/usr/local/bin
MAN_DIR =	/usr/local/man/man1
SRCS =		cutview.c
MAN_PAGES =	cutview.1
PROGNAME =	cutview
OBJS =		$(SRCS:.c=.o)

main :	all

all :	localcview buildcview

buildcview :
	make -f make.local

localcview:
	@./create.make

clean:
	rm -f $(PROGNAME) $(OBJS) make.local core a.out \#* *~

install: $(PROGNAME) $(MAN_PAGES)
	-mv $(BIN_DIR)/$(PROGNAME) $(BIN_DIR)/$(PROGNAME).old
	cp $(PROGNAME) $(BIN_DIR)
	chown bin $(BIN_DIR)/$(PROGNAME)
	chgrp bin $(BIN_DIR)/$(PROGNAME)
	chmod 755 $(BIN_DIR)/$(PROGNAME)
	rm -f $(BIN_DIR)/$(PROGNAME).old
	for f in $(MAN_PAGES) ; \
	do \
		cp $$f $(MAN_DIR) ; \
		chown bin $(MAN_DIR)/$$f ; \
		chgrp bin $(MAN_DIR)/$$f ; \
		chmod 444 $(MAN_DIR)/$$f ; \
	done


