head     1.7;
branch   ;
access   ;
symbols  ;
locks    bin:1.7;
comment  @@;


1.7
date     91.07.24.07.58.40;  author bin;  state Exp;
branches ;
next     1.6;

1.6
date     91.07.15.14.46.09;  author bin;  state Exp;
branches ;
next     1.5;

1.5
date     91.07.03.13.19.17;  author bin;  state Exp;
branches ;
next     1.4;

1.4
date     91.06.20.14.46.25;  author bin;  state Exp;
branches ;
next     1.3;

1.3
date     91.06.18.08.41.07;  author bin;  state Exp;
branches ;
next     1.2;

1.2
date     91.06.18.08.18.14;  author bin;  state Exp;
branches ;
next     1.1;

1.1
date     90.08.02.13.38.48;  author root;  state Exp;
branches ;
next     ;


desc
@From alpha driver kit
@


1.7
log
@update prov by hal
@
text
@# Makefile for AT specific Coherent drivers

# System utility directory
USRSYS=/usr/sys

# Source directory
USRSRC=/usr/src/sys

# Loadable driver directory
LDRV=$(USRSYS)/ldrv

# Include directories
USRINC=/usr/include
SYSINC=/usr/include/sys

# Object directory
KOBJ=/usr/kobj

ARCHIVES=\
	$(USRSYS)/lib/al.a \
	$(USRSYS)/lib/at.a \
	$(USRSYS)/lib/ati.a \
	$(USRSYS)/lib/fl.a \
	$(USRSYS)/lib/gr.a \
	$(USRSYS)/lib/hs.a \
	$(USRSYS)/lib/kb.a \
	$(USRSYS)/lib/lp.a \
	$(USRSYS)/lib/mm.a \
	$(USRSYS)/lib/ms.a \
	$(USRSYS)/lib/rm.a \
	$(USRSYS)/lib/rs.a \
	$(USRSYS)/lib/st.a \
	$(USRSYS)/lib/tn.a \

DRVOBJ=\
	$(KOBJ)/alx.o \
	$(KOBJ)/at.o \
	$(KOBJ)/atas.o \
	$(KOBJ)/ms.o \
	$(KOBJ)/ati.o \
	$(KOBJ)/com1.o $(KOBJ)/com2.o \
	$(KOBJ)/fdisk.o \
	$(KOBJ)/fl.o \
	$(KOBJ)/fontw.o \
	$(KOBJ)/gr.o $(KOBJ)/gras.o \
	$(KOBJ)/hs.o \
	$(KOBJ)/kb.o \
	$(KOBJ)/mm.o \
	$(KOBJ)/lp.o \
	$(KOBJ)/mmas.o \
	$(KOBJ)/rm.o \
	$(KOBJ)/rs0.o $(KOBJ)/rs1.o $(KOBJ)/rsas.o \
	$(KOBJ)/st.o \
	$(KOBJ)/tn.o $(KOBJ)/tnas.o

DRIVERS=\
	$(LDRV)/al0 \
	$(LDRV)/al1 \
	$(LDRV)/at \
	$(LDRV)/fl \
	$(LDRV)/gr \
	$(LDRV)/hs \
	$(LDRV)/lp \
	$(LDRV)/mm \
	$(LDRV)/ms \
	$(LDRV)/rm

install: $(ARCHIVES) $(DRIVERS)
	@@exec /bin/sync

all:	$(DRVOBJ)
	@@exec /bin/sync

$(USRSYS)/lib/al.a: $(KOBJ)/com1.o $(KOBJ)/com2.o $(KOBJ)/alx.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/at.a: $(KOBJ)/at.o $(KOBJ)/atas.o $(KOBJ)/fdisk.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/ati.a: $(KOBJ)/mm.o $(KOBJ)/ati.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/fl.a: $(KOBJ)/fl.o
	rm -f $(USRSYS)/lib/fl.a
	ar rc $(USRSYS)/lib/fl.a $(KOBJ)/fl.o
$(USRSYS)/lib/gr.a: $(KOBJ)/mm.o $(KOBJ)/gr.o $(KOBJ)/gras.o \
				$(KOBJ)/fontw.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/hs.a: $(KOBJ)/hs.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/kb.a: $(KOBJ)/kb.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/lp.a: $(KOBJ)/lp.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/mm.a: $(KOBJ)/mm.o $(KOBJ)/mmas.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/ms.a: $(KOBJ)/ms.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/rm.a: $(KOBJ)/rm.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/rs.a: $(KOBJ)/rs0.o $(KOBJ)/rs1.o $(KOBJ)/rsas.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/st.a: $(KOBJ)/st.o
	rm -f $@@
	ar rc $@@ $<
