CFLAGS = -O

.SUFFIXES: .L

LOUT = acct.L alloc.L asm.L clock.L diag.L fakemx.L fio.L icode.L\
iget.L machdep.L main.L mck.L mem.L memdump.L nami.L pipe.L prf.L\
prim.L rdwri.L save.L sig.L sigact.L slp.L subr.L sys1.L sys2.L\
sys3.L sys4.L sys5.L sysent.L text.L trace.L trans.L trap.L

OBJ = acct.o alloc.o asm.o asmdump.o clock.o diag.o fakemx.o\
fio.o icode.o iget.o machdep.o main.o mck.o mem.o memdump.o nami.o\
pipe.o prf.o prim.o rdwri.o save.o sig.o sigact.o slp.o subr.o\
sys1.o sys2.o sys3.o sys4.o sys5.o sysent.o text.o trace.o\
trans.o trap.o

.c.L:
	@/lib/cpp -Dlint $< | /usr/lib/lint/lint1 -dhn-L$< > $@
.s.L:
	@/lib/cpp -Dlint $< | /usr/lib/lint/lint1 -dhn-L$< > $@
.c.o:
	cc -c $(CFLAGS) $<
.s.o:
	cc -c $<

a.out:  $(OBJ)
	@-echo Linking.;ld -r -x $(OBJ)
lint:   lints
	@echo Linting.;usort < lints | /usr/lib/lint/lint2 -hn
lints:  $(LOUT)
	@cat $(LOUT) > lints

acct.L:         acct.c
alloc.L:	alloc.c
asm.L:          asm.s
clock.L:	clock.c
diag.L:         diag.s
fakemx.L:	fakemx.c
fio.L:          fio.c
icode.L:	icode.s
iget.L:         iget.c
machdep.L:	machdep.c
main.L:         main.c
mck.L:          mck.c
mem.L:          mem.c
memdump.L:      memdump.c
nami.L:         nami.c
pipe.L:         pipe.c
prf.L:          prf.c
prim.L:         prim.c
rdwri.L:	rdwri.c
save.L:         save.s
sig.L:          sig.c
sigact.L:	sigact.c
slp.L:          slp.c
subr.L:         subr.c
sys1.L:         sys1.c
sys2.L:         sys2.c
sys3.L:         sys3.c
sys4.L:         sys4.c
sys5.L:         sys5.c
sysent.L:	sysent.c
text.L:         text.c
trace.L:	trace.c
trans.L:	trans.c
trap.L:         trap.c

acct.o acct.L:        acct.c    ../h/param.h ../h/systm.h ../h/acct.h \
				../h/dir.h ../h/user.h ../h/inode.h \
				../h/proc.h 
alloc.o alloc.L:      alloc.c   ../h/param.h ../h/systm.h ../h/mount.h \
				../h/filsys.h ../h/fblk.h ../h/conf.h \
				../h/buf.h ../h/inode.h ../h/ino.h \
				../h/dir.h ../h/user.h 
asm.o asm.L:          asm.s
asmdump.o:            asmdump.s
clock.o clock.L:      clock.c   ../h/param.h ../h/signal.h ../h/systm.h \
				../h/dir.h ../h/user.h ../h/proc.h \
				../h/370.h ../h/reg.h ../h/stats.h \
				../h/bitmap.h 
diag.o diag.L:        diag.s
fakemx.o fakemx.L:    fakemx.c  ../h/param.h ../h/dir.h ../h/user.h \
				../h/tty.h ../h/inode.h ../h/mx.h 
fio.o fio.L:          fio.c     ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/filsys.h ../h/file.h \
				../h/conf.h ../h/inode.h ../h/reg.h \
				../h/acct.h ../h/mount.h 
icode.o icode.L:      icode.s
iget.o iget.L:        iget.c    ../h/param.h ../h/systm.h ../h/mount.h \
				../h/dir.h ../h/user.h ../h/inode.h \
				../h/ino.h ../h/filsys.h ../h/conf.h \
				../h/buf.h 
