# $Copyright:	$
# Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
# Sequent Computer Systems, Inc.   All rights reserved.
#  
# This software is furnished under a license and may be used
# only in accordance with the terms of that license and with the
# inclusion of the above copyright notice.   This software may not
# be provided or otherwise made available to, or used by, any
# other person.  No title to or ownership of the software is
# hereby transferred.

#	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.

#ident	"$Header: Makefile 1.3 89/10/10 $@(#)sadmin:check/Makefile	1.8"
#	Makefile for check routines.

DIR = $(ROOT)/usr/lbin

INC = $(CCS_HDRS)/usr/include

LDFLAGS = ../csub/csub.a $(LDLIBS)

CFLAGS = -O -I../include

STRIP = strip

EVERYTHING:	ALLPARTS ALL

#top#
# Generated by makefile 1.41    Thu Mar 22 21:59:38 EST 1984


MAINS = checklist checkre checkyn

OBJECTS =  check.o checklist.o checkre.o checkyn.o regerror.o rightlist.o \
	sesystem.o

SOURCES =  check.c checklist.c checkre.c checkyn.c regerror.c rightlist.c \
	sesystem.c

ALL: $&		$(MAINS)

checklist: $&	checklist.o check.o rightlist.o	sesystem.o 
	$(CC) $(CFLAGS)  -o checklist  checklist.o check.o rightlist.o \
	sesystem.o   $(LDFLAGS)

checkre: $&	checkre.o check.o regerror.o rightlist.o \
		sesystem.o 
	$(CC) $(CFLAGS)  -o checkre  checkre.o check.o regerror.o \
	rightlist.o sesystem.o   $(LDFLAGS)

checkyn: $&	checkyn.o check.o sesystem.o 
	$(CC) $(CFLAGS)  -o checkyn  checkyn.o check.o sesystem.o \
	$(LDFLAGS)


check.o:	 check.h $(INC)/ctype.h $(INC)/signal.h \
		 $(INC)/sys/signal.h $(INC)/stdio.h	\
		 ../include/stddef.h 

checklist.o:	 $(INC)/stdio.h $(INC)/string.h check.h \
		 ../include/stddef.h 

checkre.o:	 $(INC)/stdio.h check.h ../include/cmderr.h \
		 ../include/stddef.h ../include/switch.h \
		 $(INC)/regexp.h 

checkyn.o:	 $(INC)/stdio.h check.h ../include/stddef.h 

regerror.o:	 

rightlist.o:	 check.h $(INC)/stdio.h $(INC)/string.h 

sesystem.o:	 $(INC)/signal.h $(INC)/sys/signal.h 

GLOBALINCS = ../include/cmderr.h ../include/stddef.h ../include/switch.h \
	$(INC)/ctype.h $(INC)/regexp.h $(INC)/signal.h \
	$(INC)/stdio.h $(INC)/string.h $(INC)/sys/signal.h

LOCALINCS = check.h 

clean:
	rm -f $(OBJECTS)
	
clobber:	
	rm -f $(OBJECTS) $(MAINS)

newmakefile:
	makefile  -m -f Makefile 
#bottom#
	echo '1,/^newmakefile/s;$(INC)/;\044(INC)/;g\nw\nq'  | \
		ed - Makefile

install: 	$(MAINS) remove
	cp $(MAINS) $(DIR)
	cd $(DIR);  $(STRIP) $(MAINS);  chmod 555 $(MAINS); \
		chown root $(MAINS); chgrp sys $(MAINS)

remove:
	cd $(DIR);  rm -f $(MAINS)

#	Check to see if everything is here.
ALLPARTS:	$(GLOBALINCS) $(LOCALINCS) $(SOURCES)

partslist:
	@echo Makefile $(LOCALINCS) $(SOURCES)  |  tr ' ' '\012'  |  sort

product:
	@echo $(MAINS)  |  tr ' ' '\012'  | \
		sed 's;^;$(DIR)/;'

productdir:
	@echo $(DIR)

srcaudit:	# will not report missing nor present object or product files.
	@(	find * -print;  \
		ls -d Makefile $(LOCALINCS) $(SOURCES) $(OBJECTS) $(MAINS) \
			$(OBJECTS) $(MAINS) 2>&1  \
	)  |  sort  |  uniq -u  |  sed '/ /!s/$$/	unexpected/'