$(USRSYS)/lib/tn.a: $(KOBJ)/tn.o $(KOBJ)/tnas.o
	rm -f $@@
	ar rc $@@ $<

$(KOBJ)/alx.o:				\
		$(SYSINC)/clist.h	\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/errno.h	\
		$(SYSINC)/i8086.h	\
		$(SYSINC)/ins8250.h	\
		$(SYSINC)/sched.h	\
		$(SYSINC)/stat.h	\
		$(SYSINC)/timeout.h	\
		$(SYSINC)/tty.h		$(SYSINC)/ktty.h \
		$(SYSINC)/uproc.h	\
		alx.c
	$(CC) $(CFLAGS) -c -o $@@ alx.c

$(KOBJ)/at.o: at.c			\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/fdisk.h	\
		$(SYSINC)/hdioctl.h	\
		$(SYSINC)/buf.h		\
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(SYSINC)/stat.h	\
		$(SYSINC)/uproc.h	\
		$(USRINC)/errno.h
	$(CC) $(CFLAGS) -DVERBOSE=1 -c -o $@@ at.c

$(KOBJ)/atas.o: atas.s
	$(AS) -go $@@ $<

$(KOBJ)/ati.o: ati.m
	$(CC) $(CFLAGS) -DATI_132=1 -c -o $@@ ati.m

$(KOBJ)/com1.o: 			\
		$(SYSINC)/al.h		\
		$(SYSINC)/clist.h	\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/i8086.h	\
		$(SYSINC)/ins8250.h	\
		$(SYSINC)/sched.h	\
		$(SYSINC)/stat.h	\
		$(SYSINC)/timeout.h	\
		$(SYSINC)/tty.h		$(SYSINC)/ktty.h \
		$(SYSINC)/uproc.h	\
		al.c
	$(CC) $(CFLAGS) -DALCOM1=1 -c -o $@@ al.c

$(KOBJ)/com2.o: 			\
		$(SYSINC)/al.h		\
		$(SYSINC)/clist.h	\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/i8086.h	\
		$(SYSINC)/ins8250.h	\
		$(SYSINC)/sched.h	\
		$(SYSINC)/stat.h	\
		$(SYSINC)/timeout.h	\
		$(SYSINC)/tty.h		$(SYSINC)/ktty.h \
		$(SYSINC)/uproc.h	\
		al.c
	$(CC) $(CFLAGS) -DALCOM2=1 -c -o $@@ al.c

$(KOBJ)/fdisk.o:			\
		$(SYSINC)/buf.h		\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/errno.h	\
		$(SYSINC)/fdisk.h	\
		$(SYSINC)/inode.h	\
		$(SYSINC)/uproc.h	\
		fdisk.c
	$(CC) $(CFLAGS) -c -o $@@ fdisk.c

$(KOBJ)/fl.o:				\
		$(SYSINC)/buf.h		\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(SYSINC)/dmac.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/fdioctl.h	\
		$(SYSINC)/i8086.h	\
		$(SYSINC)/sched.h	\
		$(SYSINC)/stat.h	\
		$(SYSINC)/timeout.h	\
		$(SYSINC)/uproc.h	\
		fl.c
	$(CC) $(CFLAGS) -c -o $@@ fl.c

$(KOBJ)/fontw.o: tools/fontgen.c
	$(CC) -o tools/fontgen tools/fontgen.c
	exec tools/fontgen > fontw.s
	exec /bin/rm tools/fontgen
	$(AS) -gxo $(KOBJ)/fontw.o fontw.s
	exec /bin/rm fontw.s

$(KOBJ)/gr.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/sched.h	\
		$(SYSINC)/timeout.h	\
		$(SYSINC)/types.h	\
		$(SYSINC)/uproc.h	\
		gr.c
	$(CC) $(CFLAGS) -c -o $@@ gr.c

$(KOBJ)/gras.o: gras.m
	$(CC) $(CFLAGS) -c -o $@@ gras.m

$(KOBJ)/hgas.o: gras.s
	$(CC) $(CFLAGS) -c -o $@@ -DHERCULES gras.m

$(KOBJ)/hs.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/ins8250.h	\
		$(SYSINC)/proc.h	$(SYSINC)/types.h $(SYSINC)/poll.h \
		$(SYSINC)/stat.h	\
		$(SYSINC)/tty.h		$(SYSINC)/ktty.h \
		$(SYSINC)/uproc.h	\
		hs.c
	$(CC) $(CFLAGS) -c -o $@@ hs.c

$(KOBJ)/kb.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/i8086.h	\
		$(SYSINC)/sched.h	\
		$(USRINC)/signal.h	\
		$(SYSINC)/stat.h	\
		$(SYSINC)/tty.h		$(SYSINC)/ktty.h \
		$(SYSINC)/uproc.h	\
		kb.c
	$(CC) $(CFLAGS) -c -o $@@ kb.c

