#sccs	"@(#)uts/kern/io:Makefile	1.5"

#	Convergent Technologies - System V - May 1983

include $(MAKEINC)/Makepre.h

LIBNAME = ../lib2

include ../cf/Makeflags

#	each file appearing in FILES must appear in LSRC
LSRC	= tt1.c tty.c err.c console.c\
	mem.c sys.c partab.c lp.c sw.c \
	gd.c gdfp.c gdhd.c \
	kbd.c ph.c rastop.s sysfont.c

SSRC	= bio.c i8274.c clist.c phsub.c

FILES =\
	bio.X\
	tt1.x\
	tty.x\
	clist.X\
	err.x\
	console.x\
	i8274.X\
	mem.x\
	sys.x\
	partab.x\
	lp.x\
	sw.x\
	gd.x\
	gdfp.x\
	gdhd.x\
	kbd.x\
	rastop.x\
	ph.x\
	phsub.X\
	sysfont.x

all:	Makeincludes $(LIBNAME) 

Makeincludes: $(LSRC) $(SSRC)
	$(INCCMD) $(LSRC) | $(SORT) | $(FILTER) | sed 's/o:/x:/' > Makeincludes
	$(INCCMD) $(SSRC) | $(SORT) | $(FILTER) | sed 's/o:/X:/' >> Makeincludes; \
	$(MAKE)

includes: $(LSRC) $(SSRC)
	$(INCCMD) $(LSRC) | $(SORT) | $(FILTER) | sed 's/o:/x:/' > Makeincludes
	$(INCCMD) $(SSRC) | $(SORT) | $(FILTER) | sed 's/o:/X:/' >> Makeincludes

rastop.s:	rastop.m4
	m4 rastop.m4 > rastop.s

.PRECIOUS:	$(LIBNAME)

$(LIBNAME): lib2.x
	-chmod 664 $(LIBNAME)

lib2.x:	$(FILES)
	$(AR) rv $(LIBNAME) `cat olist`
	rm -f `cat olist` olist
	touch $@

clean:
	-rm -f *.o rastop.s

clobber:	clean
	-rm -f $(LIBNAME) *.[xX]

populate:
	getunit

FRC:

include Makeincludes
include $(MAKEINC)/Makepost.h
