# $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:cmain/Makefile	1.8.1.4"
#	Makefile for cmain routines for simple administration.

ROOT = /

DIR = $(ROOT)/usr/lbin

INC = $(CCS_HDRS)/usr/include
CFLAGS = -O -I../include

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

STRIP = strip

#top#
# Generated by makefile 1.41    Fri Aug  3 10:06:21 EDT 1984


MAINS = chkyn fdate mkmenus num spclsize

OBJECTS =  chkyn.o fdate.o mkmenus.o num.o spclsize.o

SOURCES =  chkyn.c fdate.c mkmenus.c num.c spclsize.c

ALL: $&		$(MAINS)

chkyn:		 $(INC)/stdio.h ../include/stddef.h \
		 $(INC)/signal.h	$(INC)/sys/signal.h \
		 ../include/switch.h $(INC)/regexp.h 
	$(CC) $(CFLAGS)  -o chkyn  chkyn.c   $(LDFLAGS)

fdate:		 $(INC)/stdio.h $(INC)/time.h \
		 $(INC)/sys/types.h $(INC)/sys/stat.h 
	$(CC) $(CFLAGS)  -o fdate  fdate.c   $(LDFLAGS)

mkmenus:	 $(INC)/sys/types.h $(INC)/sys/dir.h \
		 $(INC)/sys/stat.h $(INC)/signal.h \
		 $(INC)/sys/signal.h $(INC)/stdio.h \
		 $(INC)/string.h	../include/cmderr.h \
		 ../include/stddef.h 
	$(CC) $(CFLAGS)  -o mkmenus  mkmenus.c   $(LDFLAGS)

num:		num.c 
	$(CC) $(CFLAGS)  -o num  num.c   $(LDFLAGS)

spclsize:	 ../include/cmderr.h $(INC)/fcntl.h \
		 $(INC)/stdio.h $(INC)/values.h 
	$(CC) $(CFLAGS)  -o spclsize  spclsize.c   $(LDFLAGS)


GLOBALINCS = ../include/cmderr.h ../include/stddef.h ../include/switch.h \
	$(INC)/fcntl.h $(INC)/pwd.h $(INC)/regexp.h \
	$(INC)/signal.h $(INC)/stdio.h $(INC)/string.h \
	$(INC)/sys/dir.h $(INC)/sys/signal.h \
	$(INC)/sys/stat.h $(INC)/sys/types.h \
	$(INC)/time.h $(INC)/values.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) $(DIR) remove
	cp $(MAINS) $(DIR)
	cd $(DIR);  $(STRIP) $(MAINS); chmod 555 $(MAINS); \
		chown root $(MAINS); chgrp sys $(MAINS)

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

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

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

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

productdir:
	@echo $(DIR)