$(KOBJ)/lp.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/i8086.h	\
		$(SYSINC)/io.h		\
		$(SYSINC)/proc.h	$(SYSINC)/types.h $(SYSINC)/poll.h \
		$(SYSINC)/stat.h	\
		$(SYSINC)/timeout.h	\
		$(SYSINC)/uproc.h	\
		lp.c
	$(CC) $(CFLAGS) -c -o $@@ lp.c

$(KOBJ)/mm.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/sched.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/stat.h	\
		$(SYSINC)/io.h		\
		$(SYSINC)/tty.h		$(SYSINC)/ktty.h \
		$(SYSINC)/uproc.h	\
		$(SYSINC)/timeout.h	\
		mm.c
	$(CC) $(CFLAGS) -c -o $@@ mm.c

$(KOBJ)/mmas.o: mmas.m
	$(CC) $(CFLAGS) -c -o $@@ mmas.m

$(KOBJ)/ms.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/uproc.h	\
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(SYSINC)/ms.h		\
		$(USRINC)/errno.h	\
		ms.c
	$(CC) $(CFLAGS) -c -o $@@ ms.c

$(KOBJ)/rm.o: rm.c			\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/buf.h		\
		$(USRINC)/errno.h	\
		$(SYSINC)/uproc.h	\
		$(SYSINC)/seg.h		\
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(SYSINC)/inode.h	\
		$(SYSINC)/stat.h
	$(CC) $(CFLAGS) -c -o $@@ rm.c

$(KOBJ)/rs0.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/ins8250.h	\
		$(SYSINC)/proc.h	$(SYSINC)/types.h $(SYSINC)/poll.h \
		$(SYSINC)/sched.h	\
		$(SYSINC)/stat.h	\
		$(USRINC)/termio.h	\
		$(SYSINC)/uproc.h	\
		rs.c
	$(CC) $(CFLAGS) -DRS0 -c -o $@@ rs.c

$(KOBJ)/rs1.o: 				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/ins8250.h	\
		$(SYSINC)/proc.h	$(SYSINC)/types.h $(SYSINC)/poll.h \
		$(SYSINC)/sched.h	\
		$(SYSINC)/stat.h	\
		$(USRINC)/termio.h	\
		$(SYSINC)/uproc.h	\
		rs.c
	$(CC) $(CFLAGS) -DRS1 -c -o $@@ rs.c

$(KOBJ)/rsas.o: rsas.s
	$(AS) -gxo $@@ rsas.s

$(KOBJ)/st.o:				\
		$(SYSINC)/buf.h		\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(SYSINC)/const.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/inode.h	\
		$(SYSINC)/mtioctl.h	\
		$(SYSINC)/sched.h	\
		$(SYSINC)/seg.h		\
		$(SYSINC)/stat.h	\
		$(SYSINC)/uproc.h	\
		st.c
	$(CC) $(CFLAGS) -c -o $@@ st.c

$(KOBJ)/tn.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/sched.h	\
		$(SYSINC)/timeout.h	\
		$(SYSINC)/types.h	\
		$(SYSINC)/uproc.h	\
		tn.c
	$(CC) $(CFLAGS) -c -o $@@ tn.c

$(KOBJ)/tnas.o: tnas.s
	$(AS) -gxo $@@ tnas.s

# How to make loadable drivers.

$(LDRV)/al0:	$(USRSYS)/lib/al.a
	( cd $(USRSYS); ldconfig al0 )

$(LDRV)/al1:	$(USRSYS)/lib/al.a
	( cd $(USRSYS); ldconfig al1 )

$(LDRV)/at:	$(USRSYS)/lib/at.a
	( cd $(USRSYS); ldconfig at )

$(LDRV)/fl:	$(USRSYS)/lib/fl.a
	( cd $(USRSYS); ldconfig fl )

$(LDRV)/gr:	$(USRSYS)/lib/gr.a
	( cd $(USRSYS); ldconfig gr )

$(LDRV)/hs:	$(USRSYS)/lib/hs.a
	( cd $(USRSYS); ldconfig hs )

$(LDRV)/lp:	$(USRSYS)/lib/lp.a
	( cd $(USRSYS); ldconfig lp )

$(LDRV)/mm:	$(USRSYS)/lib/mm.a
	( cd $(USRSYS); ldconfig mm )

$(LDRV)/ms:	$(USRSYS)/lib/ms.a
	( cd $(USRSYS); ldconfig ms )

$(LDRV)/rm:	$(USRSYS)/lib/rm.a
	( cd $(USRSYS); ldconfig rm )
