head     1.14;
branch   ;
access   ;
symbols  ;
locks    bin:1.14; strict;
comment  @# @;


1.14
date     93.06.14.13.42.08;  author bin;  state Exp;
branches ;
next     1.13;

1.13
date     93.04.09.08.41.06;  author bin;  state Exp;
branches ;
next     1.12;

1.12
date     93.03.02.08.18.21;  author bin;  state Exp;
branches ;
next     1.11;

1.11
date     93.01.18.16.24.02;  author bin;  state Exp;
branches ;
next     1.10;

1.10
date     92.12.18.14.20.36;  author bin;  state Exp;
branches ;
next     1.9;

1.9
date     92.11.23.09.39.31;  author bin;  state Exp;
branches ;
next     1.8;

1.8
date     92.11.13.11.05.38;  author bin;  state Exp;
branches ;
next     1.7;

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

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

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

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

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

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

1.1
date     92.07.17.15.22.18;  author bin;  state Exp;
branches ;
next     ;


desc
@@


1.14
log
@Hal: kernel 78 update
@
text
@#
#	makefile for Coherent 386 - overall system build
#
#	Do not use this makefile directly!  Use a build script.
#	(Unless you know what you are doing.)
#

AR=exec /bin/ar
ARFLAGS=rs
AS=exec /bin/as
CC=exec /bin/cc
CFLAGS=-VPSTR -D__COHERENT__

USRSRC=/usr/src
USRINC=/usr/include
SYSINC=$(USRINC)/sys

IOOBJ =\
	$(K386OBJ)/bufq.o \
	$(K386OBJ)/ct.o \
	$(K386OBJ)/dmareq.o \
	$(K386OBJ)/fdisk.o \
	$(K386OBJ)/msg.o \
	$(K386OBJ)/sem386.o \
	$(K386OBJ)/shm1.o

COHOBJ =\
	$(K386OBJ)/alloc.o \
	$(K386OBJ)/bio.o \
	$(K386OBJ)/clist.o \
	$(K386OBJ)/clock.o \
	$(K386OBJ)/clocked.o \
	$(K386OBJ)/exec.o \
	$(K386OBJ)/fd.o \
	$(K386OBJ)/fifo.o \
	$(K386OBJ)/fs1.o \
	$(K386OBJ)/fs2.o \
	$(K386OBJ)/fs3.o \
	$(K386OBJ)/main.o \
	$(K386OBJ)/misc.o \
	$(K386OBJ)/null.o \
	$(K386OBJ)/poll.o \
	$(K386OBJ)/printf.o \
	$(K386OBJ)/proc.o \
	$(K386OBJ)/rlock.o \
	$(K386OBJ)/seg.o \
	$(K386OBJ)/sig.o \
	$(K386OBJ)/support.o \
	$(K386OBJ)/sys1.o \
	$(K386OBJ)/sys2.o \
	$(K386OBJ)/sys3.o \
	$(K386OBJ)/sys4.o \
	$(K386OBJ)/sys5.o \
	$(K386OBJ)/syscoh.o \
	$(K386OBJ)/timeout.o \
	$(K386OBJ)/var.o

I386OBJ0 =\
	$(K386OBJ)/as.o \
	$(K386OBJ)/xdt.o \

I386OBJ1 =\
	$(K386OBJ)/atcon.o \
	$(K386OBJ)/defer.o \
	$(K386OBJ)/die.o \
	$(K386OBJ)/dmac.o \
	$(K386OBJ)/dmalock.o \
	$(K386OBJ)/fakedma.o \
	$(K386OBJ)/ff.o \
	$(K386OBJ)/md.o \
	$(K386OBJ)/mem_cache.o \
	$(K386OBJ)/memcpy.o \
	$(K386OBJ)/memset.o \
	$(K386OBJ)/mmu.o \
	$(K386OBJ)/msig.o \
	$(K386OBJ)/ndp.o \
	$(K386OBJ)/ndpas.o \
	$(K386OBJ)/shm0.o \
	$(K386OBJ)/sys1632.o \
	$(K386OBJ)/tioc.o \
	$(K386OBJ)/trap.o \
	$(K386OBJ)/work.o

I386OBJ = $(I386OBJ0) $(I386OBJ1)

STUBS = $(K386OBJ)/stubs.o

