|
|
1.1 root 1: #
2: # makefile for Coherent 386 - overall system build
3: #
4: # Do not use this makefile directly! Use a build script.
5: # (Unless you know what you are doing.)
6: #
7:
8: all: $(K386LIB)/k386.a
9:
10: clean:
11: @:
12:
13: AR=exec /bin/ar
14: ARFLAGS=rs
15: AS=exec /bin/as
16: CC=exec /bin/cc
17: CFLAGS=-VPSTR
18:
19: USRSRC=/usr/src
20: USRINC=/usr/include
21: SYSINC=$(USRINC)/sys
22:
23: IOOBJ =\
24: $(K386OBJ)/aha.o $(K386OBJ)/aha_dsl.o $(K386OBJ)/scsi.o \
25: $(K386OBJ)/at.o \
26: $(K386OBJ)/hai.o \
27: $(K386OBJ)/ss.o \
28: $(K386OBJ)/kb.o $(K386OBJ)/nkb.o $(K386OBJ)/vtkb.o $(K386OBJ)/vtnkb.o \
29: $(K386OBJ)/mm.o $(K386OBJ)/mmas.o \
30: $(K386OBJ)/vtmm.o $(K386OBJ)/vtmmas.o \
31: $(K386OBJ)/xla.o $(K386OBJ)/xlft.o $(K386OBJ)/xl_dec.o \
32: $(K386OBJ)/fdc.o $(K386OBJ)/fl386.o \
33: $(K386OBJ)/albaud.o \
34: $(K386OBJ)/alx.o $(K386OBJ)/com1.o $(K386OBJ)/com2.o \
35: $(K386OBJ)/hs.o \
36: $(K386OBJ)/asy.o \
37: $(K386OBJ)/pty.o \
38: $(K386OBJ)/lp.o \
39: $(K386OBJ)/bufq.o \
40: $(K386OBJ)/ct.o \
41: $(K386OBJ)/dmareq.o \
42: $(K386OBJ)/fdisk.o \
43: $(K386OBJ)/ft.o \
44: $(K386OBJ)/ipc.o \
45: $(K386OBJ)/msg.o \
46: $(K386OBJ)/putchar.o \
47: $(K386OBJ)/rm.o \
48: $(K386OBJ)/sem386.o \
49: $(K386OBJ)/shm1.o \
50: $(K386OBJ)/tty.o
51:
52: COHOBJ =\
53: $(K386OBJ)/alloc.o \
54: $(K386OBJ)/bio.o \
55: $(K386OBJ)/clist.o \
56: $(K386OBJ)/clock.o \
57: $(K386OBJ)/clocked.o \
58: $(K386OBJ)/exec.o \
59: $(K386OBJ)/fd.o \
60: $(K386OBJ)/fifo.o \
61: $(K386OBJ)/fs1.o \
62: $(K386OBJ)/fs2.o \
63: $(K386OBJ)/fs3.o \
64: $(K386OBJ)/main.o \
65: $(K386OBJ)/misc.o \
66: $(K386OBJ)/nlp.o \
67: $(K386OBJ)/null.o \
68: $(K386OBJ)/pipe.o \
69: $(K386OBJ)/printf.o \
70: $(K386OBJ)/proc.o \
71: $(K386OBJ)/rlock.o \
72: $(K386OBJ)/seg.o \
73: $(K386OBJ)/sig.o \
74: $(K386OBJ)/support.o \
75: $(K386OBJ)/sys1.o \
76: $(K386OBJ)/sys2.o \
77: $(K386OBJ)/sys3.o \
78: $(K386OBJ)/sys4.o \
79: $(K386OBJ)/sys5.o \
80: $(K386OBJ)/syscoh.o \
81: $(K386OBJ)/timeout.o \
82: $(K386OBJ)/var.o \
83: $(K386OBJ)/ker_data.o \
84: $(K386OBJ)/poll.o # Soon to disappear
85:
86: I386OBJ0 =\
87: $(K386OBJ)/as.o \
88: $(K386OBJ)/xdt.o \
89:
90: I386OBJ1 =\
91: $(K386OBJ)/atcon.o \
92: $(K386OBJ)/defer.o \
93: $(K386OBJ)/die.o \
94: $(K386OBJ)/dmac.o \
95: $(K386OBJ)/dmalock.o \
96: $(K386OBJ)/fakedma.o \
97: $(K386OBJ)/ff.o \
98: $(K386OBJ)/md.o \
99: $(K386OBJ)/mem_cache.o \
100: $(K386OBJ)/mmu.o \
101: $(K386OBJ)/msig.o \
102: $(K386OBJ)/ndp.o \
103: $(K386OBJ)/ndpas.o \
104: $(K386OBJ)/shm0.o \
105: $(K386OBJ)/sys1632.o \
106: $(K386OBJ)/tioc.o \
107: $(K386OBJ)/trap.o \
108: $(K386OBJ)/work.o \
109: $(K386OBJ)/memory.o
110:
111: I386OBJ = $(I386OBJ0) $(I386OBJ1)
112:
113: STUBS = $(K386OBJ)/stubs.o
114:
115: # LIBLIST is the .a files needed for 386 installation.
116: # k386.a is an aggregate used since 92/11/11 for driver kit kernel links.
117: # kl386.a was used in COH 4.0.0 and 4.0.1 to link a kernel on customer's
118: # hard drive during installation.
119: LIBLIST= \
120: $(K386LIB)/k386.a \
121: $(K386LIB)/k0.o
122:
123: # k386.a is used for linking driver kit kernels.
124: $(K386LIB)/k386.a: $(I386OBJ1) $(COHOBJ) $(IOOBJ)
125: rm -f $@
126: $(AR) $(ARFLAGS) $@ $(I386OBJ1) $(COHOBJ) $(IOOBJ)
127:
128: $(K386LIB)/k0.o: $(I386OBJ0)
129: ld -r -o $@ $(I386OBJ0)
130:
131: coh:
132: cd ../coh.386; make "CFLAGS=$(CFLAGS)" "CC=$(CC)"
133:
134: io:
135: cd ../io.386; make "CFLAGS=$(CFLAGS)" "CC=$(CC)"
136:
137: libs: coh io $(LIBLIST)
138: @/bin/echo "Installation libraries up to date."
139:
140: $(K386OBJ)/as.o: as.s as.inc
141: $(AS) -g -o $@ as.s
142:
143: $(K386OBJ)/xdt.o: xdt.s as.inc
144: $(AS) -g -o $@ xdt.s
145:
146: $(K386OBJ)/atcon.o: \
147: $(SYSINC)/coherent.h $(SYSINC)/types.h $(USRINC)/kernel/timeout.h \
148: $(USRINC)/kernel/reg.h $(USRINC)/kernel/param.h \
149: $(SYSINC)/con.h \
150: $(USRINC)/mtype.h \
151: $(SYSINC)/stat.h \
152: atcon.c
153: $(CC) $(CFLAGS) -c -o $@ atcon.c
154:
155: $(K386OBJ)/defer.o: defer.c
156: $(CC) $(CFLAGS) -c -o $@ $<
157:
158: $(K386OBJ)/die.o: die.c
159: $(CC) $(CFLAGS) -c -o $@ $<
160:
161: $(K386OBJ)/dmac.o: dmac.c
162: $(CC) $(CFLAGS) -c -o $@ $<
163:
164: $(K386OBJ)/dmalock.o: dmalock.c
165: $(CC) $(CFLAGS) -c -o $@ $<
166:
167: $(K386OBJ)/fakedma.o: fakedma.c
168: $(CC) $(CFLAGS) -c -o $@ $<
169:
170: $(K386OBJ)/ff.o: ff.c
171: $(CC) $(CFLAGS) -c -o $@ $<
172:
173: $(K386OBJ)/fvcon.o: \
174: $(SYSINC)/coherent.h $(SYSINC)/types.h $(USRINC)/kernel/timeout.h \
175: $(USRINC)/kernel/reg.h $(USRINC)/kernel/param.h \
176: $(SYSINC)/con.h \
177: $(USRINC)/mtype.h \
178: $(SYSINC)/stat.h \
179: fvcon.c
180: $(CC) $(CFLAGS) -c -o $@ fvcon.c
181:
182: $(K386OBJ)/md.o: md.c
183: $(CC) $(CFLAGS) -D_ENABLE_STREAMS=1 -c -o $@ $<
184:
185: $(K386OBJ)/mem_cache.o: mem_cache.c
186: $(CC) $(CFLAGS) -c -o $@ $<
187:
188: $(K386OBJ)/memory.o: memory.s
189: $(AS) -o $@ memory.s
190:
191: $(K386OBJ)/mmu.o: mmu.c
192: $(CC) $(CFLAGS) -VSUVAR -c -o $@ $<
193:
194: $(K386OBJ)/msig.o: msig.c $(SYSINC)/coherent.h
195: $(CC) $(CFLAGS) -VSUVAR -c -o $@ msig.c
196:
197: $(K386OBJ)/ndpas.o: ndpas.s
198: $(AS) -g -o $@ ndpas.s
199:
200: $(K386OBJ)/ndp.o: ndp.c
201: $(CC) $(CFLAGS) -c -o $@ $<
202:
203: $(K386OBJ)/shm0.o: shm0.c
204: $(CC) $(CFLAGS) -c -o $@ $<
205:
206: $(K386OBJ)/stubs.o: stubs.s
207: $(AS) -g -o $@ stubs.s
208:
209: $(K386OBJ)/sys1632.o: sys1632.c \
210: $(SYSINC)/coherent.h $(SYSINC)/types.h $(USRINC)/kernel/timeout.h \
211: $(USRINC)/kernel/reg.h $(USRINC)/kernel/param.h \
212: $(SYSINC)/acct.h \
213: $(SYSINC)/buf.h \
214: $(SYSINC)/con.h \
215: $(USRINC)/sys/errno.h \
216: $(SYSINC)/filsys.h \
217: $(SYSINC)/ino.h \
218: $(SYSINC)/inode.h \
219: $(USRINC)/l.out.h \
220: $(SYSINC)/proc.h \
221: $(SYSINC)/sched.h \
222: $(SYSINC)/seg.h \
223: $(USRINC)/signal.h \
224: $(SYSINC)/uproc.h \
225: $(USRINC)/kernel/reg.h \
226: $(USRINC)/kernel/systab.h \
227: $(SYSINC)/oldstat.h \
228: $(SYSINC)/timeb.h \
229: $(SYSINC)/fd.h \
230: $(USRINC)/sgtty.h
231: $(CC) $(CFLAGS) -c -o $@ sys1632.c
232:
233: $(K386OBJ)/tioc.o: tioc.c
234: $(CC) $(CFLAGS) -c -o $@ $<
235:
236: $(K386OBJ)/trap.o: trap.c $(USRINC)/kernel/systab.h
237: $(CC) $(CFLAGS) -VSUVAR -c -o $@ trap.c
238:
239: $(K386OBJ)/work.o: work.c
240: $(CC) $(CFLAGS) -c -o $@ $<
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.