@


1.6
log
@update by hal for relocateable objects
@
text
@a1 2
# Environment variable USRSYS must be defined!  It used to be /usr/sys - 
# Environment variable KOBJ must be defined!  Try /tmp/kobj
d3 9
d16 2
a17 7
DEBUG=0
AS=exec /bin/as
CC=exec /bin/cc
CPP=exec /lib/icpp
CFLAGS=
AFLAGS=-gx
NKB=nkb
d19 1
a19 4
# Loadable driver directory
LDRV=$(USRSYS)/ldrv

ARCHIVES=$(USRSYS)/lib/aha154x.a \
d26 1
d35 1
a35 1
DRVOBJ=	$(KOBJ)/aha.o \
a38 1
	$(KOBJ)/bufq.o \
a46 2
	$(KOBJ)/nkb.o \
	$(KOBJ)/gkb.o \
a52 3
	$(KOBJ)/scsi.o \
	$(KOBJ)/ss.o \
	$(KOBJ)/ssas.o \
d54 1
a54 1
	$(KOBJ)/tn.o $(KOBJ)/tnas.o \
d56 1
a56 1
DRIVERS=$(LDRV)/aha154x \
d66 1
a66 2
	$(LDRV)/rm \
	$(LDRV)/ss \
d74 1
a74 1
$(USRSYS)/lib/aha154x.a: $(KOBJ)/scsi.o $(KOBJ)/aha.o $(KOBJ)/fdisk.o
a76 3
$(USRSYS)/lib/al.a: $(KOBJ)/com1.o $(KOBJ)/com2.o $(KOBJ)/alx.o
	rm -f $@@
	ar rc $@@ $<
d80 1
a80 1
$(USRSYS)/lib/ati.a: $(KOBJ)/mm.o $(KOBJ)/ati.o $(KOBJ)/$(NKB).o
d87 1
a87 1
				$(KOBJ)/fontw.o $(KOBJ)/$(NKB).o
d93 3
d99 1
a99 1
$(USRSYS)/lib/mm.a: $(KOBJ)/mm.o $(KOBJ)/mmas.o $(KOBJ)/$(NKB).o
d111 1
a111 1
$(USRSYS)/lib/ss.a: $(KOBJ)/ss.o $(KOBJ)/ssas.o $(KOBJ)/bufq.o $(KOBJ)/fdisk.o
a113 3
$(USRSYS)/lib/st.a: $(KOBJ)/st.o
	rm -f $@@
	ar rc $@@ $<
a117 11
$(KOBJ)/aha.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h $(SYSINC)/mmu.h \
		$(SYSINC)/buf.h		\
		$(SYSINC)/sched.h		\
		$(SYSINC)/scsiwork.h	\
		$(SYSINC)/aha154x.h	\
		aha.c
	$(CC) $(CFLAGS) -c -o $@@ aha.c

d133 1
a133 1
	$(CC) $(CFLAGS) -c -o $(KOBJ)/alx.o alx.c
d135 13
a147 2
$(KOBJ)/at.o: at.c
	$(CC) $(CFLAGS) -DVERBOSE=1 -c -o $@@ $<
d152 2
a153 4
$(KOBJ)/ati.o: ati.s
	$(CPP) -E -DATI_132=1 ati.s > ati.i
	$(AS) -gxo $(KOBJ)/ati.o ati.i
	exec /bin/rm -f ati.i
a154 8
$(KOBJ)/bufq.o:			\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h $(SYSINC)/mmu.h \
		$(SYSINC)/buf.h		\
		bufq.c
	$(CC) $(CFLAGS) -DDEBUG=$(DEBUG) -c -o $@@ bufq.c

d162 1
d181 1
d193 1
a193 1
$(KOBJ)/dmareq.o:			\
a198 1
		$(SYSINC)/dmac.h	\
a199 16
		$(SYSINC)/io.h		\
		$(SYSINC)/proc.h	$(SYSINC)/types.h $(SYSINC)/poll.h \
		$(SYSINC)/sched.h	\
		$(SYSINC)/seg.h		\
		$(SYSINC)/stat.h	\
		$(SYSINC)/uproc.h	\
		dmareq.c
	$(CC) $(CFLAGS) -c -o $@@ dmareq.c

$(KOBJ)/fdisk.o:			\
		$(SYSINC)/buf.h		\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/errno.h	\
d212 1
d236 1
d245 2
a246 4
$(KOBJ)/gras.o: gras.s
	$(CPP) -E gras.s > gras.i
	$(AS) -gxo $@@ gras.i
	exec /bin/rm -f gras.i
d249 1
a249 3
	$(CPP) -E -DHERCULES gras.s > hgas.i
	$(AS) -gxo $@@ hgas.i
	exec /bin/rm -f hgas.i
