#	START NEW ARIX SCCS HEADER
#
#	@(#) Makefile: version 25.1 created on 12/2/91 at 17:00:08
#
#	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	"sadmin:check/Makefile	1.8"
#	Makefile for check routines.

#ident	"@(#)check/Makefile:Makefile	25.1"

include	$(IROOT)/macdefs

DIR = $(ROOT)/usr/lbin
#INC = $(ROOT)/usr/include
LDFLAG = ../csub/csub.a $(LDLIBS) $(LDFLAGS)
CFLAG = $(CFLAGS) -I../include

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)

install:	all $(DIR) 
	for i in $(MAINS);		\
	do				\
	$(INS) $$i $(DIR)/$$i;		\
	chmod 755 $(DIR)/$$i;		\
	chgrp bin $(DIR)/$$i;		\
	chown bin $(DIR)/$$i;		\
	done

$(DIR):
	mkdir $(DIR);  chmod 775 $(DIR)

checklist:	checklist.o check.o rightlist.o	sesystem.o 
	$(CC) -o checklist  checklist.o check.o rightlist.o \
	sesystem.o   $(LDFLAG)

checkre:	checkre.o check.o regerror.o rightlist.o \
		sesystem.o 
	$(CC) -o checkre  checkre.o check.o regerror.o \
	rightlist.o sesystem.o   $(LDFLAG)

checkyn:	checkyn.o check.o sesystem.o 
	$(CC) -o checkyn  checkyn.o check.o sesystem.o \
	$(LDFLAG)


.c.o:
		 $(CC) -c $(CFLAG) $*.c

check.o:	 check.h $(INCRT)/ctype.h $(INCRT)/signal.h \
		 $(INCRT)/sys/signal.h $(INCRT)/stdio.h	\
		 ../include/std_def.h 

checklist.o:	 $(INCRT)/stdio.h $(INCRT)/string.h check.h \
		 ../include/std_def.h 

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

checkyn.o:	 $(INCRT)/stdio.h check.h ../include/std_def.h 

regerror.o:	 

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

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

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

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