OPTS =\
	$(K386OBJ)/aha.o \
	$(K386OBJ)/aha_dsl.o \
	$(K386OBJ)/albaud.o \
	$(K386OBJ)/alx.o \
	$(K386OBJ)/asy.o \
	$(K386OBJ)/at.o \
	$(K386OBJ)/com1.o \
	$(K386OBJ)/com2.o \
	$(K386OBJ)/hs.o \
	$(K386OBJ)/ipc.o \
	$(K386OBJ)/kb.o \
	$(K386OBJ)/kb_d.o \
	$(K386OBJ)/kb_f.o \
	$(K386OBJ)/lp.o \
	$(K386OBJ)/mm.o \
	$(K386OBJ)/mmas.o \
	$(K386OBJ)/nkb.o \
	$(K386OBJ)/pipe.o \
	$(K386OBJ)/pty.o \
	$(K386OBJ)/putchar.o \
	$(K386OBJ)/scsi.o \
	$(K386OBJ)/sem386.o \
	$(K386OBJ)/ss.o \
	$(K386OBJ)/tty.o \
	$(K386OBJ)/vtmm.o \
	$(K386OBJ)/vtmmas.o \
	$(K386OBJ)/vtkb.o \
	$(K386OBJ)/vtkb_d.o \
	$(K386OBJ)/vtkb_f.o \
	$(K386OBJ)/vtnkb.o \
	$(K386OBJ)/xlft.o \
	$(K386OBJ)/xla.o \
	$(K386OBJ)/xl_dec.o 

# LIBLIST is the .a files needed for 386 installation.
# k386.a is an aggregate used since 92/11/11 for driver kit kernel links.
# kl386.a was used in COH 4.0.0 and 4.0.1 to link a kernel on customer's
#   hard drive during installation.
LIBLIST= \
	$(K386LIB)/k386.a \
	$(K386LIB)/kb.a \
	$(K386LIB)/kb_d.a \
	$(K386LIB)/kb_f.a \
	$(K386LIB)/kl386.a \
	$(K386LIB)/mm.a \
	$(K386LIB)/nkb.a \
	$(K386LIB)/vt.a \
	$(K386LIB)/vtkb.a \
	$(K386LIB)/vtkb_d.a \
	$(K386LIB)/vtkb_f.a

$(K386LIB)/kb.a:	$(K386OBJ)/kb.o
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

$(K386LIB)/kb_d.a:	$(K386OBJ)/kb_d.o
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

$(K386LIB)/kb_f.a:	$(K386OBJ)/kb_f.o
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

$(K386LIB)/nkb.a:	$(K386OBJ)/nkb.o
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

$(K386LIB)/mm.a: \
	$(K386OBJ)/mm.o \
	$(K386OBJ)/mmas.o
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

$(K386LIB)/vt.a: \
	$(K386OBJ)/vtmm.o \
	$(K386OBJ)/vtmmas.o \
	$(K386OBJ)/vtnkb.o 
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

$(K386LIB)/vtkb.a: \
	$(K386OBJ)/vtmm.o \
	$(K386OBJ)/vtmmas.o \
	$(K386OBJ)/vtkb.o 
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

$(K386LIB)/vtkb_d.a: \
	$(K386OBJ)/vtmm.o \
	$(K386OBJ)/vtmmas.o \
	$(K386OBJ)/vtkb_d.o 
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

$(K386LIB)/vtkb_f.a: \
	$(K386OBJ)/vtmm.o \
	$(K386OBJ)/vtmmas.o \
	$(K386OBJ)/vtkb_f.o 
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

# k386.a is used for linking driver kit kernels.
$(K386LIB)/k386.a: $(I386OBJ) $(COHOBJ) $(IOOBJ)
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $(I386OBJ1) $(COHOBJ) $(IOOBJ)

# kl386.a is used for linking customer kernels.
$(K386LIB)/kl386.a: \
	$(K386OBJ)/aha.o \
	$(K386OBJ)/aha_dsl.o \
	$(K386OBJ)/albaud.o \
	$(K386OBJ)/asy.o \
	$(K386OBJ)/at.o \
	$(K386OBJ)/fdc.o \
	$(K386OBJ)/fl386.o \
	$(K386OBJ)/ipc.o \
	$(K386OBJ)/lp.o \
	$(K386OBJ)/msg.o \
	$(K386OBJ)/pipe.o \
	$(K386OBJ)/pty.o \
	$(K386OBJ)/putchar.o \
	$(K386OBJ)/rm.o \
	$(K386OBJ)/scsi.o \
	$(K386OBJ)/sem386.o \
	$(K386OBJ)/shm1.o \
	$(K386OBJ)/ss.o \
	$(K386OBJ)/tty.o \
	$(K386OBJ)/xlft.o \
	$(K386OBJ)/xla.o \
	$(K386OBJ)/xl_dec.o \
	$(K386OBJ)/memcpy.o \
	$(K386OBJ)/memset.o
	rm -f $@@
	$(AR) $(ARFLAGS) $@@ $<

$(K386LIB)/ker386.o: $(I386OBJ) coh io $(STUBS)
	ld -r -o $@@ $(I386OBJ) $(COHOBJ) $(IOOBJ)