a250 3
$(KOBJ)/hd.o: hd.c
	$(CC) $(CFLAGS) -c -o $@@ hd.c

d256 1
d271 1
d282 1
a282 1
$(KOBJ)/gkb.o:				\
d287 1
a289 32
		$(SYSINC)/sched.h	\
		$(USRINC)/signal.h	\
		$(SYSINC)/stat.h	\
		$(SYSINC)/tty.h		$(SYSINC)/ktty.h \
		$(SYSINC)/uproc.h	\
		gkb.c
	$(CC) $(CFLAGS) -c -o $@@ gkb.c

$(KOBJ)/nkb.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/errno.h	\
		$(SYSINC)/i8086.h	\
		$(SYSINC)/sched.h	\
		$(SYSINC)/seg.h		\
		$(USRINC)/signal.h	\
		$(SYSINC)/stat.h	\
		$(SYSINC)/tty.h		$(SYSINC)/ktty.h \
		$(SYSINC)/uproc.h	\
		$(SYSINC)/kb.h		\
		nkb.c
	$(CC) $(CFLAGS) -c -o $@@ nkb.c

$(KOBJ)/lp.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/errno.h	\
		$(SYSINC)/i8086.h	\
d312 2
a313 4
$(KOBJ)/mmas.o: mmas.s
	-$(CPP) -E mmas.s > mmas.i
	$(AS) -gxo $@@ mmas.i
	exec /bin/rm -f mmas.i
d321 1
d327 12
a338 1
$(KOBJ)/rm.o: rm.c
d346 1
d362 1
d376 2
a377 1
$(KOBJ)/scsi.o:				\
a379 41
					$(SYSINC)/fun.h $(SYSINC)/mmu.h \
		$(SYSINC)/fdisk.h	\
		$(SYSINC)/hdioctl.h	\
		$(SYSINC)/sdioctl.h	\
		$(SYSINC)/buf.h		\
		$(SYSINC)/con.h		\
		$(SYSINC)/stat.h	\
		$(SYSINC)/uproc.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/scsiwork.h	\
		scsi.c
	$(CC) $(CFLAGS) -c -o $(KOBJ)/scsi.o scsi.c

$(KOBJ)/ss.o:				\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h $(SYSINC)/mmu.h \
		$(SYSINC)/io.h		\
		$(SYSINC)/sched.h	\
		$(SYSINC)/uproc.h	\
		$(SYSINC)/proc.h	\
		$(SYSINC)/con.h		\
		$(SYSINC)/stat.h	\
		$(SYSINC)/devices.h	\
		$(USRINC)/errno.h	\
		$(SYSINC)/ss.h		\
		$(SYSINC)/fdisk.h	\
		$(SYSINC)/hdioctl.h	\
		$(SYSINC)/buf.h		\
		$(SYSINC)/scsiwork.h	\
		ss.c
	$(CC) $(CFLAGS) -DDEBUG=$(DEBUG) -c -o $(KOBJ)/ss.o ss.c

$(KOBJ)/ssas.o:				\
		ssas.s
	$(AS) -go $@@ $<

$(KOBJ)/st.o:				\
		$(SYSINC)/buf.h		\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
d382 1
d399 1
a412 3
$(LDRV)/aha154x:	$(USRSYS)/lib/aha154x.a
	( cd $(USRSYS); ldconfig aha154x )

a441 3

$(LDRV)/ss:	$(USRSYS)/lib/ss.a
	( cd $(USRSYS); ldconfig ss )
@


1.5
log
@update provided by hal
@
text
@d3 1
d35 26
a60 25
DRVOBJ=	objects/aha.o \
	objects/alx.o \
	objects/at.o \
	objects/atas.o \
	objects/bufq.o \
	objects/ms.o \
	objects/ati.o \
	objects/com1.o objects/com2.o \
	objects/fdisk.o \
	objects/fl.o \
	objects/fontw.o \
	objects/gr.o objects/gras.o \
	objects/hs.o \
	objects/nkb.o \
	objects/kb.o \
	objects/mm.o \
	objects/lp.o \
	objects/mmas.o \
	objects/rm.o \
	objects/rs0.o objects/rs1.o objects/rsas.o \
	objects/scsi.o \
	objects/ss.o \
	objects/ssas.o \
	objects/st.o \
	objects/tn.o objects/tnas.o \
