|
|
1.1 root 1: # CKUKER.MAK, Version 2.04, 31 July 85
2: #
3: # -- Makefile to build C-Kermit for Unix and Unix-like systems --
4: # set up to build 4.4 version by default
5: #
6: # Read instructions below before proceeding, then
7: # rename this file to "makefile" or "Makefile", and then:
8: #
9: # for Berkeley Unix 4.4, "make bsd44"
10: # for Berkeley Unix 4.x, "make bsd"
11: # for Berkeley Unix 2.9 (PDP-11), "make bsd29"
12: # for AT&T 3Bx systems, "make att3bx"
13: # for AT&T generic System III/System V, "make sys3" or "make sys3nid"
14: # for Bell Unix Version 7 (aka 7th Edition), "make v7"
15: # for Microsoft Xenix (/286, PC/AT, etc), "make xenix"
16: # for Interactive System III (PC/IX) on PC/XT, "make pcix"
17: # for Interactive Sys III on other systems, "make is3"
18: # for DEC Pro-350 with Pro/Venix V1.x, "make provx1"
19: # for DEC Pro-350 with Pro/Venix V2.0 (Sys V), "make sys3nid"
20: # for DEC Pro-380 with Pro/Venix V2.0 (Sys V), "make sys3" or "make sys3nid"
21: # for NCR Tower 1632, OS 1.02, "make tower1"
22: # for NCR Tower 1632 with System V, "make sys3"
23: # for Fortune 16:32, For:Pro 1.7, "make ft17"
24: # for Valid Scaldstar, "make valid"
25: # for BBN C/70 with IOS 2.0, "make c70"
26: # for Amdahl UTS 2.4 on IBM 370 series & compatible mainframes, "make uts24"
27: #
28: ##############################################################################
29: #
30: # Notes:
31: #
32: # In many cases, the -O (optimize) compiler switch is omitted. Feel free
33: # to add it if you trust your optimizer. The ckuus2.c module, in particular,
34: # tends to make optimizers blow up.
35: #
36: # "make bsd" should produce a working C-Kermit for both 4.1 and 4.2bsd
37: # on VAX, SUN, and Pyramid computers.
38: #
39: # Either "make sys3" or "make sys3nid" tendss to produce a working version on
40: # any ATT System III or System V system, including Motorola Four Phase, Callan
41: # Unistar, Cadmus, NCR Tower, HP9836 Series 200, Plexus, Masscomp/RTU,
42: # Heurikon, etc etc (for exceptions, see below; AT&T 3Bx systems have their
43: # own entry). As far as C-Kermit goes, there is no functional difference
44: # between ATT System III and System V, so there is no need for a separate
45: # "make sys5" entry.
46: #
47: # "make sys3nid" is equivalent to "make sys3" but leaves out the -i option,
48: # which is used indicate that separate instruction and data (text) spaces are
49: # to be used, as on a PDP-11. Some systems don't support this option, others
50: # may require it. If one of these options doesn't work on your System III
51: # or System V system, try the other.
52: #
53: # For version 7, several variables must be defined to the values
54: # associated with your system. BOOTNAME=/edition7 is the kernel image on
55: # okstate's Perkin-Elmer 3230. Others will probably be /unix. PROCNAME=proc
56: # is the name of the structure assigned to each process on okstate's system.
57: # This may be "_proc" or some other variation. See <sys/proc.h> for more info
58: # on your systems name conventions. NPROCNAME=nproc is the name of a
59: # Kernal variable that tells how many "proc" structures there are. Again
60: # this may be different on your system, but nproc will probably be somewhere.
61: # The variable NPTYPE is the type of the nproc variable -- int, short, etc.
62: # which can probably be gleaned from <sys/param.h>.
63: # The definition of DIRECT is a little more in depth. If nlist() returns,
64: # for "proc" only, the address of the array, then you should define DIRECT
65: # as it is below. If however, nlist() returns the address of a pointer to
66: # the array, then you should give DIRECT a null definition (DIRECT= ). The
67: # extern declaration in <sys/proc.h> should clarify this for you. If it
68: # is "extern struct proc *proc", then you should NOT define DIRECT. If it
69: # is "extern struct proc proc[]", then you should probably define DIRECT as
70: # it is below. See ckuv7.hlp for further information.
71: #
72: # For 2.9bsd, the makefile uses pcc rather than cc for compiles; that's what
73: # the CC and CC2 definitions are for. 2.9 support basically follows the 4.2
74: # path, except with a normal file system (file names 14 chars max).
75: #
76: # The v7 and 2.9bsd versions assume I&D space on a PDP-11. When building
77: # C-Kermit for v7 on a PDP-11, you should probably add the -i option to
78: # the link flags. Without I&D space, overlays would probably have to be
79: # used (or code mapping a`la Pro/Venix if that's available).
80: #
81: # Other systems require some special treatment:
82: #
83: # For HP9000 series 500, use "make sys3nid", but
84: # 1. In ckutio.c, don't #include <sys/file.h> or ioctl.h.
85: # 2. In ckufio.c, don't #include <sys/file.h>.
86: #
87: # For Ridge32 (ROS3.2), use "make sys3", but
88: # 1. Use "CFLAGS = -DUXIII -i -O" "LNKFLAGS = -i"
89: # 2. Don't #include <sys/file.h> in cku[tf]io.c.
90: #
91: # For Whitechapel MG-1 Genix 1.3, use "make bsd", but
92: # 1. In ckufio.c, have zkself() return 0 or call getpid, rather than getppid.
93: # 2. Wart reportedly can't process ckcpro.w; just work directly from ckcpro.c.
94: #
95: # For Altos 986 with Xenix 3.0, use "make sys3", but
96: # 1. Get rid of any "(void)"'s (they're only there for Lint anyway)
97: # 2. In ckcdeb.h, define CHAR to be "char" rather than "unsigned char".
98: #
99: ##############################################################################
100: #
101: # V7-specific variables.
102: # These are set up for Perkin-Elmer 3230 V7 Unix:
103: #
104: PROC=proc
105: DIRECT=
106: NPROC=nproc
107: NPTYPE=int
108: BOOTFILE=/edition7
109: #
110: # ( For TRS-80 Xenix, use PROC=_proc, DIRECT=-DDIRECT, NPROC=_Nproc,
111: # NPTYPE=short, BOOTFILE=/xenix )
112: #
113: ###########################################################################
114: #
115: # Compile and Link variables:
116: #
117: LNKFLAGS=
118: CC= cc
119: CC2= cc
120: #
121: ###########################################################################
122:
123: # added for 4.3 bsd release; remove lines through the next comment
124: # to regenerate the generic form
125: CFLAGS= -O -DBSD4 -DDEBUG -DTLOG
126:
127: all: bsd44
128: mv wermit kermit
129:
130: .SUFFIXES: .1 .0
131:
132: .1.0:
133: ../../man/manroff $*.1 > $*.0
134:
135: install: ckuker.0
136: install -s -o bin -g bin -m 755 kermit $(DESTDIR)/usr/new/kermit
137: install -c -o bin -g bin -m 444 ckuker.0 $(DESTDIR)/usr/new/man/cat1/kermit.0
138:
139: # end of 4.3 specific
140:
141: #
142: # Dependencies Section:
143: #
144: make:
145: @echo 'Make what? You must tell which system to make C-Kermit for.'
146:
147: wermit: ckcmai.o ckucmd.o ckuusr.o ckuus2.o ckuus3.o ckcpro.o ckcfns.o \
148: ckcfn2.o ckucon.o ckutio.o ckufio.o ckudia.o ckuscr.o
149: $(CC2) -o wermit ckcmai.o ckutio.o ckufio.o ckcfns.o \
150: ckcfn2.o ckcpro.o ckucmd.o ckuus2.o ckuus3.o ckuusr.o \
151: ckucon.o ckudia.o ckuscr.o $(LNKFLAGS)
152:
153: ckcmai.o: ckcmai.c ckcker.h ckcdeb.h
154:
155: ckuusr.o: ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h
156:
157: ckuus2.o: ckuus2.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h
158:
159: ckuus3.o: ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h
160:
161: ckucmd.o: ckucmd.c ckucmd.h ckcdeb.h
162:
163: ckcpro.o: ckcpro.c ckcker.h ckcdeb.h
164:
165: ckcpro.c: ckcpro.w wart
166: ./wart ckcpro.w ckcpro.c
167:
168: ckcfns.o: ckcfns.c ckcker.h ckcdeb.h
169:
170: ckcfn2.o: ckcfn2.c ckcker.h ckcdeb.h
171:
172: ckufio.o: ckufio.c ckcker.h ckcdeb.h
173:
174: ckutio.o: ckutio.c ckcdeb.h
175:
176: ckucon.o: ckucon.c ckcker.h ckcdeb.h
177:
178: wart: ckwart.o
179: $(CC) $(LNKFLAGS) -o wart ckwart.o
180:
181: ckwart.o: ckwart.c
182:
183: ckudia.o: ckudia.c ckcker.h ckcdeb.h
184:
185: ckuscr.o: ckuscr.c ckcker.h ckcdeb.h
186: #
187: ###########################################################################
188: #
189: # Make commands for specific systems:
190: #
191:
192: bsd44:
193: make wermit "CFLAGS= -DBSD4 -DDEBUG -DTLOG" "LNKFLAGS= -lcompat"
194: #
195: #Berkeley Unix 4.1 or 4.2 (and presumably also 4.3)
196: bsd:
197: make wermit "CFLAGS= -DBSD4 -DDEBUG -DTLOG"
198:
199:
200:
201: #Berkeley Unix 2.8, 2.9 for PDP-11s with I&D space
202: bsd29:
203: make wermit "CFLAGS= -DV7 -DDEBUG -DTLOG" "LNKFLAGS= -i" "CC= pcc " \
204: "CC2= cc"
205:
206:
207: #Version 7 Unix
208: v7:
209: make wermit "CFLAGS=-DV7 -DDEBUG -DTLOG -DPROCNAME=\\\"$(PROC)\\\" \
210: -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
211: -DNPTYPE=$(NPTYPE) $(DIRECT)"
212:
213: #In case they type "make sys5"...
214: sys5:
215: make sys3
216:
217:
218: #Generic ATT System III or System V (with I&D space)
219: sys3:
220: make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -i -O" "LNKFLAGS = -i"
221:
222:
223: #Generic ATT System III or System V (no I&D space)
224: sys3nid:
225: make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -O" "LNKFLAGS ="
226:
227:
228: #AT&T 3B-series computers running System V
229: # Only difference from sys3 is lock file stuff...
230: att3bx:
231: make wermit "CFLAGS = -DUXIII -DATT3BX -DDEBUG -DTLOG -i -O" \
232: "LNKFLAGS = -i"
233:
234:
235: #Microsoft "Xenix/286" e.g. for IBM PC/AT
236: xenix:
237: make wermit "CFLAGS= -DXENIX -DUXIII -DDEBUG -DTLOG -F 3000 -i" \
238: "LNKFLAGS = -F 3000 -i"
239:
240:
241: #PC/IX, Interactive Corp System III for IBM PC/XT
242: pcix:
243: make wermit \
244: "CFLAGS= -DPCIX -DUXIII -DISIII -DDEBUG -DTLOG -Dsdata=sdatax -O -i" \
245: "LNKFLAGS = -i"
246:
247:
248: #Interactive Corp System III port in general --
249: is3:
250: make wermit \
251: "CFLAGS = -DISIII -DUXIII -DDEBUG -DTLOG -Ddata=datax -O -i" \
252: "LNKFLAGS = -i"
253:
254:
255: #DEC Pro-3xx with Pro/Venix V1.0 or V1.1
256: # Requires code-mapping on non-I&D-space 11/23 processor, plus some
257: # fiddling to get interrupt targets into resident code section.
258: provx1:
259: make wart "CFLAGS= -DPROVX1" "LNKFLAGS= "
260: make wermit "CFLAGS = -DPROVX1 -DDEBUG -DTLOG -md780" \
261: "LNKFLAGS= -u _sleep -lc -md780"
262:
263:
264: #NCR Tower 1632, OS 1.02
265: tower1:
266: make wermit "CFLAGS= -DDEBUG -DTLOG -DTOWER1"
267:
268: #Fortune 16:32, For:Pro 1.7 (mostly like 4.1bsd)
269: ft17:
270: make wermit "CFLAGS= -DDEBUG -DTLOG -DBSD4 -DFT17"
271:
272:
273: #Valid Scaldstar
274: #Berkeleyish, but need to change some variable names.
275: valid:
276: make wermit "CFLAGS= -DBSD4 -Dcc=ccx -DFREAD=1"
277:
278:
279: #Amdahl UTS 2.4 on IBM 370 series compatible mainframes.
280: #Mostly like V7, but can't do initrawq() buffer peeking.
281: uts24:
282: make wermit "CFLAGS=-DV7 -DDEBUG -DTLOG -DPROCNAME=\\\"$(PROC)\\\" \
283: -DUTS24 -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
284: -DNPTYPE=$(NPTYPE) $(DIRECT)"
285:
286:
287: #BBN C/70 with IOS 2.0
288: #Mostly Berkeley-like, but with some ATTisms
289: c70:
290: make wermit "CFLAGS= -DBSD4 -DC70 -DDEBUG -DTLOG"
291:
292: clean:
293: rm -f *.o ckcpro.c wart wermit core make.out xerrs errs kermit
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.