coh:
	cd ../coh.386; make "CFLAGS=$(CFLAGS)" "CC=$(CC)"

io:
	cd ../io.386; make "CFLAGS=$(CFLAGS)" "CC=$(CC)"

libs:	$(LIBLIST)
	@@/bin/echo "Installation libraries up to date."

$(K386OBJ)/as.o: as.s as.inc
	$(AS) -g -o $@@ as.s

$(K386OBJ)/xdt.o: xdt.s as.inc
	$(AS) -g -o $@@ xdt.s

$(K386OBJ)/atcon.o:			\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/reg.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/mtype.h	\
		$(SYSINC)/stat.h	\
		atcon.c
	$(CC) $(CFLAGS) -c -o $@@ atcon.c

$(K386OBJ)/defer.o: defer.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/die.o: die.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/dmac.o:	dmac.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/dmalock.o:	dmalock.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/fakedma.o:	fakedma.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/ff.o: ff.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/fvcon.o:			\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/reg.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/mtype.h	\
		$(SYSINC)/stat.h	\
		fvcon.c
	$(CC) $(CFLAGS) -c -o $@@ fvcon.c

$(K386OBJ)/md.o: md.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/mem_cache.o: mem_cache.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/memcpy.o: memcpy.s
	$(AS) -g -o $@@ memcpy.s

$(K386OBJ)/memset.o: memset.s
	$(AS) -g -o $@@ memset.s

$(K386OBJ)/mmu.o: mmu.c
	$(CC) $(CFLAGS) -VSUVAR -c -o $@@ $<

$(K386OBJ)/msig.o: msig.c $(SYSINC)/coherent.h
	$(CC) $(CFLAGS) -VSUVAR -c -o $@@ msig.c

$(K386OBJ)/ndpas.o: ndpas.s
	$(AS) -g -o $@@ ndpas.s

$(K386OBJ)/ndp.o: ndp.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/shm0.o: shm0.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/stubs.o: stubs.s
	$(AS) -g -o $@@ stubs.s

$(K386OBJ)/sys1632.o: sys1632.c \
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/reg.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/acct.h	\
		$(SYSINC)/buf.h		\
		$(SYSINC)/con.h		\
		$(USRINC)/errno.h	\
		$(SYSINC)/filsys.h	\
		$(SYSINC)/ino.h		\
		$(SYSINC)/inode.h	\
		$(USRINC)/l.out.h	\
		$(SYSINC)/proc.h	\
		$(SYSINC)/sched.h	\
		$(SYSINC)/seg.h		\
		$(USRINC)/signal.h	\
		$(SYSINC)/uproc.h	\
		$(SYSINC)/reg.h		\
		$(SYSINC)/systab.h	\
		$(SYSINC)/oldstat.h	\
		$(SYSINC)/timeb.h	\
		$(SYSINC)/fd.h		\
		$(USRINC)/sgtty.h
	$(CC) $(CFLAGS) -c -o $@@ sys1632.c

$(K386OBJ)/tioc.o: tioc.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/trap.o: trap.c
	$(CC) $(CFLAGS) -VSUVAR -c -o $@@ $<

$(K386OBJ)/work.o: work.c
	$(CC) $(CFLAGS) -c -o $@@ $<
@


1.13
log
@kernel 75
@
text
@d118 4
a121 1
	$(K386OBJ)/vtnkb.o 
d202 2
a203 1
	$(K386OBJ)/fl.o \
d216 3
a232 3
ver:
	newversion < version

d314 1
a314 1
		$(USRINC)/acct.h	\
d330 1
a330 1
		$(SYSINC)/oldtimeb.h	\
@


1.12
log
@kernel 73 update
@
text
@d24 1
d110 1
a110 2
	$(K386OBJ)/sem.o \
	$(K386OBJ)/semcon.o \
d208 1
a208 2
	$(K386OBJ)/sem.o \
	$(K386OBJ)/semcon.o \
@


1.11
log
@hal: kernel 72
@
text
@d12 1
a12 1
CFLAGS=-VPSTR
@


1.10
log
@hal: kernel 71: added shm support
@
text
@d23 2
a24 1
	$(K386OBJ)/msg.o
d74 1
a110 2
	$(K386OBJ)/shm.o \
	$(K386OBJ)/shmcon.o \
d210 1
a210 2
	$(K386OBJ)/shm.o \
	$(K386OBJ)/shmcon.o \
d292 3
@


1.9
log
@hal: kernel 69 update
,.
@
text
@d75 1
d78 2
a79 1
	$(K386OBJ)/trap.o
d240 10
d268 37
d330 2
a331 2
$(K386OBJ)/stubs.o: stubs.s
	$(AS) -g -o $@@ stubs.s
a332 24
$(K386OBJ)/ndpas.o: ndpas.s
	$(AS) -g -o $@@ ndpas.s