d81 1
a81 1
$(USRSYS)/lib/aha154x.a: objects/scsi.o objects/aha.o objects/fdisk.o
d84 1
a84 1
$(USRSYS)/lib/al.a: objects/com1.o objects/com2.o objects/alx.o
d87 1
a87 1
$(USRSYS)/lib/at.a: objects/at.o objects/atas.o objects/fdisk.o
d90 1
a90 1
$(USRSYS)/lib/ati.a: objects/mm.o objects/ati.o objects/$(NKB).o
d93 1
a93 1
$(USRSYS)/lib/fl.a: objects/fl.o
d95 3
a97 3
	ar rc $(USRSYS)/lib/fl.a objects/fl.o
$(USRSYS)/lib/gr.a: objects/mm.o objects/gr.o objects/gras.o \
				objects/fontw.o objects/$(NKB).o
d100 1
a100 1
$(USRSYS)/lib/hs.a: objects/hs.o
d103 1
a103 1
$(USRSYS)/lib/lp.a: objects/lp.o
d106 1
a106 1
$(USRSYS)/lib/mm.a: objects/mm.o objects/mmas.o objects/$(NKB).o
d109 1
a109 1
$(USRSYS)/lib/ms.a: objects/ms.o
d112 1
a112 1
$(USRSYS)/lib/rm.a: objects/rm.o
d115 1
a115 1
$(USRSYS)/lib/rs.a: objects/rs0.o objects/rs1.o objects/rsas.o
d118 1
a118 1
$(USRSYS)/lib/ss.a: objects/ss.o objects/ssas.o objects/bufq.o objects/fdisk.o
d121 1
a121 1
$(USRSYS)/lib/st.a: objects/st.o
d124 1
a124 1
$(USRSYS)/lib/tn.a: objects/tn.o objects/tnas.o
d128 1
a128 1
objects/aha.o:				\
d139 1
a139 1
objects/alx.o:				\
d154 1
a154 1
	$(CC) $(CFLAGS) -c -o objects/alx.o alx.c
d156 1
a156 1
objects/at.o: at.c
d159 1
a159 1
objects/atas.o: atas.s
d162 1
a162 1
objects/ati.o: ati.s
d164 1
a164 1
	$(AS) -gxo objects/ati.o ati.i
d167 1
a167 1
objects/bufq.o:			\
d175 1
a175 1
objects/com1.o: 			\
d193 1
a193 1
objects/com2.o: 			\
d211 1
a211 1
objects/dmareq.o:			\
d228 1
a228 1
objects/fdisk.o:			\
d241 1
a241 1
objects/fl.o:				\
d258 1
a258 1
objects/fontw.o: tools/fontgen.c
d262 1
a262 1
	$(AS) -gxo objects/fontw.o fontw.s
d265 1
a265 1
objects/gr.o:				\
d278 1
a278 1
objects/gras.o: gras.s
d283 1
a283 1
objects/hgas.o: gras.s
d288 1
a288 1
objects/hd.o: hd.c
d291 1
a291 1
objects/hs.o:				\
d305 1
a305 1
objects/kb.o:				\
d320 1
a320 1
objects/nkb.o:				\
d328 15
d352 1
a352 1
objects/lp.o:				\
d367 1
a367 1
objects/mm.o:				\
d381 1
a381 1
objects/mmas.o: mmas.s
d386 1
a386 1
objects/ms.o:				\
d397 1
a397 1
objects/rm.o: rm.c
d400 1
a400 1
objects/rs0.o:				\
d415 1
a415 1
objects/rs1.o: 				\
d430 1
a430 1
objects/rsas.o: rsas.s
d433 1
a433 1
objects/scsi.o:				\
d447 1
a447 1
	$(CC) $(CFLAGS) -c -o objects/scsi.o scsi.c
d449 1
a449 1
objects/ss.o:				\
d467 1
a467 1
	$(CC) $(CFLAGS) -DDEBUG=$(DEBUG) -c -o objects/ss.o ss.c
d469 1
a469 1
objects/ssas.o:				\
d473 1
a473 1
objects/st.o:				\
d490 1
a490 1
objects/tn.o:				\
d503 1
a503 1
objects/tnas.o: tnas.s
@


1.4
log
@update provided by hal
@
text
@d14 1
d47 3
a49 1
	objects/nkb.o objects/mm.o \
d88 1
a88 1
$(USRSYS)/lib/ati.a: objects/mm.o objects/ati.o objects/nkb.o
d95 1
a95 1
				objects/fontw.o objects/nkb.o
d104 1
a104 1
$(USRSYS)/lib/mm.a: objects/mm.o objects/mmas.o objects/nkb.o
d303 15
d326 1
a328 1
		$(SYSINC)/timeout.h	\
d331 1
@


1.3
log
@bob h added new environment variable $USRKER for header file paths
for kernel specific headers.
@
text
@a6 2
KERINC=$(USRKER)/src/sys/sys
DRVINC=$(USRKER)/src/sys/i8086/sys
d12 1
a12 1
CFLAGS=-I$(KERINC) -I$(DRVINC)
a14 2
# USRSYS=$USRSYS

