OBJ =   clrerr.o data.o doscan.o endopen.o errinfo.o fdopen.o \
	fgetc.o fgets.o filbuf.o findiop.o fopen.o fprintf.o \
	fputc.o fputs.o freopen.o fseek.o ftell.o getchar.o getpass.o \
	getgrent.o getgrgid.o getgrnam.o getpw.o getpwent.o getpwnam.o \
	getpwuid.o gets.o getw.o popen.o printf.o putchar.o \
	puts.o putw.o rew.o rdwr.o scanf.o setbuf.o \
	sprintf.o strout.o system.o ungetc.o doprnt.o memfile.o \
	stdioerr.o flsbuf.o
#
# makefile for standard I/O library
#
CFLAGS = -c -O -w
LDFLAGS = -r -x
ASMFLAGS = -u
I = /usr/include

.c.o:
	cc $(CFLAGS) $*.c
	ld $(LDFLAGS) $*.o; mv a.out $*.o
.s.o:
	as $(ASMFLAGS) -o $@ $<
	ld $(LDFLAGS) $@; mv a.out $@

all:            $(OBJ)

clrerr.o:	clrerr.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
data.o:		data.c		$I/stdio.h 
doprnt.o:	doprnt.c	$I/stdio.h $I/stdioerr.h $I/errno.h \
				$I/ctype.h 
doscan.o:	doscan.c	$I/stdio.h $I/stdioerr.h $I/errno.h \
				$I/ctype.h 
endopen.o:	endopen.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
errinfo.o:	errinfo.c	$I/stdioerr.h $I/errno.h 
fdopen.o:	fdopen.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
fgetc.o:	fgetc.c		$I/stdio.h 
fgets.o:	fgets.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
filbuf.o:	filbuf.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
findiop.o:	findiop.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
flsbuf.o:	flsbuf.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
fopen.o:	fopen.c		$I/stdio.h 
fprintf.o:	fprintf.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
fputc.o:	fputc.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
fputs.o:	fputs.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
freopen.o:	freopen.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
fseek.o:	fseek.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
ftell.o:	ftell.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
getchar.o:	getchar.c	$I/stdio.h 
getgrent.o:	getgrent.c	$I/stdio.h $I/grp.h 
getgrgid.o:	getgrgid.c	$I/grp.h 
getgrnam.o:	getgrnam.c	$I/grp.h 
getpass.o:	getpass.c	$I/stdio.h $I/signal.h $I/sgtty.h 
getpw.o:	getpw.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
getpwent.o:	getpwent.c	$I/stdio.h $I/pwd.h 
getpwnam.o:	getpwnam.c	$I/pwd.h 
getpwuid.o:	getpwuid.c	$I/pwd.h 
gets.o:		gets.c		$I/stdio.h 
getw.o:		getw.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
memfile.o:	memfile.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
popen.o:	popen.c		$I/stdio.h $I/stdioerr.h $I/errno.h \
				$I/signal.h 
printf.o:	printf.c	$I/stdio.h 
putchar.o:	putchar.c	$I/stdio.h 
puts.o:		puts.c		$I/stdio.h 
putw.o:		putw.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
rdwr.o:		rdwr.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
rew.o:		rew.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
scanf.o:	scanf.c		$I/stdio.h $I/stdioerr.h $I/errno.h 
setbuf.o:	setbuf.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
sprintf.o:	sprintf.c	$I/stdio.h 
stdioerr.o:	stdioerr.c	$I/stdio.h $I/stdioerr.h $I/errno.h 
strout.o:	strout.c	$I/stdio.h 
system.o:	system.c	$I/signal.h $I/stdioerr.h $I/errno.h 
ungetc.o:	ungetc.c	$I/stdio.h $I/stdioerr.h $I/errno.h 

lint:
	@lint -n *.c