machdep.o machdep.L:  machdep.c ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/inode.h ../h/proc.h \
				../h/reg.h ../h/370.h 
main.o main.L:        main.c    ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/filsys.h ../h/mount.h \
				../h/proc.h ../h/inode.h ../h/conf.h \
				../h/buf.h ../h/stats.h 
mck.o mck.L:          mck.c     ../h/param.h ../h/systm.h
mem.o mem.L:          mem.c     ../h/param.h ../h/proc.h ../h/dir.h \
				../h/user.h ../h/systm.h ../h/370.h \
				../h/text.h
memdump.o:	memdump.c	../h/ioconf.h ../h/param.h ../h/reg.h \
				../h/dir.h ../h/inode.h ../h/io.h \
				../h/ino.h ../h/user.h ../h/dasd.h 
nami.o nami.L:        nami.c    ../h/param.h ../h/systm.h ../h/inode.h \
				../h/mount.h ../h/dir.h ../h/user.h \
				../h/buf.h 
pipe.o pipe.L:        pipe.c    ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/inode.h ../h/file.h \
				../h/reg.h 
prf.o prf.L:          prf.c     ../h/param.h
prim.o prim.L:        prim.c    ../h/param.h ../h/tty.h ../h/systm.h \
				../h/conf.h ../h/buf.h 
rdwri.o rdwri.L:      rdwri.c   ../h/param.h ../h/systm.h ../h/inode.h \
				../h/dir.h ../h/user.h ../h/buf.h \
				../h/conf.h 
save.o save.L:        save.s
sig.o sig.L:          sig.c     ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/proc.h ../h/inode.h \
				../h/reg.h ../h/text.h ../h/signal.h \
				../h/370.h ../h/bitmap.h 
sigact.o sigact.L:    sigact.c  ../h/param.h
slp.o slp.L:          slp.c     ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/proc.h ../h/text.h \
				../h/file.h ../h/inode.h ../h/buf.h \
				../h/stats.h 
subr.o subr.L:        subr.c    ../h/param.h ../h/systm.h ../h/conf.h \
				../h/inode.h ../h/dir.h ../h/user.h \
				../h/buf.h 
sys1.o sys1.L:        sys1.c    ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/proc.h ../h/reg.h \
				../h/inode.h ../h/acct.h ../h/signal.h \
				../h/370.h ../h/bitmap.h ../h/text.h 
sys2.o sys2.L:        sys2.c    ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/reg.h ../h/file.h \
				../h/inode.h 
sys3.o sys3.L:        sys3.c    ../h/param.h ../h/systm.h ../h/mount.h \
				../h/ino.h ../h/reg.h ../h/buf.h \
				../h/filsys.h ../h/dir.h ../h/user.h \
				../h/inode.h ../h/file.h ../h/conf.h \
				../h/stat.h 
sys4.o sys4.L:        sys4.c    ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/reg.h ../h/inode.h \
				../h/proc.h ../h/timeb.h ../h/signal.h \
				../h/bitmap.h 
sys5.o sys5.L:        sys5.c    ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/mount.h ../h/buf.h \
				../h/filsys.h 
sysent.o sysent.L:    sysent.c  ../h/param.h ../h/systm.h
text.o text.L:        text.c    ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/proc.h ../h/text.h \
				../h/inode.h ../h/buf.h ../h/signal.h \
				../h/370.h 
trace.o trace.L:      trace.c   ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/signal.h ../h/proc.h \
				../h/inode.h ../h/reg.h ../h/370.h \
				../h/bitmap.h ../h/buf.h ../h/mon.h 
trans.o trans.L:      trans.c   ../h/param.h ../h/systm.h ../h/370.h \
				../h/dir.h ../h/user.h 
trap.o trap.L:        trap.c    ../h/param.h ../h/systm.h ../h/dir.h \
				../h/user.h ../h/proc.h ../h/reg.h \
				../h/signal.h ../h/stats.h ../h/370.h \
				../h/bitmap.h ../h/mon.h 