d124 1
a124 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d126 1
a126 1
					$(SYSINC)/fun.h $(DRVINC)/mmu.h \
d129 2
a130 2
		$(DRVINC)/scsiwork.h	\
		$(DRVINC)/aha154x.h	\
d135 2
a136 2
		$(KERINC)/clist.h	\
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d141 2
a142 2
		$(DRVINC)/i8086.h	\
		$(DRVINC)/ins8250.h	\
d146 1
a146 1
		$(SYSINC)/tty.h		$(KERINC)/ktty.h \
d163 1
a163 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d165 1
a165 1
					$(SYSINC)/fun.h $(DRVINC)/mmu.h \
d171 3
a173 3
		$(DRVINC)/al.h		\
		$(KERINC)/clist.h	\
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d178 2
a179 2
		$(DRVINC)/i8086.h	\
		$(DRVINC)/ins8250.h	\
d183 1
a183 1
		$(SYSINC)/tty.h		$(KERINC)/ktty.h \
d189 3
a191 3
		$(DRVINC)/al.h		\
		$(KERINC)/clist.h	\
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d196 2
a197 2
		$(DRVINC)/i8086.h	\
		$(DRVINC)/ins8250.h	\
d201 1
a201 1
		$(SYSINC)/tty.h		$(KERINC)/ktty.h \
d208 1
a208 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d212 1
a212 1
		$(DRVINC)/dmac.h	\
d225 1
a225 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d238 1
a238 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d242 1
a242 1
		$(DRVINC)/dmac.h	\
d245 1
a245 1
		$(DRVINC)/i8086.h	\
d261 1
a261 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d287 1
a287 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d292 1
a292 1
		$(DRVINC)/ins8250.h	\
d295 1
a295 1
		$(SYSINC)/tty.h		$(KERINC)/ktty.h \
d301 1
a301 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d306 1
a306 1
		$(DRVINC)/i8086.h	\
d311 1
a311 1
		$(SYSINC)/tty.h		$(KERINC)/ktty.h \
d317 1
a317 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d322 1
a322 1
		$(DRVINC)/i8086.h	\
d332 1
a332 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d339 1
a339 1
		$(SYSINC)/tty.h		$(KERINC)/ktty.h \
d351 1
a351 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d365 1
a365 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d370 1
a370 1
		$(DRVINC)/ins8250.h	\
d380 1
a380 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d385 1
a385 1
		$(DRVINC)/ins8250.h	\
d398 1
a398 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d400 1
a400 1
					$(SYSINC)/fun.h $(DRVINC)/mmu.h \
d409 1
a409 1
		$(DRVINC)/scsiwork.h	\
d414 1
a414 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d416 1
a416 1
					$(SYSINC)/fun.h $(DRVINC)/mmu.h \
d425 1
a425 1
		$(DRVINC)/ss.h		\
d429 1
a429 1
		$(DRVINC)/scsiwork.h	\
d439 1
a439 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
d455 1
a455 1
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
@


1.2
log
@update provided by hal
@
text
@d7 2
a8 2
KERINC=/usr/src/sys/sys
DRVINC=/usr/src/sys/i8086/sys
@


1.1
log
@Initial revision
@
text
@a0 1
#
d2 1
a2 6
#
AS=exec /bin/as
CC=exec /bin/cc
CPP=exec /lib/cpp
CFLAGS=-I.. -I../sys -I../.. -I../../sys -I/usr/include/sys
AFLAGS=-gx
a8 1
USRSYS=/usr/sys
d10 15
a24 1
ARCHIVES=$(USRSYS)/lib/al.a \
a26 1
	$(USRSYS)/lib/gm.a \
a32 1
	$(USRSYS)/lib/rp.a \
d37 5
a41 1
DRVOBJ=	objects/alx.o \
d48 3
a50 3
	objects/gr.o objects/gras.o objects/gmas.o \
	objects/hs.o objects/clocked.o \
	objects/kb.o objects/mm.o \
a53 1
	objects/rp.o objects/rpas.o \
d55 3
d61 14
a74 1
install: $(ARCHIVES)
d80 3
d84 8
a91 5
	rm -f $(USRSYS)/lib/al.a
	ar rc $(USRSYS)/lib/al.a objects/com1.o objects/com2.o objects/alx.o
$(USRSYS)/lib/ati.a: objects/mm.o objects/ati.o objects/kb.o
	rm -f $(USRSYS)/lib/ati.a
	ar rc $(USRSYS)/lib/ati.a objects/mm.o objects/ati.o objects/kb.o
