#sccs	"@(#)libc/port/stdio:Makefile	1.6"

#
# makefile for libc/port/stdio
#
#

.SUFFIXES: .p

include $(MAKEINC)/Makepre.h

OBJECTS=\
bufctl.o    clrerr.o    ctermid.o	\
cuserid.o   data.o      doscan.o    fdopen.o	\
fgetc.o     fgets.o     filbuf.o    findiop.o	\
flsbuf.o    fopen.o     fputc.o     fputs.o	\
fread.o     fseek.o     ftell.o     fwrite.o	\
getchar.o   getpass.o   gets.o      getw.o	\
popen.o     putchar.o   puts.o      putw.o	\
rew.o       scanf.o     setbuf.o    setvbuf.o	system.o	\
tempnam.o   tmpfile.o   tmpnam.o    ungetc.o	highbuf.o

POBJECTS=\
bufctl.p    clrerr.p    ctermid.p	\
cuserid.p   data.p      doscan.p    fdopen.p	\
fgetc.p     fgets.p     filbuf.p    findiop.p	\
flsbuf.p    fopen.p     fputc.p     fputs.p	\
fread.p     fseek.p     ftell.p     fwrite.p	\
getchar.p   getpass.p   gets.p      getw.p	\
popen.p     putchar.p   puts.p      putw.p	\
rew.p       scanf.p     setbuf.p    setvbuf.p	system.p	\
tempnam.p   tmpfile.p   tmpnam.p    ungetc.p	highbuf.p

DEPENDLIST = bufctl.c \
	clrerr.c \
	ctermid.c \
	cuserid.c \
	data.c \
	doscan.c \
	fdopen.c \
	fgetc.c \
	fgets.c \
	filbuf.c \
	findiop.c \
	flsbuf.c \
	fopen.c \
	fputc.c \
	fputs.c \
	fread.c \
	fseek.c \
	ftell.c \
	fwrite.c \
	getchar.c \
	getpass.c \
	gets.c \
	getw.c \
	highbuf.c \
	popen.c \
	putchar.c \
	puts.c \
	putw.c \
	rew.c \
	scanf.c \
	setbuf.c \
	setvbuf.c \
	stdiom.h \
	system.c \
	tempnam.c \
	tmpfile.c \
	tmpnam.c \
	ungetc.c

all: Makeincludes $(OBJECTS)

Makeincludes: $(DEPENDLIST)
	$(INCCMD) $(DEPENDLIST) | $(SORT) | $(FILTER) > Makeincludes;\
	$(MAKE)

includes: $(DEPENDLIST)
	$(INCCMD) $(DEPENDLIST) | $(SORT) | $(FILTER) > Makeincludes

prof: $(POBJECTS)

clean clobber:
	rm -fr *.[po]

install:

populate:
	getunit

include Makeincludes
include $(MAKEINC)/Makepost.h

.c.o:
	@echo $(@F):
	$(CC) $(CFLAGS) -c $(*F).c

.c.p:
	@echo $(@F):
	$(CC) $(CFLAGS) -S -c -p $(*F).c
	$(AS) -o $(*F).p $(*F).s
	@rm $(*F).s