$(K386OBJ)/ndp.o: ndp.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/mmu.o: mmu.c
	$(CC) $(CFLAGS) -VSUVAR -c -o $@@ $<

$(K386OBJ)/md.o: md.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/mem_cache.o: mem_cache.c
	$(CC) $(CFLAGS) -c -o $@@ $<

$(K386OBJ)/memcpy.o: memcpy.s
	$(AS) -g -o $@@ memcpy.s

$(K386OBJ)/memset.o: memset.s
	$(AS) -g -o $@@ memset.s

$(K386OBJ)/tioc.o: tioc.c
	$(CC) $(CFLAGS) -c -o $@@ $<

d336 2
a337 19
$(K386OBJ)/atcon.o:			\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/reg.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/mtype.h	\
		$(SYSINC)/stat.h	\
		atcon.c
	$(CC) $(CFLAGS) -c -o $@@ atcon.c

$(K386OBJ)/fvcon.o:			\
		$(SYSINC)/coherent.h	$(SYSINC)/types.h $(SYSINC)/timeout.h \
					$(SYSINC)/reg.h $(SYSINC)/param.h \
					$(SYSINC)/fun.h \
		$(SYSINC)/con.h		\
		$(USRINC)/mtype.h	\
		$(SYSINC)/stat.h	\
		fvcon.c
	$(CC) $(CFLAGS) -c -o $@@ fvcon.c
@


1.8
log
@hal: kernel 68 update
@
text
@d81 2
d217 1
a217 1
$(K386LIB)/ker386.o: $(I386OBJ) coh io
d281 3
@


1.7
log
@kernel 66: floating point context switching, exceptions and signal handlers.
@
text
@d12 1
a12 1
CFLAGS=-DTRACER -VPSTR
d22 2
a23 1
	$(K386OBJ)/fdisk.o
d56 1
a56 1
I386OBJ =\
d59 2
d79 2
a97 1
	$(K386OBJ)/msg.o \
d116 4
a119 1
# LIBLIST is the .a files needed for 386 installation
d121 1
d183 6
a188 1
# kl386.a is the main library needed for linking customer kernels.
@


1.6
log
@*** empty log message ***
@
text
@d70 2
a93 1
	$(K386OBJ)/msgcon.o \
a185 1
	$(K386OBJ)/msgcon.o \
d266 4
a269 1
$(K386OBJ)/mmu.o: mmu.c
d272 3
@


1.5
log
@update by hal for kernel 62 (60 files)
@
text
@d119 4
a122 1
	$(K386LIB)/vt.a
d153 21
@


1.4
log
@update by hal for kernel 61
@
text
@d67 2
d173 2
a174 1
	memcpy.o
d178 2
a179 2
$(K386LIB)/ker386.o: $(I386OBJ) coh io memcpy.o memset.o
	ld -r -o $@@ $(I386OBJ) $(COHOBJ) $(IOOBJ) memcpy.o memset.o
a192 3
$(K386OBJ)/memset.o: memset.s
	$(AS) -g -o $@@ memset.s

d251 6
@


1.3
log
@*** empty log message ***
@
text
@d2 1
a2 1
#	makefile for Coherent (TM) 386 - overall system build
d4 3
d104 3
a174 10
at386: ktest $(I386OBJ) coh io memcpy.o $(OPTS) 
	ld -K -o at386 -e stext $(I386OBJ) $(COHOBJ) \
	$(IOOBJ) $(K386OBJ)/tty.o $(K386OBJ)/nkb.o memcpy.o

stuff: ktest $(I386OBJ) coh io memcpy.o $(OPTS) ker386.files
	@@echo "kernel binaries up to date"

ker386.files:	Makefile ../coh.386/Makefile ../io.386/Makefile
	@@echo $(I386OBJ) $(COHOBJ) $(IOOBJ) memcpy.o > $@@

d178 2
a179 2
ktest:
	@@./check
a180 3
coh:
	cd ../coh.386; make "CFLAGS=$(CFLAGS)"

d182 1
a182 1
	cd ../io.386; make "CFLAGS=$(CFLAGS)"
d190 3
@


1.2
log
@update for kernel 59
@
text
@d179 2
a180 2
ker386.o: $(I386OBJ) coh io memcpy.o
	ld -r -o $@@ $(I386OBJ) $(COHOBJ) $(IOOBJ) memcpy.o
a181 6
kld386.o:	never
	@@echo "$@@ built"

never:
	ld -r -o kld386.o $(I386OBJ) $(COHOBJ) $(IOOBJ) memcpy.o

d259 1
a259 1
	$(CC) $(CFLAGS) -c -o $@@ $<
@


1.1
log
@Initial revision
@
text
@a13 1
K386LIB=lib
@