a94 5
$(USRSYS)/lib/gm.a: objects/mm.o objects/gr.o objects/gmas.o \
				objects/fontw.o objects/kb.o
	rm -f $(USRSYS)/lib/gm.a
	ar rc $(USRSYS)/lib/gm.a objects/mm.o objects/gr.o objects/gmas.o \
				objects/fontw.o objects/kb.o
d96 6
a101 7
				objects/fontw.o objects/kb.o
	rm -f $(USRSYS)/lib/gr.a
	ar rc $(USRSYS)/lib/gr.a objects/mm.o objects/gr.o objects/gras.o \
				objects/fontw.o objects/kb.o
$(USRSYS)/lib/hs.a: objects/hs.o objects/clocked.o
	rm -f $(USRSYS)/lib/hs.a
	ar rc $(USRSYS)/lib/hs.a objects/hs.o objects/clocked.o
d103 5
a107 5
	rm -f $(USRSYS)/lib/lp.a
	ar rc $(USRSYS)/lib/lp.a objects/lp.o
$(USRSYS)/lib/mm.a: objects/mm.o objects/mmas.o objects/kb.o
		rm -f $(USRSYS)/lib/mm.a
	ar rc $(USRSYS)/lib/mm.a objects/mm.o objects/mmas.o objects/kb.o
d109 2
a110 2
	rm -f $(USRSYS)/lib/ms.a
	ar rc $(USRSYS)/lib/ms.a objects/ms.o
d112 2
a113 5
	rm -f $(USRSYS)/lib/rm.a
	ar rc $(USRSYS)/lib/rm.a objects/rm.o
$(USRSYS)/lib/rp.a: objects/rp.o objects/rpas.o
	rm -f $(USRSYS)/lib/rp.a
	ar rc $(USRSYS)/lib/rp.a objects/rp.o objects/rpas.o
d115 5
a119 2
	rm -f $(USRSYS)/lib/rs.a
	ar rc $(USRSYS)/lib/rs.a objects/rs0.o objects/rs1.o objects/rsas.o
d121 2
a122 2
	rm -f $(USRSYS)/lib/st.a
	ar rc $(USRSYS)/lib/st.a objects/st.o
d124 2
a125 2
	rm -f $(USRSYS)/lib/tn.a
	ar rc $(USRSYS)/lib/tn.a objects/tn.o objects/tnas.o
d127 11
d153 1
a153 1
	$(CC) $(CFLAGS) -c -o $@@ alx.c
d155 6
d162 2
a163 2
	exec /lib/cpp -E -DATI_132=1 ati.s > ati.i
	exec /bin/as -gxo $@@ ati.i
d166 7
a172 2
objects/clocked.o: clocked.s
	$(AS) -go $@@ $<
d175 1
d193 1
d257 6
a262 6
objects/fontw.o: fontgen.c
	$(CC) -i fontgen.c
	exec ./fontgen > $*.s
	exec /bin/rm fontgen
	$(AS) -gxo $@@ $*.s
	exec /bin/rm $*.s
a263 5
objects/gmas.o: gras.s
	exec /lib/cpp -E -DTECMAR gras.s > gmas.i
	exec /bin/as -gxo $@@ gmas.i
	exec /bin/rm -f gmas.i

d278 2
a279 2
	exec /lib/cpp -E gras.s > gras.i
	exec /bin/as -gxo $@@ gras.i
d283 2
a284 2
	exec /lib/cpp -E -DHERCULES gras.s > hgas.i
	exec /bin/as -gxo $@@ hgas.i
d288 1
a288 1
	$(CC) $(CFLAGS) -c -o $@@ $<
d304 1
a304 1
objects/kb.o:				\
d317 2
a318 2
		kb.c
	$(CC) $(CFLAGS) -c -o $@@ kb.c
d350 2
a351 2
	-/lib/cpp -E mmas.s > mmas.i
	exec /bin/as -gxo $@@ mmas.i
d366 1
a366 1
	$(CC) $(CFLAGS) -c -o $@@ $<
d368 1
a368 1
objects/rp.o:				\
a373 18
		$(SYSINC)/seg.h		\
		$(SYSINC)/sched.h	\
		$(SYSINC)/stat.h	\
		$(USRINC)/termio.h	\
		$(SYSINC)/uproc.h	\
		$(USRINC)/v7sgtty.h	\
		rp.c
	$(CC) $(CFLAGS) -c -o $@@ rp.c

objects/rpas.o: rpas.s
	$(AS) -gxo $@@ $<

objects/rs0.o:				\
		$(KERINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/machine.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/errno.h	\
d399 1
a399 1
	$(AS) -gxo $@@ $<
d401 40
d472 39
a510 1
	$(AS) -gxo $@@ $<
@
