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