makefile patch
[ckermit.git] / makefile
1 # makefile / Makefile / ckuker.mak / CKUKER.MAK
2 #
3 # Thu Jun 16 17:36:23 2011
4 # Note: sources haven't changed since 20110615, only this file.
5 BUILDID=20110615
6 CKVER= "9.0.299"
7 TESTID= "Beta.01"
8 #
9 # -- Makefile to build C-Kermit for UNIX and UNIX-like platforms --
10 #
11 # Copyright (C) 1985, 2011,
12 #   Trustees of Columbia University in the City of New York.
13 #   All rights reserved.  See the C-Kermit COPYING.TXT file or the
14 #   copyright text in the ckcmai.c module for disclaimer and permissions.
15 #   In case you can't find the COPYING.TXT file, it contains the 
16 #   Simplified 3-Clause BSD License, which is an Open Source license.
17 #
18 # Author: Frank da Cruz, Columbia University
19 # 612 West 115th Street, New York NY 10025-7799, USA
20 # E-mail: fdc@columbia.edu
21 # Web:    http://www.columbia.edu/kermit/
22 # FTP:    ftp://kermit.columbia.edu/kermit/
23 #
24 # Note: Author is no longer at Columbia University or at the 115th Street
25 # address effective 1 July 2011.  The email address should still work,
26 # and the website and FTP addresses, for the foreseeable future.
27 #
28 # Contributions from many others.  Special thanks to Jeff Altman for the
29 # secure-build targets, Peter Eichhorn, assyst GmbH, for the consolidated
30 # HP-UX targets and the "uninstall" target, to Robert Lipe for the updated
31 # and consolidated SCO UNIX / ODT / OSR5 targets, to Ric Anderson for the
32 # IRIX 6.x targets, to Seth Theriault for major improvements to the
33 # Mac OS X targets.
34 #
35 # C-Kermit is written and produced by hand without any automated procedures
36 # such as autoconf / automake / configure, although some of the targets below
37 # (especially the linux target) inspect the environment and make some
38 # decisions in the most portable way possible. The automated tools are not
39 # used because (a) C-Kermit predates them, and (b) they are not portable to
40 # all the platforms where C-Kermit must be (or once was) built, and (c) to
41 # keep C-Kermit as independent as possible from external tools over which
42 # we have no control.
43 #
44 # Most entries use the "xermit" target, which uses the select()-based CONNECT
45 # module, ckucns.c.  The "wermit" target uses the original fork()-based CONNECT
46 # module, ckucon.c, which has some drawbacks but was portable to every Unix
47 # variant whether it had TCP/IP or not (select() is part of the TCP/IP
48 # library, which was not standard on older Unixes).  If your target still uses
49 # the "wermit" target, please try substituting the "xermit" one and if it
50 # works, let us know (mailto:kermit-support@columbia.edu).  When changing a
51 # target over from wermit to xermit, also remove -DNOLOEARN.
52 #
53 # CAREFUL: Don't put the lowercase word "if", "define", or "end" as the first
54 # word after the "#" comment introducer in the makefile, even if it is
55 # separated by whitespace.  Some versions of "make" understand these as
56 # directives.  Uppercase letters remove the danger, e.g. "# If you have..."
57
58 # WARNING: This is a huge makefile and it contains nested makes.  Although
59 # this is less likely since the turn of the century, some "make" programs
60 # might run out of memory.  If this happens to you, edit away the parts that
61 # do not apply to your platform and try again.
62 #
63 # Certain UNIX variations have their own separate makefiles:
64 #  . For 2.10 or 2.11 BSD on DEC PDP-11s, use ckubs2.mak.
65 #  . For Plan 9, use ckpker.mk.
66 #
67 # Separate build procedures are provided non-UNIX platforms: VMS, VOS,
68 # AOS/VS, etc.  See the ckaaaa.txt file or the Kermit website for details.
69 #
70 #
71 # DIRECTIONS FOR UNIX
72 #
73 # Rename this file to "makefile" or "Makefile" if necessary.  Pick out the
74 # entry most appropriate for your UNIX version from the list below and then
75 # give the appropriate "make" command, for example "make aix", "make macosx",
76 # "make linux".  If you experience any difficulties with the build procedure,
77 # then please also read any comments that accompany the make entry itself
78 # (search for the make entry name on the left margin).
79 #
80 # Other targets:
81 #  'make install' is an installation script (read accompanying comments!).
82 #  'make clean' removes intermediate and object files.
83 #
84 # IMPORTANT:
85 #   For more detailed installation instructions, read the files ckuins.txt
86 #   and ckccfg.txt, also available at the Kermit website in HTML form:
87 #   http://www.columbia.edu/kermit/ckuins.html
88 #   http://www.columbia.edu/kermit/ckccfg.html
89 #
90 #  For descriptions of known problems and limitations,
91 #   read the files ckcbwr.txt and ckubwr.txt (the "beware files") or:
92 #   http://www.columbia.edu/kermit/ckcbwr.html
93 #   http://www.columbia.edu/kermit/ckubwr.html
94 #
95 # Most targets build C-Kermit with its symbol table included.  To reduce the
96 # size of the executable program, add "LNKFLAGS=-s" to the end of your 'make'
97 # command or to the makefile entry, or 'strip' the executable after
98 # building.  To further reduce the size after building, use 'mcs -d' if your
99 # Unix version has such a command.  For further details on size reduction, read
100 # ckccfg.txt to find out how to remove features that you don't need.
101 #
102 # TCP/IP networking support: If your C-Kermit version does not include TCP/IP
103 # networking, but your UNIX system does, try adding -DTCPSOCKET to the CFLAGS
104 # of your makefile entry.  If that doesn't work, look at some of the other
105 # targets that include this flag for ideas about what libraries might need to
106 # be included (typically -lsocket and/or -lBSD and/or -lnsl and/or -linet).
107 # NOTE: In some cases (old versions of SCO or HP-UX), you might need not only
108 # a C compiler, but also a "TCP/IP developers kit" for the required object
109 # libraries and header files.
110 #
111 # Please report modifications, failures (preferably with fixes) or successes
112 # to the author, fdc@columbia.edu.
113 #
114 # TARGETS FOR DIFFERENT UNIX PLATFORMS AND VERSIONS:
115 #
116 # + Marks those that have been built successfully for C-Kermit 8.0 or later.
117 # - Those that once built OK but no longer do (e.g. too big).
118 # ? Those that worked in a previous version but have not been tested recently.
119 # --------------------------
120 # Some commonly used targets:
121 #
122 # + "make linux" should work for any version of Linux on any hardware.
123 # + "make linux+ssl" ditto, with OpenSSL security added.
124 # + "make linux+krb5" ditto, with Kerberos 5 security added.
125 # + "make linux+krb5+ssl" Linux with OpenSSL and Kerberos 5.
126 # + "make netbsd", NetBSD, any version.
127 # + "make netbsd+ssl", NetBSD with OpenSSL 0.9.7 or later.
128 # + "make netbsd+krb5", NetBSD with Kerberos 5.
129 # + "make netbsd+krb5+ssl", NetBSD with Kerberos 5 and OpenSSL 0.9.7 or later.
130 # + "make freebsd", FreeBSD 4.1 or later.
131 # + "make freebsd+ssl", FreeBSD 5.0 or later with OpenSSL 0.9.7 or later.
132 # + "make openbsd", OpenBSD 2.3 or later.
133 # + "make openbsd+ssl", OpenBSD 2.3 or later with OpenSSL 0.9.7 or later.
134 # + "make mirbsd", MirBSD.
135 # + "make mirbsd+ssl", MirBSD with OpenSSL 0.9.7 or later.
136 # + "make macosx" should work for any Mac OS X version 10.3.9 or later.
137 # + "make macosx+krb5+openssl" Mac OS X 10.3.9 or later + Kerberos V + OpenSSL.
138 # + "make aix" should work for any version of AIX 4.2 or later.
139 # + "make aixg" should work for any version of AIX 4.2 or later, using gcc.
140 # + "make aix+ssl" ditto, with OpenSSL (specifying SSLLIB and SSLINC)
141 # + "make aix+ibmssl" ditto, with IBM OpenSSL
142 # + "make solaris9", "make solaris10" for Solaris 9 or 10 with Sun cc.
143 # + "make solaris9g", "make solaris10g" for Solaris 9 or 10 with gcc.
144 # + "make solaris11" for Solaris 11 with Sun CC
145 # + "make solaris11g" for Solaris 11 with gcc
146 # + "make sco_osr600" for SCO OpenServer 6.0.0.
147 #
148 # For other current OSs such as Solaris, HP-UX, and SCO there are separate
149 # targets for different combinations of OS version and compiler; see the
150 # complete list.  For older OS's see the complete list.  If an old target
151 # doesn't work in this release of C-Kermit you can get a previous release from
152 # the Kermit FTP site: ftp://kermit.columbia.edu/kermit/
153 #
154 # SECURE TARGETS (versions that support authentication and encryption)
155 #  are described after the following list.  Search for ******* below.
156 #
157 # --------------------------
158 # Complete list (alphabetical):
159 # ? for 386BSD (Jolix) 0.0, 0.1, "make 386bsd" (see comments in entry),
160 #     or (preferably, if it works) "make bsd44" or "make bsd44c".
161 # ? for Acorn RISCiX, "make riscix" or "make riscix-gcc"
162 # ? for Alliant FX/8 with Concentrix 4.1 or later, "make bsdlck"
163 # ? for Altos 486, 586, 986 with Xenix 3.0, "make altos"
164 # ? for Altos ACS68000, 8Mhz 68000, UNIX System 3 Rel 2, 512K, "make altos3"
165 # ? for Amdahl UTS 2.4 on IBM 370 series & compatible mainframes, "make uts24"
166 # ? for Amdahl UTSV IBM 370 series & compatible mainframes, "make utsv"
167 # ? for Amdahl UTSV IBM 370 series mainframes with TCP/IP, "make utsvtcp"
168 # ? for Amdahl mainframes with UNIX System V R 5.2.6b 580, "make sys3"
169 # ? for Apollo Aegis 9.x, DOMAIN/IX 9.x, "make aegis"
170 #    (Last tested in C-Kermit 5A(189))
171 # ? for Apollo DOMAIN/IX, if the above fails, try "make apollobsd"
172 # ? for Apollo with SR10.0 or later, BSD environment, "make sr10-bsd"
173 # ? for Apollo with SR10.0 or later, System V environment, "make sr10-s5r3"
174 # ? for Apple Macintosh II with A/UX pre-3.0, "make aux", "auxgcc" or "auxufs"
175 # ? for Apple Macintosh with A/UX 3.0 and gcc, "make aux3gcc" or aux3gccc
176 # ? for Apple PowerMac with MkLinux, "make mklinux" (read Linux entry first)
177 # ? for Apple PowerMac with LinuxPPC, "make linuxppc"
178 # ? for Apple Macintosh with Minix 1.5.10, "make minix68k" or "make minixc68"
179 # ? for Apple Macintosh with Mac OS X 1.0 (Rhapsody), "make macosx10"
180 #     (no curses), "make macosx10c" (curses), or "make macosx10nc" (ncurses).
181 #     Or "make macosx10ncx" (ncurses but "make macosx10nc" doesn't work).
182 # ? for Apple Macintosh with Mac OS X 10.2, "make macosx102nc" (ncurses).
183 # ? for Apple Macintosh with Mac OS X 10.3, "make macosx103"
184 # ? for Apple Macintosh with Mac OS X 10.3.9 or later, "make macosx"
185 # ? for Arix System 90 with AT&T SVR3, "make sys5r3na"
186 # - for AT&T 6300 with IN/ix, "make sys5"
187 # - for AT&T 6300 PLUS, "make att6300" or (with no debugging) "make att6300nd"
188 # ? for AT&T 6386 WGS UNIX PC, "make sys5r3"
189 # ? for AT&T 3B2, 3B20 systems, "make att3b2".
190 #   for AT&T 3B1, 7300 UNIX PC (see notes with the entries):
191 #     In C-Kermit 7.0, only the gcc entries work:
192 # ?   "make sys3upcg", "make sys3upcgc", "make att351gm"
193 #    The others fail with "too many defines" (usually in ckuusr.h):
194 # -   "make sys3upc", "make sys3upcold", "make sys3upcc", "make sys3upcx",
195 #       "make sys3upcm", "make att351m"
196 # ? for AT&T System III/System V R2 or earlier, "make sys3" or "make sys3nid"
197 # ? for AT&T System III/System V with Honey DanBer UUCP, "make sys3hdb"
198 # ? for AT&T System V on DEC VAX, "make sys3" or "make sys5r3"
199 # ? for AT&T System V R3, use "make sys5r3" or "make sys5r3c"
200 # ? for AT&T System V/386 R3.2 built on Interactive 4.1.1, "make sys5r32is".
201 # ? for AT&T System V/386 R320.0 Versyss Systems, use "make sys5r3"
202 #     or "make sys5r3c".
203 # ? for AT&T System V R4, "make sys5r4", "make sys5r4sx", or "make sys5r4nx",
204 #     or if the ANSI C function prototyping makes trouble, add -DNOANSI,
205 #     as in "sys5r4sxna" entry
206 # ? for AT&T (USL) System V R4.2 use the sys5r4* entries.
207 # ? for Atari Falcon with MiNT, "make posix"
208 # ? for Atari ST with Minix ST 1.5.10.3, "make minix68k" or "make minixc68"
209 # ? for BBN C/70 with IOS 2.0, "make c70"
210 # ? for BeBox with Be OS 1.x DR7, "make beboxdr7"
211 #     Compiles OK but doesn't link with default linker which is limited to 64K.
212 #     Links OK with "Code Warrior Gold".  Many hacks in the source code need
213 #     to be removed when DR8 and later come out.
214 #     (Last tested in C-Kermit 6.0)
215 # - for BeBox with Be OS 1.x DR8, "make bebox"
216 #     (Needed functions missing from operating system and/or not working.)
217 # - for Bell Labs UNIX Version 6 (6th Edition), there is no makefile entry.
218 # ? for Bell Labs UNIX Version 7 (7th Edition), "make v7" (but see notes below)
219 #    (last built successfully in C-Kermit 5A188)
220 # ? for Bell Labs Research UNIX Version 10, "make bellv10"
221 #    (last built successfully in C-Kermit 6.0)
222 # ? for Bell Labs / Lucent Plan 9, use separate makefile ckpker.mk:
223 #    can be built for Intel, MIPS, 680x0, and PowerPC (last built C-Kermit 7.0)
224 # ? for BSDI BSD/386 1.x, "make bsdi"
225 # ? for BSDI BSD/OS 2.x, "make bsdi2"
226 # ? for BSDI BSD/OS 3.0 or 3.1, "make bsdi3"
227 # ? for BSDI BSD/OS 4.x, "make bsdi4"
228 # ? for BSDI BSD/OS 4.x, to build a binary that also works on FreeBSD,
229 #     "make bsdix".
230 # ? for Berkeley Unix 2.4, "make v7" (but read v7 material below)
231 # ? for Berkeley Unix 2.9 (DEC PDP-11 or Pro-3xx), "make bsd29"
232 # - for Berkeley Unix 2.10, use ckubs2.mak (a separate makefile)
233 # - for Berkeley Unix 2.11, use ckubs2.mak (a separate makefile)
234 #     This makefile is too big.  Read the instructions in ckubs2.mak.
235 #     "make -f ckubs2.mak bsd210" or "make -f ckubs2.mak bsd211".
236 #     (last built successfully in C-Kermit 6.0 - later versions too big)
237 # ? for Berkeley Unix 2.11 "make -f ckubs2.mak bsd210noicp" (no command parser)
238 # ? for Berkeley Unix 4.1, "make bsd41"
239 # ? for Berkeley Unix 4.2 on VAX, "make bsd42" or "make bsd42c"
240 # ? for Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP, "make bsdhdb"
241 # ? for Berkeley Unix 4.3 on VAX, "make bsd43", "make bsd43nc".
242 # ? for Berkeley Unix 4.3 on VAX, no networking "make bsd43nonet.
243 # ? for Berkeley Unix 4.3 without acucntrl program, "make bsd42" or "bsd42c"
244 #     NOTE: all the C-Kermit 7.0 full builds for old BSDs fail with
245 #     "too many defines" in CPP, even on big architectures like VAX.  This
246 #     can be worked around with a clever ruse.  See comments at target.
247 # ? for Berkeley Unix 4.3, command-line only, "make bsdm".
248 # ? for Berkeley Unix 4.3-Tahoe, same as 4.3 BSD
249 # ? for Berkeley Unix 4.3-Reno, "make bsd43" or "make bsd44" or "make bsd44c"
250 # ? for Berkeley Unix 4.3-Carson City, "make bsd44" or "make bsd44c"
251 # ? for Berkeley Unix 4.4-Networking/2 or -Alpha, "make bsd44" or "make bsd44c"
252 # ? for Berkeley Unix 4.4, "make bsd44" or "make bsd44c"
253 # ? for Berkeley Unix 4.4-Lite, "make bsd44" or "make bsd44c"
254 # ? for Bull DPX/2 with BOS/X, "make bulldpx2"
255 # ? for Cadmus, "make sys3"
256 #   for Caldera, see SCO, Linux.
257 # ? for Callan Unistar, "make sys3"
258 # ? for CDC VX/VE 5.2.1 System V emulation, "make vxve"
259 # ? for Charles River Data Systems Universe 680x0 with UNOS 9.2, maybe
260 #     also other UNOS versions, "make crds"
261 # ? for CIE Systems 680/20 with Regulus, "make cie"
262 # ? for Commodore Amiga 3000UX Sys V R4, "make sys5r4sx"
263 # ? for Commodore Amiga 3000UX Sys V R4 and TCP/IP, "make svr4amiganet"
264 # ? for Commodore Amiga with Minix 1.5.10, "make minix68k" of "make minixc68"
265 # ? for Concurrent/Masscomp with RTU 4.0 or later, BSD environment, "make
266 #     rtubsd", "make rtubsd2", "make rtubsd3" (depending on where ndir.h
267 #     is stored, see entries below).
268 # ? for Concurrent/Masscomp with RTU 4.0 or later, System V R2, "make rtus5"
269 # ? for Concurrent (Perkin-Elmer) 3200 series, "make sys5".
270 # ? for Concurrent (Perkin-Elmer) 3200 series with <dirent.h>, "make ccop1"
271 # ? for Concurrent PowerMAX OS SVR4, "make powermax"
272 # ? for Consensys UNIX SV/386 R4V3, "make sys5r4sxtcpc" or "make sys5r4sx"
273 # ? for Convergent with CTIX Sys V R2, "make sys5"
274 # ? for Convergent with CTIX 6.4.1, "make ctix"
275 # ? for Convex C1, "make convex"
276 # ? for Convex C210 with Convex/OS 8, "make convex8"
277 # ? for Convex C2 with Convex/OS 9.1, "make convex9"
278 # ? for Convex C2 with Convex/OS 10.1 and gcc 2.x, "make convex10gcc"
279 # ? for Cray Research X/MP or YMP or C90 with UNICOS 6.x (System V R3),
280 #       "make cray"
281 # ? for Cray Research X/MP or YMP or C90 with UNICOS 7.x (System V R4),
282 #       "make cray"
283 # ? for Cray Research X/MP or YMP or C90 with UNICOS 8.0 Alpha, "make cray8"
284 # ? for Cray Research X/MP or Y-MP or C90 with UNICOS 9.0, "make cray9"
285 # ? for Cray Computer Cray-2 or Cray3 with CSOS, "make craycsos"
286 # ? for Cyber 910 (Silicon-Graphics Iris) with Irix 3.3, "irix33"
287 # ? for Data General AViiON with DG/UX 5.4 before R3.00, "make dgux540"
288 #     or "make dgux540c" (compile ckwart separately if necessary)
289 # ? for DG/UX 5.4 on AViiON Intel models, "make dgux540i" or dgux540ic.
290 # ? for DG/UX 5.4R4.11 on AViiON, all models, "make dgux54411"
291 # ? for DG/UX 5.4R4.20 on AViiON, all models, "make dgux54420"
292 # ? for Data General AViiON with DG/UX 4.3x using Sys V-isms, "make dgux430"
293 # ? for Data General AViiON with DG/UX 4.3x using BSD-isms, "make dgux430bsd"
294 # ? for Data General AViiON, earlier UNIX versions,
295 #     "make sys5r3" (maybe compile ckwart separately, or "touch ckcpro.c")
296 # ? for Data General MV systems with DG/UX, ???
297 # ? for Data General MV systems with MV/UX, use AOS/VS C-Kermit (CKDKER.MAK)
298 # ? for Data General MV systems with AOS/VS, use CKDKER.MAK (last = C-K 7.0)
299 #   for DEC PDP-11 with Berkeley UNIX 2.x, see Berkeley UNIX 2.x.
300 # ? for DEC PDP-11 with Mini-UNIX (Bell 6th Edition for PDP-11 with no MMU),
301 #     probably no way to fit C-Kermit without I&D space.
302 # ? for DEC PDP-11 with Ultrix-11 3.x, ??? (probably needs overlays)
303 # ? for DEC VAX with Ultrix 1.x "make bsd"
304 # ? for DEC VAX with Ultrix 2.x "make ultrix2x"
305 # ? for DEC VAX or DECstation with Ultrix 3.0, 3.1, "make ultrix3x"
306 # ? for DECstation or VAX with Ultrix 4.0 or 4.1, "make ultrix40"
307 # ? for DECstation or VAX with Ultrix 4.2, "make ultrix42" or "make ultrix42c"
308 # ? for DECstation or VAX with Ultrix 4.x, POSIX world, "make posix"
309 # ? for DECstation or VAX with Ultrix 4.3, "make ultrix43".
310 # ? for DECstation or VAX with Ultrix 4.4, "make ultrix44".
311 # ? for DECstation 5000/50, /150 or /260 (R4x00 MIPS CPU), Ultrix 4.3A or later
312 #     "make ultrix43-mips3" or "make ultrix43c-mips3"
313 # ? for DECstation (MIPS) with Berkeley Sprite, "make bsd44"?
314 # ? for DECstation (MIPS) with OSF/1 V1.0 to 1.3, "make dec-osf"
315 # ? for DEC Alpha with OSF/1 1.0 to 1.3, "make dec-osf"
316 # ? for DEC PC 486 with OSF/1, "make dec-osf"
317 # ? for DEC Alpha with OSF/1 2.x, "make dec-osf20"
318 # ? for DEC Alpha with OSF/1 3.0, "make dec-osf30"
319 # ? for DEC Alpha with Digital UNIX 3.2, "make du32"
320 # ? for DEC Alpha with Digital UNIX 4.0-4.0D, "make du40" or "make du40gcc"
321 # ? for DEC Alpha with Digital UNIX 4.0E or higher, see Tru64.
322 # - for DEC Pro-350 with Pro/Venix V1.x, "make provx1" (version 5A is too big)
323 # ? for DEC Pro-380 with Pro/Venix V2.0 (Sys V), "make sys3" or "make sys3nid"
324 # ? for DEC Pro-380 with 2.9, 2.10, or 2.11 BSD, "make bsd29" or "make bsd210"
325 #   for DEC PDP-11 with 2.xBSD (use separate makefile ckubs2.mak)
326 # ? for Dell UNIX Issue 2.x (= USL Sys V/386 R4.x + fixes), "make dellsys5r4"
327 #     or "make dellsys5r4c" (last tested in C-Kermit 5A).
328 # ? for DIAB DS90 with DNIX (any version) create an empty <sys/file.h> if
329 #     this file does not already exist (or add -DNOFILEH to the make entry).
330 # ? for DIAB DS90 with DNIX 5.2 (Sys V.2) or earlier, "make dnix",
331 #     "make dnixnd", or (to add curses and TCP/IP) "make dnixnetc",
332 # ? for DIAB DS90 with DNIX 5.3 (Sys V.3), "make dnix5r3"
333 # ? for DIAB DS90 with DNIX 5.3 (Sys V.3) and TCP/IP, "make dnix5r3net"
334 # ? for DIAB DS90 with DNIX 5.3 2.2 (Sys V.3), ANSI C, "make dnix5r3ansi"
335 #     or, to include TCP/IP, "make dnix5r3ansinet",
336 #     but you have to fix a bug in /usr/include/stdlib.h first:
337 #     change "extern void free(char *str);" to "extern void free(void *str);"
338 # ? for Dolphin Server Technology Triton 88/17 with SV/88 R3.2, "make sv88r32"
339 # ? for Encore Multimax 310, 510 with Umax 4.2, "make umax42"
340 # ? for Encore Multimax 310, 510 with Umax 4.3, "make umax43"
341 # ? for Encore Multimax 310, 510 with Umax V 2.2, use Berkeley cc, "make bsd"
342 # ? for Encore 88K with Umax V 5.2, "make encore88k"
343 # ? for ESIX System V R4.0.3 or 4.04 with TCP/IP support, "make esixr4"
344 #     NOTE: You can also build on Unixware 2.x with "make esixr4", and run
345 #     on ESIX, but there you must first:
346 #       ln /usr/lib/libsocket.so /usr/lib/libsocket.so.1
347 #       ln /usr/lib/libnsl.so /usr/lib/libnsl.so.1
348 #     (This worked for C-Kermit 6.0 but does not work for 7.0)
349 #     (But you can probably still build a non-networking version this way)
350 # ? for Everex STEP 386/25 Rev G with ESIX Sys V R3.2D, "make sys5r3"
351 # ? for Fortune 32:16, For:Pro 1.8, "make ft18"
352 # ? for Fortune 32:16, For:Pro 2.1, "make ft21"
353 # ? for FPS 500 with FPX 4.1, "made bsd"
354 # ? for FreeBSD 1.0, "make freebsd1"
355 # ? for FreeBSD 2.x, "make freebsd2" (ncurses) or "make freebsd2c" (curses)
356 # ? for FreeBSD 3.x, "make freebsd3" (ncurses) or "make freebsd3c" (curses)
357 # ? for FreeBSD 4.0, "make freebsd40"
358 # ? for FreeBSD 4.1 or later, "make freebsd"
359 # ? for Harris HCX-2900, "make sys5r3"
360 # ? for Harris Night Hawk 88K or 68K with CX/UX pre-6.1, "make sys5r3"
361 # ? for Harris Night Hawk 88K or 68K with CX/UX 6.1 or later, "make cx_ux"
362 # ? for Heurikon, "make sys3"
363 # ? for HP-3000, MPE/ix, "make posix"?
364 # ? for HP-9000 Series 300 with 4.4BSD, "make bsd44"
365 # ? for HP-9000 Series 500, HP-UX 5.21 and no networking "make hpux0500"
366 # ? for HP-9000 Series 500, HP-UX 5.21 with WIN/TCP 1.2 "make hpux0500wintcp"
367 # ? for HP-9000 Series, HP-UX 6.5, without long filenames,
368 #     "make hpux0650", "make hpux0650c" or "make hpux0650tcpc"
369 # ? for HP-9000 Series, HP-UX 7.0 or later no long filenames, "make hpux0700sf"
370 #     or (to include tcp/ip, curses, etc) "make hpux0700sftcpc"
371 # ? for HP-9000 Series with HP-UX 7.0, TCP/IP,long filenames,"make hpux0700lfn"
372 # ? for HP-9000 300/400 Series (680x0) with HP-UX 8.0, TCP/IP, "make hpux0800"
373 #      or "make hpux0800c"
374 # ? for HP-9000 700/800 Series (PA-RISC), HP-UX 8.0, TCP/IP, "make hpux0800pa"
375 #      or "make hpux0800pac"
376 # ? for HP-9000 Series with HP-UX 8.0, no TCP/IP, long filenames,
377 #      "make hpux0800notcp"
378 # ? for HP-9000 Series, HP-UX 9.0 - 9.10, TCP/IP, curses, restricted compiler
379 #     (no optimization, no ANSI), all models, "make hpux0900".  Read the
380 #     hpux0900 entry below for more info.
381 # ? for HP-9000 700 and 800 Series, HP-UX 9.x, TCP/IP, curses,
382 #     HP optimizing ANSI C compiler, "make hpux0900o700".
383 # ? for HP-9000 with Motorola CPUs, HP-UX 9.x, TCP/IP, curses,
384 #     HP optimizing ANSI C compiler, "make hpux0900mot".
385 # ? for HP-9000 on other CPUs, HP-UX 9.x, TCP/IP, curses,
386 #     HP optimizing ANSI C compiler, "make hpux0900o".
387 # ? for HP-9000 series, HP-UX 9.x, TCP/IP, curses, gcc, all models,
388 #     "make hpux0900gcc"
389 # ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
390 #     curses, restricted compiler (no optimization, no ANSI) "make hpux1000".
391 # ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
392 #     curses, HP ANSI/optimizing compiler "make hpux1000o" or "make hpux1000o+"
393 # ? for HP-9000 HP-UX 10.00 or later with gcc, "make hpux1000gcc"
394 # ? for Trusted HP-UX 10.xx "make hpux1000t", "make hpux1000to",
395 #     or make hpux1000to+"
396 # ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
397 #     (no optimization, no ANSI) "make hpux1100".
398 # ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
399 #     HP ANSI/optimizing compiler "make hpux1100o" or "make hpux1100o+"
400 # ? for Trusted HP-UX 11.xx "make hpux1100t", "make hpux1100to",
401 #     make hpux1100to+"
402 # ? for HP-9000 PA-RISC models with NeXTSTEP 3.3, "make nextquadfat".
403 # ? for HP-9000 PA-RISC models with OPENSTEP/Mach 4.1, "make nextquadfat".
404 # ? for IBM 370 Series with IX/370, "make ix370"
405 # ? for IBM 370 Series with AIX/370 1.2, "make aix370"
406 # ? for IBM 370 Series with AIX/370 3.0, "make aix370"
407 # ? for IBM 370 Series with AIX/ESA 2.1, "make aixesa"
408 # - for IBM PC/AT 286 & compatibles with Mark Williams Coherent OS,
409 #     command-line-only version, "make coherent" (version 5A & later too big)
410 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
411 #     minimum interactive version, "make coherentmi"
412 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
413 #     full interactive version, prior to v4.2, "make coherentmax"
414 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS 4.2,
415 #     "make coherent42"
416 # ? for IBM PC 386 & compatibles with LynxOS 2.0 or 2.1, "make lynx21"
417 # ? for IBM PC 386 & compatibles with LynxOS 2.2, "make lynx"
418 # - for IBM PC/AT & compatibles with original MINIX, "make minix" (too big)
419 # ? for IBM PC family, 386-based, with MINIX/386 1.5, "make minix386"
420 #     or if you have GNU CC, "make minix386gcc"
421 # ? for IBM PC family, 386-based, with MINIX 2.0, "make minix20"
422 # ? for IBM PC family, 386-based, with MINIX 3.0, "make minix3"
423 # ? for IBM PS/2 with PS/2 AIX 1.0, 1.1, or 1.2, "make ps2aix" or ps2aixnetc.
424 # ? for IBM PS/2 with PS/2 AIX 1.3, "make ps2aix3"
425 # ? for IBM RISC System/6000 with AIX 3.0, "make aix30"
426 # ? for IBM RISC System/6000 with AIX 3.1.x, "make aix31"
427 # ? for IBM RISC System/6000 with AIX 3.2.0 thru 3.2.5, "make aix32"
428 # ? for IBM RS/6000 or Power Series with AIX 4.1.x, "make aix41"
429 # ? for IBM RS/6000 or Power Series with AIX 4.1.x with gcc, "make aix41g"
430 # ? for IBM RS/6000 or Power Series with AIX 4.1 with X.25, "make aix41x25"
431 # ? for IBM RS/6000 or Power Series with AIX 4.2 or later: "make aix"
432 #  (the following "make aixnn" targets are no longer necessary except for gcc)
433 # ? for IBM RS/6000 or Power Series with AIX 4.2, "make aix42"
434 # ? for IBM RS/6000 or Power Series with AIX 4.3, "make aix43" (or aix43gcc)
435 # ? for IBM RS/6000 or Power Series with AIX 4.4, "make aix44" (or aix44gcc)
436 # ? for IBM RS/6000 or Power Series with AIX 4.5, "make aix45" (or aix45gcc)
437 # ? for IBM RS/6000 or Power Series with AIX 5.0, "make aix50" (or aix50gcc)
438 # ? for IBM RS/6000 or Power Series with AIX 5.1, "make aix51" (or aix51gcc)
439 # ? for IBM RS/6000 or Power Series with AIX 5.2, "make aix52" (or aix52gcc)
440 # ? for IBM RS/6000 or Power Series with AIX 5.3, "make aix53" (or aix53gcc)
441 # ? for IBM RS/6000 or Power Series with AIX 6.1, "make aix61" (or aix53gcc)
442 # ? for IBM RT PC with AIX 2.1, "make sys3"
443 # ? for IBM RT PC with AIX 2.2.1, "make rtaix" or "make rtaixc"
444 # ? for IBM RT PC with ACIS 4.2, "make bsd"
445 # ? for IBM RT PC with ACIS 4.3, "make rtacis" or "make bsd KFLAGS=-DNOANSI"
446 # ? for IBM RT PC with 4.3BSD/Reno, "make bsd44" or "make bsd44c"
447 # ? for ICL DRS400 or 400E, "make iclsys5r3"
448 # ? for ICL DRS3000 (80486) with DRS/NX, "make iclsys5r4_486"
449 # ? for ICL DRS6000 (SPARC) with DRS/NX, "make iclsys5r4"
450 # ? for ICL DRS6000 (SPARC) with DRS/NX 4.2MP 7MPlus, "make iclsys5r4m+"
451 # ?     Ditto but with IKSD support included, "make iclsys5r4m+iksd"
452 # ? for Integrated Solutions Inc V8S VME 68020, "make isi"
453 # ? for Intel 302 with Bell Tech Sys V/386 R3.2, "make sys5r3"
454 # ? for Intel Xenix/286, "make sco286"
455 # ? for Interactive System III (PC/IX), "make pcix" or "make is3"
456 # ? for Interactive System III (PC/IX) with gcc, "make is3gcc"
457 # ? for Interactive 386/ix 1.0.6 with TCP/IP networking, "make is5r3net2"
458 # ? for Interactive 386/ix 2.0.x, "make is5r3" or (POSIX) "make is5r3p"
459 # ? for Interactive 386/ix 2.0.x with TCP/IP networking, "make is5r3net"
460 #     or "make is5r3net2"
461 # ? for Interactive 386/ix 2.2.1, job control, curses, no net, gcc,
462 #     "make is5r3gcc"
463 # ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 without TCP/IP, "make is5r3jc"
464 # ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 with TCP/IP, "make is5r3netjc"
465 # ? for Intergraph Clipper, "make clix" or "make clixnet"
466 # ? for Jolix (see 386BSD)
467 # + for Linux 1.2 and later, "make linux".  Uses ncurses.  This version
468 #     handles serial speeds up to 460800 bps, Linux FSSTD 1.2, TCP/IP, and
469 #     should work on both libc and glibc systems.  For static linking, use
470 #     "make linux LNKFLAGS=-static".  Please read the comments that accompany
471 #     the linux entry.  As of 8.0.212 Dev.10, this also includes Large File
472 #     Support (LFS).
473 # + for Linux builds that fail with "sys/select.h: No such file or directory",
474 #     "make linuxns"
475 # + for Linux 1.2 and later but with curses.h and libcurses (rather than
476 #     ncurses.h and libncurses), use "make linuxc".
477 # + for Linux 1.2 and later with no curses support at all, "make linuxnc".
478 # + for Linux with no TCP/IP, "make linuxnotcp"
479 # (The following Linux targets are historic and might not work...)
480 # ? for Red Hat Linux 7.1 through RH9, fully configured (krb5, SSL, etc):
481 #     "make redhat71", "make redhat72", "make redhat73", "make redhat80"
482 #     "make redhat9"
483 #     NOTE: You must use this target for Red Hat 7.1 since it
484 #     also includes a workaround for its broken curses library.
485 #     WARNING: These targets create binaries that include code for
486 #     strong encryption and are therefore not exportable. DO NOT PUT
487 #     THESE BINARIES ON US OR CANADIAN WEB OR FTP SITES.
488 # ? for Linux on PowerMac (Mklinux DR3), "make mklinux".
489 # ? for Linux 1.2 and later, to build with egcs, "make linuxegcs".
490 # ? for Linux with lcc compiler, no TCP/IP, "make linuxnotcp-lcc"
491 # ? for Linux 1.0 or earlier, "make linux10".
492 # (End old linux targets)
493 # ? for Mach 2.6 on (anything, e.g. DECstation), "make bsd42" or "make bsd43".
494 # ? for MachTen (Tenon) 2.1.1.D on (e.g.) Apple Powerbook, "make machten".
495 # ? for Masscomp RTU AT&T System III, "make rtu"
496 #   for other Masscomp, see Concurrent.
497 # ? for Microport SV/AT (System V R2), "make mpsysv" (last edit tested: 144)
498 # ? for Microport SVR4 2.2, 3.1, or 4.1 "make sys5r4sx"
499 # ? for Microsoft,IBM Xenix (/286, PC/AT, etc), "make xenix" or "make sco286"
500 # ? for MIPS System with RISC/os (UMIPS) 4.52 = AT&T SVR3, "make mips"
501 #     or "make mipstcpc"
502 # ? for MkLinux on Power Macintosh, "make mklinux"
503 # ? for Modcomp 9730, Real/IX, "make sys5r3" (or modify to use gcc = GLS cc)
504 # ? for Modcomp Realstar 1000 with REAL/IX D.1, "make sv88r32"
505 # ? for Motorola Four Phase, "make sys3" or "make sys3nid"
506 # ? for Motorola Delta System V/68 R3, "make sv68r3"
507 # ? for Motorola Delta System V/68 R3V5, "make sv68r3v5"
508 # ? for Motorola Delta System V/68 R3V5.1, "make sv68r3v51"
509 # ? for Motorola Delta System V/68 R3V6 with NSE TCP/IP, "make sv68r3v6"
510 # ? for Motorola Delta System V/88 R32, "make sv88r32"
511 # ? for Motorola Delta System V/88 R40, "make sv88r40"
512 # ? for Mt Xinu Mach386 on 386/486-based PCs, "make bsd43"
513 # ? for NCR Tower 1632, OS 1.02, "make tower1"
514 # ? for NCR Tower 1632 or Minitower with System V R2, "make sys3"
515 #     or "make sys3nv"
516 # ? for NCR Tower 32, OS Release 1.xx.xx, "make tower32-1"
517 # ? for NCR Tower 32, OS Release 2.xx.xx, "make tower32-2"
518 # ? for NCR Tower 32, OS Releases based on Sys V R3, "make tower32"
519 # ? for NCR Tower 32, OS Releases based on Sys V R3 with gcc "make tower32g"
520 # ? for NCR System 3000, AT&T UNIX System V R4 2.0, "make sys5r4sxna"
521 # ? for NCR System 3000, AT&T UNIX System V R4 2.0 with Wollongong TCP/IP,
522 #     "make sys5r4net2" or "make sys5r4net2c".
523 #      Some header files might be misplaced; try this:
524 #       ln /usr/include/netinet/in.h /usr/include/sys/in.h
525 #       ln /usr/include/arpa/inet.h /usr/include/sys/inet.h
526 #       ln /usr/include/sys/termiox.h /usr/include/termiox.h
527 # ? for NCR System 3000, NCR UNIX 02.02.01, same as above.
528 # ? for NCR MP-RAS System V R4 V2.03 or 3.02, "make mpras" or "make mprastcpc"
529 # ? for NetBSD any version on any architecture, "make netbsd"
530 # ? for NetBSD with SSL/TLS, SRP, and ZLIB, "make netbsd+ssl+srp+zlib"
531 # ? for NetBSD with ncurses specified instead of curses, "make netbsdn"
532 # ? for NetBSD with all curses support omitted, "make netbsdnc"
533 # ? for NeXT with NeXTSTEP 1.0 through 3.2, "make next" (on a NeXT)
534 # ? for NeXT with NeXTSTEP 3.3, "make next33"
535 # ? for NeXT with OPENSTEP/Mach 4.1, "make nextquadfat".
536 # ? for NeXT with OPENSTEP/Mach 4.2, "make openstep42".
537 # ? for NeXTSTEP/486, "make next" (on a PC)
538 # ? for NeXTSTEP portable binary (runs on Intel or Motorola), "make nextfat"
539 # ? for NeXTSTEP portable binary (Intel, Motorola, HP PA-RISC, or SPARC),
540 #     "make nextquadfat"
541 # ? for Nixdorf Targon/31, "make t31tos40x"
542 # ? for Norsk Data Uniline 88/17 with SV/88 R3.2, "make sv88r32"
543 #   for Novell UnixWare - see UnixWare
544 # ? for OSF/1 (vanilla, from OS/F), "make posix"
545 # ? for OkiStation 7300 Series, "make sys5r4sxtcp"
546 # ? for Olivetti LSX-3020 with X/OS R.2.3, "make xos23" or "make xos23c"
547 # + for OpenBSD, "make openbsd" (also see secure targets listed below).
548 # ? for OPENSTEP/Mach 4.1, "make nextquadfat" (NeXT, Intel, PA-RISC, SPARC)
549 # ? for OPENSTEP/Mach 4.2, "make openstep42" (tested on NeXT)
550 # ? for Perkin-Elmer (Concurrent) 3200 series, "make sys5".
551 # ? for Perkin-Elmer (Concurrent) 3200 series with <dirent.h>, "make ccop1"
552 # ? for Perkin-Elmer/Concurrent 3200 with Xelos R02, "make ccop1"
553 # ? for PFU Compact A Series SX/A TISP V10/E50 (Japan), "make sxae50"
554 # ? for Plexus, "make sys3"
555 # ? for Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1,
556 #     "ucb make pyramid" or for HDB UUCP, "ucb make pyramid-hdb" or:
557 # ? for Pyramid MIServer S or ES Series, DataCenter/OSx, "make pyrdcosx"
558 # ? for Pyramid MIS-S MIPS R3000, DataCenter OSx System V R4, "make pyrdcosx"
559 # ? for POSIX on anything, "make posix" (but adjustments might be necessary).
560 #      NOTE: this target is not very useful - many features are missing.
561 # ? for Prime 8000 MIPS, SVR3, "make mips" or "make mipstcpc"
562 # - for QNX 2.x (sorry we don't have a version of C-Kermit for QNX 2.x)
563 # ? for QNX 4.0 or 4.1, 16-bit, on 286 PC, Watcom C 8.5, "make qnx16_41"
564 # ? for QNX 4.21 - 4.22A (286+), and 4.23 (386+), or higher, 16-bit,
565 #     Watcom C 9.5x or higher, "make qnx16"
566 # + for QNX 4.21-4.25, 32-bit, 386 or above, Watcom C 10.6, "make qnx32"
567 #     NOTE: ("make qnx" == "make qnx32")
568 # ? for QNX Neutrino 2+, "make qnx_nto2+" (crosscompiled on QNX4 with Watcom C)
569 # ? for QNX 6 = Neutrino 2.xx, "make qnx6"
570 # ? for Ridge 32 (ROS3.2), "make ridge32"
571 # ? for Samsung MagicStation, "make sys5r4"
572 # ? for SCO Xenix 2.2.1 with development system 2.2 on 8086/8 "make sco86"
573 # ? for SCO Xenix/286 2.2.1 with development system 2.2 on 80286, "make sco286"
574 #     NOTE: reportedly this makefile is too long for SCO Xenix/286 make, but it
575 #     works with "makeL", or if some of the other make entries are edited out.
576 # ? for SCO Xenix/386 2.2.2, "make sco386"
577 # ? for SCO Xenix/386 2.3.x, "make sco3r2"
578 # ? for SCO Xenix/386 SCO 2.3.3 or 2.3.4 with gcc 1.37 or later,
579 #     "make sco386gcc" or (to add curses) "make sco386gccc".
580 # ? for SCO Xenix/386 or UNIX/386 with Excelan TCP/IP, "make sco3r2net"
581 #     or (to add curses support) "make sco3r2netc" or "sco386netc"
582 # + for SCO XENIX 2.3.4, "make sco234" or "make sco234c" to add curses.
583 # ? for SCO XENIX 2.3.4 with SCO TCP/IP & curses, "make sco234netc".
584 # ? for SCO Xenix 2.3.x with Racal-InterLan TCP/IP, "make sco3r2netri"
585 #   for other UNIX varieties with Racal Interlan TCP/IP, read sco3r2netri entry
586 # ? for SCO Xenix 2.3.x with SCO (Lachman) TCP/IP, "make sco3r2lai"
587 #     or (to add curses) "make sco3r2laic"
588 #   for SCO UNIX...  ALSO READ COMMENTS in the SCO UNIX entries for more info!
589 # ? for SCO UNIX/386 3.2.0 or 3.2.1, "make sco3r2" or "make sco3r2x"
590 # ? for SCO UNIX/386 3.2.2, "make sco3r22" or "make sco3r22gcc"
591 #     or "make sco3r22c"
592 # ? for SCO UNIX/386 3.2.2 with SCO TCP/IP, "make sco3r22net"
593 #     or "make sco3r22netc" (curses)
594 # ? for SCO ODT 1.1, "make sco3r22net" or "make sco3r22netc" (curses)
595 # ? for SCO UNIX/386 3.2 V4.x, no network support, "make sco32v4"
596 # ?   or "make sco32v4ns" (this one uses no select() or sockets library)
597 # ? for SCO UNIX/386 3.2 V4.x with TCP/IP, "make sco32v4net"
598 #     (also sco32v4gcc, sco32v4netgcc)
599 # ? for SCO UNIX/386 3.2 V5.0 - see SCO OpenServer.
600 # ? for SCO UNIX 3.2v4.x with TCP/IP, <dirent.h> for Extended Acer File
601 #     System (EAFS), curses, ANSI C compilation, "make sco32v4net"
602 # ?   or (to use select()-based CONNECT module) "make sco32v4netx".
603 # ? for SCO UNIX 3.2v4.2, "make sco-odt30" (includes TCP/IP).
604 # ? for SCO MPX 3.0 - The SCO UNIX binary runs on the corresponding MPX system.
605 #
606 # NOTE: Also see below for other entries that are variations on these.
607 # Also be sure to read the comments accompanying each SCO entry.
608 # Also see Unixware section.
609 #
610 # ? for SCO ODT 2.0, "make sco32v4net"
611 # ? for SCO ODT 3.0, "make sco-odt30"
612 # ? for SCO OpenServer 5.0 (OSR5), "make sco32v500"
613 # ? for SCO OpenServer 5.0 (OSR5) with networking, "make sco32v500net"
614 # ? for SCO OpenServer 5.0 (OSR5), gcc, "make sco32v500gcc"
615 # ? for SCO OpenServer 5.0 (OSR5), gcc, with networking, "make sco32v500netgcc"
616 # ? for SCO OpenServer 5.0 (OSR5), as above, ELF, "make sco32v500netgccelf"
617 # ? for SCO OpenServer 5.0.2, use "make sco32v502xxx" entries as above.
618 # ? for SCO OpenServer 5.0.4, use "make sco32v504xxx" entries as above.
619 # ? for SCO OpenServer 5.0.5, use "make sco32v505xxx" entries as above.
620 #     Use the sco32v505udkxxx entries if you have the UDK rather than /bin/cc.
621 # ? for SCO OpenServer 5.0.6, use "make sco32v506xxx" entries as above.
622 # ? for SCO OpenServer 5.0.6a,use "make sco32v506axxx" entries as above.
623 # ? for SCO OpenServer 5.0.7, use "make sco32v507", "make sco32v507net"
624 # ? for SCO (Univel) UnixWare 1.x, "make unixware" or "make unixwarenetc".
625 #     If there are problems with this in C-K 7+ see notes at unixware entry.
626 # + for SCO OpenServer 6.0.0, "make sco_osr600"
627 # ? for SCO UnixWare 2.0.x, "make uw20"
628 # ? for SCO UnixWare 2.1.0, "make uw21"
629 # ? for SCO UnixWare 2.1.3, "make uw213"
630 # + for SCO UnixWare 7, "make uw7" (includes large file support)
631 # ? for SCO UnixWare 7 with IKSD support, "make uw7iksd" or "make uw7iksdudk"
632 # ? for SCO UnixWare 7 with OpenSSL, "make uw7ssl"
633 # ? for SCO (Caldera) Open UNIX 8, "make ou8"
634 # ? for Sharp Zaurus SL5500 PDA, "make zsl5500".
635 # ? for Sequent with DYNIX/ptx 1.2.1, "make dynixptx12"
636 # ? for Sequent with DYNIX/ptx 1.3 or 1.4 with TCP/IP, "make dynixptx13"
637 # ? for Sequent with DYNIX/ptx 2.0 or 2.1 with TCP/IP, "make dynixptx20"
638 #     or "dynixptx20c"
639 # ? for Sequent with DYNIX/ptx 2.1.6 on i486, "dynixptx216c"
640 # ? for Sequent with DYNIX/ptx V4.1.3 with TCP/IP, "make dynixptx41c"
641 # ? for Sequent with DYNIX/ptx V4.4.2 with TCP/IP, "make dynixptx44"
642 # ? for Sequent Balance 8000 or B8 with DYNIX 3.0.xx, "make dynix3"
643 #    or "make dynix3noacu"
644 # ? for Sequent Symmetry S81 with DYNIX 3.0.xx, "make dynix3"
645 # ? for Sequent DYNIX 3.1.xx, "make dynix31" or "make dynix31c"
646 # ? for Siemens/Nixdorf SINIX-L Intel V5.41, "make sinix541i"
647 # ? for Siemens/Nixdorf SINIX-N MIPS V5.42, "make sinix542"
648 # ? for Siemens/Nixdorf SINIX-P MIPS V5.42 with gcc, "make sinix542g"
649 # ? for Siemens/Nixdorf SINIX-Z Intel V5.42, "make sinix542i"
650 # ? for Siemens/Nixdorf Reliant UNIX V5.43, "make sni543"
651 # ? for Siemens/Nixdorf Reliant UNIX V5.44, "make sni544"
652 # ? for Silicon Graphics Iris System V IRIX 3.2 or earlier, "make iris"
653 # ? for Silicon Graphics Sys V R3 with IRIX 3.3 or later, "make sys5r3"
654 # ? for Silicon Graphics Iris Indigo with IRIX 4.0 or 5.0, "make irix40" or
655 #     (to include Yellow Pages and Curses) "make irix40ypc"
656 # ? for Silicon Graphics Iris Indigo or Elan with IRIX 4.0.x with microcode
657 #     optimization and -O4, "make irix40u" or "irix40uc" (and read notes
658 #     accompanying these entries).
659 # ? for Silicon Graphics IRIX 5.1, "make irix51" or "irix51x" (no optimize)
660 # ? for Silicon Graphics IRIX 5.2, "make irix52"
661 # ? for Silicon Graphics IRIX 5.3, "make irix53" or "irix53x" (no optimize)
662 # ? for Silicon Graphics IRIX 6.0, "make irix60".
663 # ? for Silicon Graphics IRIX 6.2, "make irix62".
664 # ? for Silicon Graphics IRIX 6.3, "make irix63".
665 # ? for Silicon Graphics IRIX 6.4, "make irix64" or "make irix64gcc".
666 # + for Silicon Graphics (SGI) IRIX 6.5, "make irix65"
667 # +   or "make irix65mips2" to force MIPS2, or "make irix65gcc" for GCC.
668 # + for Silicon Graphics (SGI) IRIX 6.5, "make irix65" or "make irix65mips2"
669 # ? for SGI IRIX 6.5 with SSL/TLS, SRP, and ZLIB "make irix65+ssl+srp+zlib"
670 # ? for Solaris 2.0-2.3 on SPARC or Intel, SunPro CC, "make solaris2x",
671 # ?   or to add SunLink X.25 8.0x support, "make solaris2x25".
672 # ? for Solaris 2.4 built with gcc, "make solaris24g".
673 # ? for Solaris 2.0-2.3 on SPARC or Intel, GNU CC, "make solaris2xg".
674 # ? for Solaris 2.4 with X.25, "make solaris24x25".
675 # ? for Solaris 2.5 on SPARC or Intel, SunPro CC, "make solaris25".
676 # ?   or to add SunLink X.25 8.0x support, "make solaris25x25".
677 # ? for Solaris 2.5 on SPARC or Intel, GNU CC, "make solaris25g".
678 # ? for Solaris 2.6 on SPARC or Intel, "make solaris26".
679 # ? for Solaris 7 on SPARC or Intel, SunPro CC, "make solaris7".
680 # ? for Solaris 7 on SPARC or Intel, GNU CC, "make solaris7g".
681 # ? for Solaris 8 on SPARC or Intel, SunPro CC, "make solaris8".
682 # ? for Solaris 8 on SPARC or Intel, GNU CC, "make solaris8g".
683 # + for Solaris 9 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris9".
684 # + for Solaris 9 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris9g".
685 # + for Solaris 9 on SPARC 100% 64-bit, SunPro CC, "make solaris9_64".
686 # + for Solaris 9 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris9g64".
687 # + for Solaris 10 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris10".
688 # + for Solaris 10 on SPARC 64-bit, SunPro CC, "make solaris10_64".
689 # + for Solaris 10 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris10g".
690 # ? for Solaris 10 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris10g64".
691 # ? for Solbourne 4/500 with OS/MP 4 "make sunos4"
692 # ? for Solbourne 4/500 with OS/MP 4.1 "make sunos41" or "make sunos41c"
693 # ? for SONY NEWS with NEWS-OS 4.0.1C, "make sonynews"
694 # ? for SONY NEWS with NEWS-OS 4.1.2C, "make sonynews"
695 # ? for Sperry/UNISYS 5000/20, UTS V 5.2 3R1, "make sys5"
696 # ? for Sperry/UNISYS 5000/30/35/50/55, UTS V 5.2 2.01, "make unisys5r2"
697 # ? for Sperry/UNISYS 5000/80 with System V R3, "make sys5r3"
698 # ? for Sperry/UNISYS 5000/95 with System V R3, "make sys5r3"
699 #     For UNISYS SVR3 it might be necessary to "make sys5r3 KFLAGS=-UDYNAMIC"
700 # ? for Stardent 1520, "make sys5r3"
701 # ? for Stratus FTX 2.x, try "make ftx" or else "make sys5r4" or "sys5r4sx"
702 # ? for Stratus FTX 3.x, PA-RISC 1.0 or 2.0, "make ftx" or "make ftxtcp"
703 # ? for Sun with Sun UNIX 3.5 and gcc, "make sunos3gcc"
704 # ? for Sun with pre-4.0 SunOS versions, "make bsd" (or appropriate variant)
705 # ? for Sun with SunOS 4.0, BSD environment, "make sunos4"
706 # ? for Sun with SunOS 4.0, BSD, with SunLink X.25, make sunos4x25
707 # ? for Sun with SunOS 4.1 or 4.1.1, BSD environment, "make sunos41"
708 #     or "make sunos41c" (curses) or "make sunos41gcc" (compile with gcc)
709 # ? for Sun with SunOS 4.1.x, BSD, with SunLink X.25 7.00 or earlier,
710 #     "make sunos41x25" or "make sunos41x25c" (curses)
711 # ? for Sun with SunOS 4.1, 4.1.1, AT&T Sys V R3 environment, "make sunos41s5"
712 # ? for Sun with SunOS 4.1.2, "make sunos41" or any of its variations.
713 #     NOTE:  All SunOS 4.x systems -- Shared libraries are used by default.
714 #       If this causes problems, add -Bstatic to CFLAGS.
715 #     NOTE2: When building C-Kermit under SunOS for the BSD universe,
716 #       but /usr/5bin/cc is ahead of /usr/ucb/cc in your PATH, add
717 #       "CC=/usr/ucb/cc CC2=/usr/ucb/cc" to the make entry.
718 #     NOTE3: If an executable built on one type of Sun hardware does not work
719 #       on another type, rebuild the program from source on the target machine.
720 #   for Sun with Solaris 1.x use SunOS 4.1 entries.
721 #   for Sun with Solaris 2.0 and higher use Solaris entries.
722 # + for Sun SPARC with Linux, "make linux"
723 # ? for Sun SPARC with OPENSTEP/Mach 4.1, "make nextquadfat"
724 # ? for Sun SPARC with OPENSTEP/Mach 4.2, "make openstep42"
725 # - for Tandy 16/6000 with Xenix 3.0, "make trs16" (C-Kermit 7.0 is too big)
726 # ? for Tektronix 6130/4132/43xx (e.g.4301) with UTek OS, "make utek"
727 #     or (for models without hardware flow control), "make uteknohwfc"
728 # ? for Tektronix XD88 series with UTekV OS, "make utekvr3"
729 # ? for Tri Star Flash Cache with Esix SVR3.2, "make sys5r3"
730 # + for Tru64 UNIX 4.0E, "make tru64-40e"
731 # + for Tru64 UNIX 4.0F, "make tru64-40f"
732 # + for Tru64 UNIX 4.0G, "make tru64-40g"
733 # + for Tru64 UNIX 5.0A, "make tru64-50a"
734 # + for Tru64 UNIX 5.1A, "make tru64-51a"
735 # + for Tru64 UNIX 5.1B, "make tru64-51b"
736 # ? for Unistar, "make sys5"
737 # ? for Unisys S/4040 68040 CTIX SVR3.2 6.4.1, "make ctix" or "make sys5r3"
738 # ? for Unisys U5000 UNIX SVR3 6.x, "make sys5r3" or "make sys5r3c"
739 # ? for Unisys U6000 UNIX SVR4 1.x, "make sys5r4nx" or "make sys5r4nxnetc"
740 #   for Unisys ... (also see Sperry)
741 #   for Univel - see UnixWare
742 #   for Unixware - see SCO
743 # ? for Valid Scaldstar, "make valid"
744 # ? for Whitechapel MG01 Genix 1.3, "make white"
745 # ? for Zilog ZEUS 3.21, "make zilog"
746 #
747 # The result should be a runnable program called "wermit" in the current
748 # directory.  After satisfactory testing, you can rename wermit to "kermit"
749 # and put it in some directory that's in everybody's PATH, such as
750 # /usr/local or /opt/local.
751 #
752 # To remove intermediate and object files, "make clean".
753 # If your C compiler produces files with an extension other than "o",
754 # then "make clean EXT=u", "make clean EXT=s", or whatever.
755 #
756 # To run lint on the source files, "make lintsun", "make lintbsd",
757 # "make lints5", as appropriate.
758 #
759 # ******************************
760 # SECURE TARGETS
761 #
762 # Beginning with C-Kermit 7.0, secure targets are included, as are the
763 # source modules (ckuat*.[ch], ck_*.[ch]) needed to build them.  Secure
764 # target names are like the regular names, but with security features
765 # indicated by plus (+) signs.  The features are:
766 #
767 # krb4     MIT Kerberos IV
768 # krb5     MIT Kerberos V
769 # openssl  OpenSSL (SSL/TLS)
770 # zlib     ZLIB compression for SSL/TLS
771 # srp      Stanford Secure Remote Password
772 # pam      PAM (pluggable authentication module)
773 # shadow   Shadow Password File
774 #
775 # You can build these targets if you have the Kermit source files and the
776 # required libraries (Kerberos, OpenSSL, SRP, etc) and header files.  See:
777 #   http://www.columbia.edu/kermit/security.html
778 # for specific details regarding supported versions.
779 #
780 # NOTE: OpenSSL 0.9.6 and earlier are not compatible with 0.9.7 and later.
781 # C-Kermit code was originally designed for 0.9.6.  To build with 0.9.7 you
782 # must add -DOPENSSL_097 to avoid missing symbols in the DES library and to
783 # use the entry points that were renamed to avoid conflict with Kerberos 4.
784 # If you have OpenSSL 0.9.8, add -DOPENSSL_098, which is a synonym for
785 # -DOPENSSL_097.  If you have 1.0.0 or later, add -DOPENSSL_100, which is
786 # another synonym.
787
788 # In OpenSSL builds add -ldl if you get unresolved references for
789 # dlopen, dlclose, dlsym, and/or dlerror.
790 #
791 # In order to build a secure version of Kermit, you need to know the location
792 # of the header (include) files and libraries for the desired form of
793 # security.  Unless you specify a location, this makefile looks in /usr/local
794 # and if the required files are not found, the build fails.
795 #
796 # If the secure headers and libraries are not on your computer, you have
797 # to download and install them, for example from http://www.openssl.org .
798 #
799 # The following symbols are used to specify library and header file locations:
800
801 prefix  = /usr/local
802 srproot = $(prefix)
803 sslroot = $(prefix)
804 manroot = $(prefix)
805
806 K4LIB=-L/usr/kerberos/lib
807 K4INC=-I/usr/kerberos/include
808 K5LIB=-L/usr/kerberos/lib
809 K5INC=-I/usr/kerberos/include
810 SRPLIB=-L$(srproot)/lib
811 SRPINC=-I$(srproot)/include
812 SSLLIB=-L$(sslroot)/ssl/lib
813 SSLINC=-I$(sslroot)/ssl/include
814
815 # To override these assignments; for example, if your OpenSSL files are
816 # not in /usr/local/ssl, invoke the desired target like this:
817
818 #  make solaris9+openssl "SSLINC=-I/opt/openssl-0.9.8k/include" \
819 #   "SSLLIB=-L/opt/openssl-0.9.8k/lib"
820 #
821 # (don't set the variables and then do "make -e" because that breaks 
822 # chaining of makefile targets.)
823 #
824 # Here are some up-to-date secure targets as of Sep 2009: 
825 #
826 # aix+openssl:                        IBM AIX 4.2 or later with OpenSSL
827 # freebsd44+srp+openssl               FreeBSD 4.4 with SRP and OpenSSL
828 # freebsd50+openssl                   FreeBSD 5.0 with OpenSSL
829 # hpux1100o+openssl:                  HP-UX 11.xx with OpenSSL
830 # hpux1000gcc+openssl:                HP-UX 10.xx with OpenSSL (build with gcc)
831 # hpux1100gcc+openssl:                HP-UX 11.xx with OpenSSL (build with gcc)
832 # irix6x+krb5:                        IRIX 6.x with Kerberos V
833 # irix65+krb5:                        etc etc...
834 # solaris9+openssl                    Solaris 9,10, or 11 with Openssl (Sun cc)
835 # solaris9g+openssl                   Solaris 9,10, or 11 with Openssl (gcc)
836 # linux+ssl                           OpenSSL only
837 # linux+krb5+ssl                      Linux with Kerberos 5 and OpenSSL
838 # linux+krb5:                         Kerberos 5 only
839
840 # The following secure Linux targets have not been updated or tested recently.
841 # linux+krb5+krb4:
842 # linux+srp:
843 # linux+srp+pam:
844 # linux+srp+gmp:
845 # linux+srp+gmp+no-des:
846 # linux+srp+gmp-export:
847 # linux+srp+gmp+pam:
848 # linux+shadow+pam:
849 # linux+openssl:
850 # linux+openssl+shadow:
851 # linux+openssl+zlib+shadow+pam:
852 # linux+srp+openssl:
853 # linux+krb5+krb4+srp:
854 # linux+krb5+krb4+srp+openssl:
855 # linux+krb5+krb4+openssl:
856 # linux+krb5+krb4+openssl+shadow:
857 # linux+krb5+krb4+openssl+zlib+shadow:
858 # linux+krb5+krb4+srp-export:
859 # linux+krb5+krb4+srp+pam:
860 # linux+krb5+krb4+srp+openssl+pam-debug:
861 # linux+krb5+krb4+srp+openssl+pam:
862 # linux+krb5+krb4+srp+openssl+zlib+pam:
863 # linux+krb5+krb4+openssl+shadow+pam:
864 # linux+krb5+openssl+zlib+shadow+pam:
865
866 # The following have not been tested recently either and might
867 # need adjustment.
868 #
869 # macosx+krb5+ssl:     Mac OS X 10.3.9 or later + OpenSSL and Kerberos 5
870 # macosx103+secure:    This one is probably redundant
871 # netbsd+openssl:      NetBSD with OpenSSL
872 # openbsd30+ssl:       OpenBSD 3.0 with OpenSSL
873 # redhat71,redhat72,redhat73,redhat80,redhat9 (Krb5,OpenSSL,Showdow,PAM,Zlib)
874 # sco32v500net+ssl:
875 # sco32v505net+ssl:
876 # solaris2x+krb4:
877 # solaris2xg+krb4:
878 # solaris2xg+openssl+pam+shadow:
879 # solaris2xg+openssl+zlib+pam+shadow:
880 # solaris2xg+krb5+krb4+openssl+shadow:
881 # solaris25+krb4:
882 # solaris25g+krb4:
883 # solaris26g+openssl:
884 # solaris8g+openssl+zlib+pam+shadow:
885 # solaris8g+krb4:
886 # solaris9g+openssl+zlib+pam+shadow:
887 # solaris9g+openssl+shadow+pam+zlib
888 # sunos41gcc+krb4:                    SunOS 4.1 built with gcc with Kerberos IV
889 # sunos41gcc+openssl:                 SunOS 4.1 built with gcc with OpenSSL
890 # sunos41gcc+krb4+openssl:            ...with Kerberos IV and OpenSSL
891 # sunos41gcc+krb4+openssl+zlib:       ditto, plus ZLIB compression
892 # sunos41gcc+krb4+srp+openssl+zlib:   ditto, plus SRP
893 # sunos41gcc+srp+openssl+zlib:
894 # tru64-51b-openssl:                  Tru64 (Digital) Unix 5.1B with OpenSSL
895 # uw7ssl                              Unixware 7 with SSL
896 #
897 ###########################################################################
898 #
899 #  Compile and Link variables:
900 #
901 #  EXT is the extension (file type) for object files, normally o.
902 #  See MINIX entry for what to do if another filetype must be used.
903 #
904 EXT=o
905 #LNKFLAGS=
906 SHAREDLIB=
907 CC= cc
908 CC2= cc
909 MAKE= make
910 SHELL=/bin/sh
911
912 ###########################################################################
913 # (Ancient) UNIX V7-specific variables.
914 # These are set up for Perkin-Elmer 3230 V7 Unix:
915 #
916 PROC=proc
917 DIRECT=
918 NPROC=nproc
919 NPTYPE=int
920 BOOTFILE=/edition7
921 #
922 # ( For old Tandy TRS-80 Model 16A or 6000 V7-based Xenix, use PROC=_proc,
923 #   DIRECT=-DDIRECT, NPROC=_Nproc, NPTYPE=short, BOOTFILE=/xenix )
924 #
925
926 ###########################################################################
927 # SAMPLE INSTALLATION SCRIPT
928 #
929 # Modify to suit your own computer's file organization and permissions.  If
930 # you don't have write access to the destination directories, "make install"
931 # fails.  In most cases, a real installation also requires you to chown /
932 # chgrp the Kermit binary for the UUCP lockfile and/or tty devices, and
933 # perhaps also to chmod +s the corresponding permission fields.
934 #
935 # Default binary, man, and doc directories are supplied below.  You can
936 # override them in your 'make' command.  Examples:
937 #
938 #   make install                                   # Accept defaults.
939 #   make "INFODIR=/usr/share/lib/kermit" install   # Override INFODIR default.
940 #
941 # You can also build and install in one step, e.g.:
942 #
943 #   make linux install
944 #
945 # If you use the 'install' target to install C-Kermit, it creates an
946 # UNINSTALL script that can be used to uninstall it.
947 #
948 WERMIT = makewhat
949 BINARY = wermit
950 DESTDIR =
951 BINDIR = $(prefix)/bin
952 MANDIR = $(manroot)/man/man1
953 MANEXT = 1
954 SRCDIR =
955 INFODIR =
956 CERTDIR =
957
958 TEXTFILES = COPYING.TXT ckcbwr.txt ckubwr.txt ckuins.txt ckccfg.txt \
959                 ckcplm.txt ckermit.ini ckermod.ini ckermit70.txt ckermit80.txt
960
961 ALL = $(WERMIT)
962
963 all: $(ALL)
964
965 .c.o:
966         $(CC) $(CFLAGS) -DKTARGET=\"$(KTARGET)\" -c $<
967
968 #Clean up intermediate and object files
969 clean:
970         @echo 'Removing object files...'
971         -rm -f ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
972 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckcpro.$(EXT) ckcfns.$(EXT) \
973 ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) \
974 ckufio.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) ckwart.$(EXT) ckuusx.$(EXT) \
975 ckuusy.$(EXT) ckcnet.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckusig.$(EXT) \
976 ckucns.$(EXT) ckcmdb.$(EXT) ckuath.$(EXT) ckctel.$(EXT) ckclib.$(EXT) \
977 ckcuni.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
978 ckcpro.c wart
979
980 show:
981         @echo prefix=$(prefix)
982         @echo srproot=$(srproot)
983         @echo sslroot=$(sslroot)
984         @echo manroot=$(manroot)
985         @echo K4LIB=$(K4LIB)
986         @echo K4INC=$(K4INC)
987         @echo K5LIB=$(K5LIB)
988         @echo K5INC=$(K5INC)
989         @echo SRPLIB=$(SRPLIB)
990         @echo SRPINC=$(SRPINC)
991         @echo SSLLIB=$(SSLLIB)
992         @echo SSLINC=$(SSLINC)
993         
994 # Install C-Kermit after building -- IMPORTANT: Read the instructions above
995 # (SAMPLE INSTALLATION SCRIPT).  For SSL/TLS versions, ca_certs.pem file
996 # should be installed in the appropriate place for your OpenSSL library, e.g.:
997 #
998 #   cp ca_certs.pem /usr/local/ssl/
999 #   cp ca_certs.pem /usr/share/ssl/
1000 #
1001 # To make sure 'man' notices the new source file and doesn't keep
1002 # showing the old formatted version, remove the old formatted version,
1003 # something like this:
1004 #               rm -f $(MANDIR)/../cat$(MANEXT)/kermit.$(MANEXT)
1005 # or this (which requires CATDIR to be defined):
1006 #               rm -f $(CATDIR)/kermit.$(MANEXT)
1007 #
1008 # As of C-Kermit 8.0.205 this target also builds an UNINSTALL script, and
1009 # so it might be too long for some old Bourne shells, in which case you can
1010 # use a different shell:
1011 #
1012 #   make SHELL=ksh install
1013 #   make SHELL=/bin/posix/sh install
1014 #
1015 install:
1016         @echo Installing C-Kermit version $(CKVER)...;\
1017         rm -f UNINSTALL;\
1018         exec 3>./UNINSTALL;\
1019         echo "# C-Kermit UNINSTALL script" >&3;\
1020         echo "# `date`\n" >&3;\
1021         echo "CKVER=$(CKVER)" >&3;\
1022         echo "PrN Uninstalling C-Kermit version $(CKVER)..." >&3;\
1023         echo DESTDIR=$(DESTDIR);\
1024         if test -n "$(DESTDIR)"; then\
1025                 if test -d $(DESTDIR); then\
1026                         echo  "$(DESTDIR) exists...\n";\
1027                 else\
1028                         echo "Creating $(DESTDIR)...";\
1029                         DESTDIR=`echo $(DESTDIR) | sed 's!/*$$!!'`;\
1030                         mkdir $$DESTDIR  || exit 1;\
1031                 fi;\
1032                 chmod 755 $(DESTDIR) || exit 1;\
1033         fi;\
1034         echo BINARY=$(BINARY);\
1035         if test -f $(BINARY); then\
1036                 ls -l $(BINARY);\
1037         else\
1038                 echo "?$(BINARY) not found";\
1039                 exit 1;\
1040         fi;\
1041         if test -z "$(DESTDIR)$(BINDIR)"; then\
1042                 echo "Binary directory not specified";\
1043                 exit 1;\
1044         fi;\
1045         if test -d $(DESTDIR)$(BINDIR); then\
1046                 echo  "$(DESTDIR)$(BINDIR) exists...";\
1047         else\
1048                 echo "Creating $(DESTDIR)$(BINDIR)/...";\
1049                 mkdir     $(DESTDIR)$(BINDIR) || exit 1;\
1050                 chmod 755 $(DESTDIR)$(BINDIR);\
1051         fi;\
1052         rm -f $(DESTDIR)$(BINDIR)/kermit;\
1053         cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1054         chmod 755    $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1055         rm -f        $(DESTDIR)$(BINDIR)/kermit-sshsub;\
1056         ln -s        $(DESTDIR)$(BINDIR)/kermit\
1057                      $(DESTDIR)$(BINDIR)/kermit-sshsub || exit 1;\
1058         echo 'set flag=f\nPrC Removing binaries' >&3;\
1059         echo "RmF $(DESTDIR)$(BINDIR)/kermit-sshsub" >&3;\
1060         echo "RmF $(DESTDIR)$(BINDIR)/kermit" >&3;\
1061         if test -f ckermit.ini; then\
1062                 echo "#!$(BINDIR)/kermit" >\
1063                         $(DESTDIR)$(BINDIR)/_tmp.ini;\
1064                 cat ckermit.ini >> $(DESTDIR)$(BINDIR)/_tmp.ini;\
1065                 mv $(DESTDIR)$(BINDIR)/_tmp.ini\
1066                    $(DESTDIR)$(BINDIR)/ckermit.ini;\
1067                 chmod 755 $(DESTDIR)$(BINDIR)/ckermit.ini;\
1068                 echo "RmF $(DESTDIR)$(BINDIR)/ckermit.ini" >&3;\
1069         fi;\
1070         echo;\
1071         echo 'EfM' >&3;\
1072         echo "Kermit binary installed:";\
1073         ls -l $(DESTDIR)$(BINDIR)/kermit\
1074               $(DESTDIR)$(BINDIR)/kermit-sshsub\
1075               $(DESTDIR)$(BINDIR)/ckermit.ini;\
1076         echo;\
1077         echo " WARNING: If C-Kermit is to be used for dialing out,";\
1078         echo " you must change its owner and group and permissions";\
1079         echo " to match the 'cu' program.  See the ckuins.txt file";\
1080         echo " for details.";\
1081         echo;\
1082         echo MANDIR=$(MANDIR);\
1083         if test -n "$(DESTDIR)$(MANDIR)"; then\
1084                 if test -d $(DESTDIR)$(MANDIR); then\
1085                         echo  "$(DESTDIR)$(MANDIR) exists...";\
1086                 else\
1087                         echo "Creating $(MANDIR)...";\
1088                         mkdir $(MANDIR) || exit 1;\
1089                         chmod 755 $(MANDIR) || exit 1;\
1090                 fi;\
1091                 rm -f $(DESTDIR)$(MANDIR)/kermit.$(MANEXT);\
1092                 cp ckuker.nr $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1093                 chmod 644 $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1094                 echo 'set flag=f\nPrC Removing man pages' >&3;\
1095                 echo "RmF $(DESTDIR)$(MANDIR)/kermit.$(MANEXT)" >&3;\
1096                 echo 'EfM' >&3;\
1097                 echo;\
1098         else\
1099                 echo "Not installing man page!\n";\
1100         fi;\
1101         echo CERTDIR=$(CERTDIR);\
1102         if test -n "$(CERTDIR)"; then\
1103                 if test -f ca_certs.pem; then\
1104                         if test -d $(CERTDIR); then\
1105                                 echo  "$(CERTDIR) exists...";\
1106                         else\
1107                                 echo "Creating $(CERTDIR)...";\
1108                                 mkdir $(CERTDIR) || exit 1;\
1109                                 chmod 755 $(CERTDIR) || exit 1;\
1110                         fi;\
1111                         echo "Installing certificates file...";\
1112                         cp ca_certs.pem $(CERTDIR) || exit 1;\
1113                         echo 'set flag=f' >&3;\
1114                         echo 'PrC Removing certificates file' >&3;\
1115                         echo "RmF $(CERTDIR)/ca_certs.pem" >&3;\
1116                         echo 'EfM' >&3;\
1117                         echo;\
1118                 fi;\
1119         else\
1120                 echo "Not installing certificates file!\n";\
1121         fi;\
1122         echo SRCDIR=$(DESTDIR)$(SRCDIR);\
1123         if test -n "$(SRCDIR)"; then\
1124                 echo "Installing source files...";\
1125                 if test -d $(DESTDIR)$(SRCDIR); then\
1126                         echo  "$(DESTDIR)$(SRCDIR) exists...";\
1127                 else\
1128                         echo "Creating $(DESTDIR)$(SRCDIR)/...";\
1129                         mkdir     $(DESTDIR)$(SRCDIR) || exit 1;\
1130                         chmod 755 $(DESTDIR)$(SRCDIR);\
1131                 fi;\
1132                 echo "Copying source files to $(DESTDIR)$(SRCDIR)...";\
1133                 echo 'set flag=f\nPrC Removing source files' >&3;\
1134                 for TextFile in COPYING.TXT ck[cuw_]*.[cwh] makefile; do\
1135                         cp $$TextFile $(DESTDIR)$(SRCDIR)/ && echo ".\c";\
1136                         echo "RmF $(DESTDIR)$(SRCDIR)/$$TextFile" >&3;\
1137                 done; echo;\
1138                 echo 'EfM' >&3;\
1139                 ( cd $(DESTDIR)$(SRCDIR)/ &&\
1140                 ls -l COPYING.TXT ck[cuw_]*.[cwh] makefile );echo;\
1141         else\
1142                 echo "Not installing source code!\n";\
1143         fi;\
1144         echo INFODIR=$(DESTDIR)$(INFODIR);\
1145         if test -n "$(INFODIR)"; then\
1146                 echo "Installing info files...";\
1147                 if test -d $(DESTDIR)$(INFODIR); then\
1148                         echo  "$(DESTDIR)$(INFODIR) exists...";\
1149                 else\
1150                         echo "Creating $(DESTDIR)$(INFODIR)/...";\
1151                         mkdir     $(DESTDIR)$(INFODIR) || exit 1;\
1152                         chmod 755 $(DESTDIR)$(INFODIR);\
1153                 fi;\
1154                 echo "Copying text files to $(DESTDIR)$(INFODIR)...";\
1155                 echo 'set flag=f\nPrC Removing text files' >&3;\
1156                 FileCopyList='';\
1157                 for TextFile in $(TEXTFILES); do\
1158                         test -f $$TextFile || continue;\
1159                         cp $$TextFile $(DESTDIR)$(INFODIR) && echo ".\c" &&\
1160                         FileCopyList="$$FileCopyList $$TextFile";\
1161                         echo "RmF $(DESTDIR)$(INFODIR)/$$TextFile" >&3;\
1162                 done; echo;\
1163                 echo 'EfM' >&3;\
1164                 ( cd $(DESTDIR)$(INFODIR)/ && chmod  644   $$FileCopyList );\
1165                 ( cd $(DESTDIR)$(INFODIR)/ && pwd && ls -l $$FileCopyList );\
1166         else\
1167                 echo "Not installing text files!\n";\
1168         fi;\
1169         echo "set flag=d\nPrN Removing empty dirs..." >&3;\
1170         echo "RmD $(DESTDIR)$(BINDIR)" >&3;\
1171         echo "RmD $(DESTDIR)$(SRCDIR)" >&3;\
1172         echo "RmD $(DESTDIR)$(INFODIR)" >&3;\
1173         echo "RmD $(CERTDIR)" >&3;\
1174         echo "RmD $(MANDIR)" >&3;\
1175         echo "RmD $(DESTDIR)" >&3;\
1176         echo "EfM" >&3;\
1177         echo "PrN C-Kermit version $(CKVER) is uninstalled!" >&3;\
1178         echo C-Kermit version $(CKVER) installed!
1179
1180 # UN-Install C-Kermit after building
1181 # Please to not remove the extra blanks before and after '{}' within the
1182 # functions. You would get syntax errors for some older Bourne shells! Best is 
1183 # you don't change or remove anything.
1184 #
1185 uninstall:
1186         @if test ! -f UNINSTALL; then\
1187                 echo "?C-Kermit UNINSTALL data file not found!";\
1188                 exit 1;\
1189         fi; \
1190         X=`grep '^CKVER='$(CKVER)'$$' ./UNINSTALL || :`;\
1191         if test -z "$$X"; then\
1192                 echo "?UNINSTALL file is not for C-Kermit version $(CKVER)";\
1193                 exit 2;\
1194         fi;\
1195         PrN () { echo "$$*"; };\
1196         PrC () { echo "$$* \c"; };\
1197         RmF () { test -f "$$1" && rm -f "$$1" && echo ".\c" && flag=F ; };\
1198         RmD () { \
1199         dir=$$1;\
1200         while test -d "$$dir"; do\
1201                 rmdir "$$dir" 2>&- || return && echo "$$dir" && flag=D;\
1202                 dir=`echo "$$dir" | sed 's!/[^/]*/*$$!!'`;\
1203         done; \
1204         };\
1205         EfM () { \
1206         case "$$flag" in\
1207                 f) echo "- Nothing to remove!";;\
1208                 d) echo "Nothing to remove!";;\
1209                 F) echo " done";;\
1210                 D) echo "done";;\
1211         esac; \
1212         };\
1213         while read Act Args; do\
1214                 case $$Act in\
1215                         EfM) EfM;;\
1216                         RmD) RmD $$Args;;\
1217                         RmF) RmF $$Args;;\
1218                         PrN) PrN $$Args;;\
1219                         PrC) PrC $$Args;;\
1220                         set) eval $$Args;;\
1221                 esac;\
1222         done < ./UNINSTALL
1223
1224 makewhat:
1225         @echo 'make what?  You must tell which platform to make C-Kermit for.'
1226         @echo Examples: make linux, make aix, make solaris10, make hpux1100.
1227         @echo Please read the comments at the beginning of the makefile.
1228
1229 ###########################################################################
1230 #
1231 # Dependencies Section:
1232
1233 wermit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1234                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1235                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1236                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1237                 ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1238                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1239                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1240         $(CC2) $(LNKFLAGS) -o wermit \
1241                 ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1242                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1243                 ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1244                 ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1245                 ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucon.$(EXT) \
1246                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1247                 ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1248                 $(LIBS)
1249
1250 # Preferred configuration with select()-based CONNECT
1251
1252 xermit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1253                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1254                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1255                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1256                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1257                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1258                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) ckuath.$(EXT) \
1259                 ck_crp.$(EXT) ck_ssl.$(EXT)
1260         $(CC2) $(LNKFLAGS) -o wermit \
1261                 ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1262                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1263                 ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1264                 ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1265                 ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) \
1266                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckusig.$(EXT) \
1267                 ckctel.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1268                 ckuath.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1269
1270 # Malloc Debugging version
1271
1272 mermit: ckcmdb.$(EXT) ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1273                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1274                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1275                 ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1276                 ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1277                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1278                 ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1279         $(CC2) $(LNKFLAGS) -o mermit ckcmdb.$(EXT) ckclib.$(EXT) ckcmai.$(EXT)\
1280                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1281                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1282                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1283                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1284                 ckuusr.$(EXT) ckucon.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1285                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckcuni.$(EXT) \
1286                 ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1287
1288 # Kerberized Version - Subject to USA export restrictions.
1289
1290 # NOTE: We don't use this any more -- As of 15 Feb 2003, the "xermit"
1291 # target is used for both secure and regular version.
1292
1293 krbmit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1294                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1295                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1296                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1297                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1298                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1299                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1300                 ckcftp.$(EXT) ck_ssl.$(EXT)
1301         $(CC2) $(LNKFLAGS) -o krbmit ckcmai.$(EXT) ckclib.$(EXT) \
1302                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1303                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1304                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1305                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1306                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1307                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1308                 ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1309                 ck_ssl.$(EXT) $(LIBS)
1310
1311 krbmit-debug:   ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1312                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1313                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1314                 ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1315                 ckuxla.$(EXT) ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1316                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1317                 ckusig.$(EXT) ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) \
1318                 ckupty.$(EXT) ck_ssl.$(EXT) ckcmdb.$(EXT) ckcftp.$(EXT)
1319         $(CC2) $(LNKFLAGS) -o krbmit ckcmdb.$(EXT) ckcmai.$(EXT) \
1320                 ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) \
1321                 ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) \
1322                 ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
1323                 ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) \
1324                 ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) \
1325                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1326                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1327                 ckcftp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1328
1329 # SRP(TM) Version - Subject to USA export restrictions.
1330
1331 srpmit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1332                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1333                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1334                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1335                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1336                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1337                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1338                 ckcftp.$(EXT) ck_ssl.$(EXT)
1339         $(CC2) $(LNKFLAGS) -o srpmit ckcmai.$(EXT) ckclib.$(EXT) \
1340                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1341                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1342                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1343                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1344                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1345                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1346                 ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ck_ssl.$(EXT) \
1347                 ckcftp.$(EXT) $(LIBS)
1348
1349 # Kerberized Version - Not subject to USA export restrictions.
1350
1351 krbmit-export:  ckcmai.$(EXT) \
1352                 ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1353                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1354                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1355                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1356                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1357                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1358                 ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1359         $(CC2) $(LNKFLAGS) -o krbmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1360                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1361                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1362                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1363                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1364                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1365                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1366                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1367
1368 # SRP(TM) Version - Not subject to USA export restrictions.
1369
1370 srpmit-export:  ckcmai.$(EXT) \
1371                 ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1372                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1373                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1374                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1375                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1376                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1377                 ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1378         $(CC2) $(LNKFLAGS) -o srpmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1379                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1380                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1381                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1382                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1383                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1384                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1385                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1386
1387 ###########################################################################
1388 # man page...
1389 #
1390 ckuker.nr:
1391         @echo This target is obsolete.
1392         @echo The ckuker.nr file no longer needs any preprocessing.
1393
1394 ###########################################################################
1395 # Dependencies for each module...
1396 #
1397 ckcmai.$(EXT): ckcmai.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h ckcsig.h \
1398                 ckuusr.h ckctel.h ckclib.h
1399
1400 ckclib.$(EXT): ckclib.c ckclib.h ckcdeb.h ckcasc.h ckcsym.h
1401
1402 ckcpro.$(EXT): ckcpro.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckclib.h
1403
1404 ckcpro.c: ckcpro.w wart ckcdeb.h ckcsym.h ckcasc.h ckcker.h ckcnet.h ckctel.h \
1405          ckclib.h
1406         ./wart ckcpro.w ckcpro.c
1407
1408 ckcfns.$(EXT): ckcfns.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckcuni.h \
1409                 ckuxla.h ckclib.h ckcnet.h
1410
1411 ckcfn2.$(EXT): ckcfn2.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1412                 ckuxla.h ckctel.h ckclib.h ckcnet.h ckcuni.h
1413
1414 ckcfn3.$(EXT): ckcfn3.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1415                 ckuxla.h ckclib.h ckcuni.h
1416
1417 ckuxla.$(EXT): ckuxla.c ckcker.h ckcsym.h ckcdeb.h ckcxla.h ckuxla.h ckclib.h \
1418                  ckcuni.h
1419
1420 ckcuni.$(EXT): ckcuni.c ckcdeb.h ckcker.h ckucmd.h ckcuni.h ckcxla.h ckuxla.h
1421
1422 ckuusr.$(EXT): ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcsym.h ckcdeb.h ckcxla.h \
1423                 ckuxla.h ckcasc.h ckcnet.h ckctel.h ckclib.h ckcuni.h
1424
1425 ckuus2.$(EXT): ckuus2.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1426                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1427
1428 ckuus3.$(EXT): ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1429                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1430
1431 ckuus4.$(EXT): ckuus4.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1432                 ckcasc.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1433
1434 ckuus5.$(EXT): ckuus5.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1435                  ckcsym.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1436
1437 ckuus6.$(EXT): ckuus6.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1438                  ckcsym.h ckctel.h ckclib.h
1439
1440 ckuus7.$(EXT): ckuus7.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1441                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1442
1443 ckuusx.$(EXT): ckuusx.c ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcsym.h \
1444                 ckcsig.h ckcnet.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1445
1446 ckuusy.$(EXT): ckuusy.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1447                  ckclib.h
1448
1449 ckucmd.$(EXT): ckucmd.c ckcasc.h ckucmd.h ckcdeb.h ckcsym.h ckctel.h ckclib.h
1450
1451 ckufio.$(EXT): ckufio.c ckcdeb.h ckuver.h ckcsym.h ckclib.h \
1452                 ckcxla.h ckuxla.h ckcuni.h
1453
1454 ckutio.$(EXT): ckutio.c ckcdeb.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h
1455
1456 ckucon.$(EXT): ckucon.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1457                  ckclib.h
1458
1459 ckucns.$(EXT): ckucns.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1460                  ckclib.h ckcxla.h ckuxla.h ckcuni.h
1461
1462 ckcnet.$(EXT): ckcnet.c ckcdeb.h ckcker.h ckcnet.h ckcsym.h ckcsig.h ckctel.h \
1463                  ckclib.h
1464
1465 ckctel.$(EXT): ckcsym.h ckcdeb.h ckcker.h ckcnet.h ckctel.h ckclib.h
1466
1467 # ck_off_t: ck_off_t.$(EXT)
1468 #       $(CC) -o ck_off_t ck_off_t.$(EXT)
1469
1470 wart: ckwart.$(EXT)
1471         $(CC) $(LNKFLAGS) -o wart ckwart.$(EXT) $(LIBS)
1472
1473 ckcmdb.$(EXT): ckcmdb.c ckcdeb.h ckcsym.h ckclib.h
1474
1475 ckwart.$(EXT): ckwart.c
1476
1477 ckudia.$(EXT): ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckcsym.h ckcsig.h \
1478                 ckcnet.h ckctel.h ckclib.h
1479
1480 ckuscr.$(EXT): ckuscr.c ckcker.h ckcdeb.h ckcasc.h ckcsym.h ckcsig.h \
1481                 ckcnet.h ckctel.h ckclib.h
1482
1483 ckusig.$(EXT): ckusig.c ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h \
1484                 ckcsig.h ckctel.h ckclib.h
1485
1486 ckcftp.$(EXT): ckcftp.c ckcdeb.h ckcasc.h ckcker.h ckucmd.h ckuusr.h \
1487                 ckcnet.h ckctel.h ckcxla.h ckuxla.h ckcuni.h
1488
1489 ckupty.$(EXT): ckupty.c ckupty.h ckcdeb.h
1490
1491 ckuath.$(EXT): ckuath.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1492                  ckclib.h ckcnet.h
1493
1494 ck_crp.$(EXT): ck_crp.c ckcdeb.h ckcnet.h ckuath.h ckclib.h
1495
1496 ck_ssl.$(EXT): ck_ssl.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1497                  ckclib.h ck_ssl.h
1498
1499 ###########################################################################
1500 #
1501 # Entries to make C-Kermit for specific systems.
1502 #
1503 # Put the ones that need short makefiles first.
1504
1505 #Apollo Aegis 9.x.  Includes TCP/IP support.
1506 #You can also add processor-dependent optimization switches like -M570.
1507 aegis:
1508         @echo Making C-Kermit $(CKVER) for Apollo Aegis 9.x...
1509         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1510         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOCSETS -DCK_CURSES -O $(KFLAGS)" \
1511         "LIBS = -lcurses -ltermcap"
1512
1513 #Apple Mac II, A/UX pre-3.0
1514 #Warning, if "send *" doesn't work, try the auxufs makefile entry below.
1515 aux:
1516         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1517         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1518         "CFLAGS = -DAUX -DTCPSOCKET $(KFLAGS) -i -O" "LNKFLAGS = -i"
1519
1520 #Apple Mac II, A/UX pre-3.0, compiled with gcc
1521 auxgcc:
1522         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1523         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1524         "CFLAGS = -DAUX -DTCPSOCKET -traditional $(KFLAGS) -i -O" \
1525         "LNKFLAGS = " "CC = gcc" "CC2 = gcc"
1526
1527 #Apple Mac II, A/UX, pre-3.0, but with ufs file volumes, uses <dirent.h>.
1528 auxufs:
1529         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1530         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1531         "CFLAGS = -DAUX -DTCPSOCKET -DDIRENT $(KFLAGS) -i -O" "LNKFLAGS = -i"
1532
1533 #Apple Mac II, A/UX 3.0, compiled with gcc
1534 aux3gcc:
1535         @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1536         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1537         "CFLAGS = -DAUX -DHDBUUCP -DLFDEVNO -DTCPSOCKET -DDIRENT $(KFLAGS)" \
1538         "LNKFLAGS = -s" "LIBS = $(LIBS)" \
1539         "CC=gcc -pipe -traditional" "CC2=gcc -pipe -traditional"
1540
1541 #Apple Mac II, A/UX 3.0, compiled with gcc, uses curses
1542 aux3cgcc:
1543         @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1544         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) aux3gcc \
1545         KTARGET=$${KTARGET:-$(@)} \
1546         "KFLAGS=$(KFLAGS) -DCK_CURSES" "LIBS = -lcurses $(LIBS)"
1547
1548 # Tenon MachTen, tested on Apple Powerbook with MachTen 2.1.1.D.
1549 # NOTE: This doesn't do anything about UUCP.  It only works if /usr/spool/uucp
1550 # has permission of 777, and dialout device is world read/writeable.
1551 machten:
1552         @echo Making C-Kermit $(CKVER) for MachTen...
1553         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
1554         "CFLAGS= -DBSD43 -DTCPSOCKET -DSIG_V -DNDGPWNAM -DCK_CURSES -O \
1555         $(KFLAGS)"  "LIBS=-lcurses -ltermcap"
1556
1557 #Bell Labs Research UNIX V10
1558 #Can't add TCP/IP because there is no sockets library.  It would have to
1559 #be done using streams, but there is no code in C-Kermit for that.
1560 #Remove -DNOJC if desired (if your system has csh, ksh, or bash).
1561 bellv10:
1562         @echo Making C-Kermit $(CKVER) for Bell Labs Research UNIX V10...
1563         $(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1564         "CFLAGS= -DBELLV10 -DBSD4 -DNDIR -DNOJC -DNOSYSIOCTLH -DNOSETREU \
1565         -DNOCSETS -MINIDIAL $(KFLAGS)"
1566
1567 # WARNING: The early BSD entries do not build in version 7.0 with the stock
1568 # BSD compiler: "Too many defines".  Unless you can rebuild cpp to have more
1569 # space for defines, these builds must be accomplished by:
1570 # copying the /usr/include tree to someplace else, preprocessing there with cc
1571 # -E -I./include or whatever (plus all the same -D's, adding any necessary
1572 # -U/-D to override the architecture)), renaming the the resulting files back
1573 # to their original names, bringing them back to the original BSD system, and
1574 # running the make target there.  This technique was used for 4.2 and 4.3 BSD
1575 # on a VAX in C-Kermit 7.0 (later, cpp on that machine was rebuilt to allow
1576 # more symbols, so the C-Kermit 8.0 build proceeds normally).
1577
1578 #Berkeley Unix 4.1
1579 bsd41:
1580         @echo Making C-Kermit $(CKVER) for 4.1BSD...
1581         $(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1582         "CFLAGS= -DBSD41" "LIBS = -ljobs"
1583
1584 #Berkeley 4.2, 4.3, also Ultrix-32 1.x, 2.x, 3.x, many others
1585 # Add -O, -s, etc, if they work.
1586 # If you have a version of BSD but signal() is void rather than int,
1587 # "make bsd KFLAGS=-DSIG_V".
1588 bsd42:
1589         @echo Making C-Kermit $(CKVER) for 4.2BSD...
1590         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1591         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1592         -DCK_CURSES -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK -DBSD42HACK \
1593         $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1594
1595 bsd:
1596         $(MAKE) CC=$(CC) CC2=$(CC2) bsd42 KTARGET=$${KTARGET-$(@)}
1597
1598 #Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP
1599 bsdhdb:
1600         @echo Making C-Kermit $(CKVER) for 4.2BSD with HDB UUCP...
1601         $(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1602         "KFLAGS= -DHDBUUCP $(KFLAGS)"
1603
1604 #Berkeley Unix 4.3 with acucntrl program, curses, TCP/IP included.
1605 bsd43:
1606         @echo Making C-Kermit $(CKVER) for 4.3BSD...
1607         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1608         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1609         -DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1610         -DBSD42HACK $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1611
1612 #4.3BSD, curses excluded
1613 bsd43nc:
1614         @echo Making C-Kermit $(CKVER) for 4.3BSD...
1615         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1616         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH \
1617         -DACUCNTRL -DSYSTIMEBH -DNOIKSD -DNOPUTENV -DNOANSI -DBIGBUFOK \
1618         -DBSD42HACK $(KFLAGS)" "LIBS=$(LIBS)"
1619
1620 #4.3BSD, TCP/IP excluded.
1621 bsd43nonet:
1622         @echo Making C-Kermit $(CKVER) for 4.3BSD + curses...
1623         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1624         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1625         -DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1626         -DBSD42HACK -DNONET $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1627
1628 #Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
1629 #but without acucntrl program
1630 bsdlck:
1631         @echo Making C-Kermit $(CKVER) for 4.2BSD, /usr/spool/uucp/LCK/...
1632         $(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1633         "KFLAGS= -DLCKDIR $(KFLAGS)"
1634
1635 #Berkeley UNIX 4.4-Lite, 4.4-Encumbered, Net/2, etc (Post-Reno),
1636 #with TCP/IP networking.  This was the basis for FreeBSD, NetBSD, OpenBSD,
1637 #BSDI, BSD/OS, and Mac OS X (each of which has its own set of targets that
1638 #are newer than this one).
1639 #
1640 #NOTE: This is not a pure POSIX configuration.  Using -DPOSIX instead of
1641 # -DBSD44 prevents any kind of directory-reading (for wildcard expansion),
1642 #and disallows use of ENOTCONN symbol for detecting broken network
1643 #connections, and disallows RTS/CTS flow control, and would also require
1644 #definition of the appropriate UUCP lockfile convention.
1645 #Do not add -DCK_POSIX_SIG without reading <signal.h> first!  For example,
1646 #sigsetjmp(), etc, tend to be defined but not implemented.
1647 #
1648 #NOTE: originally crypt was in libc - later it was unbundled.
1649 #Remove the LIBS clause to build on an early 4.4BSD platform.
1650 #
1651 bsd44:
1652         @echo Making C-Kermit $(CKVER) for 4.4BSD...
1653         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1654         "CFLAGS= -DBSD44 -DTCPSOCKET $(KFLAGS) -O" "LIBS=-lcrypt"
1655
1656 #Berkeley UNIX 4.4, as above, but with curses for fullscreen display
1657 #Please read notes for bsd44 entry just above.
1658 # NOTE: This one dumped core on the real 4.4BSD development system at
1659 # UC Berkeley (an HP-9000/300), so the no-curses version was used
1660 # for that one, which was unplugged years ago.
1661 bsd44c:
1662         @echo Making C-Kermit $(CKVER) for 4.4BSD with curses...
1663         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1664         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O" \
1665         "LIBS= -lcurses -ltermcap -lcrypt $(LIBS)"
1666
1667 #For FreeBSD 1.x.
1668 freebsd1:
1669         @echo 'Making C-Kermit $(CKVER) for FreeBSD...'
1670         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1671         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1672         -DFNFLOAT -DNOHTERMCAP -DNOREALPATH -DNOSYSCONF $(KFLAGS) -O -pipe" \
1673         "LIBS= -lcurses -ltermcap -lm $(LIBS)"
1674
1675 #FreeBSD 2.x with ncurses
1676 freebsd2:
1677         @echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with ncurses...'
1678         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1679         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1680         -DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -funsigned-char \
1681         -DFNFLOAT $(KFLAGS) -O -pipe" \
1682         "LIBS= -lncurses -ltermlib -lcrypt -lm $(LIBS)"
1683
1684 #For FreeBSD 2.x -- Uses curses rather than ncurses
1685 freebsd2c:
1686         @echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with curses...'
1687         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1688         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1689         -DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -DFNFLOAT \
1690         -funsigned-char $(KFLAGS) -O -pipe" \
1691         "LIBS= -lcurses -ltermlib -lcrypt -lm $(LIBS)"
1692
1693 #FreeBSD 3.x with ncurses and uu_lock()
1694 #(Note: uu_lock() goes back to 2.2.2, but not necessarily 2.0)
1695 freebsd3:
1696         @echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with ncurses...'
1697         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1698         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1699         -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 -DUSE_UU_LOCK -DFNFLOAT \
1700         $(KFLAGS) -O -pipe" \
1701         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1702
1703 #As above but with curses rather than ncurses.
1704 freebsd3c:
1705         @echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with curses...'
1706         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1707         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_UU_LOCK \
1708         -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 $(KFLAGS) -DFNFLOAT \
1709         -funsigned-char -pipe -O" \
1710         "LIBS= -lcurses -lcrypt -lutil -lm $(LIBS)"
1711
1712 #FreeBSD 4.0 with ncurses and uu_lock().  Note - there is no curses in 4.0.
1713 #ncurses 5.0 is broken requiring us to work around with setbuf().
1714 freebsd40:
1715         @echo 'Making C-Kermit $(CKVER) for FreeBSD 4.x with ncurses...'
1716         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1717         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DFNFLOAT \
1718         -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD4 \
1719         -DNONOSETBUF -DUSE_UU_LOCK $(KFLAGS) -O -pipe" \
1720         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1721
1722 #FreeBSD 4.1 and above
1723 #Like FreeBSD 4.0 but without the NONOSETBUF hack and with CK_NEWTERM.
1724 #OK 2009/11/17 FreeBSD 7.2-RELEASE
1725 freebsd freebsd41 freebsd72:
1726         @echo 'Making C-Kermit $(CKVER) for FreeBSD 4.1 or later...'
1727         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1728         "CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \
1729         -DFREEBSD4 -DUSE_UU_LOCK -DFNFLOAT \
1730         -DHERALD=\"\\\" `uname` `uname -r`\\\"\" \
1731         -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR $(KFLAGS) -O -pipe" \
1732         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1733
1734 #FreeBSD 5.0 or later with OpenSSL 0.9.7 or later.
1735 #OK 2009/11/17 FreeBSD 7.2-RELEASE
1736 freebsd+ssl freebsd+openssl freebsd50+openssl:
1737         @echo 'Making C-Kermit $(CKVER) for FreeBSD 5.0, ncurses, openssl'
1738         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1739         "CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \
1740         -DCK_AUTHENTICATION -DCK_SSL $(SSLINC) -DZLIB \
1741         -DFREEBSD4 -DUSE_UU_LOCK -DFNFLOAT -funsigned-char -DTPUTSARGTYPE=int \
1742         -DFREEBSD41 -DFREEBSD42 -DFREEBSD43 -DFREEBSD44 -DFREEBSD45 \
1743         -DFREEBSD46 -DFREEBSD50 -DUSE_STRERROR $(KFLAGS) -O -pipe" \
1744         "LIBS= -lncurses -lcrypt -lssl -lcrypto -lutil -lm $(SSLLIB) $(LIBS)"
1745
1746 #NetBSD 1.4.1 or later with vanity banner automated with uname
1747 #and automatic inclusion of large file support if it is available.
1748 #This target tested successfully on NetBSD 1.4.1, 1.5.2, and 2.0.3 (Jan 2006).
1749 #Fails on NetBSD 2.0 on Sun/3 mc68030 with gcc 3.3.3 unless optimization is
1750 #disabled on ckcfn2.c ("KFLAGS=-O0") (Letter O Digit Zero).
1751 #(This could be automated by testing `uname -m` for "sun3".)
1752 #OK: 2011/06/15 on NetBSD 1.5.2 and 5.1.
1753 netbsd netbsd2 netbsd15 netbsd16 old-netbsd:
1754         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1755         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1756         "CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1757         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1758         -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DHAVE_OPENPTY \
1759         -funsigned-char -DHERALD=\"\\\" NetBSD `uname -r`\\\"\" \
1760         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1761         "LIBS= -lcurses -lcrypt -lm -lutil $(LIBS)"
1762
1763 #NetBSD 1.4.1 or later with OpenSSL
1764 #OK: 2011/06/15 on NetBSD 5.1 (but not 1.5.2 with OpenSSL 0.9.5a)
1765 netbsd+ssl netbsd+openssl:
1766         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL SSLLIB=$(SSLLIB)'
1767         @case `openssl version` in \
1768           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1769           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1770           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1771           *) OPENSSLOPTION="" ;; \
1772         esac; \
1773         HAVE_DES=''; \
1774         DES_LIB=''; \
1775         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1776            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1777               DES_LIB='-ldes'; \
1778               HAVE_DES='-DCK_DES -DLIBDES'; \
1779               echo "HAVE DES"; \
1780            else echo "NO DES"; \
1781         fi; \
1782         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
1783         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1784         -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1785         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1786         "LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB -lcurses \
1787         -lcrypto -lcrypt -lz -lm -lpam -lutil $(LIBS)"
1788
1789 #NetBSD with MIT Kerberos 5:
1790 # OK 2011/06/15 (once K5INC and K5LIB were set right).
1791 # NOT OK for Heimdal - Heimdal Kerberos support in C-Kermit needs work.
1792 netbsd+krb5:
1793         @echo 'Making C-Kermit $(CKVER) for NetBSD with Kerberos 5...'
1794         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...'
1795         @case `openssl version` in \
1796           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1797           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1798           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1799           *) OPENSSLOPTION="" ;; \
1800         esac; \
1801         HAVE_DES=''; \
1802         DES_LIB=''; \
1803         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1804            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1805               DES_LIB='-ldes'; \
1806               HAVE_DES='-DCK_DES -DLIBDES'; \
1807               echo "HAVE DES"; \
1808            else echo "NO DES"; \
1809         fi; \
1810         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
1811         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_KERBEROS -DKRB5 \
1812         -DCK_CAST $$HAVE_DES -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1813         $(KFLAGS)" \
1814         "LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lcurses $$DES_LIB \
1815         -lcrypto -lgssapi -lkrb5 -lm -lutil $(LIBS)"
1816
1817 # NetBSD - With Kerberos 5 and SSL and Zlib.
1818 # OK 2011/06/15
1819 netbsd+krb5+ssl netbsd+krb5+openssl+zlib:
1820         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...'
1821         @case `openssl version` in \
1822           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1823           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1824           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1825           *) OPENSSLOPTION="" ;; \
1826         esac; \
1827         HAVE_DES=''; \
1828         DES_LIB=''; \
1829         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1830            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1831               DES_LIB='-ldes'; \
1832               HAVE_DES='-DCK_DES -DLIBDES'; \
1833               echo "HAVE DES"; \
1834            else echo "NO DES"; \
1835         fi; \
1836         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
1837         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1838         -DCK_KERBEROS -DKRB5 -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1839         -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1840         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1841         "LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB \
1842         -lcrypto -lcrypt -lgssapi -lkrb5 -lz -lm -lpam -lutil -lcurses $(LIBS)"
1843
1844 #Special Security Enhanced NetBSD target with SRP, SSL, and zlib support.
1845 #To build this, you need to BUILD the pkgsrc srp_client package.  After
1846 #you build it, you must go into work/srp-x.y.z/libkrypto and "bmake install"
1847 #then go to work/srp-x.y.z/libsrp and "bmake install".  As of 2005Q3, the
1848 #pkgsrc install only installed the statically linked client applications.  You
1849 #need to manually install the libraries to build your own applications.
1850 netbsd+ssl+srp+zlib:
1851         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1852         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1853         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DNETBSD15 \
1854         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DHAVE_OPENPTY \
1855         -I/usr/include/openssl -I/usr/pkg/include \
1856         -DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 -DCK_ENCRYPTION \
1857         -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DZLIB -DFNFLOAT $(KFLAGS) -O" \
1858         "LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lcurses -lsrp -lgmp -ldes \
1859         -lssl -lkrypto -lcrypto -lcrypt -lz -lm -lutil $(LIBS)"
1860
1861 #NetBSD with curses left out (e.g. for use as IKSD).
1862 netbsdnc:
1863         @echo Making C-Kermit $(CKVER) for NetBSD with no curses...
1864         $(MAKE) CC=$(CC) CC2=$(CC2) netbsd KTARGET=$${KTARGET:-$(@)} \
1865         "KFLAGS=-DNOCURSES"
1866
1867 #NetBSD with ncurses requested explicitly rather than curses-which-is-ncurses
1868 netbsdn:
1869         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1870         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1871         "CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1872         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1873         -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DHAVE_OPENPTY \
1874         -DHERALD=\"\\\" NetBSD `uname -r`\\\"\" \
1875         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1876         "LIBS= -L/usr/pkg/lib -lncurses -lcrypt -lm -lutil $(LIBS)"
1877
1878 #OpenBSD - All versions.
1879 #Uses ncurses as its curses so use -ltermlib, not -ltermcap
1880 #But it doesn't use uu_lock() which was introduced in OpenBSD 2.3.
1881 #For that use the next entry.
1882 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1883 openbsdold:
1884         @echo Making C-Kermit $(CKVER) for OpenBSD...
1885         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1886         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1887         -DFNFLOAT -DNDSYSERRLIST $(KFLAGS) -O" "LIBS= -lcurses -ltermlib -lm"
1888
1889 #OpenBSD 2.3 or later
1890 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1891 #For C-Kermit 8.0 (Christian Weisgerber):
1892 # -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1893 # -DUSE_UU_LOCK and -lutil added for uu_lock()
1894 # -DNDSYSERRLIST changed to -DUSE_STRERROR
1895 #If this gives you trouble use the previous entry.
1896 openbsd:
1897         @echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later...
1898         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1899         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1900         -DHERALD=\"\\\" OpenBSD `uname -r`\\\"\" \
1901         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1902         "LIBS= -lcurses -lutil -lm"
1903
1904 #Better to chain to the openbsd target but...
1905 mirbsd:
1906         @echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later...
1907         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1908         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1909         -DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
1910         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1911         "LIBS= -lcurses -lutil -lm"
1912
1913 #OpenBSD 3.0 or later includes OpenSSL
1914 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1915 #For C-Kermit 8.0 (Christian Weisgerber):
1916 # -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1917 # -DUSE_UU_LOCK and -lutil added for uu_lock()
1918 # -DNDSYSERRLIST changed to -DUSE_STRERROR
1919 #If this gives you trouble use the previous entry.
1920 openbsd+ssl:
1921         @echo Making C-Kermit $(CKVER) for OpenBSD 3.0 or later...
1922         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1923         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1924         -DHERALD=\"\\\" OpenBSD `uname -r`\\\"\" \
1925         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
1926         -DCK_SSL $(KFLAGS) -O" \
1927         "LIBS= -lcurses -lutil -lm -lssl -lcrypto"
1928
1929 mirbsd+ssl:
1930         @echo Making C-Kermit $(CKVER) for OpenBSD 3.0 or later...
1931         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1932         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1933         -DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
1934         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
1935         -DCK_SSL -DNO_DCL_INET_ATON $(KFLAGS) -O" \
1936         "LIBS= -lcurses -lutil -lm -lssl -lcrypto"
1937
1938 # make 386bsd 0.0new, posix
1939 # for  386bsd 0.1.24, change /usr/include/termios.h to #define NCCS if
1940 #  _POSIX_SOURCE is #defined. (source: lewine, posix prgmrs guide, o`reilly)
1941 #NOTE: Lock directory is /var/spool/lock.  Formerly, it was /var/spool/uucp,
1942 #but reportedly <wjones@halcyon.com> that was due to a typo in 'man tip'.
1943 386bsd:
1944         @echo 'Making C-Kermit $(CKVER) for jolix 386BSD 0.0new and 0.1.24...'
1945         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1946         "CFLAGS= -DPOSIX -DSETREUID -DPIDSTRING -DUSLEEP \
1947         -D_386BSD -DCK_CURSES -DTCPSOCKET \
1948         -DLOCK_DIR=\\\"/var/spool/lock\\\" \
1949         $(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
1950
1951 # Mac OS X 10 early versions.
1952 # For 10.3.9 and later, use the macosx target below.
1953
1954 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP but no curses.
1955 oldmacosx10:
1956         @echo Making C-Kermit $(CKVER) for `uname -s`...
1957         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1958         "CFLAGS= -DMACOSX10 -DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
1959
1960 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and curses.
1961 #Note: curses must be obtained separately.  See next entry for ncurses.
1962 #Add "LIBS = -lcurses -ltermcap" if necessary (but reportedly it is not).
1963 oldmacosx10c:
1964         @echo Making C-Kermit $(CKVER) for `uname -s` + curses...
1965         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1966         "CFLAGS= -DMACOSX10 -DCK_CURSES -DTPUTSFNTYPE=void -DTPUTSISVOID \
1967         -DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
1968
1969 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and ncurses.
1970 #Note: ncurses must be obtained separately.
1971 #In the event of trouble with this one try the next one.
1972 oldmacosx10nc:
1973         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
1974         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1975         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
1976         $(KFLAGS)" "LIBS= -lncurses $(LIBS)"
1977
1978 #Mac OS X 10.2 (Jaguar) ncurses.
1979 oldmacosx102nc:
1980         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
1981         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1982         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
1983         $(KFLAGS) " "LIBS= -lncurses $(LIBS)"
1984
1985 #The problem here is that if curses.h also exists, it conflicts with
1986 #ncurses.h and and we have fatal errors.  If this happens to you, then
1987 #try this target.
1988 oldmacosx10ncx:
1989         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
1990         @rm -f ./curses.h; touch ./curses.h
1991         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1992         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR \
1993         -I. -O $(KFLAGS) " \
1994         "LIBS= -lncurses $(LIBS)"
1995         @rm -f ./curses.h
1996
1997 #Mac OS X 10.3 (Panther) - Assumes ncurses is installed.
1998 oldmacosx103: 
1999         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2000         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2001         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2002         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -O \
2003         $(KFLAGS) " "LIBS= -lncurses -lresolv $(LIBS)"
2004
2005 #Mac OS X 10.3 (Panther) with Kerberos 5 and SSL, assumes ncurses is installed.
2006 oldmacosx103+secure:
2007         @echo Making Secure C-Kermit $(CKVER) for `uname -s` + ncurses...
2008         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2009         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET \
2010         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -O -DCK_PAM \
2011         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2012         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
2013         $(KFLAGS) " "LIBS= -lssl -lcrypto -lkrb5 -lcom_err \
2014         -lk5crypto -lgssapi_krb5 -lpam -lncurses -lresolv $(LIBS)"
2015
2016 # THIS IS THE MAIN MAC OS X TARGET (the next one is for Kerberos/SSL builds).
2017 # Use this target for 10.3.9 (or maybe earlier) through 10.6 (maybe later)
2018 # on both Power and Intel architectures.  This one uses utmp.h on 10.4 and
2019 # earlier and utmpx.h on 10.5 onwards.
2020 # Note: Mac OS X 10.5 and earlier are 32-bit; 10.6 and later 64-bit.
2021 # Note 2: As of C-Kermit 9.0 -NOUUCP is included by default because
2022 # Mac OS X doesn't support UUCP.  To undo this, use KFLAGS=-UNOUUCP.
2023 #OK: 2009/11/16 (for 10.3.9, 10.4.11, 10.5.8, 10.6.1)
2024 macosx macosx10 macosx10.3.9 macosx10.4 macosx10.5 macosx10.6:
2025         @MACOSNAME=`/usr/bin/sw_vers -productName`; \
2026         MACOSV=`/usr/bin/sw_vers -productVersion`; \
2027         echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2028         MACCPU=$$HOSTTYPE; \
2029         if test `uname -r | cut -d . -f 1` -gt 8; \
2030         then if test -f /usr/include/utmpx.h ; \
2031         then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2032         else HAVE_UTMPX='' ; fi ; fi; \
2033         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2034         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2035         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2036         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2037         -funsigned-char -DNODCLINITGROUPS \
2038         -DNOUUCP -O -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2039         -DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2040         $(KFLAGS)" "LIBS= -lncurses -lresolv $(LIBS)"
2041
2042 # Mac OS X 10.3.9 or later with Kerberos 5 and OpenSSL...
2043 # NOTE: Apple has removed all support for DES in OpenSSL and Kerberos
2044 #   in Mac OS X 10.6 and later.  The DES flags are included or left out
2045 #   automatically based on the Mac OS X version number.
2046 # See note about UUCP in previous target.
2047 #OK: 2009/11/16 (for 10.3.9, 10.4.11, 10.5.8, 10.6.1)
2048 macosx+krb5+ssl macosx10.5+krb5+ssl macosx10.6+krb5+ssl \
2049 macosx+krb5+openssl macosx10.5+krb5+openssl macosx10.6+krb5+openssl:
2050         @MACOSNAME=`/usr/bin/sw_vers -productName`; \
2051         MACOSV=`/usr/bin/sw_vers -productVersion`; \
2052         echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2053         MACCPU=$$HOSTTYPE; \
2054         if test `uname -r | cut -d . -f 1` -gt 8; \
2055         then if test -f /usr/include/utmpx.h ; \
2056         then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2057         else HAVE_UTMPX='' ; fi ; fi; \
2058         if test `uname -r | cut -d . -f 1` -eq 7; \
2059         then IS_MACOSX103='-DMACOSX103' ; \
2060         else IS_MACOSX103='' ; fi; \
2061         case $$MACOSV in \
2062           10.[012345].*) HAVE_DES='-DCK_DES -DLIBDES' ;; \
2063           *.*) HAVE_DES='' ;; \
2064         esac ; \
2065         if test -x /usr/bin/krb5-config ; \
2066         then HAVE_KRB5CONFIG=`/usr/bin/krb5-config --libs krb5 gssapi` ; \
2067         else HAVE_KRB5CONFIG='-lgssapi_krb5 -lkrb5 -lk5crypto \
2068         -lcom_err -lresolv' ; fi; \
2069         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2070         "CFLAGS= -DMACOSX10 $$IS_MACOSX103 -DCK_NCURSES -DTCPSOCKET \
2071         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2072         -DCKHTTP -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2073         -DNODCLINITGROUPS -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2074         -DCK_ENCRYPTION -DCK_CAST -DCK_SSL -DOPENSSL_098 $$HAVE_DES \
2075         -DNOUUCP -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2076         -DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2077         -funsigned-char -O $(KFLAGS)" \
2078         "LIBS= $$HAVE_KRB5CONFIG -lssl -lcrypto -lpam -lncurses $(LIBS)"
2079
2080 # End of Mac OS X Section
2081
2082 #Acorn RISCiX, based on ...
2083 #Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
2084 #but without acucntrl program
2085 riscix:
2086         @echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2087         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2088                 "CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2089                 -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2090                 -DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2091                 -DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2092                 -DNOANSI -w -O2 -fomit-frame-pointer" \
2093                 "LIBS= -lcurses -ltermcap " \
2094                 "CC= /usr/ucb/cc" \
2095                 "CC2= /usr/ucb/cc"
2096
2097 #Acorn RISCiX, as above, but using gcc
2098 riscix-gcc:
2099         @echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2100         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2101                 "CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2102                 -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2103                 -DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2104                 -DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2105                 -DNOANSI -w -O2 -fomit-frame-pointer" \
2106                 "LIBS= -lcurses -ltermcap " \
2107                 "CC= gcc -mbsd" \
2108                 "CC2= gcc -mbsd"
2109
2110 #Convergent CTIX 6.4.1
2111 ctix:
2112         @echo 'Making C-Kermit $(CKVER) for Convergent CTIX 6.4.1'
2113         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2114         "CFLAGS= -DSVR3 -DDIRENT -DTCPSOCKET -DHDBUUCP -DCK_CURSES \
2115         -DNONAWS -DNOLEARN -DNOLONGLONG $(KFLAGS) -XO" \
2116         "LNKFLAGS=-s" "LIBS=-lsocket -lcurses -lc_s"
2117         mcs -d wermit
2118
2119 # The following makefile entry should work for any Harris Night Hawk system
2120 # (either 88k or 68k based) running release 6.1 or later of the CX/UX
2121 # operating system. This is a POSIX and ANSI-C compliant system which also
2122 # supports BSD networking. (Earlier CX/UX releases will probably work with
2123 # sys5r3, but this has not been verified).
2124 #
2125 cx_ux:
2126         @echo Making C-Kermit $(CKVER) for Harris Night Hawk CX/UX 6.1 or later
2127         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2128         "CFLAGS=-DPOSIX -DTCPSOCKET -DHDBUUCP -DPID_T=pid_t -DWAIT_T=int \
2129         -Dd_ino=d_fileno -DUID_T=uid_t -DGID_T=gid_t -DNOLONGLONG \
2130         $(KFLAGS) -Xa -O3 -g" "LNKFLAGS=-O3"
2131
2132 #Intergraph Clipper, CLIX, job control, HDB UUCP.
2133 clix:
2134         @echo 'Making C-Kermit $(CKVER) for Intergraph CLIX...'
2135         $(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2136         "CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2137         -DNOGETUSERSHELL -DNOREALPATH -DNOLEARN $(KFLAGS) -O" \
2138         "LNKFLAGS=" "LIBS= -lbsd"
2139
2140 #As above + TCP/IP...
2141 clixnet:
2142         @echo 'Making networked C-Kermit $(CKVER) for Intergraph CLIX...'
2143         $(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2144         "CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2145         -DTCPSOCKET -DNOGETUSERSHELL -DNOLEARN -DNOREALPATH $(KFLAGS) -O" \
2146         "LNKFLAGS=" "LIBS= -lbsd"
2147
2148 #Mark Williams Coherent 286 or 386 on IBM PC family.
2149 #There is a 64K limit on program size, so this is a command-line only version.
2150 coherent:
2151         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOICP -DNOSETKEY -DNOLEARN \
2152         -DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG -DNOXMIT \
2153         -DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DSELECT_H $(KFLAGS) -VSUVAR" \
2154         -DNOFLOAT KTARGET=$${KTARGET:-$(@)} wermit
2155
2156 #Mark Williams Coherent 386 on IBM PC family.
2157 #This will make a "minimum interactive" version - no scripts,
2158 #no character sets, no help, no dial, no debug/transaction logging, no
2159 #transmit, msend, mail, type, etc.
2160 coherentmi:
2161         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOSETKEY -DNOLEARN \
2162         -DNOSHOW -DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG \
2163         -DNOXMIT -DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DNOSERVER -DNOUUCP \
2164         -DNOSPL -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ -DNOFLOAT \
2165         -DNOCMDL $(KFLAGS) -VSUVAR -DSELECT_H" KTARGET=$${KTARGET:-$(@)} \
2166         wermit
2167
2168 #Mark Williams Coherent 386 on IBM PC/AT family.
2169 coherentmax:
2170         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DSELECT_H -DNOLEARN \
2171         -DNOFLOAT -DNOSYSIOCTLH $(KFLAGS) -VSUVAR" "LNKFLAGS = -O -s" \
2172         KTARGET=$${KTARGET:-$(@)} wermit
2173
2174 #Mark Williams Coherent 386 4.2.  Includes curses but not TCP/IP.
2175 #Requires updates to the 4.2.10 compiler; the regular compiler fails to
2176 #to handle "complex expressions".  NOFLOAT is so it can work on old PCs
2177 #without floating-point hardware.
2178 coherent42:
2179         $(MAKE) "CFLAGS = -T500000 -DNOFLOAT -DCOHERENT -DNOANSI -DSELECT \
2180         -DNOSYSLOG -DDIRENT -DCK_CURSES -DCK_NEWTERM -DCK_WREFRESH -VSUVAR \
2181         -DDCLGETCWD -DNOSYSIOCTLH -DNOINITGROUPS -DNOSYMLINK -DSELECT_H \
2182         -DDCLGETCWD -O $(KFLAGS)" \
2183         "LNKFLAGS = -O -s" KTARGET=$${KTARGET:-$(@)} \
2184         "LIBS  = -lsocket -lcurses" wermit
2185
2186 #DEC Ultrix 2.x
2187 # Add -O, -DDYNAMIC, -s, etc, if they work.
2188 ultrix2x:
2189         @echo Making C-Kermit $(CKVER) for Ultrix 2.x ...
2190         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2191         "CFLAGS= -DBSD4 -DTCPSOCKET -DDU2 -DNOGETUSERSHELL $(KFLAGS)"
2192
2193 du2:
2194         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix2x
2195
2196 #DEC Ultrix 3.0 and 3.1
2197 ultrix30:
2198         @echo Making C-Kermit $(CKVER) for Ultrix 3.0...
2199         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2200         "CFLAGS= -DBSD4 -DTCPSOCKET -DDIRENT -DSIG_V -DNOGETUSERSHELL \
2201         -DULTRIX3 -DCK_CURSES $(KFLAGS) -O" "LIBS= -lcurses -ltermcap"
2202
2203 du3:
2204         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2205
2206 ultrix3x:
2207         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2208
2209 #DEC Ultrix 4.0 or 4.1 on DECstation, VAXstation, VAX, etc.
2210 ultrix40:
2211         @echo Making C-Kermit $(CKVER) for Ultrix 4.0 or 4.1...
2212         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2213         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DDU4 -DNOGETUSERSHELL \
2214         $(KFLAGS) -Olimit 1450" "LNKFLAGS = -s"
2215
2216 #DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2217 #Like ultrix40, except now C compiler supports -O2 optimization.
2218 ultrix42:
2219         @echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2220         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2221         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL $(KFLAGS) \
2222         -O2 -Olimit 1750" "LNKFLAGS = -s"
2223
2224 du42:
2225         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix42
2226
2227 #DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2228 #Like du42, but with curses support added and a couple features.
2229 ultrix42c:
2230         @echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2231         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2232         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2233         -DCK_CURSES -DNOIKSD $(KFLAGS)-G6 -O2 -Olimit 3000 " \
2234         "LNKFLAGS = -s" "LIBS= -lcurses -ltermcap"
2235
2236 ultrix43:
2237         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2238         "KFLAGS=-DULTRIX43 $(KFLAGS)" KTARGET=$${KTARGET-$(@)} ultrix42c
2239
2240 ultrix43notcp:
2241         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2242         "KFLAGS=-DULTRIX43 -DNONET $(KFLAGS)" \
2243         KTARGET=$${KTARGET-$(@)} ultrix42c
2244
2245 # NOTE: need -DNODEBUG on MIPS to avoid relocation errors at link time.
2246 # Actually now (8.0) that we have discovered the -G option maybe debugging
2247 # can be put back.
2248 ultrix44:
2249         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2250         "KFLAGS=-DULTRIX44 -G7 -DNODEBUG -DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2251         KTARGET=$${KTARGET-$(@)} ultrix42c
2252
2253 ultrix45:
2254         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2255         "KFLAGS=-DULTRIX45 $(KFLAGS)-DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2256         KTARGET=$${KTARGET-$(@)} ultrix42c
2257
2258 du42c:
2259         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2260         KTARGET=$${KTARGET-$(@)} ultrix42c
2261
2262 #DEC Ultrix 4.3A or later on DECsystem and DECstation 5000/50, /150 or /260
2263 #with MIPS R4x00 processor.  The "-mips3" switch generates R4000-specific
2264 #code, which is faster and more compact, but *won't* run on earlier
2265 #DECsystems and DECstations.
2266 ultrix43-mips3:
2267         @echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2268         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2269         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2270         $(KFLAGS) -O2 -Olimit 1750 -mips3" "LNKFLAGS = -s -mips3"
2271
2272 du43-mips3:
2273         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) ultrix43-mips3
2274
2275 #DEC Ultrix 4.3A or later on MIPS R4x000 based systems.
2276 #Like ultrix43-mips3 but with curses support added
2277 ultrix43c-mips3:
2278         @echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2279         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2280         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL -DCK_CURSES \
2281         $(KFLAGS) -O2 -Olimit 3000 -mips3" "LNKFLAGS = -s -mips3" \
2282         "LIBS= -lcurses -ltermcap"
2283
2284 du43c-mips3:
2285         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2286         KTARGET=$${KTARGET-$(@)} ultrix43c-mips3
2287
2288 #DEC Ultrix 4.4 on DECstation 5000/50 or /150 with R4000 MIPS processor,
2289 #or 5000/260 with R4400.  The "-mips3" switch generates R4000-specific code,
2290 #which is faster and more compact but *won't* run on earlier DECstations.
2291 ultrix44-mips3:
2292         @echo Making C-Kermit $(CKVER) for Ultrix 4.4, R4000 cpu ...
2293         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2294         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2295         $(KFLAGS) -O2 -Olimit 1450 -mips3" "LNKFLAGS = -s -mips3"
2296
2297 du44-mips3:
2298         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2299         KTARGET=$${KTARGET-$(@)} ultrix44c-mips3
2300
2301 #DEC Ultrix 4.2 on DECstation, VAXstation, VAX, etc, System V R4 environment
2302 ultrix42s5r4:
2303         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4 on Ultrix...'
2304         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2305         "CFLAGS = -O2 -Olimit 1500 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
2306         -DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
2307
2308 #OSF/1
2309 osf osf1:
2310         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2311         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2312         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT $(KFLAGS)" \
2313         "LNKFLAGS = -s" "LIBS = $(LIBS) -lbsd -lcurses -ltermcap -lm"
2314
2315 #DEC OSF/1 V1.0-1.3 on DECstation, VAX, Alpha, or PC.
2316 dec-osf dec-osf1:
2317         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2318         "CFLAGS= -DBSD4 -DOSF -DOSF13 -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2319         -DNOREALPATH -DNOIKSD -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DNODEBUG \
2320         -DNOUNICODE $(KFLAGS)" \
2321         "LNKFLAGS = -non_shared" "LIBS = -lbsd -lcurses -ltermcap -lm"
2322
2323 # This one causes "relocation out-of-range" errors in the linker.
2324 old-dec-osf:
2325         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V1.x...
2326         @echo If you are building for DEC OSF/1 2.0, please use dec-osf20.
2327         @echo Remove or adjust -O2 and/or -Olimit if they cause trouble.
2328         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2329         "KFLAGS= -O2 -Olimit 2400 $(KFLAGS)"
2330
2331 #DEC OSF/1 2.0 on Alpha and probably nowhere else.
2332 #The only difference from OSF/1 is that optimization is omitted.
2333 #The optimized version gets strange runtime errors, like the PAUSE command
2334 #not working.  Add "-unsigned" to make all chars unsigned.
2335 dec-osf20:
2336         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V2.0...
2337         @echo Optimization omitted because it causes runtime errors.
2338         @echo See comments in makefile.
2339         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2340         "KFLAGS= -DOSF20 $(KFLAGS)"
2341
2342 dec-osf30:
2343         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V3.0...
2344         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2345         "KFLAGS= -DOSF30 -O2 -Olimit 2400 $(KFLAGS)"
2346
2347 #Digital UNIX 3.2
2348 # Must compile ckuus[6x].c separately without optimization otherwise
2349 # the optimizer dumps core - keep CFLAGS here in sync with those from osf.
2350 du32:
2351         @echo Making C-Kermit $(CKVER) for Digital UNIX 3.2...
2352         $(MAKE) CC=$(CC) CC2=$(CC2) ckuus6.$(EXT) \
2353         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2354         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2355         $(MAKE) CC=$(CC) CC2=$(CC2) ckuusx.$(EXT) \
2356         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2357         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2358         $(MAKE) CC=$(CC) CC2=$(CC2) osf \
2359         "KFLAGS= -DOSF32 -DHDBUUCP -O2 -Olimit 3200 $(KFLAGS)"
2360
2361 dec-osf32:
2362         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) du32 \
2363         KTARGET=$${KTARGET:-$(@)}
2364
2365 #Digital UNIX 4.0 through 4.0D (use tru64 targets for 4.0E and above)...
2366 du40:
2367         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0...
2368         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2369         "KFLAGS= -DOSF40 -DHDBUUCP -DFNFLOAT \
2370         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2371
2372 du40gcc:
2373         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0 with gcc ...
2374         $(MAKE) osf CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
2375         "KFLAGS= -DOSF40 -DHDBUUCP $(KFLAGS)"
2376
2377 #Tru64 Unix 4.0E
2378 tru64-40e:
2379         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0E...
2380         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2381         "KFLAGS= -DOSF40 -DOSF40E -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2382         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2383
2384 tru64-40f:
2385         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0F...
2386         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2387         "KFLAGS= -DOSF40 -DOSF40F -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2388         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2389
2390 tru64-40g:
2391         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0G...
2392         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2393         "KFLAGS= -DOSF40 -DOSF40G -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2394         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2395
2396 tru64-50a:
2397         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.0A...
2398         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2399         "KFLAGS= -DTRU64 -DOSF50 -DHDBUUCP \
2400         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2401
2402 tru64-51a:
2403         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1A...
2404         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2405         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DHDBUUCP \
2406         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2407
2408 tru64-51b:
2409         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1B...
2410         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2411         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2412         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2413
2414 # Added 5.1b version with OpenSSL - CDW 6-13-2005...
2415 tru64-51b+openssl:
2416         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1b
2417         @echo  including OpenSSL...
2418         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2419         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2420         -unsigned -std1 -O3 -Olimit 2400 \
2421         -DCK_AUTHENTICATION -DCK_SSL $(SSLINC) $(KFLAGS)" \
2422         "LIBS= $(SSLLIB) -rpath $(sslroot)/ssl/lib -lssl -lcrypto"
2423
2424 du50:
2425         $(MAKE) CC=$(CC) CC2=$(CC2) tru64-50a KTARGET=$${KTARGET:-$(@)}
2426
2427 du40-ridiculous-checking:
2428         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0.
2429         @echo Checking everything - assumes DECC...
2430         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2431         "KFLAGS= -DOSF40 -DHDBUUCP -w0 -warnprotos -check -portable \
2432         -unsigned -std1 -O3 -Olimit 1760 $(KFLAGS)"
2433
2434 #Sequent DYNIX/ptx 1.2.1
2435 dynixptx12:
2436         @echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.2.1...
2437         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2438         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DPTX -DNOGETUSERSHELL -DNOLEARN \
2439         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t $(KFLAGS) -i -O" \
2440         "LNKFLAGS = -i"
2441
2442 #Sequent DYNIX/ptx 1.3 or 1.4
2443 dynixptx13:
2444         @echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.3 TCP/IP...
2445         $(MAKE) xermit "CFLAGS= -O KTARGET=$${KTARGET:-$(@)} \
2446         -DSVR3 -DDIRENT -DHDBUUCP -DPTX -DCK_POLL -DNOGETUSERSHELL \
2447         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DTCPSOCKET $(KFLAGS) -i" \
2448         "LNKFLAGS = -i" "LIBS = -lsocket -linet -lnsl"
2449
2450 #Sequent DYNIX/ptx 2.0, ANSI C compilation
2451 #Should work on any hardware platform when DYNIX/ptx runs, including
2452 #386, 486, Pentium.
2453 dynixptx20:
2454         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2455         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2456         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2457         -DWAIT_T=int -DPTX -DNOGETUSERSHELL $(KFLAGS) -O" \
2458         "LIBS = -lsocket -linet -lnsl"
2459
2460 #Sequent DYNIX/ptx 2.0, ANSI C compilation, with curses
2461 dynixptx20c:
2462         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2463         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2464         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int -DPTX -DCK_CURSES \
2465         -DCK_NEWTERM -DNOGETUSERSHELL $(KFLAGS) -O" \
2466         "LIBS = -lsocket -linet -lnsl -lcurses -ltermcap"
2467
2468 #Sequent DYNIX/ptx 2.1.6, 80486, ANSI C compilation, with curses:
2469 # -Xa -- use ANSI compiler.
2470 # -Wc,-pw -- suppress portability warnings.
2471 # -Wc,-i386 -- 80386 cpu.
2472 # -Wc,-i486 -- 80486 cpu.
2473 # -Wc,-P5 -- Pentium (default).
2474 # -Wc,-O3 -- highest optimization.
2475 # -Wa,-N17061 -- increase symbol table from default of 15013 for ckcuni.c.
2476 # Early versions of DYNIX/ptx 2.1.x may need -DCK_POLL instead of -DSELECT.
2477 # Add "$&" after the colon in the "xermit" target for parallel makes.
2478 dynixptx216c:
2479         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6'
2480         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2481         "CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2482         -DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2483         -DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2484         -DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2485         $(KFLAGS) -Xa -Wc,-pw -Wc,-i486 -Wc,-O3 -Wa,-N17061" \
2486         "LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2487         "LNKFLAGS = -s"
2488
2489 #Sequent DYNIX/ptx 2.1.6, gcc 2.7.2.2, with curses:
2490 dynixptx216cgcc:
2491         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6 gcc'
2492         $(MAKE) xermit "CC = gcc" "CC2 = gcc" KTARGET=$${KTARGET:-$(@)} \
2493         "CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2494         -DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2495         -DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2496         -DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2497         $(KFLAGS) -O3 -pipe -funsigned-char" \
2498         "LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2499         "LNKFLAGS = -s"
2500
2501 #Sequent DYNIX/ptx 4.0, ANSI C compilation, with curses
2502 dynixptx41c:
2503         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.0...'
2504         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2505         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2506         -DWAIT_T=int -DPTX -DPTX4 -DCK_CURSES -DCK_NEWTERM \
2507         -DNOGETUSERSHELL $(KFLAGS) -O" \
2508         "LIBS = -lsocket -lnsl -lcurses -ltermcap"
2509
2510 #Sequent DYNIX/ptx 4.4, ANSI C compilation, with curses
2511 dynixptx44:
2512         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.4...'
2513         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2514         "CFLAGS= -DPTX -DPTX4 -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int \
2515         -DCK_CURSES -DCK_NEWTERM -DBIGBUFOK -DSELECT -DNOGETUSERSHELL \
2516         $(KFLAGS) -O" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
2517
2518 #Sequent DYNIX 3.0.x
2519 dynix3:
2520         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2521         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2522         "CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O \
2523         -DPWUID_T=int -DGID_T=int $(KFLAGS)"
2524
2525 #Sequent DYNIX 3.0.x, no ACUCNTRL
2526 dynix3noacu:
2527         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2528         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2529         "CFLAGS= -DBSD43 -DLCKDIR -DTCPSOCKET -O \
2530         -DUID_T=int -DGID_T=int $(KFLAGS)"
2531
2532 #Sequent DYNIX 3.1.x
2533 dynix31:
2534         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.x...
2535         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2536         "CFLAGS= -O -DDCLPOPEN -DLCKDIR -DBSD4 -DTCPSOCKET $(KFLAGS)"
2537
2538 #Sequent DYNIX 3.1.2, as above but with curses, to be compiled by gcc 2.3.3.
2539 dynix31c:
2540         @echo 'Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.2, curses...'
2541         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2542         "CFLAGS= -O2 -DDCLPOPEN -DACUCNTRL \
2543         -DBSD43 -DTCPSOCKET -DCK_CURSES -DUID_T=int \
2544         $(KFLAGS)" "LIBS= -lcurses -ltermcap"
2545
2546 #Convex C1 with Berkeley Unix
2547 convex:
2548         @echo Making C-Kermit $(CKVER) for Convex C1 / BSD...
2549         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2550         "CFLAGS= -DBSD4 -DNOLEARN $(KFLAGS) -Dmsleep=mnap"
2551
2552 #Convex C210 with Convex/OS 8
2553 convex8:
2554         @echo Making C-Kermit $(CKVER) for Convex C210 with OS 8
2555         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2556         "CFLAGS= -DBSD4 -DTCPSOCKET -DNODEBUG -DDIRENT -DNOFILEH \
2557         $(KFLAGS) -DSIG_V -Dmsleep=mnap"
2558
2559 #Convex C2 with Convex OS 9.1 (should also work with 8.1 or later)
2560 #with ANSI C compiler, uses BSD 4.3 uucp lockfile convention.
2561 convex9:
2562         @echo Making C-Kermit $(CKVER) for Convex C210 with OS 9.1
2563         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2564         "CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2565         -D__STDC__ -DLCKDIR -Dmsleep=mnap -O -ext -tm c1 $(KFLAGS)" \
2566         "LNKFLAGS = -ext"
2567
2568 #Convex C2 with Convex OS 10.1 or later
2569 #with gcc 2.x C compiler
2570 convex10gcc:
2571         @echo Making C-Kermit $(CKVER) for Convex C2 with OS 10.1 using gcc
2572         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2573         "CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2574         -D__STDC__  -Dmsleep=mnap -O2 $(KFLAGS)" CC=gcc CC2=gcc
2575
2576 #Cray X-MP or Y-MP UNICOS 6.x or 7.x.
2577 #NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2578 #processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2579 cray:
2580         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 6.x or 7.0...
2581         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2582         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2583
2584 #Cray X-MP or Y-MP UNICOS 8.0 Alpha.
2585 cray8:
2586         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 8.0 Alpha...
2587         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2588         "CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2589
2590 #Cray X-MP or Y-MP UNICOS 9.0.
2591 #This one was executed successfully for C-Kermit 8.0.209.
2592 #Earlier versions of Unicos will probably need the same flags.
2593 cray9:
2594         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 9.0...
2595         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2596         "CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DNOLFDEVNO \
2597         -DTCPSOCKET $(KFLAGS) -O1"
2598
2599 #Cray-2 or Cray 3-CSOS
2600 #NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2601 #processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2602 craycsos:
2603         @echo 'Making C-Kermit $(CKVER) for Cray-2/3 CSOS
2604         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2605         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET \
2606         $(KFLAGS) -DCK_ANSIC -DCK_CURSES" "LIBS=-lnet"
2607
2608 #NeXTSTEP 1.0 through 3.2.
2609 #Includes fullscreen file transfer display (curses) and TCP/IP support.
2610 #Uses shared library to make executable program about 80K smaller.
2611 #Remove "LIBS = -lsys_s" if this causes trouble.
2612 next:
2613         @echo Making C-Kermit $(CKVER) for NeXTSTEP...
2614         @echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2615         @echo 'add KFGLAGS=-DNOREDIRECT to your make command.'
2616         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2617         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2618         -pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2619
2620 nextc:
2621         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2622         KTARGET=$${KTARGET:-$(@)}
2623
2624 nextg:
2625         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2626         KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2627
2628 nextgc:
2629         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2630         KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2631
2632 #NeXTSTEP 3.3.
2633 #Includes fullscreen file transfer display and TCP/IP.
2634 # You might have to add 1 line to 1 NeXT header file <ip.h>
2635 # to declare n_long as u_long by adding #include <bsd/netinet/in_systm.h>
2636
2637 next33:
2638         @echo Making C-Kermit $(CKVER) for NeXTSTEP 3.3...
2639         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2640         "CFLAGS= -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2641         -pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2642
2643 #OPENSTEP 4.2 for Sparc, m680x0, HP PA-RISC, and Intel.
2644 #Includes fullscreen file transfer display and TCP/IP.
2645 #ckcpro.c compiled without optimization because it crashes the compiler.
2646 openstep42:
2647         @echo Making C-Kermit $(CKVER) for OPENSTEP 4.2...
2648         $(MAKE) ckcpro.$(EXT) \
2649         "CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2650         -DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -w"
2651         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2652         "CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2653         -DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -O -w" \
2654         "LIBS = -lsys_s -lcurses -ltermcap"
2655
2656 #NeXT with malloc debugger
2657 nextmd:
2658         @echo Making C-Kermit $(CKVER) for NeXT with malloc debugging...
2659         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
2660         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2661         -DCK_CURSES $(KFLAGS) -O -w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
2662         "LIBS = -lsys_s -lcurses -ltermcap"
2663
2664 #Build for NeXTSTEP with "fat" binaries (MABs) that run on both Motorola
2665 #and Intel platforms.
2666 nextfat:
2667         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2668         next KTARGET=$${KTARGET:-$(@)} \
2669         "KFLAGS=-Wall -arch m68k -arch i386" "LNKFLAGS = -arch m68k -arch i386"
2670
2671 #NeXTSTEP on Intel Platforms.
2672 next486:
2673         @echo Making C-Kermit $(CKVER) for NeXTSTEP on Intel Platforms...
2674         @echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2675         @echo 'add KFGLAGS=D-DNOREDIRECT to your make command.'
2676         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2677         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2678         -DNODEBUG -O3 -fno-omit-frame-pointer -fschedule-insns2 -pipe \
2679         -DCK_CURSES $(KFLAGS) -w" "LIBS = -lsys_s -lcurses -ltermcap"
2680
2681 #Single binary that runs on NeXT 68030 and 68040, Intel, HP, and Sparc,
2682 #as well as on OpenStep/Mach.
2683 nextquadfat:
2684         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2685         KTARGET=$${KTARGET:-$(@)} \
2686         "KFLAGS=-Wall -arch m68k -arch i386 -arch hppa -arch sparc" \
2687         "LNKFLAGS = -arch m68k -arch i386 -arch hppa -arch sparc"
2688
2689 #BeBox
2690 beboxdr7:
2691         @echo 'Making C-Kermit $(CKVER) for the BeBox...'
2692         @echo 'Link step will fail with default Metroworks linker 64K limit.'
2693         @echo 'Code Warrior Gold required to link big programs.'
2694         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2695         "CC=/boot/develop/tools/mwcc" "CC2=/boot/develop/tools/mwld" \
2696         "CFLAGS= -DBEBOX -DBE_DR_7 -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2697
2698 #BeBox BeOS DR7 only
2699 bebox:
2700         @echo 'Making C-Kermit $(CKVER) for BeBox...'
2701         @echo 'Link step will fail with default Metroworks linker 64K limit.'
2702         @echo 'Code Warrior Pro 3.0 for BeBox required to link big programs.'
2703         $(MAKE) wermit "CC=mwcc" "CC2=mwld" KTARGET=$${KTARGET:-$(@)} \
2704         "CFLAGS= -DBEBOX -DPOSIX -DNOLEARN -DNOUUCP $(KFLAGS) -O"
2705
2706 #BeOS 4.5
2707 #We have to use the wermit target because 'fd_set' is unknown.
2708 beos45:
2709         $(MAKE) wermit "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
2710         "CFLAGS= -DBEOS -DBEOS45 -DPOSIX -DNOIKSD -DNOREALPATH -DSYSTIMEH \
2711         -DNOCOTFMC -DNOUUCP -DNOLEARN $(KFLAGS) -O" \
2712         "LIBS = $(LIBS)"
2713
2714 #BeOS 4.5
2715 beos45net:
2716         $(MAKE) CC=$(CC) CC2=$(CC2) beos45 \
2717         "KFLAGS=-DTCPSOCKET -DNO_DNS_SRV $(KFLAGS)" "LIBS=-lnet -lnetapi"
2718
2719 #Plan 9 from Bell Labs
2720 plan9:
2721         @echo 'C-Kermit for Plan 9 from Bell Labs - calling ckpker.mk...'
2722         make -f ckpker.mk
2723
2724 #POSIX
2725 posix:
2726         @echo 'Making C-Kermit $(CKVER) for pure POSIX...'
2727         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2728         "CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2729
2730 # PowerMAX OS (SVR4) from Concurrent (tested on PowerMAX 5.1)
2731 powermax:
2732         @echo 'Making C-Kermit $(CKVER) for Concurrent PowerMAX OS...'
2733         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2734         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DPOWERMAX \
2735         -DNETPTY -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
2736         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
2737         -DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
2738         "LIBS= -lsocket -lnsl -lresolv -lcurses -lgen -lc -lucbc"
2739
2740 #Berkeley Software Design Inc. BSDI
2741 # Substitute "LIBS= -lnewcurses -ltermcap" if desired.
2742 bsdi:
2743         @echo 'Making C-Kermit $(CKVER) for BSDI ...'
2744         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2745         "CFLAGS= -DBSD44 -DSETREUID -DSW_ACC_ID -DBIGBUFOK -DFIXCRTSCTS \
2746         -DTCPSOCKET -DCK_CURSES -DFNFLOAT $(KFLAGS) -O" \
2747         "LIBS= -lcurses -ltermcap -lm"
2748
2749 #Berkeley Software Design Inc. BSDI - has higher serial speeds than 1.x.
2750 bsdi2:
2751         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2752         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 $(KFLAGS)"
2753
2754 bsdi3:
2755         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2756         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 -DBSDI3 $(KFLAGS)"
2757
2758 bsdi4:
2759         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2760         KTARGET=$${KTARGET:-$(@)} \
2761         "KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2762         -DCKHTTP -m486 $(KFLAGS)"
2763
2764 # (old name for the above)
2765 bsdiposix:
2766         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi
2767
2768
2769 #Build a BSDI 4.x binary that also runs under FreeBSD (Terry Kennedy).
2770 #But watch out for details like serial-port locking.
2771 bsdix:
2772         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2773         KTARGET=$${KTARGET:-$(@)} \
2774         "KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2775         -m486 $(KFLAGS)" "LNKFLAGS=-static -Wl,-m,i386bsdi -Wl,-e,_start"
2776
2777 #Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1
2778 pyramid:
2779         @echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2780         ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2781         "CFLAGS= -DBSD43 -DTCPSOCKET -DPYRAMID -O $(KFLAGS)" "LNKFLAGS = -s"
2782
2783 #Pyramid Dual Port OSx using HoneyDanBer UUCP, curses and TCP
2784 pyramid-hdb:
2785         @echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2786         ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2787         "CFLAGS= -DBSD43 -DTCPSOCKET -DHBDUUCP -DCK_CURSES -O $(KFLAGS)" \
2788         "LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
2789
2790 #Pyramid DC/OSx (UNIX System V R4).
2791 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
2792 #are not misplaced in sys (rather than netinet and arpa, respectively).
2793 #Uses ANSI C.
2794 #NOTE: Remove -O and Olimit:2500 from CFLAGS if TELNET connections do not work.
2795 pyrdcosx:
2796         @echo 'Making C-Kermit $(CKVER) for Pyramid DC/OSx...'
2797         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2798         "CFLAGS = -Xa -O -DSVR4 -DDIRENT -DHDBUUCP -DSELECT -DNOGETUSERSHELL \
2799         -DCK_CURSES -DSTERMIOX -DTCPSOCKET -DPYRAMID -K Olimit:3100 \
2800         -DNO_DNS_SRV $(KFLAGS)" "LIBS= -lcurses -lsocket -lnsl" "LNKFLAGS = -s"
2801
2802 #IBM's AIX 3.0 on IBM 370 mainframe, tested on AIX F44 thru F50.
2803 aix370:
2804         @echo Making C-Kermit $(CKVER) for IBM System/370 AIX 3.0...
2805         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2806         "CFLAGS= -DAIX370 -DTCPSOCKET -DLCKDIR -DDIRENT $(KFLAGS)" \
2807         "LIBS = -lbsd"
2808
2809 #IBM's AIX/ESA 2.1 (OSF/1) on IBM mainframe
2810 aixesa:
2811         @echo Making C-Kermit $(CKVER) for IBM AIX/ESA...
2812         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2813         "CFLAGS= -DAIXESA -DTCPSOCKET $(KFLAGS) -O"
2814
2815 #IBM PS/2 with AIX 1.0 thru 1.3.
2816 #  Reports indicate that -O switch must be omitted.
2817 #  It is also possible that "make bsd" will work (reports welcome).
2818 #  One report said "make LIBS=-lbsd bsd" did the trick.
2819 #  NOTLOG is to get around a 'tlog' symbol defined in one of the headers.
2820 ps2aix:
2821         @echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2822         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2823         "CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DSIG_V \
2824         -DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2825         "LNKFLAGS = -i"
2826
2827 ps2aixnetc:
2828         @echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2829         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2830         "CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DTCPSOCKET -DCK_CURSES \
2831         -DSIG_V -DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2832         "LIBS = -lcurses" "LNKFLAGS = -i"
2833
2834 ps2aix3:
2835         $(MAKE) ps2aix KTARGET=$${KTARGET:-$(@)}
2836
2837 #IBM RT PC with AIX 2.2.1, valid as of C-Kermit 8.0.
2838 #NOTLOG because of a conflict in <sys/termio.h>.
2839 #This one has unique and strange lockfiles.
2840 #  -O removed on purpose (8.0).
2841 #  In case of "compiler error: symbol table full", increase the -Nn number.
2842 #  In case of "compiler error: Constant pool too big", boost the -Np number.
2843 #  Add -DNOPUTENV if putenv() causes trouble.
2844 #  Put -DNOIKSD back if IKSD-related problems occur.
2845 rtaix:
2846         @echo 'Making C-Kermit $(CKVER) for IBM RT PC, AIX 2.2.1...'
2847         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2848         "CFLAGS = -DATTSV -DRTAIX -DHDBUUCP -DDIRENT -DNOTLOG -DTCPSOCKET \
2849         -DNOGETUSERSHELL -DCLSOPN -DNOREALPATH -DNOUNICODE -DBSD_INCLUDES \
2850         -DUSE_LSTAT -DFNFLOAT -Nn2500 -Np1000 -Wq,-SJ2 -a -w $(KFLAGS)" \
2851         "LIBS = -lm $(LIBS)" "LNKFLAGS = -s"
2852
2853 #### IBM RT PC - these targets were last verified in C-Kermit 8.0.211.
2854
2855 #IBM RT PC with AIX 2.2.1 + curses
2856 rtaixc:
2857         $(MAKE) rtaix CC=$(CC) CC2=$(CC2) "KFLAGS=-DCK_CURSES" "LIBS=-lcurses"
2858
2859 #IBM RT PC with AIX (ACIS) 2.2.1 (BSD 4.3)
2860 # Add -O, -DDYNAMIC, -s, etc, if they work.
2861 rtacis:
2862         @echo Making C-Kermit $(CKVER) for RT PC with ACIS 2.2.1 = BSD 4.3...
2863         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2864         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOIKSD -DNOPUTENV \
2865         $(KFLAGS) -U__STDC__" "LNKFLAGS = -s"
2866
2867 #### IBM AIX.  The first two targets should work for any version of AIX
2868 #### from 4.2 onwards.  The ones after that are for older versions or
2869 #### specific configurations, and/or with gcc.
2870
2871 # This one should work for any AIX 4.2 or later: "make aix".
2872 # Other tags are for compatibility with old makefile targets.
2873 #OK: 2009/11/16
2874 aix aix42 aix43 aix44 aix45 aix50 aix51 aix52 aix53 aix54 aix61:
2875         @echo Making C-Kermit $(CKVER) for IBM AIX...
2876         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2877         "CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2878         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2879         -DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
2880         -DCKCPU=\\\"`uname -p`\\\" \
2881         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2882         -D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
2883
2884 # Same but using gcc instead of cc
2885 # This works but we get "gcc: unrecognized option '-qmaxmem-..'" each module.
2886 aixg:
2887         @echo "Using gcc..."
2888         $(MAKE) aix KTARGET=$${KTARGET:-$(@)} \
2889         CC=gcc CC2=gcc "KFLAGS=-pipe -funsigned-char"
2890
2891 # AIX 4.2 or later with OpenSSL 0.9.7 or later: "make aix+ssl"
2892 # For earlier OpenSSL remove -DOPENSSL_097 or add "KFLAGS=-UOPENSSL_097".
2893 # Synonym target names added to cover old redundant targets that were removed.
2894 # If SSL is not installed in the /usr/local tree (see SSLINC and SSLLIB
2895 # definitions near the top), you can specify the locations in your make
2896 # command as in this example:
2897 #
2898 #  SSLINC=-I/opt/ssl/include SSLLIB=-L/opt/ssl/lib make -e aix+ssl
2899 #
2900 # To build with gcc use "make aix CC=gcc CC2=gcc", or "make aixg"
2901 #
2902 #OK: 2009/11/16
2903 aix+ssl aix51+openssl aix52+openssl aix53+openssl:
2904         @echo "Making C-Kermit $(CKVER) for IBM AIX with OpenSSL..."
2905         @echo "SSLINC=$(SSLINC) SSLLIB=$(SSLLIB)"
2906         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2907         CC=$(CC) CC2=$(CC2) \
2908         "CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2909         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2910         -D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2911         -DCKCPU=\\\"`uname -p`\\\" \
2912         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2913         -DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $(SSLINC) $(KFLAGS)" \
2914         "LNKFLAGS=-s" "LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
2915
2916 # AIX 5.3 or 6.1 or later with IBM OpenSSL, which is always in the directories
2917 # shown below so you don't have to set SSLINC and SSLLIB.  If for some reason
2918 # the SSL include files and libraries are not in the places assumed, then use
2919 # "make aix+ssl" (just above) and set SSLINC and SSLLIB to indicate where the
2920 # SSL files are.  To build with gcc use "make aix+ibmssl CC=gcc CC2=gcc".
2921 aix+ibmssl:
2922         @echo "Making C-Kermit $(CKVER) for IBM AIX 6.1 with OpenSSL..."
2923         @echo "If this fails use 'make aix+ss' and specify SSLINC and SSLLIB"
2924         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2925         CC=$(CC) CC2=$(CC2) \
2926         "CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2927         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2928         -D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2929         -DCKCPU=\\\"`uname -p`\\\" \
2930         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2931         -DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_098 \
2932         -I/usr/include/openssl $(KFLAGS)" \
2933         "LNKFLAGS=-s" \
2934         "LIBS=-L/usr/lib/openssl -lssl -lcrypto -lcurses -lm -lcrypt"
2935
2936 # Old AIX versions...
2937
2938 #IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000.
2939 rs6000:
2940         @echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
2941         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2942         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
2943         -DCK_POLL -DCLSOPN -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
2944         "LNKFLAGS = -s"
2945
2946 #IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000, with curses.
2947 rs6000c:
2948         @echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
2949         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2950         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
2951         -DCK_POLL -DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -DNOREALPATH \
2952         -O $(KFLAGS)" "LIBS= -lcurses -ltermcap" "LNKFLAGS = -s"
2953
2954 aix30:
2955         $(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
2956
2957 aix31:
2958         $(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
2959
2960 #IBM AIX 3.2 for RISC System/6000.
2961 #In case of "subprogram too complex" warnings, add "-qmaxmem=16000" to CFLAGS.
2962 rs6aix32:
2963         @echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000...
2964         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2965         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
2966         -DSELECT_H -DCLSOPN -DNOTTYLOCK -O $(KFLAGS)" "LNKFLAGS = -s"
2967
2968 #IBM AIX 3.2 for RISC System/6000.
2969 rs6aix32c:
2970         @echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000, TCP+curses...
2971         @echo In case of Subprogram Too Complex warnings,
2972         @echo add -qmaxmem=16000 to CFLAGS.
2973         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2974         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
2975         -DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
2976         "LNKFLAGS = -s" "LIBS=-lcurses"
2977
2978 aix32:
2979         $(MAKE) rs6aix32c KTARGET=$${KTARGET:-$(@)}
2980
2981 #IBM AIX 4.1, 4.1.x on RISC System/6000 or Power Series.
2982 #Generates common binary for all platforms if using xlc (IBM C compiler).
2983 #When using gcc, add -mcpu=common to generate common binary.
2984 #Note that this one needs CK_NEWTERM.
2985 # Add -bbigtoc in case ld fails with TOC overflow.
2986 aix41:
2987         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
2988         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2989         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
2990         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
2991         -DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
2992         "LNKFLAGS = -s" "LIBS=-lcurses"
2993
2994 #Ditto but with gcc.
2995 #Remove "CC=gcc CC2=gcc" if you have gcc installed as cc.
2996 aix41g:
2997         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
2998         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
2999         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3000         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3001         -DNOGETUSERSHELL -O $(KFLAGS)" \
3002         "LNKFLAGS = -s -Xlinker -bbigtoc" "LIBS=-lcurses"
3003
3004 # Add -bbigtoc in case ld fails with TOC overflow.
3005 aix41+krb5+krb4:
3006         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3007         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3008         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3009         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3010         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3011         -DCK_ENCRYPTION -DCK_DES $(K5INC) $(K5INC)/krb5  \
3012         -DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
3013         "LNKFLAGS = -s" \
3014         "LIBS = $(K5LIB) -lcurses -lkrb4 -ldes425 -lkrb5 \
3015         -lcom_err -lk5crypto -lgssapi_krb5"
3016
3017 #Old name for "aix41".
3018 rs6aix41c:
3019         $(MAKE) aix41 KTARGET=$${KTARGET:-$(@)}
3020
3021 #IBM AIX 4.1, 4.1.x, or 4.2 on RISC System/6000 or Power Series,
3022 # with X.25 support
3023 #Generates common binary for all platforms if using xlc (IBM C compiler).
3024 #When using gcc, add -mcpu=common to generate common binary.
3025 # Add -bbigtoc in case ld fails with TOC overflow.
3026 aix41x25:
3027         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3028         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3029         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3030         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3031         -DIBMX25 -DDEBUG -DNOGETUSERSHELL -qmaxmem=16000 -g $(KFLAGS)" \
3032         "LNKFLAGS = -g -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3033         -@echo "\e]0;kermit done\a\c"
3034
3035 #As above but without -g in LNKFLAGS.
3036 # Add -bbigtoc in case ld fails with TOC overflow.
3037 aix41x25o:
3038         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3039         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3040         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3041         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3042         -DIBMX25 -DNODEBUG -DNOGETUSERSHELL -qmaxmem=16000 $(KFLAGS)" \
3043         "LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3044         -@echo "\e]0;kermit done\a\c"
3045
3046 #AIX 4.2 -- Use this target if the regular "make aix" doesn't work.
3047 # Must have CK_NEWTERM or echoing is lost after curses.
3048 # Add -bbigtoc in case ld fails with TOC overflow.  As of C-Kermit 8.0.212,
3049 # all AIX builds 4.2 and later include large file support.
3050 oldaix42:
3051         @echo Making C-Kermit $(CKVER) for IBM AIX 4.2 or higher...
3052         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3053         "CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3054         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
3055         -DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
3056         -DCKCPU=\\\"`uname -p`\\\" \
3057         -DHERALD=\\\"\ IBM\ AIX\ `uname -v`.`uname -r`\\\" \
3058         -D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
3059
3060 #AIX 4.3 - Use this target if the regular "make aix" doesn't work.
3061 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3062 # -bbigtoc needed on some systems but not others to avoid TOC overflow.
3063 # "man ld" says -bbigtoc makes program run slower.
3064 oldaix43:
3065         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher...
3066         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3067         "CFLAGS= -DAIXRS -DAIX41 -DAIX43 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3068         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3069         -DFNFLOAT -DNOGETUSERSHELL -qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3070         "LNKFLAGS = -s" "LIBS=-lcurses -lm"
3071
3072 #AIX 4.3 with IBM X.25.
3073 aix43x25:
3074         @echo "Making C-Kermit $(CKVER) for IBM AIX 4.3 with X.25..."
3075         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3076         "CFLAGS= -DAIXRS -DAIX41 -DAIX43 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3077         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3078         -DFNFLOAT -DNOGETUSERSHELL -DIBMX25 \
3079         -qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3080         "LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg -lm"
3081
3082 #AIX 4.3 -- Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3083 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3084 # "man ld" says -bbigtoc makes program run slower.
3085 aix43g:
3086         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3087         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3088         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3089         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3090         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3091         "LIBS=-lcurses -lm"
3092
3093 aix43gcc:
3094         $(MAKE) aix43g
3095
3096 # None of the following aix43gcc attempts work on a gcc-only AIX 4.3.3 box.
3097 # It just plain can't find the math routines (fmod, pow, exp, sqrt, log10,...)
3098 # Which is odd because nm /usr/lib/libC.a finds them...
3099
3100 #in case aix43gcc can't find its math library...
3101 aix43gccx:
3102         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3103         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3104         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3105         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3106         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3107         "LIBS= -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.1.0/2.95.2 \
3108         -lcurses -bloadmap -bnoquiet"
3109
3110 #in case aix43gccx can't find its math library...
3111 aix43gccy:
3112         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3113         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3114         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3115         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3116         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3117         "LIBS= -lcurses -bloadmap -bnoquiet"
3118
3119 #in case aix43gccx can't find its math library...
3120 aix43gccz:
3121         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3122         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3123         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3124         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3125         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3126         "LIBS= -L. -lcurses -bloadmap -bnoquiet"
3127
3128 #AIX 4.3 with MIT Kerberos 5 and Kerberos 4 compatibility mode
3129 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3130 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3131 # "man ld" says -bbigtoc makes program run slower.
3132 aix43gcc+krb5+krb4:
3133         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3134         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3135         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3136         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3137         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3138         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3139         -DCK_ENCRYPTION -DCK_DES -funsigned-char $(K5INC) $(K5INC)/krb5 \
3140         $(KFLAGS)" \
3141         "LIBS=$(K5LIB) -lcurses -lm -lkrb4 -ldes425 -lkrb5 \
3142         -lcom_err -lk5crypto -lcrypt -lgssapi_krb5"
3143
3144 #AIX 4.3 with MIT Kerberos 5, Kerberos 4 compatibility mode and OpenSSL
3145 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3146 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3147 # "man ld" says -bbigtoc makes program run slower.
3148 aix43gcc+krb5+krb4+openssl:
3149         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3150         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3151         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3152         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3153         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3154         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3155         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DLIBDES -DCK_SSL \
3156         -funsigned-char $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3157         "LIBS=$(K5LIB) $(SSLLIB) -lssl -lcrypto \
3158         -lcurses -lm -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt \
3159         -lgssapi_krb5"
3160
3161 aix43gcc+openssl:
3162         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/OpenSSL...
3163         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3164         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3165         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3166         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3167         -DCK_AUTHENTICATION -DCK_SSL -funsigned-char $(SSLINC) $(KFLAGS)" \
3168         "LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
3169
3170 aix44gcc:
3171         $(MAKE) aix43g "KFLAGS=-DAIX44 $(KFLAGS)" \
3172         KTARGET=$${KTARGET:-$(@)}
3173
3174 aix45gcc:
3175         $(MAKE) aix43g "KFLAGS=-DAIX45 $(KFLAGS)" \
3176         KTARGET=$${KTARGET:-$(@)}
3177
3178 aix50gcc:
3179         $(MAKE) aix43g "KFLAGS=-DAIX50 $(KFLAGS)" \
3180         KTARGET=$${KTARGET:-$(@)}
3181
3182 aix51gcc:
3183         $(MAKE) aix43g "KFLAGS=-DAIX51 $(KFLAGS)" \
3184         KTARGET=$${KTARGET:-$(@)}
3185
3186 aix52gcc:
3187         $(MAKE) aix43g "KFLAGS=-DAIX52 $(KFLAGS)" \
3188         KTARGET=$${KTARGET:-$(@)}
3189
3190 aix53gcc:
3191         $(MAKE) aix43g "KFLAGS=-DAIX53 $(KFLAGS)" \
3192         KTARGET=$${KTARGET:-$(@)}
3193
3194 #Bull DPX/2 with BOS/X, like AIX/RS6000
3195 bulldpx2:
3196         @echo Making C-Kermit $(CKVER) for Bull DPX/2 with BOS/X...
3197         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3198         "CFLAGS= -DSVR3 -DDIRENT -DCK_ANSIC -DCKTYP_H=<sys/types.h> \
3199         -DCK_POLL -DNOGETUSERSHELL -DCLSOPN -DNOLEARN -O $(KFLAGS)" \
3200         "LNKFLAGS = -s"
3201
3202 #Sun UNIX 3.5 with gcc 2.3.3.
3203 sunos3gcc:
3204         @echo Making C-Kermit $(CKVER) for Sun UNIX 3.5 and gcc...
3205         $(MAKE) xermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3206         CFLAGS="-g -O -DBSD4 -DTCPSOCKET $(KFLAGS)"
3207
3208 #SunOS version 4.0, BSD environment, has saved original euid feature.
3209 # Add "CC=/usr/ucb/cc CC2=/usr/ucb/cc" if necessary.
3210 # Note: Including Unicode crashes the assembler in ckcuni.c.
3211 sunos4:
3212         @echo Making C-Kermit $(CKVER) for SunOS 4.0, BSD environment...
3213         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3214         "CFLAGS= -O -DSUNOS4 -DFNFLOAT -DNOUNICODE $(KFLAGS)" \
3215         "LIBS=-lm"
3216
3217 #As above, but with SunLink X.25 support
3218 sunos4x25:
3219         @echo SunLink X.25 support
3220         $(MAKE) "MAKE=$(MAKE)" sunos4 KTARGET=$${KTARGET:-$(@)} \
3221         "KFLAGS=$(KFLAGS) -DFNFLOAT -DSUNX25" \
3222         "LIBS=-lm"
3223
3224 #SUN OS version 4.1 - 4.1.3, BSD environment, has saved original euid feature.
3225 #Uses Honey DanBer UUCP.  Requires presence of /usr/spool/locks directory.
3226 # /var/spool/ should be a symbolic link to  /usr/spool/.
3227 # ... or 'make xermit "CC= /usr/ucb/cc " \'
3228 # Note: "xermit" means use the select() version of the CONNECT module.
3229 # Note for C-Kermit 9.0: Reportedly 'you need to modify the sys/ioctl.h
3230 # include file, i.e. comment out the "struct winsize" and "struct
3231 # ttysize". Otherwise there will be a conflict with sys/ttycom.h (included by
3232 # termios.h) which also declares these structs. But you need both includes.'
3233 sunos41:
3234         @echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD...
3235         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3236         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE $(KFLAGS)" \
3237         "LIBS= $(LIBS) -lresolv -lm"
3238
3239 #As above, but compiled with gcc.  Gives 24-32K size reduction
3240 #with gcc 2.1 or 2.2.2.  CAUTION: make sure "fixincludes" has been run on
3241 #the include files, so gcc's are in sync with the regular Sun ones.
3242 #This includes the curses library for fullscreen file transfer display.
3243 #NDGPWNAM needed for GCC 2.5.6, not needed for 2.4.0, but it's uncertain
3244 #whether it will do any harm for 2.4.0 compilation -- if so, remove it.
3245 sunos41gcc:
3246         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3247         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3248         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3249         -funsigned-char $(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3250
3251 # As above, but without -funsigned-char so I can see the warnings that
3252 # everybody else will get when they use ANSI compilers that don't have this
3253 # option (gsc = gcc signed char).
3254 sunos41gsc:
3255         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3256         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3257         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3258         $(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3259
3260 #As above but with ckucon.c rather than ckucns.c (for testing only)
3261 sunos41gccfork:
3262         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3263         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3264         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3265         -DNOLEARN -funsigned-char $(KFLAGS)" \
3266         "LIBS= -lcurses -ltermcap -lresolv -lm"
3267
3268 #as above but configured for Kerberos IV
3269 sunos41gcc+krb4:
3270         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3271         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3272         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3273         -DTCPSOCKET -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3274         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK -funsigned-char \
3275         $(K4INC) $(KFLAGS)" \
3276         "LIBS= $(K4LIB) -lcurses -ltermcap -lresolv -lm -lkrb -ldes"
3277
3278 #as above but configured for SSL/TLS
3279 sunos41gcc+openssl:
3280         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, ssl...
3281         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3282         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3283         -DCK_AUTHENTICATION -funsigned-char \
3284         -DCK_SSL -DTCPSOCKET -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3285         "LIBS= $(SSLLIB) -lcurses -ltermcap -lresolv -lm -lssl -lcrypto"
3286
3287 #as above but configured for Kerberos IV and SSL/TLS
3288 sunos41gcc+krb4+openssl:
3289         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3290         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3291         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3292         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3293         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3294         $(K4INC) $(SSLINC) $(KFLAGS)" \
3295         "LIBS= $(K4LIB) $(SSLLIB) \
3296         -lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto"
3297
3298 #as above but configured for Kerberos IV and ZLIB enabled SSL/TLS
3299 sunos41gcc+krb4+openssl+zlib:
3300         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3301         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3302         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3303         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3304         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3305         -DZLIB $(K4INC) $(SSLINC) \
3306         $(KFLAGS)" \
3307         "LIBS= $(K4LIB) $(SSLLIB) \
3308         -lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto -lz"
3309
3310 #as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3311 sunos41gcc+krb4+srp+openssl+zlib:
3312         @echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,krb4,srp,ssl,zlib..."
3313         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3314         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3315         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3316         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3317         -DZLIB -DCK_SRP $(K4INC) $(SRPINC) $(SSLINC) $(KFLAGS)" \
3318         "LIBS= $(K4LIB) $(SRPLIB) $(SSLLIB) \
3319         -lcurses -ltermcap -lresolv -lm -lkrb -lkrypto \
3320         -lsrp -lssl -lcrypto -lz"
3321
3322 #as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3323 sunos41gcc+srp+openssl+zlib:
3324         @echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,srp,ssl,zlib..."
3325         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3326         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3327         -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES \
3328         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3329         -DZLIB -DCK_SRP $(SRPINC) $(SSLINC) \
3330         $(KFLAGS)" \
3331         "LIBS= $(SRPLIB) $(SSLLIB) \
3332         -lcurses -ltermcap -lresolv -lm -lkrypto -lsrp -lssl -lcrypto -lz "
3333
3334 #SUNOS 4.1 as sunos41 above, but also with curses support
3335 sunos41c:
3336         @echo Curses support
3337         $(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
3338         "KFLAGS=$(KFLAGS) -DCK_CURSES -DFNFLOAT " \
3339         "LIBS= -lcurses -ltermcap"
3340
3341 #As SunOS 4.1.x, gcc, configured as Internet Kermit Server.
3342 # . NOLOCAL removes capability to make connections
3343 # . TNCODE allows server-side Telnet negotiation.
3344 # . used to include -lpwent, why?
3345 # . used to include -L/usr/local/lib -lm, why?
3346 sunos41giks:
3347         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc for IKS...
3348         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3349         "CFLAGS= -O -DSUNOS41 -DNDGPWNAM -DFNFLOAT \
3350         -DNOLOCAL -DTCPSOCKET -DTNCODE -DNOPUSH $(KFLAGS)" \
3351         "LIBS= -lm -lresolv"
3352
3353 #SUNOS 4.1 with SunLink X.25 support
3354 sunos41x25:
3355         @echo SunLink X.25 support
3356         $(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3357         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3358         -DNOLEARN $(KFLAGS)" "LIBS= $(LIBS) -lresolv -lm"
3359
3360 #SUNOS 4.1 with SunLink X.25 support and curses
3361 sunos41x25c:
3362         @echo SunLink X.25 support + curses
3363         $(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3364         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3365         -DCK_CURSES -DNOLEARN $(KFLAGS)" \
3366         "LIBS= $(LIBS) -lcurses -ltermcap -lresolv -lm"
3367
3368 #SUN with Solaris 2.0 = SunOS 5.0.
3369 #Mostly the same as System V R4.  Don't use this with later Solaris versions.
3370 solaris20:
3371         @echo 'Making C-Kermit $(CKVER) for Sun with Solaris 2.0 and curses...'
3372         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3373         "CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3374         -DTCPSOCKET -DCK_CURSES -DFNFLOAT -DCK_POLL $(KFLAGS)" \
3375         "LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s"
3376
3377 #SUN with Solaris 2.0.
3378 #As above, but built with the gcc compiler from the Cygnus CD-ROM.
3379 solaris20g:
3380         @echo 'Making C-Kermit $(CKVER) for Sun Solaris 2.0, gcc, and curses..'
3381         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3382         "CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3383         -DTCPSOCKET -DCK_CURSES -DCK_POLL -DFNFLOAT $(KFLAGS)" \
3384         "LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s" \
3385         CC=/opt/cygnus-sol2-1.1/bin/gcc CC2=/opt/cygnus-sol2-1.1/bin/gcc
3386
3387 #SunOS 5.1 = Solaris 2.1.
3388 #NOTE: A C compiler is no longer bundled with SunOS 5.1, so to compile C
3389 #programs, you might have to change your PATH to include the directory
3390 #/usr/ccs/bin AFTER the directory containing the compiler.  SunPRO C is
3391 #installed by default in /opt/SUNWspro/bin.  So a sample PATH might be:
3392 #
3393 # /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3394 # /usr/ucb:/usr/sbin:/sbin:.
3395 #
3396 # or:
3397 #
3398 # /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3399 #
3400 #NOTE 2: Compilation with the Apogee C compiler (apcc) might not work,
3401 #because it refuses to allow "-Usun".  Reportedly, newer releases of apcc
3402 #(such as 1.2.17) work OK, use: "make -e sunos51 CC=apcc CC2=apcc".
3403 solaris21:
3404         @echo 'Making C-Kermit $(CKVER) for SunOS 5.x....'
3405         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3406         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DFNFLOAT \
3407         -DSELECT -DNODEBUG -DSTERMIOX $(KFLAGS)" "LIBS = -lm" "LNKFLAGS = -s"
3408
3409 #Solaris 2.0 - 2.4, SunPro compiler, includes curses and TCP/IP.
3410 #When using SUNWspro CC 2.0.1 under Solaris 2.3, be sure all cc patches
3411 #are applied, otherwise corrupt or truncated object files can result.
3412 #To build, set your PATH as follows:
3413 #  /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3414 #  /usr/ucb:/usr/sbin:/sbin:.
3415 # or (depending on where the compiler has been installed):
3416 #  /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3417 #For additional optimization try using "-fast -xO4 -xdepend".
3418 solaris2x:
3419         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3420         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3421         "CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3422         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
3423         "LNKFLAGS = -s" "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv"
3424
3425 #as above but configured for Kerberos IV
3426 solaris2x+krb4:
3427         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x, SunPro cc, krb4...'
3428         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3429         "CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3430         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET  \
3431         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3432         -DCK_ENCRYPTION -DCK_DES -DCK_CAST $(K4INC) $(KFLAGS)" \
3433         "LNKFLAGS = -s" \
3434         "LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes"
3435
3436 #C-Kermit for Solaris 2.0-2.4 compiled with gcc, includes curses and TCP/IP.
3437 #Change -O2 to -O if -O2 gives trouble.
3438 #Remove -Usun if it causes trouble.
3439 #Your PATH should start with something like:
3440 #  /usr/local/gnu/bin:/usr/ccs/bin:
3441 #Produces a huge executable -- strip with /usr/ccs/bin/strip (not Gnu strip).
3442 #Also don't add "LNKFLAGS = -s" -- strip manually instead.
3443 #Also note: this can NOT be linked statically - Sun makes it impossible.
3444 #And for Solaris 2.4, you might have to replace:
3445 # /usr/local/lib/gcc-lib/i486-sun-solaris2/2.4.5/include/sys/stat.h
3446 #with /usr/include/sys/stat.h.
3447 solaris2xg:
3448         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc...'
3449         @echo 'Please read the comments that accompany the solaris2xg target.'
3450         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3451         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3452         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3453         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3454
3455 #ditto but no curses.
3456 solaris2xgnc:
3457         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc...'
3458         @echo 'Please read the comments that accompany the solaris2xg target.'
3459         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3460         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3461         -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3462         "LIBS= -lsocket -lnsl -lm -lresolv $(LIBS)"
3463
3464 #and with Kerberos IV
3465 solaris2xg+krb4:
3466         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc, krb4...'
3467         @echo 'Please read the comments that accompany the solaris2xg target.'
3468         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3469         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3470         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3471         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 -DCK_ENCRYPTION \
3472         -DCK_DES -DCK_CAST -DBIGBUFOK $(K4INC) $(KFLAGS)" \
3473         "LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes \
3474         $(LIBS)"
3475
3476 #and with OpenSSL,ZLIB,PAM,SHADOW
3477 solaris2xg+openssl+zlib+pam+shadow:
3478         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3479         @echo 'Please read the comments that accompany the solaris2xg target.'
3480         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3481         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3482         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3483         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW  -DZLIB \
3484         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3485         "LIBS= $(SSLLIB) -ltermlib \
3486         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz"
3487
3488 #Ditto but with GCC 3.1 in which you have to specify 32-bit with -m32.
3489 #In Solaris 9 (and maybe 8) you'll also need specifiy the Library path.
3490 #Reportedly this can be done here, but only with:
3491 # crle -l /usr/lib:/usr/local/ssl/lib
3492 #prior to building.  Note: 64-bit not tested with SSL.
3493 #For no-crypto 64-bit builds see the solaris9g64 target.
3494 solaris2xg32+openssl+zlib+pam+shadow:
3495         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3496         @echo 'Please read the comments that accompany the solaris2xg target.'
3497         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC="gcc -m32" CC2="gcc -m32" \
3498         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3499         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3500         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW  -DZLIB \
3501         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3502         "LIBS= $(SSLLIB) -ltermlib \
3503         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz"
3504
3505 #and with Krb5,Krb4,OpenSSL,SHADOW
3506 solaris2xg+krb5+krb4+openssl+shadow:
3507         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc,k5,k4,ssl...'
3508         @echo 'Please read the comments that accompany the solaris2xg target.'
3509         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3510         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3511         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3512         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3513         -DCK_ENCRYPTION -DCK_SSL -DCK_DES -DCK_CAST -DBIGBUFOK \
3514         $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3515         "LIBS= $(K5LIB) $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3516         -lkrb4 -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3517         -ldes $(LIBS)"
3518
3519 #and with OpenSSL
3520 solaris2xg+openssl+pam+shadow:
3521         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3522         @echo 'Please read the comments that accompany the solaris2xg target.'
3523         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3524         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3525         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3526         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW \
3527         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3528         "LIBS= $(SSLLIB) -ltermlib \
3529         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam"
3530
3531 solaris2xg+openssl+zlib+srp+pam+shadow: 
3532         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3533         @echo 'Please read the comments that accompany the solaris2xg target.'
3534         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3535         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3536         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DBIGBUFOK \
3537         -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES -DLIBDES -DCK_CAST \
3538         -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DCK_SRP $(SSLINC) $(KFLAGS)" \
3539         "LIBS= $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv -lsrp -lssl \
3540         -ldes -lkrypto -lcrypto -lpam -lz"
3541
3542 solaris22g:
3543         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3544         KTARGET=$${KTARGET:-$(@)}
3545
3546 solaris23g:
3547         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3548         KTARGET=$${KTARGET:-$(@)}
3549
3550 #Solaris 2.4 built with gcc
3551 solaris24g:
3552         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} \
3553         solaris2xg "KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3554
3555 #Solaris 2.0-2.3, SunPro compiler, with SunLink X.25 support.
3556 #This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3557 #exists and can be dynamically linked.
3558 #NOTE: Do not change target to xermit -- it doesn't support X.25.
3559 solaris2x25:
3560         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x+X.25 with SunPro cc...'
3561         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3562         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DDIRENT \
3563         -DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DNOLEARN \
3564         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3565         "LNKFLAGS = -s" \
3566         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3567         -lsockx25 -lsocket -lnsl -lm -lresolv"
3568
3569 #Solaris 2.0-2.4, gcc, SunLink X.25 added.
3570 #NOTE: Can't use xermit target with X.25.
3571 solaris2xgx25:
3572         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x + X.25 with GNU cc...'
3573         @echo 'Please read the comments that accompany the solaris2xg entry.'
3574         $(MAKE) wermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3575         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DSUNX25 \
3576         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DFNFLOAT \
3577         -DNOLEARN $(KFLAGS)" \
3578         "LIBS= -ltermlib -lm -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3579         -lsockx25 -lsocket -lnsl"
3580
3581 #Solaris 2.4, SunPro compiler, with SunLink X.25 support.
3582 #This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3583 #exists and can be dynamically linked.
3584 solaris24x25:
3585         @echo 'Making C-Kermit $(CKVER) for Solaris 2.4+X.25 with SunPro cc...'
3586         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3587         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DSOLARIS24 -DDIRENT -DNOLEARN \
3588         -DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DPOSIX_CRTSCTS \
3589         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3590         "LNKFLAGS = -s" \
3591         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3592         -lsockx25 -lsocket -lnsl -lm -lresolv"
3593
3594 #Solaris 2.5, SunPro compiler, with SunLink X.25 support.
3595 solaris25x25:
3596         @echo 'Making C-Kermit $(CKVER) for Solaris 2.5+X.25 with SunPro cc...'
3597         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3598         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS25 -DDIRENT -DSUNX25 \
3599         -DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES \
3600         -DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3601         -I/opt/SUNWconn/include $(KFLAGS)" \
3602         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3603         -lsockx25 -lsocket -lnsl -lm -lresolv"
3604
3605 solaris23:
3606         $(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3607         "KFLAGS=$(KFLAGS)"
3608
3609 solaris24:
3610         $(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3611         "KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3612
3613 # template for Solaris 2.5 and above.
3614 solaris25x:
3615         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3616         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3617         "CFLAGS = -DFNFLOAT -O -Usun -i $(KFLAGS)" \
3618         "LNKFLAGS = -s" \
3619         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3620
3621 #Solaris 2.5, SunPro compiler, curses, TCP/IP
3622 solaris25:
3623         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3624         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3625
3626 #Solaris 2.5, SunPro compiler, curses, TCP/IP, Kerberos IV
3627 solaris25+krb4:
3628         $(MAKE) "MAKE=$(MAKE)" solaris25x+krb4 KTARGET=$${KTARGET:-$(@)} \
3629         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3630
3631 #Solaris 2.5 built with gcc
3632 solaris25g:
3633         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3634         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3635
3636 #Solaris 2.5 built with gcc and Kerberos IV
3637 solaris25g+krb4:
3638         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3639         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3640
3641 #Solaris 2.5 built with gcc and Kerberos V/IV, SSL, ...
3642 solaris25g+krb5+krb4+openssl+shadow:
3643         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3644         KTARGET=$${KTARGET:-$(@)} \
3645         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3646
3647 #Solaris 2.5, gcc, SunLink X.25 added.
3648 solaris25gx25:
3649         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3650         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3651
3652 #Solaris 2.6, gcc, SunLink X.25 added.
3653 solaris26gx25:
3654         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3655         "KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3656         "LIBS= -lpam"
3657
3658 #Solaris 2.6, SunPro compiler, curses, TCP/IP
3659 solaris26:
3660         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3661         "KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3662         "LIBS= -lpam"
3663
3664 #Solaris 2.6 with gcc
3665 solaris26g:
3666         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xg \
3667         "KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3668         "LIBS = -lpam"
3669
3670 #Solaris 2.6 with gcc and SSL
3671 solaris26g+openssl:
3672         $(MAKE) "MAKE=$(MAKE)"  solaris2xg+openssl+pam+shadow \
3673         KTARGET=$${KTARGET:-$(@)} "KFLAGS= -DSOLARIS26 $(KFLAGS)"
3674
3675 #Solaris 2.6 with gcc, no curses (e.g. because libtermlib is missing).
3676 solaris26gnc:
3677         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgnc \
3678         "KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3679         "LIBS= -lpam"
3680
3681 #Solaris 2.6, SunPro compiler, with SunLink X.25 support.
3682 solaris26x25:
3683         @echo 'Making C-Kermit $(CKVER) for Solaris 2.6+X.25 with SunPro cc...'
3684         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3685         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS26 -DDIRENT -DSUNX25 \
3686         -DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES -DCK_PAM -DCK_SHADOW \
3687         -DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3688         -I/opt/SUNWconn/include $(KFLAGS)" \
3689         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3690         -lsockx25 -lsocket -lnsl -lm -lresolv -lpam"
3691
3692 #Solaris 7 (2.7) with Sun CC
3693 solaris7:
3694         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3695         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3696         "LIBS= -lpam"
3697
3698 #Solaris 7 with gcc (32-bit)
3699 solaris7g:
3700         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3701         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3702         "LIBS= -lpam"
3703
3704 #Solaris 7 with gcc + Kerberos IV (32-bit)
3705 solaris7g+krb4:
3706         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3707         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3708         "LIBS= -lpam"
3709
3710 solaris7g+openssl+zlib+pam+shadow:
3711         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3712         KTARGET=$${KTARGET:-$(@)} \
3713         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3714
3715 #Solaris 7 with gcc + OpenSSL (32-bit)
3716 solaris7g+openssl+zlib+srp+pam+shadow:
3717         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+srp+pam+shadow \
3718         KTARGET=$${KTARGET:-$(@)} \
3719         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3720
3721 #Solaris 8
3722 solaris8:
3723         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3724         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3725         "LIBS= -lpam"
3726
3727 #Solaris 8 with gcc (32-bit)
3728 solaris8g:
3729         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3730         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3731         "LIBS= -lpam"
3732
3733 # In OpenSSL builds add -ldl if you get unresolved references for
3734 # dlclose, dlsym, dlopen, dlerror.
3735
3736 #Solaris 8 with gcc + OpenSSL (32-bit)
3737 solaris8g+openssl+zlib+pam+shadow:
3738         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3739         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DSOLARIS8 $(KFLAGS)"
3740
3741 #Solaris 8 with gcc + Kerberos IV (32-bit)
3742 solaris8g+krb4:
3743         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3744         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3745         "LIBS= -lpam"
3746
3747 solaris9nolfs:
3748         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3749         "KFLAGS=-DSOLARIS9 -DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3750         "LIBS= -lpam"
3751
3752 #Solaris 9 with malloc debugging
3753 solaris9md:
3754         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
3755         "CFLAGS = -DFNFLOAT -O -Usun -i -D_FILE_OFFSET_BITS=64 \
3756         -DSOLARIS9 -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG \
3757         -DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3758         "LIBS= -lpam -ltermlib -lsocket -lnsl -lm -lresolv"
3759
3760 #Solaris 9 with gcc + OpenSSL + Shadow (32-bit)
3761 #Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3762 solaris9g+openssl+shadow+pam+zlib:
3763         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3764         KTARGET=$${KTARGET:-$(@)} \
3765         "KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
3766         -DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
3767         "LIBS= -lpam -ldes425 -lz $(LIBS)"
3768
3769 #Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow (32-bit)
3770 #Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3771 solaris9g+krb5+krb4+openssl+shadow+pam+zlib:
3772         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3773         KTARGET=$${KTARGET:-$(@)} \
3774         "KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
3775         -DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
3776         "LIBS= -lpam -ldes -lz $(LIBS)"
3777
3778 #Solaris 9 with gcc + Kerberos 4 and 5:
3779 solaris9g+krb5+krb4:
3780         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3781         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3782         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3783         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3784         -D_FILE_OFFSET_BITS=64 \
3785         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK \
3786         $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3787         "LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3788         -lkrb4 -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3789         -ldes $(LIBS)"
3790
3791 #Solaris 9 with gcc + Kerberos 5.
3792 #Columbia Only - libdes has a version number in its name.
3793 #In the general case, change -ldes425 to -des.
3794 #If you have Kerberos 1.4 or later and and krb5_init_ets can't be found
3795 #at link time, add -DNO_KRB5_INIT_ETS.
3796 cu-solaris9g+krb5:
3797         @case `openssl version` in \
3798           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3799           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3800           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3801           *) OPENSSLOPTION="" ;; \
3802         esac ; \
3803         HAVE_DES=''; \
3804         DES_LIB=''; \
3805         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3806               DES_LIB='-ldes425'; \
3807               HAVE_DES='-DCK_DES -DLIBDES'; \
3808               echo "HAVE DES"; \
3809            else echo "NO DES"; \
3810         fi; \
3811         GSSAPILIB=''; \
3812         K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
3813         echo K5DIR=$$K5DIR; \
3814         if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
3815               GSSAPILIB='-lgssapi_krb5'; \
3816           else GSSAPILIB='-lgssapi'; \
3817         fi; \
3818         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3819         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3820         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET  -DBIGBUFOK \
3821         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DCK_ENCRYPTION -DCK_CAST \
3822         $$OPENSSLOPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3823         "LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lcrypto \
3824         $$GSSAPILIB -lkrb5 -lcom_err -lk5crypto $$DES_LIB $(LIBS)"
3825
3826 #Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow + Long files
3827 #Columbia Only, mainly because of the -R clause.
3828 # (I tried adding -DCK_SRP and -lsrp but got a lot of symbol referencing
3829 #  errors at link time.)
3830 cu-solaris9g+krb5+krb4+openssl+shadow+pam+zlib:
3831         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3832         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3833         -DSOLARIS9 -D_FILE_OFFSET_BITS=64 -DBIGBUFOK \
3834         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3835         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3836         -DCK_ENCRYPTION -DCK_SSL -DCK_DES -DCK_CAST -DNO_KRB5_INIT_ETS \
3837         -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES -DOPENSSL_097 -DCK_FORWARD_X \
3838         $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3839         "LIBS= $(K5LIB) $(SSLLIB) -R/opt/local/lib -ltermlib -lsocket -lnsl \
3840         -lm -lresolv -lkrb4 -lssl -lcrypto -lgssapi_krb5 -lkrb5 \
3841         -lcom_err -lk5crypto -lpam -ldes425 -lz $(LIBS)"
3842
3843 #Solaris 9, 10, or 11 with gcc...  
3844 #Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3845 #This target is chained to be the secure solaris9g+xxx targets below.
3846 solaris9g solaris10g solaris11g:
3847         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with gcc'
3848         @case `uname -r` in \
3849           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3850           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3851           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3852           *) SOLARISVERSION="-DSOLARIS" ;; \
3853         esac ; \
3854         $(MAKE) "MAKE=$(MAKE)" CC="gcc -m32" CC2="gcc -m32" xermit \
3855         KTARGET=$${KTARGET:-$(@)} \
3856         "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3857         -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW -funsigned-char \
3858         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3859         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3860         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3861         -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3862         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3863
3864 #Solaris 9, 10, or 11 with Sun CC, 64 bit build.
3865 #DON'T USE THIS ONE ON PC ARCHITECTURE - It compiles and links but won't run.
3866 #OK: 2009/11/16 (but not tested on Solaris 11)
3867 solaris9_64 solaris10_64 solaris11_64:
3868         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 64-bit Sun CC'
3869         $(MAKE) "MAKE=$(MAKE)" solaris9 KTARGET=$${KTARGET:-$(@)} \
3870         "KFLAGS=-xarch=generic64 -U_FILE_OFFSET_BITS -DNOARROWKEYS" \
3871         "LNKFLAGS= -xarch=generic64"
3872
3873 #Solaris 9, 10, or 11 with gcc, 64 bit build.
3874 #Peeking inside FILE struct not allowed in 64-bit world.
3875 #DON'T USE THIS ONE ON PC ARCHITECTURE - It compiles and links but won't run.
3876 #OK: 2009/09/25 (but not tested on Solaris 11)
3877 solaris9g64 solaris10g64 solaris11g64:
3878         @echo 'Making C-Kermit $(CKVER) for Solaris 9++ with gcc 64-bit'
3879         @case `uname -r` in \
3880           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3881           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3882           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3883           *) SOLARISVERSION="-DSOLARIS" ;; \
3884         esac ; \
3885         $(MAKE) "MAKE=$(MAKE)" CC="gcc -m64" CC2="gcc -m64" xermit \
3886         KTARGET=$${KTARGET:-$(@)} \
3887         "CFLAGS = -g -O -Usun -funsigned-char \
3888         -DSVR4 $$SOLARISVERSION -DNOARROWKEYS \
3889         -DSTERMIOX -DSELECT -DFNFLOAT -DUSE_STRERROR -DCK_PAM -DCK_SHADOW \
3890         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3891         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3892         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3893         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3894
3895 #Solaris 9, 10, or 11 with SunPro CC
3896 #Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3897 #This target is chained to by the secure targets below.
3898 solaris9 solaris10 solaris11:
3899         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with Sun CC'
3900         @case `uname -r` in \
3901           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3902           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3903           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3904           *) SOLARISVERSION="-DSOLARIS" ;; \
3905         esac ; \
3906         $(MAKE) "MAKE=$(MAKE)" xermit KTARGET=$${KTARGET:-$(@)} \
3907         "CFLAGS = -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3908         -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW \
3909         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3910         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3911         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3912         -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3913         "LIBS= $(LIBS) -ltermlib -lsocket -lnsl -lm -lresolv -lpam"
3914
3915 # Solaris 9, 10, or 11 with OpenSSL built with Sun CC.
3916 # Here's an example of how to invoke this target in case your OpenSSL
3917 # headers and libraries are not in /usr/local:
3918 #
3919 # make solaris9+openssl "SSLINC=" "SSLLIB=" \
3920 #  "KFLAGS= -I/opt/openssl-0.9.8k/include -L/opt/openssl-0.9.8k/lib"
3921 #
3922 # Don't use 'make -e' because that inhibits passing of KFLAGS to
3923 # the base (solaris9) target.
3924 #
3925 #OK: 2011/06/14
3926 solaris9+ssl solaris10+ssl solaris11+ssl \
3927 solaris9+openssl solaris10+openssl solaris11+openssl:
3928         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: cc'
3929         @case `openssl version` in \
3930           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3931           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3932           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3933           *) OPENSSLOPTION="" ;; \
3934         esac ; \
3935         HAVE_DES=''; \
3936         DES_LIB=''; \
3937         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3938               DES_LIB='-ldes425'; \
3939               HAVE_DES='-DCK_DES -DLIBDES'; \
3940               echo "HAVE DES"; \
3941            else echo "NO DES"; \
3942         fi; \
3943         $(MAKE) "MAKE=$(MAKE)" solaris9 KTARGET=$${KTARGET:-$(@)} \
3944         "KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
3945         -DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
3946         "LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto  $(LIBS)"
3947
3948 # Solaris 9 or later with OpenSSL, built with gcc.
3949 # Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.  This target nicely
3950 # chains to the solaris{9,10,11}g target but for some reason it doesn't work if
3951 # you add the -DFORWARD_X option, thus the solaris9g+openssl+forward_x target.
3952 #
3953 #OK: 2009/09/25 (but not tested on Solaris 11)
3954 solaris9g+ssl solaris10g+ssl solaris11g+ssl \
3955 solaris9g+openssl solaris10g+openssl solaris11g+openssl:
3956         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: gcc'
3957         @case `openssl version` in \
3958           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3959           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3960           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3961           *) OPENSSLOPTION="" ;; \
3962         esac ; \
3963         HAVE_DES=''; \
3964         DES_LIB=''; \
3965         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3966               DES_LIB='-ldes425'; \
3967               HAVE_DES='-DCK_DES -DLIBDES'; \
3968               echo "HAVE DES"; \
3969            else echo "NO DES"; \
3970         fi; \
3971         $(MAKE) "MAKE=$(MAKE)" solaris9g KTARGET=$${KTARGET:-$(@)} \
3972         "KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
3973         -DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
3974         "LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto  $(LIBS)"
3975
3976 # Solaris 9 or later with gcc + OpenSSL + Shadow (32-bit).
3977 # Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.
3978 # Includes long file support - not sure if this was available before Solaris 9.
3979 # Detects Solaris version automatically.
3980 #
3981 solaris9g+openssl+forward_x:
3982         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with OpenSSL...'
3983         @case `openssl version` in \
3984           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3985           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3986           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3987           *) OPENSSLOPTION="" ;; \
3988         esac ; case `uname -r` in \
3989           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3990           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3991           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3992           *) SOLARISVERSION="-DSOLARIS" ;; \
3993         esac ; \
3994         $(MAKE) xermit  KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3995         "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION \
3996         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3997         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3998         -DSTERMIOX -DSELECT -DFNFLOAT -DBIGBUFOK -D_FILE_OFFSET_BITS=64 \
3999         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DLIBDES \
4000         -DFORWARD_X $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
4001         "LIBS= $(SSLLIB) -lpam -ldes425 -lz -ltermlib \
4002         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz $(LIBS)"
4003
4004 # These two should be folded in with the ones just above.
4005
4006 #Solaris 9 with gcc 3.1 + OpenSSL (32-bit)
4007 solaris9g+openssl+zlib+pam+shadow:
4008         $(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4009         KTARGET=$${KTARGET:-$(@)} \
4010         "KFLAGS=-DSOLARIS9 -DUSE_STRERROR $(KFLAGS)"
4011
4012 #Solaris 10 with gcc 3.1 + OpenSSL (32-bit)
4013 solaris10g+openssl+zlib+pam+shadow:
4014         $(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4015         KTARGET=$${KTARGET:-$(@)} \
4016         "KFLAGS=-DSOLARIS10 -DUSE_STRERROR $(KFLAGS)"
4017
4018 #The following (old, old) sunosxxx entries are for debugging and testing only.
4019
4020 sunos41x:
4021         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4022         "CFLAGS= -O -DSUNOS41 -DDIRENT -DNOTLOG -DNOMSEND \
4023         -DNOUUCP -DNOSIGWINCH -DNOREDIRECT -DNOPUSH -DNOCCTRAP \
4024         -DNOICP -DNOLOCAL $(KFLAGS)"
4025
4026 #SunOS 4.1.x, debugging with Pure Software, Inc., Purify 2 (commercial runtime
4027 #error-detection software for catching wild array references, etc).
4028 #Before running the resulting wermit, you'll also need to define and export
4029 #the following environment variables (as in this example):
4030 #PURIFYHOME=/usr/local/purify ; export PURIFYHOME
4031 #PURIFYCACHEDIR=/tmp ; export PURIFYCACHEDIR
4032 sunos41cp:
4033         @echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD / Curses / Purify...
4034         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4035         "CC2= purify -cache_dir=/usr/tmp cc" \
4036         "CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4037         -DSAVEDUID -DCK_CURSES $(KFLAGS)" \
4038         "LIBS= -lcurses -ltermcap"
4039
4040 #SunOS 4.1 with malloc debugger
4041 sunos41md:
4042         @echo Making C-Kermit $(CKVER) for SunOS 4.1 malloc debug...
4043         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
4044         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4045         -DSAVEDUID $(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG"
4046
4047 sunos41gmd:
4048         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
4049         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4050         "CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4051         -DNDGPWNAM -DSAVEDUID -DCK_CURSES -DRLOGCODE \
4052         $(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
4053         "LIBS= -lcurses -ltermcap"
4054
4055 #SunOS version 4.1, gcc, profiling with gprof, no debugging.
4056 #To get profile, "make sunos41p" (on Sun), then "./wermit".  After running
4057 #wermit, "gprof ./wermit | lpr" (or whatever) to get execution profile.
4058 sunos41p:
4059         @echo Making C-Kermit $(CKVER) for SunOS 4.x with profiling...
4060         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4061         "CFLAGS= -DSUNOS41 -DNODEBUG -DSAVEDUID -DDIRENT -DTCPSOCKET \
4062         -DNDGPWNAM $(KFLAGS) -pg" "LNKFLAGS = -pg"
4063
4064 #SunOS version 4.1 or later, BSD environment, minimum features.
4065 sunos41min:
4066         @echo Minimum interactive
4067         $(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
4068         "KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNORETRY \
4069         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS \
4070         -DNOSHOW -DNOSETKEY -DNOUUCP -DNORECALL -DNOREDIRECT \
4071         -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ \
4072         -DNONET -DCK_SMALL -DNOCKSPEED -DNOCKTIMERS -DNOLOGIN \
4073         -DNOCKXYZ -DNOKERBEROS -DNOMKDIR -DNOPATTERNS -DNOPERMS -DNOPIPESEND \
4074         -DNORECURSIVE -DNORENAME -DNORESEND -DNOSETKEY \
4075         -DNOTRIGGER -DNOTUNING $(KFLAGS)" "LNKFLAGS = -s"
4076
4077 #SunOS version 4.1, BSD environment, min size, command-line only...
4078 sunos41m:
4079         @echo Minimum size
4080         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4081         "KFLAGS=-DNOICP $(KFLAGS)"
4082
4083 #SunOS version 4.1, BSD environment, min size, cmd-line only, remote only...
4084 #
4085 sunos41mr:
4086         @echo Minimum size
4087         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4088         "KFLAGS=-DNOICP -DNOLOCAL $(KFLAGS)"
4089
4090 #SunOS version 4.1, BSD environment, min size, interactive...
4091 sunos41mi:
4092         @echo Minimum size
4093         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4094         "KFLAGS=-DNOCMDL $(KFLAGS)"
4095
4096 #SunOS version 4.1, BSD environment, min size, interactive, remote only...
4097 sunos41mir:
4098         @echo Minimum size
4099         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4100         "KFLAGS=-DNOCMDL -DNOLOCAL $(KFLAGS)"
4101
4102 #SunOS 4.1, System V R3 environment (-i option omitted).
4103 sunos41s5:
4104         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4105         @echo For testing purposes only - NOT for production use.
4106         @echo For a useable version, make sunos41 instead.
4107         $(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4108         KTARGET=$${KTARGET:-$(@)} \
4109         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN -DCK_POLL $(KFLAGS) -O"
4110
4111 #As above, but with curses support
4112 sunos41s5c:
4113         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4114         @echo Curses included.
4115         @echo For testing purposes only - NOT for production use.
4116         @echo For a useable version, make sunos41 instead.
4117         $(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4118         KTARGET=$${KTARGET:-$(@)} \
4119         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN \
4120         -DCK_POLL -DCK_CURSES -DCK_NEWTERM $(KFLAGS) -O" "LIBS= -lcurses"
4121
4122 #As above, but with curses support AND net support
4123 sunos41s5tcpc:
4124         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4125         @echo TCP/IP and curses included.  No debug log.
4126         @echo For testing purposes only - NOT for production use.
4127         @echo For a useable version, make sunos41 instead.
4128         $(MAKE) xermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4129         KTARGET=$${KTARGET:-$(@)} \
4130         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DCK_POLL \
4131         -DNODEBUG -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET $(KFLAGS) -O" \
4132         "LIBS= -lcurses -lresolv"
4133
4134 # (End of SunOS test entries...)
4135
4136 #Apollo with Domain SR10.0 or later, BSD environment
4137 #Reportedly, it might also help to add '-A,systype=bsd4.3' to CFLAGS.
4138 #Reportedly, there is also a problem with getc & putc macros that can
4139 #be handled by using '#ifdef apollo' somewhere to redefine them???
4140 #On the other hand, other reports indicate that it works fine as-is.
4141 #NOTE: This entry was previously like this:
4142 #       $(MAKE) wermit "CFLAGS= -DNOFILEH -DBSD4 $(KFLAGS) -Uaegis \
4143 #       -DTCPSOCKET -U__STDC__"
4144 #Reports (Dec 91) indicate SR10 has an ANSI-compliant C compiler,
4145 #in addition to an older one that claimed to be ANSI-compliant but wasn't.
4146 #The following make entry (plus checks that are made in ckcdeb.h) detect
4147 #which compiler is used and define the CK_ANSIC or NOANSI flags accordingly.
4148 sr10-bsd:
4149         @echo Making C-Kermit $(CKVER) for Apollo SR10.0 / BSD ...
4150         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4151         "CFLAGS= -O -DAPOLLOSR10 -DBSD43 -DTCPSOCKET -DCK_CURSES -DNOLEARN \
4152         -Uaegis $(KFLAGS)" "LIBS= -lcurses -ltermcap"
4153
4154 #Apollo with Domain SR10.0 or later, System V R3 environment.
4155 #Don't use the optimizer (-O), it causes problems at runtime.
4156 sr10-s5r3:
4157         @echo Making C-Kermit $(CKVER) for Apollo SR10.0 / Sys V R3 ...
4158         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4159         "CFLAGS= -DNOFILEH -DSVR3 -DAPOLLOSR10 -DNOLEARN $(KFLAGS) \
4160         -Uaegis -U__STDC__"
4161
4162 #Apollo Domain/IX (untested, try this if sr10-bsd doesn't work)
4163 # -DTCPSOCKET can probably be added here.
4164 apollobsd:
4165         @echo Making C-Kermit $(CKVER) for Apollo Domain/IX...
4166         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4167         "CC= /bin/cc " "CC2= /bin/cc " \
4168         "CFLAGS= -DNOFILEH -DBSD4 -DAPOLLOBSD -DNOLEARN $(KFLAGS) -Uaegis"
4169
4170 #Version 7 Unix (see comments near top of makefile)
4171 v7:
4172         @echo Making C-Kermit $(CKVER) for UNIX Version 7.
4173         @echo Read the makefile if you have trouble with this...
4174         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4175         "CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
4176         -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
4177         -DNPTYPE=$(NPTYPE) $(DIRECT) -DO_RDWR=2 -DO_NDELAY=0 -DO_SCCS_ID \
4178         -DNOLEARN $(KFLAGS)"
4179
4180 #AT&T UNIX System V R3, signal() is void rather than int.
4181 #Uses dirent.h and Honey DanBer UUCP.
4182 #Add the -i link option if necessary.
4183 #If you get errors like "ws_row undefined" in ckutio.c, add -DNONAWS.
4184 sys5r3:
4185         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4186         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4187         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4188         "LNKFLAGS="
4189
4190 #As above, plus curses.
4191 sys5r3c:
4192         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3 + curses...'
4193         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4194         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES -DNONAWS -DNOLEARN \
4195         $(KFLAGS) -O" "LNKFLAGS=" "LIBS = -ltermlib"
4196
4197 #System V R3.2 for PCs built on Interactive UNIX SV/386 R4.x
4198 #but with all calls to dup2() disabled because generic SVR3 does not have dup2.
4199 # (The -linet library might not need to be in this one.)
4200 sys5r32is:
4201         @echo 'Making C-Kermit $(CKVER) for System V/386 R32
4202         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
4203         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
4204         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES -DNONAWS \
4205         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD -DNOFDZERO -DNOREDIRECT \
4206         -DNOZEXEC -DNOLEARN $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
4207
4208 #System V R3.2 for PCs built on Interactive UNIX SV/386 R4.x
4209 #but with all calls to dup2() disabled because generic SVR3 does not have dup2.
4210 #With TCP/IP added.
4211 sys5r32isnet:
4212         @echo 'Making C-Kermit $(CKVER) for System V/386 R32 + TCP/IP
4213         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
4214         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
4215         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES -DNONAWS \
4216         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD -DNOFDZERO -DNOREDIRECT \
4217         -DNOLEARN -DNOZEXEC -DTCPSOCKET $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
4218
4219 iclsys5r3:
4220         make sys5r3 KTARGET=$${KTARGET:-$(@)} KFLAGS=-DICLSVR3
4221
4222 #AT&T UNIX System V R3.  As above, but no ANSI prototyping.
4223 sys5r3na:
4224         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4225         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4226         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOANSI -DNOLEARN $(KFLAGS) -O" \
4227         "LNKFLAGS="
4228
4229 #AT&T UNIX System V R3, for 3B computers with Wollongong TCP/IP.
4230 sys5r3net3b:
4231         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX SVR3/3B/Wollongong...'
4232         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4233         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DWOLLONGONG -DNOLEARN $(KFLAGS) \
4234         -O" "LIBS= -lnet -lnsl_s" "LNKFLAGS ="
4235
4236 #AT&T UNIX System V R3, signal() is void rather than int.
4237 #Uses dirent.h and Honey DanBer uucp, has <termiox.h>.
4238 #Has <termiox.h> for RTS/CTS flow control.
4239 sys5r3tx:
4240         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4241         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4242         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN \
4243         $(KFLAGS) -i -O" "LNKFLAGS ="
4244
4245 #AT&T UNIX System V R3, signal() is void rather than int.
4246 #Uses dirent.h and Honey DanBer uucp, has <termiox.h>.
4247 #Has <sys/termiox.h> for RTS/CTS flow control.
4248 sys5r3sx:
4249         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4250         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4251         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4252         $(KFLAGS) -i -O" "LNKFLAGS ="
4253
4254 #AT&T UNIX System V R4.
4255 #Has <termiox.h>.
4256 sys5r4:
4257         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4258         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4259         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN $(KFLAGS)" \
4260         "LNKFLAGS = -s"
4261
4262 #AT&T UNIX System V R4 with Wollongong TCP/IP.
4263 #Has <termiox.h>.
4264 sys5r4net:
4265         @echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4266         @echo ' If sockets-library routines are missing at link time, then'
4267         @echo ' try the sys5r4net2 entry.'
4268         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4269         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4270         -DTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4271
4272 #As above, but needs libs included.
4273 sys5r4net2:
4274         @echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4275         @echo ' (Search for WOLLONGONG...)'
4276         $(MAKE) sys5r4net KTARGET=$${KTARGET:-$(@)} "LIBS= -lsocket -lnsl"
4277
4278 #As above plus curses.
4279 sys5r4net2c:
4280         echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4281         @echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4282         @echo ' (Search for WOLLONGONG...)'
4283         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4284         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4285         -DTERMIOX -DWOLLONGONG -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4286         "LIBS= -lsocket -lnsl -lcurses"
4287
4288 #DELL UNIX System V R4.
4289 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4290 #are not misplaced in sys (rather than netinet and arpa, respectively).
4291 #Uses ANSI C constructs, advisory file locking on devices, etc.
4292 #Warning: -DSTERMIOX enables hardware flow control (RTS/CTS), but reportedly
4293 #this does not work with the normal drivers.  However, it might still work
4294 #on non-Dell systems, or even Dell systems with different drivers installed.
4295 dellsys5r4:
4296         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4297         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4298         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4299         -DTCPSOCKET -DSTERMIOX -DCK_POLL $(KFLAGS)" \
4300         "LIBS= -lsocket -lnsl" "LNKFLAGS = -s"
4301
4302 #As above, curses support added...
4303 dellsys5r4c:
4304         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4305         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4306         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4307         -DTCPSOCKET -DSTERMIOX -DCK_CURSES -DCK_POLL \
4308         $(KFLAGS)" "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4309
4310 #Minimum interactive: As above, but with every conceivable option removed.
4311 dellsys5r4mi:
4312         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4313         @echo 'Minimum-size interactive'
4314         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4315         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4316         -UTCPSOCKET -DNOCMDL -DNOSPL -DNOXMIT -DCK_POLL \
4317         -DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4318         -DNOSCRIPT -DNOCSETS -DNOSHOW -DNOSETKEY -DNOSERVER -DNOUUCP \
4319         -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ  \
4320         $(KFLAGS)" "LNKFLAGS = -s"
4321
4322 #Command-line only version.
4323 dellsys5r4m:
4324         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4325         @echo 'Command-line only'
4326         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4327         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4328         -UTCPSOCKET -DNOICP -DNOFRILLS -DNODIAL -DNODEBUG -DNOTLOG -DNOCSETS \
4329         -DNOSETKEY -DNOESCSEQ -DNOJC -DNOFDZERO -DCK_POLL \
4330         $(KFLAGS)" "LNKFLAGS = -s"
4331
4332 #AT&T UNIX System V R4.
4333 #Has <sys/termiox.h>.
4334 sys5r4sx:
4335         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4336         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4337         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4338         $(KFLAGS)" "LNKFLAGS = -s" "LIBS=$(LIBS)"
4339
4340 #AT&T UNIX System V R4.
4341 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4342 #are not misplaced in sys (rather than netinet and arpa, respectively).
4343 #Uses ANSI C constructs, <sys/termiox.h>, etc etc.
4344 sys5r4sxtcp:
4345         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4346         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4347         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4348         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4349         "LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4350
4351 #AT&T UNIX System V R4.
4352 #As above + curses.
4353 sys5r4sxtcpc:
4354         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4355         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4356         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4357         -DSTERMIOX  -DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4358         "LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)" "LNKFLAGS = -s"
4359
4360 #AT&T UNIX System V R4.  CONSENSYS SVR4.2-1.
4361 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4362 #are not misplaced in sys (rather than netinet and arpa, respectively).
4363 #Uses ANSI C constructs, <sys/termiox.h>, etc.
4364 # Fullscreen -DCK_CURSES added (with curses & termcap libs)
4365 # Submission by Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu
4366 sys5r4sxtcpf:
4367         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4368         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4369         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4370         -DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
4371         "LIBS= -lsocket -lnsl -L/usr/ccs/lib -lcurses -ltermcap" \
4372         "LIBS=$(LIBS)" "LNKFLAGS = -s"
4373
4374 #Smallest possible version for System V R4
4375 s5r4m:
4376         @echo Minimum size
4377         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4378         "KFLAGS=$(KFLAGS) -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4379         -DNOSCRIPT -DNOCSETS -DNOICP -DNOMSEND -UTCPSOCKET" "LNKFLAGS = -s"
4380
4381 #Smallest possible interactive version of above
4382 s5r4mi:
4383         @echo Minimum interactive
4384         $(MAKE) "MAKE=$(MAKE)" sys5r4sx \
4385         "KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNOSHOW \
4386         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOSETKEY \
4387         -UTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
4388
4389 #AT&T UNIX System V R4, has <sys/termiox.h>
4390 #ANSI C function prototyping disabled.
4391 sys5r4sxna:
4392         @echo No ANSI C prototyping...
4393         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4394         "KFLAGS=$(KFLAGS) -DNOANSI"
4395
4396 #Stratus FTX.
4397 ftx:
4398         @echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4399         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4400         "CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DSTERMIOX \
4401         -DNOGETUSERSHELL -DNOLEARN +DA1.1 $(KFLAGS)" \
4402         "LNKFLAGS = -s" "LIBS=$(LIBS)"
4403
4404 #Stratus FTX + TCP/IP.
4405 ftxtcp:
4406         @echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4407         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4408         "CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4409         -DSTERMIOX -DTCPSOCKET -DNO_DNS_SRV +DA1.1 $(KFLAGS)" \
4410         "LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4411
4412 #NCR MP-RAS 2.03 or 3.02
4413 mpras:
4414         @echo 'Making C-Kermit $(CKVER) for NCR MP-RAS...'
4415         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4416         "CFLAGS = -O -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX \
4417         -DNOGETUSERSHELL -DUSE_FILE__CNT -DNOLEARN -DNO_DNS_SRV $(KFLAGS)" \
4418         "LNKFLAGS = -s" "LIBS=$(LIBS)"
4419
4420 #NCR MP-RAS 2.03 or 3.02 with TCP/IP and curses
4421 mprastcpc:
4422         @echo 'Making C-Kermit $(CKVER) for NCR MP-RAS + TCP/IP + curses...'
4423         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CFLAGS=-DTCPSOCKET \
4424         -DCK_CURSES -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4425         -DNOGETUSERSHELL -DNO_DNS_SRV DUSE_FILE__CNT -O $(KFLAGS)" \
4426         "LNKFLAGS = -s" "LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)"
4427
4428 #SINIX-L V5.41 - includes curses, tcp/ip - Use this one for i386.
4429 #This version of SINIX doesn't like fdopen() or popen().
4430 sinix541:
4431         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX V5.41/i386'
4432         $(MAKE) ckcpro.$(EXT) "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP \
4433         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV \
4434         -DSNI541 -DNOGETUSERSHELL -DNONETCMD -DNOPOPEN -kansi -W0 $(KFLAGS)"
4435         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4436         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DNOPOPEN \
4437         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4438         -DSNI541 -DNOGETUSERSHELL -DNONETCMD -kansi -W0 -O $(KFLAGS)" \
4439         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4440
4441 sinix541i:
4442         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sinix541
4443
4444 #SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for MIPS.
4445 # As of C-Kermit 7.1, optimization removed -- takes (literally) forever.
4446 sinix542:
4447         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4448         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4449         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4450         -DSNI542 -DNOGETUSERSHELL -kansi -W0 $(KFLAGS)" \
4451         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4452
4453 #SINIX V5.42 gcc - includes curses, tcp/ip, everything.
4454 #This one was used to build the Pyramid-architecture RM600 version
4455 #on SINIX-P 5.42 A10 with gcc but should work for SINIX 5.42 on any other
4456 #architecture with gcc.
4457 sinix542g:
4458         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4459         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4460         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4461         -DSNI542 -DNOGETUSERSHELL $(KFLAGS)" \
4462         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4463         "LNKFLAGS = -s"
4464
4465 #SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for Intel.
4466 # (Note: SNI discontinued Intel support after 5.42.)
4467 sinix542i:
4468         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX-Z V5.42...'
4469         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4470         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DFNFLOAT -DSTERMIOX \
4471         -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV -kansi \
4472         -DSNI542 $(KFLAGS)" \
4473         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4474         "LNKFLAGS = -s"
4475
4476 #Siemens Nixdorf Reliant UNIX V5.43 - includes curses, tcp/ip, everything:
4477 # . gettimeofday() suddenly has only one arg instead of two (GTODONEARG).
4478 # . The syntax of the Olimit specifier changed.
4479 # . The name was changed from SINIX to Reliant UNIX in version 5.43C.
4480 sni543:
4481         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.43'
4482         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4483         "CFLAGS = -DSINIX -DSNI543 -DSVR4 -DDIRENT -DHDBUUCP \
4484         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4485         -DNO_DNS_SRV -kansi -W0 -O -F Olimit,3100 $(KFLAGS)" \
4486         "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4487
4488 #Siemens Nixdorf Reliant UNIX V5.44 - Like 5.43 but with different banner.
4489 sni544:
4490         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.44'
4491         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4492         "CFLAGS = -DSINIX -DSNI544 -DSVR4 -DDIRENT -DHDBUUCP \
4493         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4494         -DNO_DNS_SRV -kansi -W0 -O -K Olimit,3100 $(KFLAGS)" \
4495         "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4496
4497 #Commodore Amiga with AT&T UNIX System V R4 and TCP/IP support.
4498 #Has <sys/termiox.h>.
4499 svr4amiganet:
4500         @echo 'Making C-Kermit $(CKVER) for Amiga SVR4 + TCP/IP...'
4501         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4502         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX \
4503         -DTCPSOCKET -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4504         "LIBS = -lsocket -lnsl -ltermlib"
4505
4506 #SCO (Novell (Univel)) UnixWare 1.x or 2.0, no TCP/IP.
4507 #This assumes the Novell SDK 1.0, which has <sys/termiox.h>.
4508 #UnixWare users with the "Prime Time Freeware" CD-ROM SDK will probably have
4509 #to use the sys5r4 entry (no termiox.h file, so no hardware flow control).
4510 #Change -DSELECT to -DCK_POLL if -DSELECT causes problems.
4511 # NOTE: Unixware 1.x builds have not been tried in C-Kermit 7.0.
4512 unixware:
4513         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4514         "KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4515         -DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt"
4516
4517 #UnixWare 1.x or 2.0 with TCP/IP and curses.
4518 #fork()-based CONNECT - no high serial speeds.
4519 unixwarenetc:
4520         $(MAKE) "MAKE=$(MAKE)" sys5r4sxtcpc KTARGET=$${KTARGET:-$(@)} \
4521         "KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4522         -DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt -lresolv"
4523
4524 uw10:
4525         $(MAKE) unixwarenetc KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4526
4527 #This is for Unixware 2.0.x only - use unixware21 for UW 2.1.x.
4528 #Has special library search and enables special kludge around library
4529 #foulup regarding vfork() (which Kermit doesn't use).  Forces POSIX-style
4530 #hangup.
4531 unixware20:
4532         @echo 'Making C-Kermit $(CKVER) for UnixWare 2.0.x...'
4533         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4534         "CFLAGS = -O -DOLD_UNIXWARE -DUNIXWARE2 -DSELECT -DSVR4 -DDIRENT \
4535         -DHDBUUCP -DBIGBUFOK -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES \
4536         -DTCPSOCKET -DUW200 -DFNFLOAT -DCK_NEWTERM -DNOSYSLOG $(KFLAGS)" \
4537         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lgen -lm -lresolv" \
4538         "LNKFLAGS = -s"
4539
4540 uw20:
4541         $(MAKE) unixware20 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4542
4543 #Adds big buffers ("large memory model") - otherwise the same as UnixWare 1.x.
4544 unixware21:
4545         @echo 'Making C-Kermit $(CKVER) for UnixWare 2.1.x...'
4546         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4547         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4548         -DNOSYSLOG -DSTERMIOX  -DCK_CURSES -DTCPSOCKET \
4549         -DCK_NEWTERM -DFNFLOAT -DUNIXWARE2 $(KFLAGS)" \
4550         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4551         $(LIBS)" "LNKFLAGS = -s"
4552
4553 #Unixware 2.1.0
4554 uw21:
4555         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4556
4557 #Unixware 2.1.3
4558 uw213:
4559         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4560         "KFLAGS=-DUSE_FILE__CNT $(KFLAGS)"
4561
4562 #Unixware 2.1 with IKSD support
4563 uw21iksd:
4564         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4565         "KFLAGS=-DCK_SHADOW $(KFLAGS)" "LIBS= -lgen"
4566
4567 #UnixWare 7 with tc[gs]etspeed() high serial speeds & select()-based CONNECT
4568 #and as of C-Kermit 8.0.212, large file support (LFS).
4569 #NOTE: This is the one we use.
4570 unixware7t:
4571         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4572         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4573         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4574         -DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4575         -DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4576         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNEEDMDMDEFS $(KFLAGS)" \
4577         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4578         "LNKFLAGS = -s"
4579
4580 #UnixWare 7 - select()-based CONNECT - no POSIX i/o - no high serial speeds.
4581 #In other words, just like the UnixWare 1 and 2 builds.
4582 unixware7x:
4583         @echo 'Making C-Kermit $(CKVER) for UnixWare 7...'
4584         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4585         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4586         -DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4587         -DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4588         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4589         "LNKFLAGS = -s"
4590
4591 #UnixWare 7 with POSIX cfset[oi]speed() to allow high serial speeds.
4592 #(but the high speeds don't work)
4593 unixware7p:
4594         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4595         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4596         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4597         -DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4598         -DFNFLOAT -DCK_NEWTERM -DNOLSTAT $(KFLAGS)" \
4599         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4600         "LNKFLAGS = -s"
4601
4602 # UnixWare 7 built with gcc - This does not work at all...
4603 # Reportedly gcc 2.8.1 is broken on Unixware 7.  Try egcs?
4604 unixware7g:
4605         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with gcc...'
4606         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4607         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
4608         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4609         -DUW7 -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4610         -DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4611         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4612         "LNKFLAGS = -s"
4613
4614 unixware7:
4615         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4616         KTARGET=$${KTARGET:-$(@)}
4617
4618 uw7:
4619         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4620         KTARGET=$${KTARGET:-$(@)}
4621
4622 #SCO OpenUNIX 8.0
4623 ou8:
4624         @echo 'Making C-Kermit $(CKVER) for Open UNIX 8...'
4625         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DOU8 $(KFLAGS)" unixware7t \
4626         KTARGET=$${KTARGET:-$(@)}
4627
4628 #UnixWare 7 with OpenSSL
4629 uw7ssl uw7+ssl:
4630         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 and OpenSSL...'
4631         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4632         "CFLAGS = -O -DCK_AUTHENTICATION -DCK_SSL -DCK_SHADOW \
4633         -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4634         -DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4635         -DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4636         $(SSLINC) $(KFLAGS)" \
4637         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4638         -lgen -lcudk70 $(SSLLIB) -lssl -lcrypto $(LIBS)" \
4639         "LNKFLAGS = -s"
4640
4641 #As above but includes Shadow password support needed for IKSD.
4642 uw7iksd:
4643         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4644         KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen" unixware7t
4645
4646 #As above but links with static API for realpath() so a binary built
4647 #with this target on UW7.1 will also work on 7.0.  Requires SCO UDK
4648 #rather than the stock compiler.
4649 uw7iksdudk:
4650         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4651         KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen -lcudk70" unixware7t
4652
4653 #ESIX SVR4.0.3 or 4.04 with TCP/IP support.
4654 #Has <sys/termiox.h>, ANSI C function prototyping disabled.
4655 #Add -m486 to CFLAGS if desired.
4656 esixr4:
4657         @echo 'Making C-Kermit $(CKVER) for ESIX SVR4 + TCP/IP...'
4658         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4659         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOANSI \
4660         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s" \
4661         "LIBS = -lsocket -lnsl"
4662
4663 #AT&T UNIX System V R4.
4664 #Has <sys/termiox.h>, Wollongong WIN/TCP TCP/IP.
4665 sys5r4sxnet:
4666         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4667         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4668         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4669         -DSTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4670
4671 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>.
4672 sys5r4nx:
4673         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4674         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4675         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS)" \
4676         "LNKFLAGS = -s"
4677
4678 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, curses, TCP/IP.
4679 sys5r4nxnetc:
4680         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4681         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4682         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4683         -DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4684         "LIBS = -lcurses -lsocket -lnsl -ltcpip" \
4685         "LNKFLAGS = -s"
4686
4687 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, Wollongong TCP/IP.
4688 sys5r4nxtwg:
4689         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4690         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4691         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DWOLLONGONG $(KFLAGS)"
4692         "LNKFLAGS = -s"
4693
4694 #ICL UNIX System V R4.(DRS N/X) version :-
4695 #UNIX System V Release 4.0 ICL DRS 6000 (SPARC)
4696 #DRS/NX 6000 SVR4 Version 5  Level 1  Increment 4
4697 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4698 #are not misplaced in sys (rather than netinet and arpa, respectively).
4699 #Uses ANSI C constructs, advisory file locking on devices, etc.
4700 #Remove -lnsl if it causes trouble.
4701 iclsys5r4:
4702         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 (DRS N/X)'
4703         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4704         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4705         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4706         "LIBS= -lsocket -lnsl -lresolv " "LNKFLAGS = -s"
4707
4708 #As above but for DRS/NX 4.2MP 7MPlus.
4709 iclsys5r4m+:
4710         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4711         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4712         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOIKSD \
4713         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4714         "LIBS= -lsocket -lnsl -lm -lc -g -lgen " "LNKFLAGS = -s"
4715
4716 #As above but for DRS/NX 4.2MP 7MPlus with IKSD support.
4717 iclsys5r4m+iksd:
4718         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4719         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4720         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4721         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4722         "LIBS= -lsocket -lnsl -lm -lc -g -lgen -lresolv " "LNKFLAGS = -s"
4723
4724 iclsys5r4_486:
4725         $(MAKE) "MAKE=$(MAKE)" iclsys5r4 KTARGET=$${KTARGET:-$(@)}
4726
4727 #Data General DG/UX 4.30 (System V R3) for DG AViiON, with TCP/IP support.
4728 dgux430:
4729         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4730         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4731         "CFLAGS = -O -DDGUX430 -DSVR3 -DDIRENT -DTCPSOCKET \
4732         -DNOINADDRX -DNOGETUSERSHELL $(KFLAGS)"
4733
4734 #Data General DG/UX 4.30 for DG AViiON, with TCP/IP support with BSDisms.
4735 dgux430bsd:
4736         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4737         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4738         "CFLAGS = -O -DDGUX430 -D_BSD_SOURCE -DBSD4 \
4739         -DNOINADDRX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)"
4740
4741 #Data General DG/UX 5.4 (System V R4) for DG AViiON, with TCP/IP support.
4742 #Add -lsocket -lnsl if inet_addr comes up missing...
4743 #Hmmm - I really think CK_POLL can be removed from this one in which case
4744 #there is no difference between dgux540 and dgux540i.
4745 dgux540:
4746         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4747         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4748         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4749         -DSTERMIOX -DTCPSOCKET -DCK_POLL -DNOGETUSERSHELL $(KFLAGS)"
4750
4751 #Data General DG/UX 5.40 (System V R4) for Intel AViiON, with TCP/IP support.
4752 dgux540i:
4753         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4754         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4755         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4756         -DSTERMIOX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)" \
4757         "LIBS = -lsocket -lnsl"
4758
4759 dgux54:
4760         make dgux540 KTARGET=$${KTARGET:-$(@)}
4761
4762 #Data General DG/UX 5.4 (= System V R4) for DG AViiON, with TCP/IP support.
4763 # And curses.
4764 dgux540c:
4765         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4...'
4766         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4767         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4768         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4769         $(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4770
4771 #As above but for Intel - only difference is name library names.
4772 dgux540ic:
4773         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4774         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4775         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4776         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4777         $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4778
4779 dgux54c:
4780         make dgux540c KTARGET=$${KTARGET:-$(@)}
4781
4782 #DG/UX 5.4R3.10
4783 dgux54310:
4784         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4R3...'
4785         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4786         "CFLAGS = -DDGUX540 -DDGUX54310 -DDIRENT -DHDBUUCP -DSELECT \
4787         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4788         -DNOINADDRX $(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4789
4790 #DG/UX 5.4R4.10 - Includes everything.
4791 dgux54410:
4792         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.10...'
4793         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4794         "CFLAGS = -O -DDGUX540 -DDGUX54410 -DDIRENT -DHDBUUCP -DSELECT \
4795         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4796         -DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4797
4798 #DG/UX 5.4R4.11 - Includes everything.
4799 dgux54411:
4800         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.11...'
4801         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4802         "CFLAGS = -O -DDGUX540 -DDGUX54411 -DDIRENT -DHDBUUCP -DSELECT \
4803         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4804         -DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4805
4806 #DG/UX 5.4R4.20 - Includes everything.
4807 dgux54420:
4808         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.20...'
4809         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4810         "CFLAGS = -O -DDGUX540 -DDGUX54420 -DDIRENT -DHDBUUCP -DSELECT \
4811         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4812         -DNOINADDRX $(KFLAGS)" \
4813         "LIBS = -lsocket -lresolv -lnsl -lcurses -ltermcap"
4814
4815 #Silicon Graphics System V R3 with BSD file system (IRIS)
4816 iris:
4817         @echo Making C-Kermit $(CKVER) for Silicon Graphics IRIX pre-3.3...
4818         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4819         "CFLAGS = -O -DSVR3 -DLONGFN -DNOLEARN $(KFLAGS) -I/usr/include/bsd" \
4820         "LIBS = -lbsd"
4821
4822 #Silicon Graphics IRIS System V R3
4823 irix33:
4824         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 3.3...'
4825         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4826         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4827         "LNKFLAGS = -s"
4828
4829 #Silicon Graphics Iris Indigo with IRIX 4.0.0 or 5.0...
4830 #Strict ANSI C compilation, TCP/IP support included
4831 irix40:
4832         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4833         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4834         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4835         -DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O -Olimit 1600 -I/usr/include/bsd" \
4836         "LNKFLAGS = -s"
4837
4838 #As above, but with fullscreen display (curses) and Sun Yellow Pages support.
4839 #NOTE: IRIX versions prior to 5 run COFF binaries.
4840 irix40ypc:
4841         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0.'
4842         @echo 'Includes fullscreen file display and Sun Yellow Pages...'
4843         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4844         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES \
4845         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET $(KFLAGS) \
4846         -O -Olimit 1600 -I/usr/include/bsd" \
4847         "LIBS = -lcurses -lsun" "LNKFLAGS = -s"
4848
4849 # Silicon Graphics Iris Series 4D/*, IRIX 4.0.x, -O4 ucode optimized.
4850 # Huge temporary file space needed for ucode optimizer.  If you get an error
4851 # like "ugen: internal error writing to /tmp/ctmca08777: Error 0", define the
4852 # the TMPDIR environment variable to point to a file system that has more
4853 # space available, e.g. "setenv TMPDIR /usr/tmp".
4854 irix40u:
4855         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4856         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4857         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4858         -DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4859         "LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u"
4860
4861 # As above, with Curses Support added
4862 irix40uc:
4863         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4864         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4865         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4866         -DCK_ANSIC -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4867         "LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u" "LIBS= -lcurses -ltermcap"
4868
4869 #Silicon Graphics IRIX 5.x.
4870 #Yellow Pages and Curses support included.
4871 #IRIX version 5.x can run COFF or ELF binaries.
4872 irix51:
4873         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 5.x'
4874         @echo 'Includes fullscreen file display and Yellow Pages...'
4875         @echo 'Add -mips<n> to CFLAGS specify a particular hardware target.'
4876         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4877         "CFLAGS = -DIRIX51 -DSVR4 -DDIRENT -DHDBUUCP -DCK_CURSES -DCK_NEWTERM \
4878         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET -DSELECT -DNOGETUSERSHELL \
4879         -DSYSTIMEH -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) -ansi -O -Olimit 3000" \
4880         "LIBS = -lcurses" "LNKFLAGS = -s"
4881
4882 #Use this one if irix51 blows up due to lack of swap space or whatever.
4883 irix51x:
4884         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 5.x'
4885         @echo 'Includes fullscreen file display and Yellow Pages...'
4886         @echo 'Add -mips<n> to CFLAGS specify a particular hardware target.'
4887         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4888         "CFLAGS = -DIRIX51 -DSVR4 -DDIRENT -DHDBUUCP -DCK_CURSES -DCK_NEWTERM \
4889         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET -DSELECT -DNOGETUSERSHELL \
4890         -DSYSTIMEH -DDCLPOPEN -DDCLFDOPEN $(KFLAGS)" \
4891         "LIBS = -lcurses" "LNKFLAGS = -s"
4892
4893 irix51ypc:
4894         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4895         "KFLAGS= $(KFLAGS)"
4896
4897 #IRIX 5.2 adds RTS/CTS
4898 irix52:
4899         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4900         "KFLAGS=-DIRIX52 -DCK_RTSCTS $(KFLAGS)"
4901
4902 irix53:
4903         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4904         "KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4905
4906 irix53x:
4907         $(MAKE) "MAKE=$(MAKE)" irix51x KTARGET=$${KTARGET:-$(@)} \
4908         "KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4909
4910 #Silicon Graphics IRIX 6.[024] common stuff.
4911 #Yellow Pages and Curses support included.
4912 #IRIX version 6.0 and later runs only ELF binaries.
4913 #Depends on code changes in ckcdeb.h that make -DIRIX6x define all
4914 #lower IRIX6x values and IRIX51.
4915 irix6x:
4916         @echo 'Includes fullscreen file display and Yellow Pages...'
4917         @echo 'Add -mips<n> to specify a particular hardware target.'
4918         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4919         "CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4920         -DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET \
4921         -DSELECT -DCK_RTSCTS -O $(KFLAGS)" \
4922         "LIBS = -lcurses" "LNKFLAGS = -s $(LNKFLAGS)"
4923
4924 #Silicon Graphics IRIX 6.0.
4925 irix60:
4926         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.0'
4927         @$(MAKE) "MAKE=$(MAKE)" \
4928         "KFLAGS=-DIRIX60 -Olimit 2138 $(KFLAGS)" \
4929         irix6x KTARGET=$${KTARGET:-$(@)}
4930
4931 #Silicon Graphics IRIX 6.2.
4932 #Serial speeds > 38400 are available in IRIX 6.2 on O-class machines only.
4933 #Note: Olimit must be a number > 0.
4934 irix62:
4935         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.2'
4936         @$(MAKE) "MAKE=$(MAKE)" \
4937         LNKFLAGS="-Wl,-woff,84" \
4938         "KFLAGS=-DIRIX62 -Olimit 4700 $(KFLAGS)" \
4939         irix6x KTARGET=$${KTARGET:-$(@)}
4940
4941 #Silicon Graphics IRIX 6.3.
4942 irix63:
4943         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.3'
4944         @$(MAKE) "MAKE=$(MAKE)" irix62 KTARGET=$${KTARGET:-$(@)} \
4945         "KFLAGS=-DIRIX63"
4946
4947 #Silicon Graphics IRIX 6.4.
4948 # -woff,84 to linker stops complaints about no symbols loaded from
4949 # curses, and -woff 1110 stops complaints about unreachable "break;"
4950 # statements in ckcpro.c among others.
4951 # tested on SGI Octane, running IRIX 6.4 up to 115200 bps.
4952 # -Olimit 0 means infinite.
4953 irix64:
4954         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4'
4955         @$(MAKE) "MAKE=$(MAKE)" \
4956         LNKFLAGS="-Wl,-woff,84" \
4957         "KFLAGS=-DIRIX64 -DCK_RTSCTS -Olimit 3000 -woff 1110 $(KFLAGS)" \
4958         irix6x KTARGET=$${KTARGET:-$(@)}
4959
4960 irix64gcc:
4961         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4 gcc'
4962         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
4963         "CFLAGS= -DSVR4 -DIRIX64 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4964         -DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
4965         -DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
4966         $(KFLAGS) -O" "LIBS= -lcurses -ltermcap -lcrypt"
4967
4968 #Note the new Optimization option syntax for MIPSpro CC 7.2.1.2m.
4969 #See note on irix65gcc target about Large File Support (LFS).
4970 irix65:
4971         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
4972         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
4973         "KFLAGS=-DIRIX65 -D_LARGEFILE_SOURCE -DCK_RTSCTS -OPT:Olimit=0 \
4974         -woff 1110,1552,1174 $(KFLAGS)" \
4975         irix6x KTARGET=$${KTARGET:-$(@)}
4976
4977 #Build for those that have GCC instead of MIPSpro.
4978 #
4979 # Large File Support note: use the define _LARGEFILE_SOURCE to enable support
4980 # for files larger than 2GB.  This may work on releases of Irix prior to
4981 # 6.5.xx.  To verify, check the man page for fstat and verify that off_t is a
4982 # 64 bit value for an -n32 build.  Also check the manpage for fseek and ftell
4983 # to verify that the fseek64 and ftell64 functions are provided.  If so, then
4984 # LFS support should work and you can try adding -D_LARGEFILE_SOURCE to CFLAGS
4985 # for your selected Irix target.
4986 #
4987 irix65gcc:
4988         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 with gcc'
4989         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4990         "CC = gcc" "CC2 = gcc" \
4991         "CFLAGS= -DSVR4 -DIRIX65 -D_LARGEFILE_SOURCE -DDIRENT -DHDBUUCP \
4992         -DNOGETUSERSHELL -DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
4993         -DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
4994         $(KFLAGS) -O" "LIBS= -lcurses"
4995
4996 # The 64-bit IRIX target works but presumably is no longer needed given the
4997 # large file support in the more portable and compact 32-bit version.
4998 irix65_64:
4999         @echo 'Making C-Kermit $(CKVER) 64-bit for SGI IRIX 6.5'
5000         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
5001         "KFLAGS=-DIRIX65 -64 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5002         -DCK_64BIT $(KFLAGS)" \
5003         irix6x KTARGET=$${KTARGET:-$(@)}
5004
5005 #Dumb down to MIPS-2 if building on R5000 or higher...
5006 irix65mips2:
5007         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 MIPS-2'
5008         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-o32 -mips2 -Wl,-woff,84" \
5009         "KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -o32 -mips2 \
5010         -woff 1110,1552,1174 $(KFLAGS)" \
5011         irix6x KTARGET=$${KTARGET:-$(@)}
5012
5013 #Special target that adds srp, ssl, and zlib support.  This requires
5014 #that you have pkgsrc installed instead of Irix Freeware.  See
5015 #NetBSD.org for pkgsrc for Irix.  You will need to BUILD the srp_client
5016 #package yourself.  Install it manually using the directions found
5017 #in the netbsds+ssl+srp+zlib target comments.
5018 irix65+ssl+srp+zlib:
5019         @echo 'Making C-Kermit $(CKVER) for IRIX 6.5 with gcc and SSL SRP ZLIB'
5020         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5021         "CC = gcc" "CC2 = gcc" \
5022         "CFLAGS= -DIRIX65 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL -DSELECT \
5023         -DTCPSOCKET -DNOCOTFMC -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC \
5024         -I/usr/pkg/include -DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 \
5025         -DCK_RTSCTS -DCK_NCURSES -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DCK_SSL \
5026         -DLIBDES -DZLIB -DFNFLOAT -I/usr/pkg/include/openssl $(KFLAGS) -O" \
5027         "LIBS= -L/usr/pkg/lib -rpath /usr/pkg/lib -lncurses -lsrp -lgmp -ldes \
5028         -lssl -lkrypto -lcrypto -lcrypt -lz -lm"
5029
5030 irix6x+krb5:
5031         @echo 'Includes fullscreen file display and Yellow Pages...'
5032         @echo 'Add -mips<n> to specify a particular hardware target.'
5033         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5034         "CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
5035         -DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET\
5036         -DSELECT -DCK_RTSCTS -O \
5037         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DCK_ENCRYPTION -DCK_DES \
5038         $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
5039         "LIBS = -lcurses $(K5LIB) -ldes425 -lkrb5 \
5040         -lcom_err -lcrypto -lcrypt -lgssapi_krb5" \
5041         "LNKFLAGS = -s $(LNKFLAGS)"
5042
5043 irix65+krb5:
5044         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
5045         @$(MAKE) "MAKE=$(MAKE)" \
5046         LNKFLAGS="-Wl,-woff,84" \
5047         "KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5048         $(KFLAGS)" \
5049         irix6x+krb5 KTARGET=$${KTARGET:-$(@)}
5050
5051 #In case they type "make sys5"...
5052 sys5:
5053         $(MAKE) "MAKE=$(MAKE)" sys3 KTARGET=$${KTARGET:-$(@)}
5054
5055 #Generic ATT System III or System V (with I&D space)
5056 sys3:
5057         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5058         @echo 'or System V R2 or earlier...'
5059         @echo 'add -DNOMKDIR if mkdir is an undefined symbol.'
5060         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5061         "CFLAGS = -DATTSV -DNOUNICODE -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL \
5062         -DNOINITGROUPS -DNOFTRUNCATE -DNOREALPATH -DNOLEARN $(KFLAGS) -i -O" \
5063         "LNKFLAGS = -i"
5064
5065 #Generic ATT System III or System V (no I&D space)
5066 sys3nid:
5067         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5068         @echo 'or System V R2 or earlier, no I&D space...'
5069         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5070         "CFLAGS = -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOSYMLINK \
5071         -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE -DNOLEARN $(KFLAGS) -O" \
5072         "LNKFLAGS ="
5073
5074 #Generic ATT System III or System V R2 or earlier, "no void":
5075 #special entry to remove "Illegal pointer combination" warnings.
5076 sys3nv:
5077         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5078         @echo 'or System V R2 or earlier...'
5079         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5080         "CFLAGS= -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOGETUSERSHELL \
5081         -DNOSYMLINK -DNOFTRUNCATE -DNOINITGROUPS -DNOLEARN \
5082         -Dvoid=int $(KFLAGS) -i -O" \
5083         "LNKFLAGS = -i"
5084
5085 # AT&T 7300 UNIX PC.  As of C-Kermit 6.1, many of these entries don't work
5086 # any more due to "Out of memory" or "Too many defines" errors during
5087 # compilation, at least not on systems without lots of memory.  The sys3upcgc
5088 # entry works (using gcc) with optimization removed, and might also work
5089 # with optimization enabled on machines with larger memories.
5090
5091 #AT&T 7300/UNIX PC (3B1) systems, sys3 but special handling for internal modem.
5092 #Link with the shared library -- the conflict with openi in shared library
5093 #is solved with -Dopeni=xopeni.  Note that the xermit target can't be used
5094 #for the Unix PC; there is no select().
5095 sys3upc:
5096         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5097         @echo 'If shared lib causes trouble, use make sys3upcold.'
5098         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5099         "CFLAGS = -O -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOREALPATH -DNOLEARN \
5100         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5101         -DNOREDIRECT -DNOGFTIMER -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5102         "CC2 = ld /lib/crt0s.o /lib/shlib.ifile" "LNKFLAGS = -s"
5103
5104 #AT&T 7300/Unix PC systems, minimum kermit for those with smaller amounts
5105 #of memory.
5106 sys3upcm:
5107         @echo Minimum interactive
5108         $(MAKE) "MAKE=$(MAKE)" sys3upc KTARGET=$${KTARGET:-$(@)} \
5109         "KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5110         -DNOSYSLOG -DNOSETKEY -DNOREALPATH"
5111
5112 #AT&T 7300/UNIX PC (3B1) systems, with curses support.
5113 #Curses and the shared library don't get along, so we don't use the
5114 #shared library.  We need to include CK_NEWTERM to avoid a conflict
5115 #with curses and buffering on stdout.  Merged with submission by
5116 #Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu.
5117 #We don't need -Dopeni=xopeni since we're not using the shared library,
5118 #but we keep it to be consistent with the other entries.
5119 sys3upcc:
5120         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5121         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5122         "CFLAGS = -O -DATT7300 -DNOREALPATH \
5123         -DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DNOLEARN \
5124         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5125         -DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5126         "LIBS = -lcurses" "LNKFLAGS = -s"
5127
5128 #Like sys3upcc but for AT&T UNIX 3.51m (released as a patch on Fix Disk 2),
5129 #adds hardware flow control.
5130 att351m:
5131         $(MAKE) "MAKE=$(MAKE)" sys3upcc KTARGET=$${KTARGET:-$(@)} \
5132         "KFLAGS=-DCK_RTSCTS -DUNIX351M"
5133
5134 #As above but with gcc.
5135 att351gm:
5136         $(MAKE) "MAKE=$(MAKE)" sys3upcgc KTARGET=$${KTARGET:-$(@)} \
5137         "KFLAGS=-DCK_RTSCTS -DUNIX351M"
5138
5139 #AT&T 7300 UNIX PC (3B1), as above, but no newterm().
5140 sys3upcx:
5141         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5142         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5143         "CFLAGS = -O -DATT7300 -DNOREALPATH -DNOUNICODE -DNOLEARN \
5144         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5145         -DCK_CURSES -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DUSE_MEMCPY $(KFLAGS) \
5146         -Dopeni=xopeni" "LIBS = -lcurses -ltermcap" "LNKFLAGS = -s"
5147
5148 #AT&T 7300/UNIX PC (3B1) systems, with curses and shared library support.
5149 sys3upcshcc:
5150         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5151         @echo 'With curses.  Requires shcc.'
5152         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5153         "CFLAGS = -O -DATT7300 -DNOMKDIR -DNOREALPATH -DNOLEARN \
5154         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5155         -DCK_NEWTERM -DCK_CURSES  -DNOREDIRECT -DNOGFTIMER \
5156         -DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5157         "LNKFLAGS = -i -s" "CC = shcc" "CC2 = shcc" "LIBS = -lcurses"
5158
5159 #AT&T 7300/UNIX PC (3B1) systems, as above, no curses, but use gcc.
5160 sys3upcg:
5161         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5162         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5163         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5164         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5165         -DNOGFTIMER -DNOMKDIR -DNOREALPATH $(KFLAGS) -Dopeni=xopeni" \
5166         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
5167
5168 #AT&T 7300/UNIX PC (3B1) systems, curses and gcc.
5169 #Optimization omitted -- add it back in if your machine has lots of memory.
5170 sys3upcgc:
5171         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5172         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5173         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOGFTIMER -DNOUNICODE \
5174         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5175         -DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREALPATH -DNOLEARN $(KFLAGS)" \
5176         "CC = gcc" "CC2 = gcc" "LIBS = -lcurses" "LNKFLAGS = -s"
5177
5178 #AT&T 7300/UNIX PC (3B1) systems, special handling for internal modem.
5179 #No FULLSCREEN file transfer display (curses).
5180 sys3upcold:
5181         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5182         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5183         "CFLAGS = -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5184         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5185         -DNOGFTIMER -DNOREDIRECT -DNOREALPATH $(KFLAGS) -O" "LNKFLAGS = -i"
5186
5187 #As above, but with gcc. mininum features - fits on a 400K UNIX PC floppy
5188 #after compression with room to spare; add -DNOSHOW or other -DNOxxxx items
5189 #to reduce size even further.
5190 sys3upcgm:
5191         @echo Minimum interactive
5192         $(MAKE) "MAKE=$(MAKE)" sys3upcg KTARGET=$${KTARGET:-$(@)} \
5193         "KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5194         -DNOSETKEY $(KFLAGS)"
5195
5196 #This target is designed to create a version with the most features possible
5197 #that, after compression, still fits on a 400K UNIX PC floppy.
5198 sys3upcgfd:
5199         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC floppy...'
5200         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5201         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOSPL -DNOLEARN \
5202         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5203         -DNOGFTIMER -DNOREALPATH -Dopeni=xopeni \
5204         -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5205         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5206
5207 #AT&T 6300 PLUS (warning, -O might make it run out of space).
5208 #NOTE: Remove -DHDBUUCP if not using Honey DanBer UUCP.
5209 att6300:
5210         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5211         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5212         "CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOREALPATH -DNOLEARN \
5213         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5214         -DNOUNICODE $(KFLAGS) -O -Ml -i" "LNKFLAGS = -i -Ml"
5215
5216 #As above, but with curses support.  Debugging disabled to prevent thrashing.
5217 att6300c:
5218         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5219         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5220         "CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOCSETS -DNOREALPATH \
5221         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5222         -DCK_CURSES -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) -O -Ml -i" \
5223         "LNKFLAGS = -i -Ml" "LIBS = -lcurses"
5224
5225 #AT&T 6300 PLUS with no curses, no debugging (about 34K smaller)
5226 # -Optimization saves about 20K too.
5227 att6300nd:
5228         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS, no debugging...'
5229         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5230         "CFLAGS = -DATT6300 -DHDBUUCP -DNODEBUG -DNOFILEH -DNOREALPATH \
5231         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5232         -DNOUNICODE -DNOLEARN $(KFLAGS) -O -i -Ml" "LNKFLAGS = -i -Ml"
5233
5234 #AT&T 3B2 and maybe 3B20-series computers running AT&T UNIX System V R3.
5235 #This one was actually used to build C-Kermit 7.0 successfully on a 3B2/300.
5236 att3b2:
5237         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2'
5238         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5239         "CFLAGS = -DATTSV -DNOREDIRECT -DUSE_MEMCPY \
5240         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5241         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5242         -DNOGFTIMER -DNOREALPATH -Dopeni=xopeni -DNOFRILLS -DNOLEARN \
5243         -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5244         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5245
5246 # The next two are likely not to work as-is.
5247
5248 #AT&T 3B2, 3B20-series computers running AT&T UNIX System V.
5249 #This is just generic System V with Honey DanBer UUCP, so refer to sys3hdb.
5250 #Remove -DNONAWS if you can get away with it.
5251 att3bx:
5252         $(MAKE) "MAKE=$(MAKE)" sys3hdb KTARGET=$${KTARGET:-$(@)} \
5253         "KFLAGS=$(KFLAGS) -DNONAWS -DNOTIMEVAL"
5254
5255 # 3Bx with charsets (except Unicode) but no curses.
5256 att3bx1:
5257         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5258         @echo 'with Honey DanBer UUCP  no curses...'
5259         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5260         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5261         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5262         -DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5263         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5264         -DNOREALPATH -DNOUNICODE -i" \
5265         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s"
5266
5267 #AT&T 3B2, 3B20-series computers running AT&T UNIX System V,
5268 #with fullscreen file transfer display.
5269 att3bxc:
5270         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5271         @echo 'with Honey DanBer UUCP and curses...'
5272         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5273         "CFLAGS = -DATTSV -DHDBUUCP -DNONAWS -DNOTIMEVAL $(KFLAGS) \
5274         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5275         -DNOREALPATH -DCK_CURSES -DCK_NEWTERM -DNOUNICODE -DNOLEARN -i -O" \
5276         "LNKFLAGS = -i" "LIBS=-lcurses"
5277
5278 #3bx with curses but no charsets
5279 att3bxc3:
5280         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5281         @echo 'with Honey DanBer UUCP with curses...  no CSETS'
5282         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5283         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5284         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5285         -DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5286         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5287         -DNOREALPATH -DNOCSETS -DCK_CURSES -DCK_NEWTERM -i" \
5288         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s" "LIBS = -lcurses"
5289
5290 #Any System V R2 or earlier with Honey DanBer UUCP (same as above)
5291 sys3hdb:
5292         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5293         @echo 'or System V R2 or earlier with Honey DanBer UUCP...'
5294         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5295         "CFLAGS = -DATTSV -DHDBUUCP -DNOREALPATH -DNOUNICODE -DNOLEARN \
5296         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5297         $(KFLAGS) -i -O" "LNKFLAGS = -i"
5298
5299 #Sperry/UNISYS 5000 UTS V 5.2 (System V R2), Honey DanBer UUCP
5300 unisys5r2:
5301         @echo 'Making C-Kermit $(CKVER) for Sperry/UNISYS 5000 UTS V 5.2...'
5302         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5303         "CFLAGS = -DATTSV -DUNISYS52 -DHDBUUCP -DNOREALPATH -DNOUNICODE \
5304         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5305         -DNOLEARN $(KFLAGS) -i -O" "LNKFLAGS = -i"
5306
5307 #In case they say "make sys5hdb" instead of "make sys3hdb"...
5308 sys5hdb:
5309         $(MAKE) "MAKE=$(MAKE)" sys3hdb
5310
5311 #Create the common header line for all hpux[5-11]* entries and above. This 
5312 #extra entry is here because our header message length may differ for each 
5313 #C-Kermit version. Don't use 'fold -s' for HP-UX 5.x - 7.x! This option is 
5314 #available only for HP-UX 8.0 and above!
5315 hpux-header:
5316         @HPUX=`uname -r | sed -e 's/^[^1-9]*//' -e 's/\.00$$/.0/'` ; \
5317         [ "$(MESSAGE0)" ] && MESSAGE1="$(MESSAGE0)" ; \
5318         Message0='Making C-Kermit $(CKVER) for HP9000 HP-UX' ; \
5319         Message1=$${MESSAGE1:='without any extra compiler optimization'} ; \
5320         MessageH="$$Message0 $$HPUX" ; \
5321         case $$HPUX in \
5322           [567].*) echo "$$MessageH\n$$Message1" ;; \
5323               *.*) echo "$$MessageH $${Message1}$(MESSAGE1A)" | fold -s ;; \
5324         esac | sed -e 's/^ //' -e 's/ *$$//'
5325
5326 # Peter E's updated HP-UX 5.xx entries Oct 2001.
5327
5328 #HP-9000 500 HP-UX 5.xx, no TCP/IP.
5329 # Last known successful build: C-Kermit 8.0.206 2002/20/27.
5330 hpux0500:
5331         @MESSAGE0="no TCP/IP and no compiler optimization";\
5332         MESSAGE0=$${MESSAGE1:-$$MESSAGE0} \
5333         $(MAKE) hpux-header
5334         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5335         "CFLAGS = -DHPUX -DHPUX5 -DHPUXPRE65 -DNOREDIRECT -DDCLGETCWD \
5336         -DNOGETUSERSHELL -DNOGFTIMER -DNOSYSLOG -DNOTOMACROS -DNOLSTAT \
5337         -DNOSYMLINK -DNOINITGROUPS -DNOUNICODE -DNOLEARN -DNOLONGLONG \
5338         $(KFLAGS)" "LIBS = $(LIBS)" "LNKFLAGS = "
5339
5340 #HP-9000 500 HP-UX 5.21 with Wollongong WIN/TCP 1.2 TCP/IP.
5341 #Requires /usr/wins/usr/include and /usr/lib/libnet.a from Wollongong.
5342 #Optimization skipped - takes forever.  Really.
5343 # WARNING: this doesn't work if a file called "hpux0500" is on the disk.
5344 # Last known successful build: C-Kermit 8.0.206 2002/20/27.
5345 hpux0500wintcp:
5346         @MESSAGE1="with WIN/TCP but without any extra compiler optimization" \
5347         $(MAKE) hpux0500 KTARGET=$${KTARGET:-$(@)} \
5348         "KFLAGS = -DTCPSOCKET -DHPUX5WINTCP -DINADDRX -DNO_DNS_SRV -DNOMHHOST \
5349         -DNOHADDRLIST -DNOLONGLONG -I/usr/wins/usr/include $(KFLAGS)" \
5350         "LIBS = /usr/lib/libnet.a"
5351
5352 #HP-UX 6.5, short filenames, no network and no curses support.
5353 #ckcpro, ckuusr, ckuus3 and others are broken out because they make the
5354 #optimizer run away.  Note that the XERMIT target does not work with HP-UX 6.5!
5355 #
5356 #If you get compiler warnings like:
5357 #'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5358 #other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5359 #switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5360 #needs 257 table entries (C-Kermit Version "9.0.299").
5361 #OK: 2010/03/26
5362 hpux0650:
5363         @$(MAKE) hpux-header
5364         @MESSAGE2=$${MESSAGE2:-'and NO network'}; \
5365         echo "supporting: NO long filenames $$MESSAGE2."
5366
5367         $(MAKE) KTARGET=$${KTARGET:-$(@)} \
5368                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
5369                 ckuusr.$(EXT) ckuxla.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5370         "CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5371         -DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5372         $(KFLAGS)"
5373
5374         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5375         "CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5376         -DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5377         $(KFLAGS) -Wc,-Nw260 $(OFLAGS)" "LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5378
5379 #Exactly as above, plus curses:
5380 #OK: 2009/10/06
5381 hpux0650c:
5382         @MESSAGE2="and NO network but with curses" \
5383         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5384         "KFLAGS = -DCK_CURSES $(KFLAGS)" \
5385         "LIBS = -lcurses"
5386
5387 #Exactly as above, plus curses + network:
5388 #OK: 2009/10/02
5389 hpux0650tcpc:
5390         @MESSAGE2="but with curses and with TCP/IP" \
5391         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5392         "KFLAGS=-DCK_CURSES -DTCPSOCKET -DNOHADDRLIST \
5393         -DINTSELECT -DNOCKGETFQHOST $(KFLAGS)" \
5394         "LIBS=-lcurses"
5395
5396 #Exactly as hpux0650 but with compiler optimization:
5397 #OK: 2009/10/06
5398 hpux0650o:
5399         @MESSAGE1="with compiler optimization" \
5400         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5401         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5402
5403 #Exactly as hpux0650c but with compiler optimization:
5404 #OK: 2009/10/06
5405 hpux0650oc:
5406         @MESSAGE1="with compiler optimization" \
5407         $(MAKE) hpux0650c KTARGET=$${KTARGET:-$(@)} \
5408         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5409
5410 #Exactly as hpux0650tcpc but with compiler optimization:
5411 #OK: 2009/10/06
5412 hpux0650otcpc:
5413         @MESSAGE1="with compiler optimization" \
5414         $(MAKE) hpux0650tcpc KTARGET=$${KTARGET:-$(@)} \
5415         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5416
5417 #Take this as startup entry for all 'non-optimized' files under HP-UX 7.x!
5418 #Make sure we don't call it with the '-O' option because this will blow up
5419 #the compiler!
5420 #OK: 2009/09/30
5421 hpux0700noopt:
5422         @case "$(CFLAGS)" in \
5423         *-O*) echo "Don't use CFLAGS= -O here!" ;; \
5424            *) $(MAKE) KTARGET=$${KTARGET:-$(@)} \
5425               ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
5426               ckuus6.$(EXT) ckuus7.$(EXT) ckuxla.$(EXT) \
5427               ckcuni.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5428               ;; \
5429         esac
5430
5431 #HP-UX 7.0, no long filenames, no network support, no curses.
5432 #If you get compiler warnings like:
5433 #'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5434 #other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5435 #switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5436 #needs 257 table entries (C-Kermit Version "9.0.299").
5437 #OK: 2010/10/26
5438 hpux0700sf:
5439         @$(MAKE) hpux-header
5440         @echo 'supporting: NO long filenames, NO network, NO curses.'
5441         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5442         "CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5443         -DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260"
5444
5445         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5446         "CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5447         -DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260 $(OFLAGS)" \
5448         "LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5449
5450 #Exactly as hpux0700sf but with compiler optimization:
5451 #OK: 2009/09/30
5452 hpux0700osf:
5453         @MESSAGE1="with compiler optimization" \
5454         $(MAKE) hpux0700sf KTARGET=$${KTARGET:-$(@)} \
5455         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5456
5457 #HP-UX 7.0, short filenames, but with tcp/ip and curses.
5458 #To use this, you must have bought the ARPA Services Product from HP, and you
5459 #must have /usr/lib/libBSD.a.
5460 #
5461 #If you get compiler warnings like:
5462 #'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5463 #other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5464 #symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5465 #needs 2031 table entries (C-Kermit Version "9.0.299").
5466 #OK: 2020/03/24
5467 hpux0700sftcpc:
5468         @$(MAKE) hpux-header
5469         @echo 'supporting: NO long filenames, \c'
5470         @echo 'but with networking, curses, HDB uucp...'
5471         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5472         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5473         -DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5474         -DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5475         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5476
5477         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5478         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5479         -DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5480         -DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5481         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5482         "LNKFLAGS = -s" "LIBS = -lm -lBSD -lcurses"
5483
5484 #Exactly as above but with compiler optimization:
5485 #OK: 2009/09/30
5486 hpux0700osftcpc:
5487         @MESSAGE1="with compiler optimization" \
5488         $(MAKE) hpux0700sftcpc KTARGET=$${KTARGET:-$(@)} \
5489         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5490
5491 #HP 9000 series 300/800 HP-UX 7.0, long filenames, network support, HDB uucp,
5492 #but NO curses. See comments in hpux0700sftcpc about TCP/IP support.
5493 #
5494 #If you get compiler warnings like:
5495 #'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5496 #other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5497 #symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5498 #needs 2031 table entries (C-Kermit Version "9.0.299").
5499 #OK: 2010/03/24
5500 hpux0700lfn:
5501         @$(MAKE) hpux-header
5502         @echo 'supporting: long filenames, networking, HDB uucp$(MESSAGE2)...'
5503         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5504         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5505         -DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5506         -DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5507         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5508
5509         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5510         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5511         -DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5512         -DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5513         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5514         "LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5515
5516 #Exactly as above + curses.
5517 #OK: 2009/09/30
5518 hpux0700lfnc:
5519         @MESSAGE2=', curses' \
5520         $(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5521         "KFLAGS = -DCK_CURSES $(KFLAGS)" \
5522         "LIBS = -lcurses"
5523
5524 #Exactly as above hpux0700lfn but with compiler optimization:
5525 #OK: 2009/09/30
5526 hpux0700olfn:
5527         @MESSAGE1="with compiler optimization" \
5528         $(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5529         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5530
5531 #Exactly as above hpux0700lfnc but with compiler optimization:
5532 #OK: 2009/09/30
5533 hpux0700olfnc:
5534         @MESSAGE1="with compiler optimization" \
5535         $(MAKE) hpux0700lfnc KTARGET=$${KTARGET:-$(@)} \
5536         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5537
5538 #HP 9000 Series 300 or 400, HP-UX 8.0, long filenames and TCP/IP support.
5539 #This one should also work on 700/800, but without PA-specific optimization.
5540 #In case -DCK_RTSCTS and -DCK_REDIR make trouble, remove them.
5541 #NOTE: ckcpro.c, ckuusr.c and ckuus3.c blow up the optimizer, so don't optimize
5542 #them.
5543 #For HP-UX 8.0 on Motorola CPUs, you might have to reinstall your kernel with
5544 #maxdsiz >= 0x03000000.  But if physical memory is small, that still will not
5545 #help much.
5546 #OK: 2009/10/01
5547 hpux0800:
5548         @$(MAKE) hpux-header
5549         @MESSAGE3=$${MESSAGE3:='TCP/IP'}; \
5550         echo "supporting: long filenames, $$MESSAGE3, HDB UUCP$(MESSAGE2)..."
5551         $(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
5552         ckcpro.$(EXT) ckuusr.$(EXT) ckuus3.$(EXT) \
5553         "CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5554         -DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5555         -DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5556         -DNOLONGLONG $(KFLAGS)"
5557
5558         $(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" xermit KTARGET=$${KTARGET:-$(@)} \
5559         "CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5560         -DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5561         -DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5562         -DNOLONGLONG -DNODCLENDUSERSHELL $(KFLAGS) $(OFLAGS)" \
5563         "LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5564
5565 #Exactly as above hpux0800 + curses.
5566 #OK: 2009/10/01
5567 hpux0800c:
5568         @MESSAGE2=', curses' \
5569         $(MAKE) hpux0800  KTARGET=$${KTARGET:-$(@)} \
5570         "KFLAGS = $(KFLAGS) -DCK_CURSES" "LIBS = -lcurses"
5571
5572 #HP 9000 HP-UX 8.0, no TCP/IP because /usr/lib/libBSD.a can't be found,
5573 #or TCP/IP header files missing.
5574 #OK: 2009/10/01
5575 hpux0800notcp:
5576         @MESSAGE3='NO network, NO curses' \
5577         $(MAKE) "MAKE=$(MAKE)" hpux0800 KTARGET=$${KTARGET:-$(@)} \
5578         "KFLAGS = $(KFLAGS) -UTCPSOCKET"
5579
5580 #Now the same as above hpux0800 but with compiler optimization
5581 #OK: 2009/10/01
5582 hpux0800o:
5583         @MESSAGE1="with compiler optimization" \
5584         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5585         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5586
5587 #Exactly as above hpux0800 + curses and with compiler optimization.
5588 #OK: 2009/10/01
5589 hpux0800oc:
5590         @MESSAGE1="with compiler optimization" \
5591         $(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5592         "KFLAGS = $(KFLAGS)" "OFLAGS = -O" "LIBS = -lcurses"
5593
5594 #Exactly as above hpux0800notcp but with compiler optimization
5595 #OK: 2009/10/01
5596 hpux0800onotcp:
5597         @MESSAGE1="with compiler optimization" \
5598         $(MAKE) "MAKE=$(MAKE)" hpux0800notcp KTARGET=$${KTARGET:-$(@)} \
5599         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5600
5601 #HP 9000 Series 700 or 800, HP-UX 8.0, long filenames and TCP/IP support.
5602 # Like the previous entries, but with PA-RISC-specific optimization.
5603 #OK: 2009/10/01
5604 hpux0800pa:
5605         @MESSAGE1="with PA-RISC-specific optimization" \
5606         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5607         "KFLAGS = $(KFLAGS) +Obb1100"
5608
5609 #As above, but with curses.
5610 #OK: 2009/10/01
5611 hpux0800pac:
5612         @MESSAGE1="with PA-RISC-specific optimization" \
5613         $(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5614         "KFLAGS = $(KFLAGS) +Obb1100"
5615
5616 #As above, but compiled with GCC 2.3.3.
5617 #OK: 2009/10/01
5618 hpux0800pagcc:
5619         @MESSAGE1='using the gcc compiler' \
5620         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5621         "CC=gcc" "CC2=gcc" "KFLAGS = -funsigned-char $(KFLAGS)"
5622
5623 #HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5624 #configured.  Use this entry with the restricted compiler: no optimization, no
5625 #ANSI support.  If you get unresolved sockets library references at link time,
5626 #then try adding -lBSD to LIBS, or else remove -DTCPSOCKET to build a version
5627 #without TCP/IP support.
5628 #
5629 #Please note that we have to add the compiler option +DA1.0/+DA1.1 to avoid
5630 #core-dumps for large arguments in IF MATCH. The man page says these options
5631 #are default but C-Kermit dumps core without them! Therefore keep them
5632 #untouched. If you want to overwrite or disable the +DA1.0/+DA1.1 option use
5633 #'make hpux0900 OFLAGS=...'. An other possibility would be to create a new
5634 #kernel with maxssiz >= 0x01185000 (default maxssiz=0x00800000).
5635 #OK: 2009/09/24
5636 hpux0900:
5637         @MESSAGE1A='. Read hpux0900 entry comments if you have trouble.' \
5638         $(MAKE) hpux-header
5639         @case `uname -m` in \
5640           */[34]*) KFLAGS='-DNOLONGLONG $(KFLAGS)' ;; \
5641           */7*)    AFLAGS='+DA1.1' ;; \
5642           */8*)    AFLAGS='+DA1.0' ;; \
5643         esac ; \
5644         OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5645         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5646         "CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT -DUTIMEH \
5647         -DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME -DCK_REDIR -DLONGFN \
5648         -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5649         -DNODCLENDUSERSHELL $$KFLAGS $$OFLAGS" \
5650         "LNKFLAGS = -s" "LIBS = -lm -lcurses" "CC=$(CC)" "CC2=$(CC2)"
5651
5652 #Like hpux0900, but for the "value-added" compiler on all HP 9000 models.
5653 #Adds optimization and ANSI compilation:
5654 # +O2 makes smaller executable (= -O = Level-1 and global optimization)
5655 # +O3 adds interprocedural global optimization, makes bigger executable.
5656 # Please note: To support long-long we would need compiler switch '-Ae' but
5657 # this one works only on Risc systems. But the equivalant compiler flags
5658 # '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5659 # If optimization fails on some modules, you can add:
5660 #  +Obb<n>, +Olimit <n>, or +Onolimit, depending on your cc version,
5661 # where <n> is a number, e.g. +Obb1200.  In other words, if you get optimizer
5662 # warnings, add (for example) +Obb1200; if you still get optimizer warnings,
5663 # increase the number.  Repeat until warnings go away.  If your compiler
5664 # permits it, use +Onolimit. If optimizer blows up on ckcpro.c, see next entry.
5665 # Reportedly, on some configurations, such as HP9000/425e or /340, perhaps
5666 # depending on the amount of main memory, this entry might fail no matter what
5667 # you do ("Out of Memory", "cc: Fatal error in /lib/c.c1", etc).  In that case
5668 # use "make hpux0900" (no "o").
5669 #OK: 2009/09/24
5670 hpux0900o:
5671         @MESSAGE1=$${MESSAGE1:-"with compiler optimization"} \
5672         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5673         "KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5674
5675 # For HP-UX 9.0 on Motorola CPUs, optimization of ckcpro.c tends to blow up
5676 # the compiler.  You might have to reinstall your kernel with maxdsiz >=
5677 # 0x03000000.  But if physical memory is small, that still will not help much.
5678 # In that case, use this entry to skip optimization of ckcpro.c.  But for
5679 # C-Kermit 8.0.208 you need a kernel with maxdsiz >= 0x02000000 to compile an
5680 # optimized ckcftp.c.
5681 # Please note: To support long-long we would need compiler switch '-Ae' but
5682 # this one works only on Risc systems. But the equivalant compiler flags
5683 # '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5684 hpux0900m68ko:
5685         @MESSAGE1='without compiler optimization for ckcpro.$(EXT) ...' \
5686         $(MAKE) hpux-header
5687         $(MAKE) ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
5688         ckcftp.$(EXT) ckcpro.$(EXT) \
5689         "CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT \
5690         -DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME  -DCK_REDIR -DLONGFN \
5691         -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT $(KFLAGS)"
5692         @echo
5693         @MESSAGE1="with compiler optimization for the rest" \
5694         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5695         "KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5696
5697 # Old name for hpux0900m68ko.
5698 hpux0900mot:
5699         $(MAKE) hpux0900m68ko KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS)"
5700
5701 #Like hpux0900o but with additional model-700/800-specific optimizations.
5702 # +ESlit = consolidate strings in read-only memory.
5703 # +ESfsc = inline millicode calls when comparing pointers.
5704 hpux0900o700:
5705         @echo 'If you get optimizer warnings \c'
5706         @echo 'try "make hpux0900o700 KFLAGS=+Obb1200"'
5707         @MESSAGE1="with PA-RISC-specific optimizations" \
5708         $(MAKE) hpux0900o KTARGET=$${KTARGET:-$(@)} \
5709         "KFLAGS = $(KFLAGS) +ESlit +ESsfc"
5710
5711 #HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5712 #configured, built with gcc, all models except 800 series.
5713 #You might need to add the include path for gcc headers, for example:
5714 # 'KFLAGS=-I/usr/gnu/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5/include/'
5715 hpux0900gcc:
5716         @MESSAGE1='using the gcc compiler' \
5717         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5718         "KFLAGS = -DCK_ANSIC $(KFLAGS)" \
5719         "OFLAGS = -funsigned-char -O2 $(OFLAGS)"
5720
5721 #HP-9000 HP-UX 10.0 + TCP/IP + curses, fully configured.
5722 #Use with restricted (bundled) compiler: no optimization, no ANSI support.
5723 #libcurses needed for fullscreen file xfer display in HP-UX 10.00 and 10.01.
5724 #libHcurses (NOT libcurses!) for fullscreen display, to work around fatal bugs
5725 #in HP-UX 10.10 and 10.20 curses. Maybe we could use lcurses for 10.30, since
5726 #the 10.10 curses problem is supposedly fixed in 10.30.
5727 # +DA1.0 = Generate PA-RISC 1.0 code that runs on both 700 and 800 models.
5728 # +DA1.1 = Generate PA-RISC 1.1 code that runs on both 700 and 800 models.
5729 # Note that HP-UX 10.20 and upwards do not support PA-RISC 1.0 systems.
5730 # And that as of Dec 2001, 11.00 and 11.11 are PA-only and 11.20 is IA64-only.
5731 # Later 11.2x releases are expected to be for both.  Architecture can be
5732 # determined with the model command, at least in 10.20 and later...
5733 #For future releases, we need to include +DA1.1 for PA builds, so that a
5734 #binary built on PA 2.0 will still work on PA 1.1 machines, whereas +DA1.1
5735 #must NOT be included for IA64 builds.
5736 #4 Jan 2006 - Added Large File Support (LFS).  Large files (>2GB) are
5737 #possible in HP-UX 10.20 and later.  The only change is to add:
5738 # -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
5739 #to KFLAGS.  These should be harmless in 10.00 and 10.10, if any of examples
5740 #of those still exist, but I have no way to test this hypothesis.
5741 #OK: 2009/11/16
5742 hpux1000:
5743         @$(MAKE) hpux-header
5744         @LIBS='-lHcurses' ; \
5745         AFLAGS='+DA1.1' ; \
5746         case `uname -r` in \
5747            [AB].10.0*)  KFLAGS='-DHPUX1000 $(KFLAGS)' ; \
5748                         AFLAGS='+DA1.0' ; LIBS='-lcurses'  ;; \
5749            [AB].10.1*)  KFLAGS='-DHPUX1010 -D__HP_CURSES $(KFLAGS)' ; \
5750                         ;; \
5751            [AB].10.2*)  KFLAGS='-DHPUX1020 -D__HP_CURSES $(KFLAGS)' ; \
5752                         ;; \
5753            [AB].10.3*)  KFLAGS='-DHPUX1030 -D__HP_CURSES $(KFLAGS)' ; \
5754                         ;; \
5755            [AB].10.?*)  KFLAGS='-DHPUX10XX -D__HP_CURSES $(KFLAGS)' ; \
5756                         ;; \
5757            [AB].11.0*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5758                         ;; \
5759            [AB].11.1*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5760                         ;; \
5761            [AB].11.?*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5762                         AFLAGS='' ; LIBS='-lcurses' ;; \
5763         esac ; \
5764         OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5765         $(MAKE) "SHELL=/usr/bin/sh" xermit KTARGET=$${KTARGET:-$(@)} \
5766         "CC=$(CC)" "CC2=$(CC2)" \
5767         "CFLAGS = -DHPUX10 -DDIRENT -DSTERMIOX -DCK_DSYSINI -DHDBUUCP \
5768         -DCK_CURSES -DCK_WREFRESH -DTCPSOCKET -DCK_REDIR -DRENAME -DFNFLOAT \
5769         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
5770         $$KFLAGS $$OFLAGS" \
5771         "LNKFLAGS=-s $(LNKFLAGS)" "LIBS = -lm $$LIBS $(KLIBS)"
5772
5773 # This is a kludge, copying hpux0900gcc and adapting hpux1000
5774 # (add CC and CC2, drop the A1.[0||1])
5775 # Builds w/ no compiler warnings but minimally tested.
5776 #
5777 #OK: 2009/09/21
5778 hpux1000gcc:
5779         @MESSAGE1="using the gcc compiler $(MESSAGE1)" \
5780         $(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5781         "KFLAGS = $(KFLAGS)" "OFLAGS = -DCK_ANSIC -funsigned-char -O2"
5782
5783 # Trusted HP-UX 10
5784 # echo KFLAGS=$(KFLAGS) YTARGET YTARGET=$(YTARGET) $(XTARGET) ;
5785 hpux1000t:
5786         @case "$(KTARGET)" in \
5787            *+openssl | *+ssl) \
5788                 KENTRY=hpux1000o+openssl ;; \
5789            *gcc) \
5790                 KENTRY=hpux1000gcc ;; \
5791            *o+) KENTRY=hpux1000o+ ;; \
5792            *o)  KENTRY=hpux1000o ;; \
5793            *)   KENTRY=hpux1000 ;; \
5794         esac ; \
5795         MESSAGE1="and support for 'Trusted HP-UX'" \
5796         $(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5797         "KFLAGS = $(KFLAGS) -DHPUX10_TRUSTED" "KLIBS=-lsec"
5798
5799 hpux1000to:
5800         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5801
5802 hpux1000to+:
5803         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5804
5805 hpux1000tgcc:
5806         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5807
5808 hpux1000to+ssl hpux1000to+openssl:
5809         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5810
5811 hpux1000tgcc+ssl hpux1000tgcc+openssl:
5812         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5813
5814 #HP-9000 HP-UX 10.00 and higher with ANSI prototyping and optimization.
5815 #PA-RISC only, no Motorola or other hardware is support in HP-UX 10.00++.
5816 #The unbundled optional compiler is required.
5817 #Your path should start with /opt/ansic/bin.
5818 # -Wl,-Fw = Remove stack unwind table (info used by debuggers).
5819 # +O2 makes a smaller executable (= -O = Level-1 and global optimization).
5820 # +O3 adds interprocedural global optimization, makes a bigger executable.
5821 # +Onolimit allows all modules to be optimized, no matter how complex.  But:
5822 #  (a) +Onolimit does not seem to always be there in HP-UX 10.00, and:
5823 #  (b) some modules might take hours on low-memory and/or slow systems.
5824 # The following are PA-RISC-specific optimizations:
5825 # +ESlit = Consolidate strings in read-only memory.
5826 # +ESfsc = Inline millicode calls when comparing pointers.
5827 # You might need to configure your kernel for a maxdsiz of 0x0B000000 (176MB)
5828 # or greater to prevent the optimizer from running out of space.
5829 # December 2001: +ESlit +ESsfc removed because not supported on IA64.
5830 # Somebody who cares can use 'model' to see whether it's PA-RISC or IA64
5831 # and include the architecture-specific optimization flags.  Also note:
5832 # +DA1.1 is PA-only.  If this is included in in HP-UX 11.00 or later,
5833 # then +DS2.0 should be included too (but don't use +DS2.0 without +DA1.1,
5834 # or else the binary won't run on older PA hardware).
5835 #OK: 2009/09/21
5836 hpux1000o:
5837         @case `uname -m` in \
5838           ia64) ;; \
5839           *) MFLAGS='+ESlit +ESsfc' ;; \
5840         esac ; \
5841         MESSAGE1="with PA-RISC-specific optimizations $(MESSAGE1)" \
5842         $(MAKE) "SHELL=/usr/bin/sh" "PATH=/opt/ansic/bin:$$PATH" hpux1000 \
5843         KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS) \
5844         -Ae -D_HPUX_SOURCE -DCK_ANSIC -DUTIMEH \
5845         +O2 -Wl,-Fw $$MFLAGS"
5846
5847 #Like hpux1000o but with "+Onolimit".
5848 #On 700 series set kernel parameter maxdsiz >= 0x0D000000 (=208MB).
5849 #Takes a long time.
5850 hpux1000o+:
5851         @MESSAGE1="and +Onolimit $(MESSAGE1)" KTARGET=$${KTARGET:-$(@)} \
5852         $(MAKE) hpux1000o \
5853         "KFLAGS = $(KFLAGS) +Onolimit"
5854
5855 #HP-UX 10.xx + 11.xx with optimizing ANSI compiler and OpenSSL.
5856 #Define SSLLIB and SSLINC appropriately for your OpenSSL installation.
5857 #To overwrite the default SSLLIB and SSLINC settings you can also use the
5858 #command-line variable KSSLLIB and KSSLINC like:
5859 #make hpux1000o+openssl KSSLLIB=-L/opt/openssl/lib KSSLINC=-I/...
5860 #Ditto for the Zlib location.
5861 #This entry works for C-Kermit 8.0.206 on HP-UX 10.20 + 11.11
5862 #with OpenSSL 0.9.6 + 0.9.7
5863 #NOTE: an ANSI C compiler is required for the SSL interface.  If you don't
5864 #have the HP Optimizing ANSI compiler, see the hpux1000gcc+openssl target
5865 #below.
5866 hpux1000o+ssl hpux1000o+openssl:
5867         @case "$(KTARGET)" in \
5868            *gcc+*) \
5869                 KENTRY=hpux1000gcc ;; \
5870            *)   KENTRY=hpux1000o ;; \
5871         esac ; \
5872         case "$(KTARGET)" in \
5873            *-zlib*) \
5874                 DZLIB= LZLIB= ;; \
5875            *)   DZLIB=-DZLIB LZLIB='-L/opt/zlib/lib -lz' ;; \
5876         esac ; \
5877         SSLINC=$${KSSLINC:-$(SSLINC)}; \
5878         SSLLIB=$${KSSLLIB:-$(SSLLIB)}; \
5879         MESSAGE1="and with OpenSSL $(MESSAGE1)" \
5880         $(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5881         KFLAGS="-DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $$DZLIB \
5882         $$SSLINC $(KFLAGS)" \
5883         KLIBS="$(KLIBS) \
5884         $$SSLLIB -lssl -lcrypto \
5885         $$LZLIB \
5886         "
5887
5888 # Ditto but without Zlib:
5889 hpux1000o+ssl-zlib hpux1000o+openssl-zlib:
5890         @MESSAGE1="but without Zlib $(MESSAGE1)" \
5891         $(MAKE) hpux1000o+ssl KTARGET=$${KTARGET:-$(@)}
5892
5893 #HP-UX 10.00 or higher with OpenSSL 0.9.7.  Compiled with gcc.
5894 #From Chris Chaney, NEC America Inc.  His instructions:
5895 # (1) Install gcc version 3.2.3 & binutils version 2.13.2
5896 #     (used binary depot from http://hpux.cs.utah.edu/)
5897 # (2) Install gcc make version 3.80 from http://hpux.cs.utah.edu/
5898 #
5899 # or: gcc 2.9.2000-12-1 from "Linux to hp-ux 11.0/11i porting kit version 1.0
5900 #     (2CD)" free from:  http://www.software.hp.com
5901 #
5902 # (3) Install openSSL version 0.9.7b from http://www.software.hp.com
5903 # (4) Install flex version 2.5.4 from http://hpux.cs.utah.edu/
5904 # (5) Install gmp version 3.1.1 from http://hpux.cs.utah.edu/
5905 #
5906 #Note from Peter Eichhorn, assyst Munich. It works also without gcc make!
5907 hpux1000gcc+ssl hpux1000gcc+openssl:
5908         $(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5909
5910 # Ditto but without Zlib:
5911 hpux1000gcc+ssl-zlib hpux1000gcc+openssl-zlib:
5912         $(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5913
5914 # Same for HP-UX 11
5915 hpux1100o+ssl hpux1100o+openssl:
5916         $(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5917
5918 #OK: 2009/09/26
5919 hpux1100gcc+ssl hpux1100gcc+openssl:
5920         $(MAKE) hpux1000gcc+openssl KTARGET=$${KTARGET:-$(@)}
5921
5922 hpux1100o+ssl-zlib hpux1100o+openssl-zlib:
5923         $(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5924
5925 hpux1100gcc+ssl-zlib hpux1100gcc+openssl-zlib:
5926         $(MAKE) hpux1000gcc+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5927
5928 # HP-UX 11
5929 # Note: these are 32-bit builds even on IA64.
5930 # Adding +DD64 to CFLAGS produces 64-bit object files,
5931 # but the linker fails to find the needed 64-bit libs.
5932 #OK: 2009/09/26
5933 hpux1100:
5934         $(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)}
5935
5936 #OK: 2009/09/26
5937 hpux1100o:
5938         $(MAKE) hpux1000o KTARGET=$${KTARGET:-$(@)}
5939
5940 hpux1100o+:
5941         $(MAKE) hpux1000o+ KTARGET=$${KTARGET:-$(@)}
5942
5943 #OK: 2009/09/26
5944 hpux1100gcc:
5945         $(MAKE) hpux1000gcc KTARGET=$${KTARGET:-$(@)}
5946
5947 # Trusted HP-UX 11
5948 hpux1100t:
5949         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5950
5951 hpux1100to:
5952         $(MAKE) hpux1000to KTARGET=$${KTARGET:-$(@)}
5953
5954 hpux1100to+:
5955         $(MAKE) hpux1000to+ KTARGET=$${KTARGET:-$(@)}
5956
5957 hpux1100tgcc:
5958         $(MAKE) hpux1000tgcc KTARGET=$${KTARGET:-$(@)}
5959
5960 hpux1100to+ssl hpux1100to+openssl:
5961         $(MAKE) hpux1000to+openssl KTARGET=$${KTARGET:-$(@)}
5962
5963 hpux1100tgcc+ssl hpux1100tgcc+openssl:
5964         $(MAKE) hpux1000tgcc+openssl KTARGET=$${KTARGET:-$(@)}
5965
5966 #Regulus on CIE Systems 680/20
5967 cie:
5968         @echo 'Making C-Kermit $(CKVER) for CIE Systems 680/20 Regulus...'
5969         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5970         "CFLAGS = -DATTSV -DNOFILEH -DCIE -DNOLEARN $(KFLAGS) -O" "LNKFLAGS ="
5971
5972 # Linux 1.2 or later with gcc, dynamic libraries, ncurses, TCP/IP.
5973 #
5974 # If your Linux system has curses rather than ncurses, use the linuxc
5975 # entry, or if that doesn't work, linuxnc.
5976 #
5977 # The Kermit "large memory model" is used by default to configure big packet
5978 # and script buffers, etc.  For small-memory or limited-resource systems,
5979 # "make linux KFLAGS=-DNOBIGBUF".
5980 #
5981 # -DLINUXFSSTND (Linux File System Standard 1.2) gives UUCP lockfile /var/lock
5982 # with string pid.  Remove this to get /usr/spool/uucp with int pid, used in
5983 # very early Linux versions.  FSSTND 1.2 also says that the PID string in the
5984 # UUCP lock file has leading spaces.  This is a change from FSSTND 1.0, which
5985 # used leading zeros.  Add -DFSSTND10 to support FSSTND 1.0 instead of 1.2.
5986 # I hope subsequent editions of the file-system standard did not change these
5987 # again.
5988 #
5989 # Add -DOLINUXHISPEED (Old Linux High Speed support) to turn on an ugly kludge
5990 # in Linux 1.0 and earlier to support speeds of 57600 and 115200.  Extremely
5991 # old Linux systems (pre-0.99pl15) will not support this.  If OLINUXHISPEED is
5992 # not defined, then only the standard POSIX termios methods of setting the port
5993 # speed will be used, and in this case speeds can be as high as 460800 in most
5994 # modern Linux versions.
5995 #
5996 # -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
5997 # least 0.99.14; if it causes trouble for you, remove it from the CFLAGS.
5998 #
5999 # -pipe removes the need for temp files - remove it if it causes trouble.
6000 #
6001 # -funsigned-char makes all characters unsigned, as they should have been
6002 #  in the first place.
6003 #
6004 # Add -DCK_DSYSINI if you want a shared system-wide init file.
6005 #
6006 # See http://www.columbia.edu/kermit/ckubwr.html about -DNOCOTFMC.
6007 # Better still, should read the entire Linux section of that document.
6008 #
6009 # The "linuxa" entry can be referenced directly on LIBC systems, but not
6010 # GLIBC, where -lcrypt is required.  The "make linux" entry should normally
6011 # be used for all builds on all Linux distributions unless you have special
6012 # requirements, in which case keep reading.  CK_NEWTERM added after 7.0b04
6013 # due to new complaints about ncurses changing buffering of tty.
6014
6015 linuxa:
6016         @echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later...'
6017         @echo 'IMPORTANT: Read the comments in the linux section of the'
6018         @echo 'makefile if you have trouble.'
6019         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6020         "CFLAGS = -O -DLINUX -pipe -funsigned-char -DFNFLOAT -DCK_POSIX_SIG \
6021         -DCK_NEWTERM -DTCPSOCKET -DLINUXFSSTND -DNOCOTFMC -DPOSIX \
6022         -DUSE_STRERROR $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6023         "LIBS = $(LIBS) -lm"
6024
6025 # As above but with profiling
6026 linuxp:
6027         $(MAKE) linuxa KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS) -pg" \
6028         "LIBS=-pg -lcrypt -lresolv"
6029
6030 #Linux.  This entry should work for any Linux distribution on any platform,
6031 #32-bit or 64-bit, except for extremely ancient ones.  Automatically detects:
6032 # . curses, ncurses, or no curses
6033 # . Old versus new pty handling (new == glibc 2.1++)
6034 # . Presence or absence of libcrypt.a and <crypt.h>
6035 # . Presence or absence of libresolv.a
6036 # . Transitional Long File API for 32-bit platforms (SUS V2 UNIX 98 LFS).
6037 #Note: The HAVE_PTMX test was previously "if test -c /dev/ptmx" but this was
6038 #not sufficient for Debian 2.1, because although it had /dev/ptmx, it did not
6039 #have grantpt(), unlockpt(), or ptsname(), so has been changed to look for a
6040 #grantpt() prototype in the header files.  Modified in 8.0.206 to allow for
6041 #libraries that contain .so's but no .a's, e.g. Mandrake 9.0.
6042 #HAVE_BAUDBOY added in 8.0.210 for Red Hat -- it's like AIX ttylock().
6043 #Modified 17 Aug 2005 to use openpty() if available because the other stuff
6044 #dumps core in 64-bit ia64 and x86_64 builds.
6045 #Long file support for 32-bit builds added in 8.0.212 - if features.h contains
6046 #__USE_LARGEFILE64 then we set the flags that must be set before reading any
6047 #header files; on 32-bit platforms such as i386, this produces a 32-bit build
6048 #capable of accessing, sending, receiving, and managing long (> 2GB) files.
6049 #On 64-bit platforms, it does no harm.
6050 #As of 3 March 2009 we detect automatically if we have curses, ncurses,
6051 #or no curses at all.
6052 #OK: 2009/11/16
6053 #Added HAVE_LOCKDEV as openSuSE >= 11.3 uses ttylock directly instead of
6054 #baudboy 2010/08/23
6055 linux:
6056         @if test \
6057         `grep grantpt /usr/include/*.h /usr/include/sys/*.h | wc -l` -gt 0; \
6058         then if test -c /dev/ptmx; then HAVE_PTMX='-DHAVE_PTMX'; \
6059         else HAVE_PTMX=''; fi; fi ; \
6060         if test `grep openpty /usr/include/pty.h | wc -l` -gt 0; \
6061         then HAVE_OPENPTY='-DHAVE_OPENPTY'; \
6062         else HAVE_OPENPTY=''; fi ; \
6063         HAVE_LIBCURSES=''; \
6064         if test -f /usr/lib64/libncurses.so || \
6065            test -f /usr/lib/libncurses.a  || \
6066            test -f /usr/lib/libncurses.so; then \
6067           HAVE_LIBCURSES='-lncurses'; \
6068         else if test -f /usr/lib64/libcurses.so || \
6069            test -f /usr/lib/libcurses.a || \
6070            test -f /usr/lib/libcurses.so; then \
6071              HAVE_LIBCURSES='-lcurses'; fi; fi; \
6072         HAVE_CURSES=''; \
6073         if test -n '$$HAVE_LIBCURSES'; then \
6074           if test -f /usr/include/ncurses.h; then \
6075             HAVE_CURSES='-DCK_NCURSES  -I/usr/include/ncurses'; \
6076           else if test -f /usr/include/curses.h; then \
6077             HAVE_CURSES='-DCK_CURSES'; \
6078         fi; fi; fi; \
6079         if test -f /usr/include/baudboy.h || test -f /usr/include/ttylock.h; \
6080         then HAVE_LOCKDEV='-DHAVE_LOCKDEV' ; \
6081         else HAVE_LOCKDEV='' ; fi ; \
6082         if test -f /usr/include/baudboy.h ; \
6083         then HAVE_BAUDBOY='-DHAVE_BAUDBOY' ; \
6084         else HAVE_BAUDBOY='' ; fi ; \
6085         $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6086         "KFLAGS=$$HAVE_CURSES $$HAVE_PTMX $$HAVE_LOCKDEV \
6087         $$HAVE_BAUDBOY $$HAVE_OPENPTY \
6088         `grep __USE_LARGEFILE64 /usr/include/features.h > /dev/null && \
6089         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
6090         `if test -f /usr/include/crypt.h; then echo -DHAVE_CRYPT_H; fi` \
6091         $(KFLAGS)" \
6092         "LIBS=$(LIBS) $$HAVE_LIBCURSES \
6093         `if test -n '$$HAVE_OPENPTY'; then echo -lutil; fi` \
6094         `if test -f /usr/lib64/libresolv.a || test -f /usr/lib64/libresolv.so \
6095         || test -f /usr/lib/libresolv.a || test -f /usr/lib/libresolv.so; \
6096         then echo -lresolv; fi` \
6097         `if test -f /usr/lib64/libcrypt.a || test -f /usr/lib64/libcrypt.so \
6098         || test -f /usr/lib/libcrypt.a || test -f /usr/lib/libcrypt.so; \
6099         then echo -lcrypt; fi` \
6100         `if test -f /usr/lib64/liblockdev.a || \
6101         test -f /usr/lib64/liblockdev.so || \
6102         test -f /usr/lib/liblockdev.a || \
6103         test -f /usr/lib/liblockdev.so; \
6104         then echo -llockdev; fi`" \
6105         linuxa
6106
6107 # Secure targets for Linux.  These work on RHAS4, RHEL4, and RHEL5,
6108 # unlike some of the older targets that follow.  They hook into the main Linux
6109 # target so we pick up all the other new stuff - large files, baudboy.h, the
6110 # appropriate pty interface, etc.
6111
6112 # Linux with Kerberos 5 (but not 4) and OpenSSL.
6113 # Note: -DOPENSSL_097 is necessary.  Without it we use the wrong names
6114 # for the DES routines and the link step fails.
6115 # Note 2: In recent Red Hat releases libpam might be in /lib instead of in
6116 # /usr/lib.  There should be symlinks in place but if not add them yourself.
6117 #OK: 2010/04/01
6118
6119 # Linux with Kerberos 5.
6120 # Use "make linux+krb5 KFLAGS=-DNO_KRB5_INIT_ETS" if necessary.
6121 #OK 2011/06/14 on Fedora 14:
6122 # make linux+krb5 "LIBS=$LIBS /lib/libk5crypto.so.3 /lib/libcom_err.so.2"
6123 # On RHEL5: make linux+krb5 -UCK_DES
6124 linux+krb5:
6125         @echo 'Making C-Kermit $(CKVER) for Linux with Kerberos 5...'
6126         @case `openssl version` in \
6127           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6128           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6129           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6130           *) OPENSSLOPTION="" ;; \
6131         esac; \
6132         HAVE_DES=''; \
6133         DES_LIB=''; \
6134         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6135            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6136               DES_LIB='-ldes425'; \
6137               HAVE_DES='-DCK_DES -DLIBDES'; \
6138               echo "HAVE DES"; \
6139            else echo "NO DES"; \
6140         fi; \
6141         K5CRYPTO=''; \
6142         if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6143                 K5CRYPTO='-lk5crypto'; \
6144         fi; \
6145         COM_ERR=''; \
6146         if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6147                 COM_ERR='-lcom_err'; \
6148         fi; \
6149         GSSAPILIB='-lgssapi'; \
6150         K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6151         if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6152                 GSSAPILIB='-lgssapi_krb5'; \
6153         fi; \
6154         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6155         "KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 $$OPENSSLOPTION \
6156         -DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6157         -I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6158         "LIBS = $(K5LIB) $$DES_LIB -lcrypto $$GSSAPILIB -lkrb5 \
6159         $$K5CRYPTO $$COM_ERR $(LIBS)"
6160
6161 # Linux with OpenSSL 
6162 # In Linux, SSL libs are often in /lib or /usr/lib and so found by default.
6163 # This targets takes into account the DES library might or might not
6164 # exist.  If it does exist, however, the target will require some editing
6165 # if its basename is not libdes425.  - fdc Tue Sep 21 14:28:00 2010
6166 # IMPORTANT: Some Linux platforms have DES libraries but they are missing
6167 # functions used by Kermit.  In that case you will get fatal errors at
6168 # link time involving routines such as des_ecb3_encrypt, des_random_seed,
6169 # and des_set_odd_parity.  In that case, "make linux KFLAGS=-UCK_DES"
6170 # There's a new warning at the end that should come out if this happens,
6171 # and that should not come out if it didn't.
6172 #
6173 linux+ssl linux+openssl:
6174         @echo 'Making C-Kermit $(CKVER) for Linux+OpenSSL SSLLIB=$(SSLLIB)'
6175         @case `openssl version` in \
6176           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6177           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6178           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6179           *) OPENSSLOPTION="" ;; \
6180         esac; \
6181         HAVE_DES=''; \
6182         DES_LIB=''; \
6183         echo '#include <stdio.h>'       >  testdes.c ; \
6184         echo '#include <openssl/des.h>' >> testdes.c ; \
6185         echo 'int main(void) { DES_key_sched(NULL,NULL); return 0; }' >> testdes.c; \
6186         if $(CC) -o testdes.out testdes.c -ldes425 ; then \
6187               DES_LIB='-ldes425'; \
6188               HAVE_DES='-DCK_DES -DLIBDES'; \
6189               echo "HAVE DES"; \
6190            else echo "NO DES"; \
6191         fi; \
6192         rm -f testdes.c testdes.out; \
6193         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6194         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
6195         -DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6196         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6197         "LIBS = $(SSLLIBS) -lssl $$DES_LIB -lcrypto -lpam -ldl -lz $(LIBS)"; \
6198         if [ ! -f ./wermit ] || [ ckcmai.o -nt ./wermit ]; then \
6199         echo ""; \
6200         echo "If build failed try:"; \
6201         echo ""; \
6202         echo "  make clean ; make linux+ssl KFLAGS=-UCK_DES"; \
6203         echo ""; fi
6204
6205 # Linux with Kerberos 5 and OpenSSL
6206 # OK 2011/05/16
6207 # Add -UCK_DES if functions like des_ecb3_encrypt, es_random_seed,
6208 # come up missing at link time.
6209 linux+krb5+ssl linux+krb5+openssl:
6210         @echo 'Making C-Kermit $(CKVER) for Linux with Krb5 and OpenSSL...'
6211         @case `openssl version` in \
6212           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6213           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6214           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6215           *) OPENSSLOPTION="" ;; \
6216         esac; \
6217         HAVE_DES=''; \
6218         DES_LIB=''; \
6219         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6220            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6221               DES_LIB='-ldes425'; \
6222               HAVE_DES='-DCK_DES -DLIBDES'; \
6223               echo "HAVE DES"; \
6224            else echo "NO DES"; \
6225         fi; \
6226         K5CRYPTO=''; \
6227         if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6228                 K5CRYPTO='-lk5crypto'; \
6229         fi; \
6230         COM_ERR=''; \
6231         if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6232                 COM_ERR='-lcom_err'; \
6233         fi; \
6234         GSSAPILIB='-lgssapi'; \
6235         K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6236         echo K5DIR=$$K5DIR; \
6237         if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6238                 GSSAPILIB='-lgssapi_krb5'; \
6239         fi; \
6240         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6241         "KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6242         -DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6243         -DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6244         -I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6245         "LIBS = $(K5LIB) $(SSLLIBS) -lssl $$DES_LIB -lpam -lz \
6246         -lcrypto $$GSSAPILIB_krb5 -lkrb5 $$K5CRYPTO $$COM_ERR $(LIBS)" \
6247         if [ ! -f ./wermit ] || [ ckcmai.o -nt ./wermit ]; then \
6248         echo ""; \
6249         echo "If build failed try:"; \
6250         echo ""; \
6251         echo "  make clean ; make linux+ssl KFLAGS=-UCK_DES"; \
6252         echo ""; fi
6253
6254 #Linux configured for SSL/TLS, ZLIB, PAM and Shadow Passwords
6255 #OK: 2009/11/17
6256 linux+openssl+zlib+shadow+pam:
6257         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SSL/TLS...'
6258         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6259         "KFLAGS = -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DZLIB -DOPENSSL_097 \
6260         -DCK_SHADOW $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6261         "LIBS= $(SSLLIB) -lssl -lcrypto -lz -lpam -ldl $(LIBS)"
6262
6263 # As above but for Linux systems that have no <sys/select.h>.
6264 linuxns:
6265         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} KFLAGS=-DNO_SYS_SELECT_H
6266
6267 # A minimum-size version for Linux that does only scripting and
6268 # serial communication -- no networks, no file transfer.
6269 linuxso:
6270         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6271         "CFLAGS = -O -DLINUX -pipe -funsigned-char -DPOSIX -DCK_POSIX_SIG \
6272         -DLINUXFSSTND -DNOCOTFMC -DNOXFER -DNODEBUG -DNOCSETS -DNOHELP \
6273         -DNONET -DMINIDIAL -DNOSCRIPT -DNOIKSD -DNOPUSH $(KFLAGS)" \
6274         "LNKFLAGS = $(LNKFLAGS)" "LIBS = "
6275
6276 # The remaining Linux entries are for special or customized builds.  They
6277 # have not been generalized like the ones above.  Ideally, we should allow
6278 # for every combination of libc vs glibc, gcc vs egcs, curses vs ncurses,
6279 # Kerberos IV vs Kerberos V vs SRP (in any combination), and so on.  The
6280 # best way to do this is simply to set KFLAGS and LIBS values and then
6281 # chain to the main "linux" target, as in the examples just above.
6282
6283 #Sharp Zaurus SL-5500 - Linux based
6284 zsl5500:
6285         @echo 'Making C-Kermit $(CKVER) for Sharp Zaurus SL-5500...'
6286         @touch ckcpro.c
6287         @touch wart
6288         $(MAKE) linuxnc KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DZSL5500" \
6289         "CC = gcc" "CC2 = gcc"
6290
6291 #Mklinux DR3 has horrible bug in <utmpbits.h> - see ckufio.c.
6292 mklinux:
6293         $(MAKE) KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DUTMPBUG" \
6294         "LIBS=-lcrypt -lresolv" linuxa
6295
6296 #LinuxPPC 1999
6297 linuxppc:
6298         @echo 'Making C-Kermit $(CKVER) for LinuxPPC 1999...'
6299         @if test -f /usr/lib/libcrypt.a; then \
6300             if test -f /usr/lib/libresolv.a; then \
6301                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6302                 "KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6303                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6304                 "LIBS=-lncurses -lresolv -lcrypt" linuxa ; \
6305             else \
6306                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6307                 "KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6308                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6309                 "LIBS=-lncurses -lcrypt" linuxa ; \
6310             fi \
6311         else \
6312             if test -f /usr/lib/libresolv.a; then \
6313                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6314                 "KFLAGS=$(NCURSES_CPP) \
6315                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6316                 "LIBS=-lncurses -lresolv" linuxa ; \
6317             else \
6318                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6319                 "KFLAGS=$(NCURSES_CPP) \
6320                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6321                 "LIBS=-lncurses" linuxa ; \
6322             fi \
6323         fi
6324
6325
6326 # Like "make linux" but built with egcs rather than gcc.
6327 # If you get "Internal compiler error xxx, output pipe has been closed",
6328 # try removing -pipe.
6329 linuxegcs:
6330         @echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later with egcs...'
6331         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = egcs" "CC2 = egcs" \
6332         "CFLAGS = -O -DLINUX -pipe -funsigned-char \
6333         -DPOSIX -DCK_POSIX_SIG -DCK_NCURSES -DNOCOTFMC \
6334         -DTCPSOCKET -DLINUXFSSTND $(KFLAGS)" \
6335         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lncurses -lcrypt -lresolv"
6336
6337 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1 (no K4 compatibility).
6338 linux+krb5-old:
6339         @echo 'Making C-Kermit $(CKVER) for Linux on Intel with Kerberos...'
6340         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6341         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6342         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6343         -DCK_ENCRYPTION -DCK_DES -DCK_CURSES -DCK_POSIX_SIG \
6344         -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H $(K5INC) $(K5INC)/krb5 \
6345         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6346         "LIBS = $(K5LIB) -lncurses -ltermcap -ldes425 -lkrb5 \
6347         -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6348
6349 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1 with K4 compatibility.
6350 #
6351 # Requires the Kerberos 1.2.1 be compiled with KRB4 compatibility.
6352 linux+krb5+krb4:
6353         @echo 'Making C-Kermit $(CKVER) for Linux on Intel with Kerberos...'
6354         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6355         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6356         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
6357         -DCK_ENCRYPTION -DCK_DES -DCK_CURSES -DCK_POSIX_SIG \
6358         -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H $(K5INC) $(K5INC)/krb5 \
6359         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6360         "LIBS = $(K5LIB) -lncurses -ltermcap -lkrb4 -ldes425 -lkrb5 \
6361         -lcom_err -lk5crypto -lcrypt -lgssapi_krb5 -lresolv"
6362
6363 # Linux on Intel PC with SRP 1.7.4 using GNU MP, Krypto, and Eric Young's
6364 # DES library.  Remove the -DCK_DES, -DLIBDES and -ldes if you do not have
6365 # Eric Young's# libdes.a installed.
6366 #
6367 linux+srp+gmp:
6368         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6369         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6370         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6371         -DCK_AUTHENTICATION -DCK_SRP \
6372         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6373         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6374         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6375         "LIBS = $(SRPLIB) \
6376         -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto -lcrypt -lresolv"
6377
6378 linux+srp+gmp+no-des:
6379         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP ...'
6380         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6381         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6382         -DCK_AUTHENTICATION -DCK_SRP \
6383         -DCK_ENCRYPTION -DCK_CAST \
6384         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6385         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6386         "LIBS = $(SRPLIB) \
6387         -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lresolv"
6388
6389 linux+srp+gmp-export:
6390         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6391         $(MAKE) srpmit-export KTARGET=$${KTARGET:-$(@)} \
6392         "CC = gcc" "CC2 = gcc" \
6393         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6394         -DCK_AUTHENTICATION -DCK_SRP -DFNFLOAT \
6395         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6396         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6397         "LIBS = $(SRPLIB) \
6398         -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lm -lresolv"
6399
6400 linux+srp+gmp+pam:
6401         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6402         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6403         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6404         -DCK_AUTHENTICATION -DCK_SRP \
6405         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6406         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6407         -DCK_PAM -DFNFLOAT $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6408         "LIBS = $(SRPLIB) -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto \
6409         -lcrypt -lpam -ldl -lm -lresolv"
6410
6411 #Linux on Intel PC with SRP 1.7.4 built with OpenSSL for Big Number Math
6412 #and Cryptographic functionality.
6413 #
6414 linux+srp:
6415         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6416         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6417         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6418         -DCK_AUTHENTICATION -DCK_SRP \
6419         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6420         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6421         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6422         "LIBS = $(SRPLIB) $(SSLLIB) \
6423         -lncurses -ltermcap -lsrp -lkrypto -lcrypto -lcrypt -lresolv"
6424
6425 linux+srp+pam:
6426         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6427         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6428         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6429         -DCK_AUTHENTICATION -DCK_SRP \
6430         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6431         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6432         -DCK_PAM -DFNFLOAT $(SRPINC) $(SSLINC) $(KFLAGS)" \
6433         "LNKFLAGS = $(LNKFLAGS)" \
6434         "LIBS = $(SRPLIB) $(SSLLIB) -lncurses -ltermcap -lsrp -lkrypto \
6435         -lcrypto -lcrypt -lpam -ldl -lm -lresolv"
6436
6437 linux+shadow+pam:
6438         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with Shadow+PAM...'
6439         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6440         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6441         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6442         -DCK_SHADOW -DCK_PAM -DFNFLOAT \
6443         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6444         "LIBS = -lncurses -ltermcap -lcrypt -lpam -ldl -lm -lresolv"
6445
6446 #Linux configured for SSL/TLS.
6447 #Remove -ltermcap if it causes trouble e.g. in Debian 2.2.
6448 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6449 oldlinux+openssl:
6450         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SSL/TLS...'
6451         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6452         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6453         -DCK_AUTHENTICATION -DCK_SSL \
6454         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6455         -DFNFLOAT $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6456         "LIBS= $(SSLLIB) \
6457         -lncurses -ltermcap -lssl -lcrypto -lm -lresolv -lcrypt"
6458
6459 #Linux configured for SSL/TLS and Shadow Passwords
6460 #Remove -ltermcap if it causes trouble e.g. in Debian 2.2.
6461 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6462 linux+openssl+shadow:
6463         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SSL/TLS...'
6464         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6465         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6466         -DCK_AUTHENTICATION -DCK_SSL \
6467         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6468         -DFNFLOAT -DCK_SHADOW $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6469         "LIBS= $(SSLLIB) \
6470         -lncurses -ltermcap -lssl -lcrypto -lm -lresolv -lcrypt"
6471
6472 #Linux on Intel PC with SRP and SSL/TLS.
6473 #
6474 # libsrp.a should be build with OpenSSL
6475 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6476 #Remove -ltermcap if it causes trouble e.g. in Debian 2.2.
6477 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6478 linux+srp+openssl:
6479         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6480         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6481         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6482         -DCK_AUTHENTICATION -DCK_SRP \
6483         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6484         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6485         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6486         "LIBS = $(SRPLIB) $(SSLLIB) \
6487         -lncurses -ltermcap -lsrp -lssl -lkrypto -lcrypto \
6488         -lcrypt -lresolv"
6489
6490 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2 and SRP.
6491 #
6492 # libsrp.a should be build with GNU MP (libgmp.a)
6493 # instead of AT&T CryptoLib (libcrypt.a) due to naming conflicts with
6494 # standard distribution Linux libraries.
6495 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6496 linux+krb5+krb4+srp:
6497         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB54+SRP...'
6498         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6499         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6500         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6501         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6502         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6503         $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6504         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6505         "LIBS = $(K5LIB) $(SRPLIB) \
6506         -lncurses -ltermcap -lsrp -lgmp -lgssapi_krb5 -lkrypto \
6507         -ldes -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv"
6508
6509 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6510 #
6511 # libsrp.a should be build with OpenSSL
6512 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6513 # Requires OpenSSL 0.9.6a or higher
6514 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6515 linux+krb5+krb4+srp+openssl:
6516         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6517         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6518         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6519         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6520         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6521         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6522         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6523         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6524         "LIBS = $(K5LIB) $(SRPLIB) $(SSLLIB) \
6525         -lncurses -ltermcap -lsrp \
6526         -lkrb4 -lssl -lkrypto -lcrypto \
6527         -lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6528
6529 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SSL/TLS.
6530 #
6531 # libsrp.a should be build with OpenSSL
6532 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6533 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6534 linux+krb5+krb4+openssl:
6535         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6536         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6537         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6538         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6539         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6540         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6541         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6542         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6543         "LIBS = $(K5LIB) $(SSLLIB) \
6544         -lncurses -ltermcap \
6545         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6546         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6547
6548 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SSL/TLS.
6549 #
6550 # libsrp.a should be build with OpenSSL
6551 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6552 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6553 linux+krb5+krb4+openssl+shadow:
6554         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6555         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6556         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6557         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6558         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6559         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6560         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6561         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6562         "LIBS = $(K5LIB) $(SSLLIB)  \
6563         -lncurses -ltermcap \
6564         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6565         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6566
6567 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2, SSL/TLS.
6568 #
6569 # libsrp.a should be build with OpenSSL
6570 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6571 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6572 linux+krb5+krb4+openssl+zlib+shadow:
6573         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6574         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6575         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6576         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 -DZLIB \
6577         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6578         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6579         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6580         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6581         "LIBS = $(K5LIB) $(SSLLIB) \
6582         -lncurses -ltermcap \
6583         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6584         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lz"
6585
6586 linux+krb5+krb4+srp-export:
6587         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6588         $(MAKE) xermit-export KTARGET=$${KTARGET:-$(@)} \
6589         "CC = gcc" "CC2 = gcc" \
6590         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6591         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6592         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6593         $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6594         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6595         "LIBS = $(SRPLIB) $(K5LIB) \
6596         -lncurses -ltermcap -lsrp -lgmp -lkrb4 -ldes425 -lkrb5 -lgssapi_krb5 \
6597         -lcom_err -lk5crypto -lkrypto -lcrypt -lresolv"
6598
6599 linux+krb5+krb4+srp+pam:
6600         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6601         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6602         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6603         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6604         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6605         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6606         -DCK_PAM $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6607         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6608         "LIBS = $(SRPLIB) $(K5LIB) \
6609         -lncurses -ltermcap -lsrp -lgmp -ldes -lkrb4 -ldes425 -lkrb5 \
6610         -lcom_err -lk5crypto -lgssapi_krb5 -lkrypto -lcrypt -lpam -ldl \
6611         -lresolv"
6612
6613 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6614 # and PAM.
6615 #
6616 # libsrp.a should be build with OpenSSL
6617 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6618 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6619 linux+krb5+krb4+srp+openssl+pam-debug:
6620         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6621         $(MAKE) xermit-debug KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6622         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6623         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6624         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6625         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6626         -w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG $(K5INC) $(K5INC)/krb5 \
6627         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6628         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6629         -lncurses -ltermcap -lsrp -lkrb4 -lssl -lkrypto -lcrypto \
6630         -lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lpam -ldl"
6631
6632 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SRP and SSL/TLS.
6633 # and PAM.
6634 #
6635 # libsrp.a should be build with OpenSSL
6636 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6637 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6638 linux+krb5+krb4+srp+openssl+pam:
6639         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6640         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6641         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6642         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6643         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6644         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6645         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6646         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6647         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB)  \
6648         -lm -lncurses -ltermcap -lsrp \
6649         -lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6650         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6651
6652 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6653 # with ZLIB and PAM
6654 #
6655 # libsrp.a should be build with OpenSSL
6656 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6657 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6658 linux+krb5+krb4+srp+openssl+zlib+pam:
6659         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6660         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6661         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6662         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6663         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6664         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6665         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6666         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6667         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6668         -lm -lncurses -ltermcap -lsrp \
6669         -lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6670         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6671
6672 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6673 # with ZLIB, Shadow Passwords, and PAM
6674 #
6675 # libsrp.a should be build with OpenSSL
6676 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6677 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6678 linux+krb5+krb4+srp+openssl+zlib+shadow+pam:
6679         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6680         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6681         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6682         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6683         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6684         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6685         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6686         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6687         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6688         -lm -lncurses -ltermcap -lsrp -lkrypto \
6689         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6690         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6691
6692 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6693 # with Shadow Passwords, PAM
6694 #
6695 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6696 linux+krb5+krb4+openssl+shadow+pam:
6697         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL,...'
6698         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6699         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6700         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6701         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6702         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6703         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6704         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6705         "LIBS = $(K5LIB) $(SSLLIB) \
6706         -lm -lncurses -ltermcap \
6707         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6708         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6709
6710 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6711 # with ZLIB, Shadow Passwords, PAM
6712 #
6713 # libsrp.a should be build with OpenSSL
6714 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6715 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6716 linux+krb5+krb4+openssl+zlib+shadow+pam:
6717         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6718         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6719         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6720         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6721         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6722         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6723         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6724         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6725         "LIBS = $(K5LIB) $(SSLLIB) \
6726         -lm -lncurses -ltermcap \
6727         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6728         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6729
6730 #Red Hat 9 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6731 #Also works around bug in curses in which terminal goes dead after
6732 #returning from file-transfer display.  Assumes OpenSSL 0.9.7 or later.
6733 redhat9:
6734         @echo "Building SECURE Kermit for Red Hat 9.0..."
6735         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6736         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6737
6738 #Ditto plus SRP (which is not normally included with RH Linux).
6739 redhat9+srp:
6740         @echo "Building SECURE Kermit for Red Hat 9.0..."
6741         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6742         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6743
6744 #For Red Hat AS 2.1 with OpenSSL
6745 redhat21+ssl:
6746         @echo "Building SECURE Kermit for Red Hat 2.1..."
6747         $(MAKE) linux+openssl+zlib+shadow+pam \
6748         KTARGET=$${KTARGET:-$(@)} "KFLAGS =  $(KFLAGS)"
6749
6750 #Red Hat Linux 8.0 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6751 #Also works around bug in curses in which terminal goes dead after
6752 #returning from file-transfer display.
6753 redhat80:
6754         @echo "Building SECURE Kermit for Red Hat 8.0..."
6755         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6756         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6757
6758 redhat80+srp:
6759         @echo "Building SECURE Kermit for Red Hat 8.0..."
6760         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6761         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6762
6763 #Red Hat Linux 7.3 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6764 #Also works around bug in curses in which terminal goes dead after
6765 #returning from file-transfer display.
6766 redhat73:
6767         @echo "Building SECURE Kermit for Red Hat 7.3..."
6768         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6769         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6770
6771 redhat73+srp:
6772         @echo "Building SECURE Kermit for Red Hat 7.3..."
6773         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6774         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6775
6776 #Red Hat Linux 7.2 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6777 #Also works around bug in curses in which terminal goes dead after
6778 #returning from file-transfer display.
6779 redhat72:
6780         @echo "Building SECURE Kermit for Red Hat 7.2..."
6781         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6782         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6783
6784 redhat72+srp:
6785         @echo "Building SECURE Kermit for Red Hat 7.2..."
6786         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6787         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6788
6789 #Red Hat Linux 7.1 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6790 #Also works around bug in curses in which terminal goes dead after
6791 #returning from file-transfer display.
6792 redhat71:
6793         @echo "Building SECURE Kermit for Red Hat 7.1..."
6794         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6795         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6796
6797 redhat71+srp:
6798         @echo "Building SECURE Kermit for Red Hat 7.1..."
6799         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6800         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6801
6802 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6803 # with ZLIB and PAM and Shadow passwords
6804 linux+krb5+openssl+zlib+shadow+pam:
6805         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB5,SSL...'
6806         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6807         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6808         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DCK_SHADOW -DHAVE_PTMX \
6809         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6810         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6811         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6812         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6813         "LIBS = $(K5LIB) $(SSLLIB) \
6814         -lm -lncurses -ltermcap -lssl -lcrypto -lgssapi_krb5 \
6815         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6816
6817 linuxnotcp:
6818         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DNONET $(KFLAGS)"
6819
6820 # "make linuxnotcp" with lcc (see http://www.cs.princeton.edu/software/lcc)
6821 # lcc does not understand various gcc extensions:
6822 #  "__inline__" -- can be eliminated by adding "-D__inline__="
6823 #  "__asm__ and "long long" -- in header files, should be surrounded by
6824 #                              "#ifndef(__STRICT_ANSI__)"/"#endif"
6825 #  however, TCP requires some __asm__ functions, so cannot be compiled
6826 linuxnotcp-lcc:
6827         @echo 'Making C-Kermit $(CKVER) for Linux with lcc ...'
6828         @echo 'Read comments in makefile for additional information.'
6829         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = lcc" "CC2 = lcc" \
6830         "CFLAGS = -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG \
6831         -UTCPSOCKET -DLINUXFSSTND -DNOLEARN $(KFLAGS)" \
6832         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6833
6834 # Linux 0.99.14 thru 1.0 with gcc, dynamic libraries, curses, TCP/IP.
6835 # For Linux 1.2 or later, use "make linux" (above).
6836 #
6837 # -DLINUXFSSTND (Linux File System Standard) gives UUCP lockfile /var/lock with
6838 # string pid.  Remove this and get /usr/spool/uucp with int pid, which was used
6839 # in early Linux versions.
6840 #
6841 # If you get compiler errors regarding <linux/serial.h>, add -DNOHISPEED.
6842 #
6843 # -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
6844 # least 0.99.14; if it causes trouble for you, just remove it.
6845 #
6846 # -DCK_CURSES: Here we link with the regular curses library.  But you should
6847 # be using ncurses.  Internally, the ckuusx.c module includes <curses.h>, but
6848 # this really should be <ncurses.h>.  Thus if you have the new curses
6849 # material, you should either install it with the standard names, or else
6850 # create symbolic links from the standard names to the new ones.  If you get
6851 # compile-time errors complaining about data definitions in termcap.h, it
6852 # means you have new kernel material mixed with older libc header files.  To
6853 # fix, add "#include <termios.h>" to the <termcap.h> file.  Or if all this is
6854 # too confusing, create a new makefile entry based on this one, but with
6855 # -DCK_CURSES removed from CFLAGS and the entire LIBS= clause removed.
6856 #
6857 # But wait, there's more.  On most Linux systems, -ltermcap must be included
6858 # in LIBS.  But on others, the linker complains that libtermcap can't be
6859 # found.  In that case, try removing -ltermcap from LIBS=.
6860 #
6861 # But wait, there's more.  The format of the PID string in the UUCP lockfile
6862 # changed between Linux FSSTND 1.0 and 1.2.  In the earlier standard, it had
6863 # leading zeros; in the second, it has leading spaces.  By default this entry
6864 # uses the newer standard.  To force the older one, add -DFSSTND10.
6865 #
6866 # "The nice thing about the Linux standard is there are so many to choose from"
6867 #
6868 # NOTE: Remove -DBIGBUFOK for small-memory or limited-resource systems.
6869 linux10:
6870         @echo 'Making C-Kermit $(CKVER) for Linux 1.0 or earlier...'
6871         @echo 'IMPORTANT: Read the comments in the linux section of the'
6872         @echo 'makefile if you get compilation or link errors.'
6873         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6874         "CFLAGS = -O -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DLINUX \
6875         -DTCPSOCKET -DLINUXFSSTND -DOLINUXHISPEED -DNOLEARN $(KFLAGS)" \
6876         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6877
6878 #This version was used for Linux prior to C-Kermit 6.0.192.
6879 #Now the "Linux File System Standard" is considered standard, ditto TCP/IP.
6880 linuxold:
6881         @echo 'Making C-Kermit $(CKVER) for Linux...'
6882         @echo 'For FSSTND-recommended UUCP lockfiles, use:'
6883         @echo '  make linux "KFLAGS=-DLINUXFSSTND".'
6884         @echo 'Read comments in makefile for additional options.'
6885         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6886         "CFLAGS = -O -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DNOLEARN \
6887         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6888
6889 # LynxOS 2.2 with GCC compiler, TCP/IP and fullscreen display.
6890 # Probably also works with Lynx 2.1, and maybe even Lynx 2.0.
6891 # -X means use termios serial drivers rather than BSD4.3-style sgtty drivers.
6892 # If you have trouble with this, try "make bsd KFLAGS=-DNOFDZERO".
6893 lynx:
6894         @echo 'Making C-Kermit $(CKVER) for LynxOS 2.2 with TCP/IP'
6895         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6896         "CFLAGS= -O -DPOSIX -DDIRENT -DSETREUID -DCK_CURSES -DTCPSOCKET \
6897         -DCK_ANSIC -DLYNXOS -DNOLEARN" "LNKFLAGS = -X" "LIBS = -lcurses -lbsd"
6898
6899 lynx22:
6900         $(MAKE) lynx KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
6901
6902 # LynxOS 2.1 with GCC compiler 1.40 and TCP/IP.
6903 lynx21:
6904         @echo 'Making C-Kermit $(CKVER) for LynxOS 2.1 with TCP/IP'
6905         $(MAKE) kermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6906         "CFLAGS= -O -DSETREUID -DTCPSOCKET -DCK_ANSIC -DBSD4 -DLYNXOS" \
6907         "LIBS = -lbsd"
6908
6909 #SCO Xenix 2.2.1 for IBM PC, XT, PS2/30, or other 8088 or 8086 machine
6910 #Should this not work, try some of the tricks from sco286.
6911 #NOTE: -DRENAME is omitted for early SCO Xenix releases because it didn't
6912 #exist, or its semantics were different from the later POSIX-compliant
6913 #version of rename().
6914 sco86:
6915         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/86...'
6916         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6917         "CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOUNICODE -DNOLEARN \
6918         $(KFLAGS) -Dunix -F 3000 -i -M0me" \
6919         "LNKFLAGS = -F 3000 -i -s -M0me" "LIBS = -lx"
6920
6921 #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
6922 #Reportedly, this "make" can fail simply because of the size of this
6923 #makefile.  If that happens, use "makeL", or edit out some of the
6924 #other entries.  No debugging or character-set translation.
6925 sco286:
6926         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/286...'
6927         @echo 'If make fails, try using makeL.'
6928         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6929         "CFLAGS= -xenix -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
6930         -DNOIKSD -DNODEBUG -DNOTLOG -DNOCSETS -DNOLEARN \
6931         $(KFLAGS) -F 3000 -i -M2let16" \
6932         "LIBS = -lx" "LNKFLAGS = -xenix -s -O -LARGE -F 3000 -i -M2let16"
6933
6934 #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
6935 #As above, but with HDBUUCP (This one might need fixing -- see sco286).
6936 sco286hdb:
6937         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/286 with HDB UUCP...'
6938         @echo 'If make fails, try using makeL.'
6939         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6940         "CFLAGS= -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
6941         -DHDBUUCP -DNOIKSD -DNOUNICODE -DNOLEARN \
6942         $(KFLAGS) -F 3000 -i -M2let32" \
6943         "LIBS = -lx" "LNKFLAGS = -s -O -LARGE -F 3000 -i -M2let32"
6944
6945 #SCO Xenix/386 2.2.2 and 2.2.3
6946 sco386:
6947         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.2...'
6948         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6949         "CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOREDIRECT -DNOLEARN \
6950         -Dunix -DRDCHK -DNAP -DNOUNICODE $(KFLAGS) -Otcl -M3e" \
6951         "LNKFLAGS = -s" "LIBS = -lx"
6952
6953 #SCO XENIX/386 2.2.3 with Excelan TCP/IP + curses.
6954 # NOTE: This one might need some work in C-Kermit 6.0.
6955 # You might need to include /usr/include/sys/types.h
6956 # containing "typedef char *caddr_t;".  Then at least it compiles.
6957 sco386netc:
6958         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.3 + Excelan TCP'
6959         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6960         "CFLAGS= -I/usr/include/exos -DXENIX -DCK_CURSES -DNOUNICODE \
6961         -Dunix -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC -DNOMKDIR -DNOFILEH \
6962         -DNOLEARN -DNOREDIRECT -DNOIKSD -DNO_DNS_SRV $(KFLAGS) -Otcl -M3e" \
6963         "LNKFLAGS = -s" "LIBS = -lc -lx -lsocket -lcurses -ltermcap"
6964
6965 #SCO XENIX/386 2.3.3 with gcc 1.37 or later...
6966 sco386gcc:
6967         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
6968         @echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
6969         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6970         "CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
6971         -DNOJC -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) \
6972         -traditional -fpcc-struct-return -fstrength-reduce \
6973         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
6974         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
6975         -DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD -DNOREDIRECT \
6976         -DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx"
6977
6978 #As above, but with curses...
6979 sco386gccc:
6980         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
6981         @echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
6982         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6983         "CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
6984         -DNOJC -DNODEBUG -DCK_CURSES -DNOUNICODE -DNOLEARN $(KFLAGS) \
6985         -traditional -fpcc-struct-return -fstrength-reduce \
6986         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DNOREDIRECT \
6987         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
6988         -DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD \
6989         -DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx -lcurses -ltermlib"
6990
6991 #SCO UNIX (and ODT) entries...
6992 #
6993 #NOTE: All SCO UNIX entry LIBS should have "-lc_s -lc -lx" IN THAT ORDER (if
6994 #shared C library is desired), or else "-lc -lx" IN THAT ORDER.  Use shared C
6995 #libraries to save memory, but then don't expect to run the resulting binary
6996 #on a different machine.  When using -lc_s, you must also use -lc, because the
6997 #shared C library does not contain all of libc.a.  And in all cases, -lc must
6998 #ALWAYS precede -lx.
6999 #
7000 #ANOTHER NOTE: -DRENAME is included in all SCO UNIX entries.  Remove it if it
7001 #causes trouble.  No harm is done by removing it (see ckuins.txt).
7002 #
7003 #AND ANOTHER: In theory, it should be possible to run SCO UNIX binaries on
7004 #SCO Xenix 2.3 and later.  In practice, this might not work because of the
7005 #libraries, etc.  Also, don't add the -link -z switch (which is supposed to
7006 #root out references to null pointers) because it makes UNIX binaries core
7007 #dump when they are run under Xenix.
7008
7009 #NOTE: -Otcl removed and replaced by -O, since -Otcl produced incorrect code.
7010 #SCO UNIX/386 3.2.0, 3.2.1, and SCO Xenix 2.3.x
7011 sco3r2:
7012         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.0 or 3.2.1 ...'
7013         @echo 'Warning: If make blows up, edit the makefile to join'
7014         @echo 'the following three continued lines into one line.'
7015         @echo 'Also, remove -DRENAME if _rename unresolved at link time.'
7016         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7017         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7018         -DRENAME -DNOIKSD -DNOJC $(KFLAGS) -O" \
7019         "LNKFLAGS = -s" "LIBS = -lc -lx"
7020
7021 #SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7022 #In case of compilation or runtime problems, try adding
7023 #"-DUID_T=int -DGID_T=int" to the CFLAGS.  If that doesn't work, try
7024 #"-DUID_T=uid_t -DGID_T=gid_t".
7025 sco3r2net:
7026         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan...'
7027         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7028         "CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7029         -DHDBUUCP -DRDCHK -DNAP -DRENAME -DTCPSOCKET -DEXCELAN -DNOJC \
7030         -DNOIKSD -DNOREDIRECT $(KFLAGS) -O" \
7031         "LNKFLAGS = -s" "LIBS = -lc -lx -lsocket"
7032
7033 #SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7034 #As above, with curses added.
7035 sco3r2netc:
7036         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan / curses...'
7037         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7038         "CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7039         -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC $(KFLAGS) \
7040         -DRENAME -DCK_CURSES -DNOREDIRECT -DNOIKSD -O" "LNKFLAGS = -s" \
7041         "LIBS = -lc -lx -lsocket -lcurses -ltermcap"
7042
7043 #SCO UNIX 3.2.x or SCO Xenix 2.3.x with Racal InterLan TCP/IP support
7044 # Extra compile flags for other version of Racal InterLan TCP/IP:
7045 # Xenix286/NP621-286, use -Ml -DPARAMH -DINTERLAN -Di286 -DSYSV
7046 # Xenix386/NP621-386, use -DPARAMH -DINTERLAN -Di386 -DSYSV
7047 # ISC386ix/NP622I, use -DSYSV -Di386
7048 # SCO Unix3.2/NP622S, use -DSYSV -Di386 -DSCO_UNIX
7049 # AT&T SVR3.2/NP622A, use -DSYSV -Di386 -DATT
7050 sco3r2netri:
7051         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Racal InterLan...'
7052         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7053         "CFLAGS= -I/usr/include/interlan -DXENIX -DNOFILEH -DHDBUUCP \
7054         -DSVR3 -DRDCHK -DNAP -DTCPSOCKET -DPARAMH -DINTERLAN -Di386 -DSYSV \
7055         -DRENAME -DNOREDIRECT -DNOIKSD -DNOJC -DNOLEARN $(KFLAGS) -Otcl -M3e" \
7056         "LNKFLAGS = -s" "LIBS = -lc -lx -ltcp"
7057
7058 # SCO XENIX/386 2.3.3 SysV with SCO TCP/IP
7059 # System V STREAMS TCP developed by Lachman Associates Inc and
7060 # Convergent Technologies.
7061 # -DRENAME removed since some reports indicate it is not supported
7062 # (whereas others say it is.)
7063 sco3r2lai:
7064         @echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7065         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7066         "CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7067         -DNAP -DTCPSOCKET -DPWID_T=int -DNOREDIRECT -DNOIKSD -DNOLEARN \
7068         $(KFLAGS) -Otcl -i -M3e" \
7069         "LNKFLAGS = -i -s" "LIBS = -lc -lx -lsocket"
7070
7071 sco3r2laic:
7072         @echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7073         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7074         "CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7075         -DNAP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES -DM_TERMINFO -DNOLEARN \
7076         -DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) -Otcl -i -M3e" \
7077         "LNKFLAGS = -i -s" "LIBS = -ltinfo -lc -lx -lsocket"
7078
7079 #SCO UNIX/386 3.2v2 (POSIX job control), shared libraries.
7080 sco3r22:
7081         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7082         make wermit KTARGET=$${KTARGET:-$(@)} \
7083         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7084         -DNAP -DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOIKSD \
7085         -DNOREDIRECT $(KFLAGS) -O" \
7086         "LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7087
7088 #SCO UNIX/386 3.2v2, POSIX job control, fullscreen file transfer display,
7089 #dynamic memory allocation, shared C library
7090 sco3r22c:
7091         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7092         @echo 'Warning: If make blows up, edit the makefile to join'
7093         @echo 'the following four continued lines into one line.'
7094         make wermit KTARGET=$${KTARGET:-$(@)} \
7095         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7096         -DCK_CURSES -DDIRENT -DRENAME -DNOREDIRECT -DNOIKSD \
7097         -DPID_T=pid_t -DPWID_T=int $(KFLAGS) -O" \
7098         "LNKFLAGS = -s" "LIBS = -lcurses -lc_s -lc -lx"
7099
7100 #SCO UNIX/386 3.2v2 with gcc 1.40 or later (POSIX job control)
7101 sco3r22gcc:
7102         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2, gcc'
7103         @echo 'Warning: If make blows up, edit the makefile to join'
7104         @echo 'the following seven continued lines into one line.'
7105         make wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" \
7106         "CFLAGS= -O -DPOSIX -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
7107         -DNOLEARN -DRENAME -traditional -fpcc-struct-return -fstrength-reduce \
7108         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
7109         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7110         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7111         -DPID_T=pid_t -DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) " \
7112         "LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7113
7114 #SCO UNIX/386 3.2v2 (ODT 1.1) (POSIX job control) with SCO TCP/IP, shared libs
7115 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7116 sco3r22net:
7117         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.2 + TCP/IP...'
7118         @echo 'Warning: If make blows up, edit the makefile to join'
7119         @echo 'the following three continued lines into one line.'
7120         make xermit KTARGET=$${KTARGET:-$(@)} \
7121         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET \
7122         -DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOREDIRECT -DNOIKSD \
7123         $(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lsocket -lc_s -lc -lx"
7124
7125 #As above, but with curses for fullscreen file transfer display.
7126 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7127 sco3r22netc:
7128         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 + TCP/IP...'
7129         @echo 'Warning: If make blows up, edit the makefile to join'
7130         @echo 'the following three continued lines into one line.'
7131         make xermit KTARGET=$${KTARGET:-$(@)} "CFLAGS= \
7132         -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DRENAME \
7133         -DCK_CURSES -DDIRENT -DNOIKSD -DNOREDIRECT \
7134         -DPID_T=pid_t -DPWID_T=int -O $(KFLAGS)" \
7135         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7136
7137 #SCO XENIX 2.3.4, no curses, no TCP/IP, no IKSD.
7138 #This one built and tested in C-Kermit 7.0.
7139 #lcfp is C library floating-point support.
7140 #Use -M3 to generate 32-bit i386 code instead of 16-bit segmented i286 code.
7141 #Use -Me to enable MS nonstandard keywords in system headers.
7142 #Use -W2 or W3 to increase the warning level.
7143 sco234:
7144         @echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4...'
7145         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7146         "CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7147         -DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7148         -DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DSCO234 -DDCLGETCWD $(KFLAGS) \
7149         -Otcl" "LNKFLAGS = -s" "LIBS = -lcfp -lc -lx"
7150
7151 #SCO XENIX 2.3.4, no TCP/IP, no IKSD, but with curses.
7152 # Built and tested in C-Kermit 7.0.
7153 # Note: XENIX 2.3.4 does not have newterm() so no point in adding -DCK_NEWTERM.
7154 sco234c:
7155         @echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4 + curses...'
7156         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7157         "CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7158         -DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7159         -DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DCK_CURSES -DSCO234 \
7160         -DDCLGETCWD $(KFLAGS) -Otcl" \
7161         "LNKFLAGS = -s" "LIBS = -lcfp -lc -ltinfo -lx"
7162
7163 #SCO XENIX 2.3.4 with SCO TCP/IP and curses, no IKSD.
7164 # Built and tested in C-Kermit 7.0.  TCP/IP works and curses works.
7165 # Previous versions of this target included -lmalloc, but this caused "error:
7166 # " _calloc : symbol defined more than once" at link time so I removed it.
7167 # Results are likely to vary depending on exactly which version of the SDK
7168 # and TCP/IP SDK you have.
7169 sco234netc:
7170         @echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4 + TCP + curses...'
7171         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7172         "CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7173         -DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7174         -DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DCK_CURSES -DSCO234 \
7175         -DDCLGETCWD -DTCPSOCKET -DNO_DNS_SRV $(KFLAGS) -Otcl" \
7176         "LNKFLAGS = -s" "LIBS = -ltinfo -lsocket -lcfp -lc -lx"
7177
7178 # SCO 3.2v4.x targets...
7179
7180 #  NOTE: Add -DDCLPOPEN and/or -DDCLFDOPEN to anySCO 3.2v4.x non-gcc entries
7181 #  that complain about fdopen() or popen() at compile time.  They compile OK
7182 #  without these flags as of July 1999.  However, the gcc entries seem to
7183 #  need them, at least for gcc 2.7.2.2.
7184
7185 #  NOTE 2: To enable IKSD support, add:
7186 #  -DCK_LOGIN -DNOGETUSERSHELL -DNOINITGROUPS
7187 #  to CFLAGS (not tested).
7188
7189 #SCO UNIX/386 3.2v4 (POSIX job control), curses, ANSI C compilation,
7190 #<dirent.h> (EAFS) file system.  Remove -lmalloc if it causes trouble.  It was
7191 #put there to avoid core dumps caused by regular libc.a malloc.  Add -J to make
7192 #all chars unsigned.  This version uses select() for CONNECT and also has
7193 #high-precision timers and so might not work on non-TCP systems, in which case
7194 #sco32v4ns should be used instead.
7195 # If you get _ftime redefinition_ complaint, try adding -DODT30 to CFLAGS.
7196 sco32v4:
7197         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7198         make xermit KTARGET=$${KTARGET:-$(@)} \
7199         "CFLAGS= -DCK_SCO32V4 -DNOFILEH -DHDBUUCP -DCK_CURSES -DM_TERMINFO \
7200         -DNOANSI -DSELECT -DNOIKSD -DDCLGETCWD -NOLSTAT \
7201         -DNOLINKBITS -DDCLGETCWD $(KFLAGS) -O" \
7202         "LNKFLAGS = -s" "LIBS = -lcurses -lmalloc -lsocket -lc_s -lc -lx"
7203
7204 # As above, but with no dependence on sockets library or select().
7205 sco32v4ns:
7206         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7207         @echo 'No select() and no sockets library.'
7208         make wermit KTARGET=$${KTARGET:-$(@)} \
7209         "CFLAGS= -DCK_SCO32V4 -DNOFILEH -DHDBUUCP -DCK_CURSES -DM_TERMINFO \
7210         -DNOANSI -DNOIKSD -DNOGFTIMER -DCK_POLL -DNAP -DDCLGETCWD -DNOLSTAT \
7211         -DNOLINKBITS -DDCLGETCWD -DNOLEARN -O $(KFLAGS)" \
7212         "LNKFLAGS = -s" "LIBS = -lcurses -lmalloc -lc_s -lc -lx"
7213
7214 #SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7215 #<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7216 #Reportedly it's OK to add -DCK_REDIR and -DCK_WREFRESH, and to remove -lc_s.
7217 #Requires SCO TCP/IP development system or ODT for telnet.h, etc.
7218 #See sco32v4 above for additional comments.
7219 #NOTE: No more room for -Dxxx -- 25 seems to be the limit.  Move some to
7220 #ckcdeb.h or somewhere...
7221 sco32v4net:
7222         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7223         @echo 'If you get _ftime redefinition_ complaint,'
7224         @echo 'use make sco-odt30.'
7225         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7226         "CFLAGS= -DNOFILEH -DHDBUUCP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES \
7227         -DNAP -DCK_WREFRESH -DNOLINKBITS -D_IBCS2 -DSELECT -DNOLSTAT \
7228         -DDCLGETCWD -DCK_SCO32V4 -DNOIKSD -O \
7229         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS) -s" \
7230         "LIBS = $(LIBS) -lcurses -lsocket -lmalloc -lsocket -lc_s -lc -lx"
7231
7232 #SCO UNIX/386 3.2v4 with gcc 1.40 or later, POSIX job control.
7233 #Also see comments in sco32r4 entry.
7234 sco32v4gcc:
7235         make xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" \
7236         "CFLAGS= -O -DNOFILEH -DHDBUUCP -DNOANSI -DCK_CURSES -DM_TERMINFO \
7237         -traditional -fpcc-struct-return -fstrength-reduce -funsigned-char \
7238         -D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLINKBITS \
7239         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DSELECT -DNOLSTAT \
7240         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 -DDCLGETCWD \
7241         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7242         -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) " \
7243         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7244
7245 #SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7246 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7247 #<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7248 #gcc 1.40 or later.  Also see comments in sco32r4 entry.
7249 sco32v4netgcc:
7250         make xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2=gcc" \
7251         "CFLAGS= -O2 -DNOFILEH -DHDBUUCP -DSELECT -DNOLSTAT \
7252         -DNOANSI -DTCPSOCKET -DCK_CURSES -DM_TERMINFO \
7253         -D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLINKBITS \
7254         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DDCLGETCWD \
7255         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7256         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7257         -DDCLPOPEN -DDCLFDOPEN $(KFLAGS)" \
7258         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7259
7260 #As above but with bgcc BOUNDS CHECKING (for developers only).  -lcheck has
7261 #bounds-checking replacements for malloc, memcpy, bcopy, etc, so must come
7262 #before -lsocket and -lc.
7263 sco32v4netbgcc:
7264         make xermit KTARGET=$${KTARGET:-$(@)} \
7265         "CC = bgcc -pipe -m386" "CC2=bgcc -pipe -m386" \
7266         "CFLAGS= -O1 -g -DNOFILEH -DHDBUUCP -DSELECT \
7267         -DNOANSI -DTCPSOCKET -DCK_CURSES -DM_TERMINFO \
7268         -D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLSTAT \
7269         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DNOLINKBITS \
7270         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 -DDCLGETCWD \
7271         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7272         -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) " \
7273         "LNKFLAGS = -g" "LIBS = -lcurses -lcheck -lsocket -lx"
7274
7275 sco32v4netnd:
7276         @echo sco32v4net with no debug
7277         $(MAKE) "MAKE=$(MAKE)" sco32v4net KTARGET=$${KTARGET:-$(@)} \
7278         "KFLAGS=$(KFLAGS) -DNODEBUG -DNOTLOG" "LIBS=$(LIBS)"
7279
7280 sco3r2netnd:
7281         @echo sco32v4netnd built for SCO XENIX 2.3 under SCO UNIX...
7282         @echo   requires copying /lib/386/Slibc.a to /lib/386/Slibc_s.a and
7283         @echo   getting /lib/386/Slibsocket.a from a XENIX devkit.
7284         @echo   WARNING: poll/CK_POLL supported only on XENIX 2.3.4
7285         echo    For earlier XENIX systems, replace CK_POLL with RDCHK.
7286         $(MAKE) "MAKE=$(MAKE)" sco32v4netnd KTARGET=$${KTARGET:-$(@)} \
7287         "KFLAGS=$(KFLAGS) -x2.3 -DNORENAME -DNOSYMLINK" \
7288         "LNKFLAGS = $(LNKFLAGS) -x2.3" \
7289         "LIBS=-ldir -lcfp $(LIBS)"
7290
7291 #SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7292 #<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7293 #Reportedly it's OK to add -DCK_REDIR and -DCK_WREFRESH, and to remove -lc_s.
7294 #Requires SCO TCP/IP development system or ODT for telnet.h, etc.
7295 #See sco32v4 above for additional comments.
7296 # Note: "xermit" means use the select() version of the CONNECT module.
7297 sco32v4netx:
7298         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7299         @echo 'If you get _ftime redefinition_ complaint,'
7300         @echo 'use make sco-odt30.'
7301         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7302         "CFLAGS= -DNOFILEH -DHDBUUCP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES -DNAP \
7303         -DCK_WREFRESH -DNOLINKBITS -D_IBCS2 -DSELECT -DDCLGETCWD \
7304         -DCK_SCO32V4 -DNOIKSD -DNOLSTAT -O $(KFLAGS)" \
7305         "LNKFLAGS = $(LNKFLAGS) -s" \
7306         "LIBS = $(LIBS) -lcurses -lsocket -lmalloc -lsocket -lc_s -lc -lx"
7307
7308 sco32v4netndx:
7309         @echo sco32v4netx with no debug
7310         $(MAKE) "MAKE=$(MAKE)" sco32v4netx KTARGET=$${KTARGET:-$(@)} \
7311         "KFLAGS=$(KFLAGS) -DNODEBUG -DNOTLOG" "LIBS=$(LIBS)"
7312
7313 sco3r2netndx:
7314         @echo sco32v4netndx built for SCO XENIX 2.3 under SCO UNIX...
7315         @echo   requires copying /lib/386/Slibc.a to /lib/386/Slibc_s.a and
7316         @echo   getting /lib/386/Slibsocket.a from a XENIX devkit.
7317         @echo   WARNING: poll/CK_POLL supported only on XENIX 2.3.4
7318         echo    For earlier XENIX systems, replace CK_POLL with RDCHK.
7319         $(MAKE) "MAKE=$(MAKE)" sco32v4netndx KTARGET=$${KTARGET:-$(@)} \
7320         "KFLAGS=$(KFLAGS) -x2.3 -DNORENAME -DNOSYMLINK" \
7321         "LNKFLAGS = $(LNKFLAGS) -x2.3" \
7322         "LIBS=-ldir -lcfp $(LIBS)"
7323
7324 sco-odt30:
7325         @echo SCO ODT 3.0
7326         $(MAKE) "MAKE=$(MAKE)" sco32v4net KTARGET=$${KTARGET:-$(@)} \
7327         "KFLAGS=$(KFLAGS) -DODT30"
7328
7329 #SCO OpenServer 5.0 (SCO UNIX 3.2v5.0) with SCO development tools, no TCP/IP.
7330 #SCO OSR5 is much more like standard System V than previous SCO releases.
7331 #The SCO development tools include TCP/IP, so this target is only for creating
7332 #artificially limited versions of kermit required by site policy rather than
7333 #the operating system.  NOSYSLOG is included because syslog() requires the
7334 #sockets library.
7335 sco32v500:
7336         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5...
7337         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7338         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7339         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7340         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DNOSYSLOG \
7341         $(KFLAGS)" \
7342         "LIBS=-lcurses $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7343
7344 sco32v5:
7345         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v500
7346
7347
7348 #SCO OpenServer 5.0 with networking, SCO development tools.
7349 #Networking libraries are now provided with the OS.
7350 sco32v500net:
7351         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5...
7352         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7353         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7354         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7355         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7356         -DNO_DNS_SRV $(KFLAGS)" \
7357         "LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7358
7359 sco32v5net:
7360         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v500net
7361
7362 #SCO OpenServer 5.0 with networking and OpenSSL, SCO development tools.
7363 #Networking libraries are now provided with the OS.
7364 sco32v500net+ssl:
7365         @echo Making C-Kermit $(CKVER) for SCO OSR5 with OpenSSL...
7366         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7367         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7368         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7369         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7370         -DNO_DNS_SRV -DCK_AUTHENTICATION -DCK_SSL -DCK_TRIGGER \
7371         $(SSLINC) $(SSLLIB) $(KFLAGS)" \
7372         "LIBS=$(SSLLIB) -lcurses -lsocket -lssl -lcrypto $(LIBS)" \
7373         "LNKFLAGS=$(LNKFLAGS)"
7374
7375 #SCO OpenServer 5.0 with gcc, no networking.
7376 #Note: NOSYSLOG required for non-net entries because it requires <socket.h>
7377 sco32v500gcc:
7378         @echo Using gcc...
7379         $(MAKE) "MAKE=$(MAKE)" sco32v500CC=gcc CC2=gcc \
7380         KTARGET=$${KTARGET:-$(@)} "KFLAGS= $(KFLAGS)"
7381
7382 #SCO OpenServer 5.0 with networking, gcc.
7383 sco32v500netgcc:
7384         @echo TCP/IP networking added - using gcc...
7385         $(MAKE) "MAKE=$(MAKE)" sco32v500net CC=gcc CC2=gcc \
7386         KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
7387
7388 #SCO OpenServer 5.0 with networking, gcc, elf.
7389 sco32v500netgccelf:
7390         @echo TCP/IP networking added - using gcc, dynamic elf library
7391         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7392         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-O3 -belf" "LNKFLAGS=-belf"
7393
7394 sco32v502:
7395         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7396         "KFLAGS=-DSCO_OSR502 $(KFLAGS)"
7397
7398 #SCO OpenServer 5.0.2 with networking, SCO development tools.
7399 sco32v502net:
7400         @echo TCP/IP networking added...
7401         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7402         "KFLAGS=-b elf -DSCO_OSR502 $(KFLAGS)"
7403
7404 #SCO OpenServer 5.0.4 (SCO UNIX 3.2v5.0.4) with SCO development tools.
7405 #Like 5.0, but adds high serial speeds.  First POSIX-based SCO version.
7406 #Note: the -O flag is deliberately omitted for /bin/cc (= /usr/ccs/bin/cc).
7407 sco32v504:
7408         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5.0.4...
7409         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7410         "CFLAGS= -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7411         -DSCO_OSR504 -b elf -DPOSIX \
7412         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7413         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DNOSYSLOG $(KFLAGS)" \
7414         "LIBS=-lcurses $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7415
7416 #SCO OpenServer 5.0.4 with gcc, no networking.
7417 sco32v504gcc:
7418         @echo Using gcc...
7419         $(MAKE) "MAKE=$(MAKE)" sco32v504 "CC=gcc" "CC2=gcc" \
7420         KTARGET=$${KTARGET:-$(@)} "KFLAGS= $(KFLAGS)"
7421
7422 #SCO OpenServer 5.0.4 with networking.
7423 #SCO development tools (/bin/cc = /usr/ccs/bin/cc).
7424 #Optimization deliberately suppressed.
7425 sco32v504net:
7426         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5.0.4...
7427         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7428         "CFLAGS= -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7429         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7430         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7431         -b elf -DSCO_OSR504 -DPOSIX -DNO_DNS_SRV $(KFLAGS)" \
7432         "LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7433
7434 #SCO OpenServer 5.0.4 with networking, gcc.
7435 sco32v504netgcc:
7436         @echo TCP/IP networking added - using gcc...
7437         @echo If gcc crashes on ckwart.c then build it by hand:
7438         @echo " gcc -o wart -DCK_SCOV5 ckwart.c"
7439         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7440         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DSCO_OSR504 -DPOSIX $(KFLAGS)"
7441
7442 #SCO OpenServer 5.0.4 with networking, gcc, elf.
7443 sco32v504netgccelf:
7444         @echo TCP/IP networking added - using gcc, dynamic elf library
7445         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc"
7446         KTARGET=$${KTARGET:-$(@)} \
7447         "KFLAGS=-DSCO_OSR504 -DPOSIX -O3 -belf $(KFLAGS)" \
7448         LNKFLAGS="-belf"
7449
7450 #SCO OpenServer 5.0.5 (SCO UNIX 3.2v5.0.5) with SCO /bin/cc.
7451 #Like 5.0, but adds high serial speeds.  First POSIX-based SCO version.
7452 #You might have to add "LIBS=-ltinfo" (some do, some don't).
7453 sco32v505:
7454         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7455         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7456
7457 #SCO OpenServer 5.0.5 (SCO UNIX 3.2v5.0.5) with SCO UDK.
7458 #This one can't see the high serial speeds and anything to do with modem
7459 #signals doesn't work because UKD cc has its own alternative universe of
7460 #header files.
7461 sco32v505udk:
7462         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7463         "KFLAGS=-DSCO_OSR505 -DDCLTIMEVAL -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7464
7465 #SCO OpenServer 5.0.5 with networking, SCO /bin/cc.
7466 #See comments with sco32v505 targets.
7467 sco32v505net:
7468         @echo TCP/IP networking added...
7469         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7470         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7471
7472 #SCO OpenServer 5.0.5 with networking and OpenSSL, SCO /bin/cc.
7473 #See comments with sco32v505 targets.
7474 sco32v505net+ssl:
7475         @echo TCP/IP networking and OpenSSL added...
7476         $(MAKE) "MAKE=$(MAKE)" sco32v500net+ssl KTARGET=$${KTARGET:-$(@)} \
7477         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS) " \
7478         "LIBS=$(SSLLIB) -lcurses -lsocket -lssl -lcrypto $(LIBS)" \
7479         "LNKFLAGS=$(LNKFLAGS)"
7480
7481 #SCO OpenServer 5.0.5 with networking, SCO UDK.
7482 #See comments with above sco32v505 targets.
7483 sco32v505udknet:
7484         @echo TCP/IP networking added...
7485         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7486         "KFLAGS=-DSCO_OSR505 -DDCLTIMEVAL -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7487
7488 #SCO OpenServer 5.0.5 with gcc, no networking.
7489 sco32v505gcc:
7490         @echo Using gcc...
7491         $(MAKE) "MAKE=$(MAKE)" sco32v500 "CC=gcc" "CC2=gcc" \
7492         KTARGET=$${KTARGET:-$(@)} \
7493         "KFLAGS=-DSCO_OSR505 -DPOSIX -funsigned-char $(KFLAGS)"
7494
7495 #SCO OpenServer 5.0.5 with gcc, no networking, no shadow passwords.
7496 sco32v505xgcc:
7497         @echo Using gcc...
7498         $(MAKE) "MAKE=$(MAKE)" sco32v500 "CC=gcc" "CC2=gcc" \
7499         KTARGET=$${KTARGET:-$(@)} \
7500         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -DPOSIX -funsigned-char $(KFLAGS)"
7501
7502 #SCO OpenServer 5.0.5 with networking, gcc.
7503 sco32v505netgcc:
7504         @echo TCP/IP networking added - using gcc...
7505         @echo If gcc crashes on ckwart.c then build it by hand:
7506         @echo " gcc -o wart -DCK_SCOV5 ckwart.c"
7507         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7508         KTARGET=$${KTARGET:-$(@)} \
7509         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -DPOSIX -funsigned-char $(KFLAGS)"
7510
7511 #egcs is just like gcc but generates ELF by default.
7512 #Or you can include -melf (not -belf) to force it.
7513 sco32v505netegcs:
7514         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v505netgcc \
7515         KTARGET=$${KTARGET:-$(@)}
7516
7517 #SCO OpenServer 5.0.5 with networking, gcc, elf.
7518 sco32v505netgccelf:
7519         @echo TCP/IP networking added - using gcc, dynamic elf library
7520         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7521         "KFLAGS=-DSCO_OSR505 -DPOSIX -funsigned-char -O3 -belf $(KFLAGS)" \
7522         KTARGET=$${KTARGET:-$(@)} LNKFLAGS="-belf"
7523
7524 #SCO OpenServer 5.0.6 with SCO /bin/cc.
7525 # Add -DDCLTIMEVAL when building with UDK.
7526 #Like 5.0.5.   IMPORTANT: Use sco32v506a target for 5.0.6a.
7527 sco32v506:
7528         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7529         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -b elf -DPOSIX $(KFLAGS)"
7530
7531 #SCO OpenServer 5.0.6 with networking, SCO /bin/cc.
7532 # Add -DDCLTIMEVAL when building with UDK.
7533 # IMPORTANT: Use sco32v506a target for 5.0.6a.
7534 sco32v506net:
7535         @echo TCP/IP networking added...
7536         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7537         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -b elf -DPOSIX $(KFLAGS)"
7538
7539 #SCO OpenServer 5.0.6a, no networking, SCO development tools.
7540 #This one has patched sio drivers that, for the first time,
7541 #actually handle modem signals correctly.
7542 # Add -DDCLTIMEVAL when building with UDK.
7543 sco32v506a:
7544         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7545         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR506A -DNEEDMDMDEFS \
7546         -b elf -DPOSIX $(KFLAGS)"
7547
7548 #SCO OpenServer 5.0.6a with networking, SCO development tools.
7549 # Add -DDCLTIMEVAL when building with UDK.
7550 sco32v506anet:
7551         @echo TCP/IP networking added...
7552         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7553         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR506A -DNEEDMDMDEFS \
7554         -b elf -DPOSIX $(KFLAGS)"
7555
7556 #SCO OpenServer 5.0.7, no networking, SCO development tools.
7557 #Adds flags to make PTY and SSH commands work.  These have been tested
7558 #only in 5.0.7 but probably they can also be added to earlier OSR5 targets.
7559 sco32v507:
7560         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7561         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7562         -DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT \
7563         -b elf -DPOSIX $(KFLAGS)"
7564
7565 #SCO OpenServer 5.0.7 as above but with networking.
7566 sco32v507net:
7567         @echo TCP/IP networking added...
7568         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7569         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7570         -DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT \
7571         -b elf -DPOSIX $(KFLAGS)"
7572
7573 #SCO OpenServer 6 (new target 30 Jan 2006)
7574 sco_osr600:
7575         @echo Making C-Kermit $(CKVER) for SCO OpenServer 6.0.0...
7576         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7577         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7578         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7579         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7580         -DNO_DNS_SRV -DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7581         -DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT -DDCLTIMEVAL \
7582         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
7583         -DSOCKOPT_T=socklen_t -DGSOCKNAME_T=size_t -DGPEERNAME_T=size_t \
7584         -DHERALD=\"\\\" SCO OpenServer `uname -v`\\\"\" \
7585         -b elf -DPOSIX $(KFLAGS)" \
7586         "LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7587
7588 #Tandy 16/6000 with Xenix 3.0 (16 bits)
7589 #C-Kermit 7.0 (and later) do not build here; "too many defines".
7590 #Add more -DNOxxx options to remove features if program won't load.
7591 #Successful operation is a function of program size, physical memory,
7592 #available swap space, etc.  The following stripped-down configuration
7593 #seems to work on most Tandy 6000s.  NOTE: "-+" means allow long variable
7594 #names, needed for C-Kermit 6.0 because some identifiers are not unique
7595 #within the first six characters.
7596 trs16:
7597         @echo 'Making C-Kermit $(CKVER) for Tandy 16/6000, Xenix 3.0...'
7598         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7599         "CFLAGS = -+ -DATTSV -DTRS16 -DNOMKDIR -DDCLPOPEN -DCK_CURSES \
7600         -DNODEBUG -DNOTLOG -DNOHELP -DNOSCRIPT -DNOCSETS -DNOIKSD \
7601         -DNOREDIRECT -DNOSYSLOG -DNOPUTENV -DNOREALPATH -DNOLEARN \
7602         $(KFLAGS) -O" "LIBS= -lcurses -ltermcap" "LNKFLAGS = -+ -n -s"
7603
7604 # QNX 4.21 and above, 32-bit version, Watcom C32 10.6, fully configured,
7605 # except no job control because QNX 4.x does not support it.  New NCURSES
7606 # library used instead of CURSES.
7607 #
7608 # -Oatx optimizes to favor speed over size: loop optimization, inline fn's.
7609 # -Os favors size over speed.  Saves 30-40K out of about 1.75M.
7610 # -3r = generate 386 code with register-based arg passing.
7611 # -3s = generate 386 code with stack-based arg passing.
7612 # -ms = separate code & data 4GB segments (32-bit builds only).
7613 # -mf = flat memory model code+data in one 4GB segment (ditto).
7614 # -zc = place literal strings in code segment.
7615 # -N4M = Big stack (increase the digit upon SIGSEGVs at runtime).
7616 # chars are unsigned by default (-j makes them signed by default).
7617 # -NOUUCP is included because QNX doesn't use it.
7618 # Add these to the end if you like but they dump core on my QNX 4.25 system:
7619 #
7620 #       @wermit -h >use.qnx
7621 #       @usemsg wermit use.qnx
7622 #       @rm use.qnx
7623 #
7624 # If you get warnings about HEADER or C_IN add -DNO_DNS_SRV.
7625 qnx32:
7626         @echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit...'
7627         $(MAKE) xermit \
7628         "LNKFLAGS = -N4M -3r" \
7629         "CFLAGS = -ms -3r -DQNX -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7630         -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7631         -DNOINITGROUPS -DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7632         "LIBS= -lsocket -lncurses -ltermcap"
7633
7634 # As above but no networking since some QNX systems do not have TCP/IP
7635 # installed, or the TCP/IP developers kit, which includes all the needed
7636 # header files.  This entry has not been tested on a QNX system that, in
7637 # fact, does not have TCP/IP installed; some adjustments might be necessary,
7638 # in particular regarding the use of select(): is -lsocket needed, can we
7639 # get the needed definitions from non-TCP/IP header files (FD_SET, etc)?
7640 qnx32nonet:
7641         @echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit, no net...'
7642         $(MAKE) xermit \
7643         "LNKFLAGS = -N4M -3r" \
7644         "CFLAGS = -3r -ms -DQNX -DNONET -DNOIKSD -DCK_CURSES \
7645         -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7646         -DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7647         "LIBS= -lsocket -lncurses -ltermcap"
7648         @wermit -h >use.qnx
7649         @usemsg wermit use.qnx
7650         @rm use.qnx
7651
7652 # Synonym for qnx32.
7653 qnx:
7654         $(MAKE) qnx32 "KFLAGS=$(KFLAGS)"
7655
7656 # QNX 4.21 and above, 16-bit version, Watcom C 8.5 - and higher on i286 PCs
7657 # and above.
7658 #
7659 #       IMPORTANT: Do not use Watcom C 10.6!!!
7660 #       If you have it installed, add "-v9.52 to CFLAGS"
7661 #
7662 # NOTE: QNX 4.23 onward does not work on 286's anyway.
7663 # Stacksize 26000, objects larger than 100 bytes in their own segments,
7664 # string constants to the codesegment, etc.  Fully configured except job ctrl.
7665 # This entry works for building a 16-bit executable on a 32-bit system, but
7666 # has not been tested on a 16-bit system.  Uses large memory model, links
7667 # explicitly with large-model sockets library.  Correct-model curses library
7668 # is chosen automatically.  See comment in qnx32 entry about -DNOUUCP.
7669 #
7670 # WARNING:
7671 #
7672 # Watcom C prior to 10.6 never had released curses library. To link against it,
7673 # you must obtain ported free curses source from ftp://ftp.qnx.com/usr/free,
7674 # then compile and build library (cursesl.lib) and place it in /usr/lib.  You
7675 # must also copy curses.h to /usr/include.  Be aware that if you have Watcom
7676 # 10.6 installed, you should already have curses.h, which is the new ncurses
7677 # library. You must back it up and use free curses.h instead, since ncurses is
7678 # only for 32-bit applications and some definitions in these files are
7679 # different (e.g., clearok()).  For safety, curses is not defined in build.
7680 #
7681 # In 7.0 -DNOHELP added to keep ckuus2.c from blowing up; NOCSETS and NOSPL
7682 # added because ckuus4 was blowing up, and NOFLOAT just because it seemed
7683 # dangerous (remove -DNOFLOAT if you want to try it), The result works OK
7684 # except for some mysterious beeps upon termination of the top-level keyword.
7685 #
7686 # Things to try next time we get in trouble:
7687 #  . Change -zt100 to something smaller like -zt25
7688 #  . Change -Oatx to -Omilerat (enable stack checking)
7689 #  . Maybe get rid of -v9.52 -- it's only there because we were warned.
7690 #
7691 qnx16:
7692         @echo 'Making C-Kermit $(CKVER) for QNX 4.21, 16-bit...'
7693         $(MAKE) xermit \
7694         "LNKFLAGS = -2 -ml -N 26000" \
7695         "CFLAGS = -2 -Oatx -zc -zt100 -ml -DQNX -DQNX16 -DNOUUCP -DNOHELP \
7696         -DCK_REDIR -DSELECT -DSELECT_H -DNOJC -DNOGETUSERSHELL -DNOCSETS \
7697         -v9.52 -DTCPSOCKET -DCK_RTSCTS -DCK_ANSIC -DNOINITGROUPS -DNOKVERBS \
7698         -DNORANDOM -DNOCSETS -DNOSPL -DNOFLOAT -DPID_T=pid_t $(KFLAGS)"
7699
7700 # QNX 4.1, 16-bit version, with Watcom C 8.5 on i286 PCs and above.
7701 # stacksize 26000, objects larger than 100 bytes in their own segments,
7702 # string constants to the codesegment, etc.  Add -DNOUUCP if desired.
7703 qnx16_41:
7704         @echo 'Making C-Kermit $(CKVER) for QNX 4.1, 16-bit...'
7705         $(MAKE) xermit \
7706         "LNKFLAGS = -mh -N 26000" "CFLAGS = -Wc,-fpc -Wc,-j -DNOGETUSERSHELL \
7707         -Wc,-Ols -Wc,-zdf -Wc,-zc -Wc,-zt100 -mh -DPOSIX -DQNX -DDIRENT \
7708         -DNOCYRIL -DNODEBUG -DNOMSEND -DMINIDIAL -DNOXMIT -DNOSCRIPT -DNOSPL \
7709         -DNOSETKEY -DNOINITGROUPS -DQNX16 -DPID_T=pid_t $(KFLAGS)"
7710
7711 # QNX Neutrino 2 (pwaechtler@qnx.de) crosscompiled on QNX 4.25.
7712 # Gets lots of compiler warnings.
7713 qnx_nto2+:
7714         @echo 'Making C-Kermit $(CKVER) for QNX Neutrino 2+ '
7715         cc -o wart ckwart.c
7716         $(MAKE) xermit \
7717         "CC = qcc -Vgcc_ntox86" \
7718         "CC2 = qcc -Vgcc_ntox86" \
7719         "LNKFLAGS = " \
7720         "CFLAGS = -DNEUTRINO -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7721         -DNOUUCP -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS \
7722         -DNOJC -DNOINITGROUPS -DCK_ANSIC -DPID_T=pid_t -DUNIX -DDIRENT \
7723         -DMYREAD -DBSD44ORPOSIX -DSVORPOSIX -DNDGPWNAM $(KFLAGS)" \
7724         "LIBS= -lsocket -lncurses "
7725
7726 # QNX 6 (= Neutrino 2.xx) native build (kirussel@cisco.com).
7727 qnx6:
7728         @echo 'Making C-Kermit $(CKVER) for QNX6'
7729         $(MAKE) xermit KTARGET=QNX6 \
7730         "CFLAGS = -DPOSIX -DCK_POSIX_SIG -DNETPTY -DNOARROWKEYS \
7731         -DUSE_TIOCSDTR -DBIGBUFOK -DCKMAXOPEN=100 -DRLOGCODE -DNOREALPATH \
7732         -DMAXNAMLEN=48 -DQNX6 -DUSE_TERMIO -DINIT_SPTY \
7733         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DDYNAMIC \
7734         -DTCPSOCKET -DNOGETUSERSHELL -DCK_REDIR -DSELECT -DSELECT_H \
7735         -DCK_RTSCTS -DNOJC -DSVORPOSIX -DBSD44ORPOSIX -DNOUUCP -DCK_ANSIC \
7736         $(KFLAGS) -O" \
7737         "LIBS= -lsocket  -lncurses"
7738
7739 #MINIX/2.0 32 Bit version for intel 386+ running the POSIX-compliant MINIX
7740 # version 2.0 (The definition of fatal avoids a conflict with a symbol by
7741 # the same name in the curses library.) It is impossible to compile with
7742 # network support since Minix does not support Berkeley sockets.
7743 # Note: use chmem liberally on the compiler passes, make, and the final
7744 # kermit executable. (3 megabytes of memory for each is sufficient.)
7745 # From Terry McConnell, Syracuse U, and Will Rose.  Will says:
7746 # The stacks for make and some compiler passes needed to be increased
7747 # with chmem as follows:
7748 #   make 1MB
7749 #   /usr/lib/em_cemcom.ansi 3MB
7750 #   /usr/lib/em_opt 1MB
7751 #   /usr/lib/i386/cg 1MB
7752 #   /usr/lib/i386/as 1MB
7753 # The compiler temporary directory was set to /usr/tmp via the TMPDIR
7754 # environment variable; more than 1MB of temporary space was needed.
7755 # Kermit itself needs at least 1MB of stack.
7756 minix20:
7757         @echo 'Making C-Kermit $(CKVER) for MINIX 2.0/386...'
7758         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} EXT=o \
7759         "CFLAGS=  -wo -DV7 -DMINIX2 -DMINIX -DSIG_V -D_POSIX_SOURCE \
7760         -DCKCPU=\\\"i-386\\\" -DNOIKSD -Dfatal=myfatal -DCK_CURSES -DNOLEARN \
7761         -DNOSYSLOG -DUSE_MEMCPY -DNOREALPATH $(KFLAGS)" "LIBS= -lcurses"
7762
7763 #MINIX/386 (PC Minix modified by Bruce Evans in Australia for 386 addressing)
7764 # For MINIX 1.5+ (but < 2.0)
7765 minix386:
7766         @echo 'Making C-Kermit $(CKVER) for MINIX/386...'
7767         @echo 'TOTALLY UNTESTED!'
7768         $(MAKE) wermit EXT=s KTARGET=$${KTARGET:-$(@)} \
7769         "CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7770
7771 #MINIX/386 Minix modified by Bruce Evans in Australia to use 386 addressing
7772 minix386gcc:
7773         @echo 'Making C-Kermit $(CKVER) for MINIX/386 with gcc...'
7774         @echo 'TOTALLY UNTESTED!'
7775         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC=gcc -g -O" "CC2=gcc -g" \
7776         "CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7777
7778 #MINIX - 68k version with ACK compiler.
7779 # If you have trouble compiling or running wart, "touch wart".
7780 # If it still doesn't work, "touch ckcpro.c".
7781 # The version configured below has many features removed, including
7782 # the TRANSMIT, MSEND, HELP, and SCRIPT commands, international
7783 # character set support, and the entire script programming language.
7784 # But it does have an interactive command parser.
7785 # Make sure make(1) has (at least) 100000 chmemory!
7786 # If you are using the Amsterdam C compiler, you might have to add "-D__ACK__".
7787 minix68k:
7788         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with ACK...'
7789         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7790         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7791         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7792         -DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7793         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7794
7795 #MINIX - 68k version with c68 compiler.
7796 # If you have trouble compiling or running wart, "touch wart" or
7797 # "touch ckcpro.c". Compiling ckudia.c (no -DNODIAL!) might fail. :-(
7798 # Give c68 250000 bytes of stack+heap; make sure make(1) has at least
7799 # 100000 chmemory.  On a 1MB Atari ST this means that the recursive
7800 # call of make fails due to memory shortage.  Try "make -n minixc68 >makeit",
7801 # followed by ". makeit".  Otherwise, as above.
7802 minixc68:
7803         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7804         $(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7805         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7806         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7807         -DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7808         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7809
7810 #MINIX - 68k version with c68 compiler.
7811 #A variation on the above that was recently (Sep 95) reported to work.
7812 minixc68a:
7813         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7814         $(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7815         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE \
7816         -DCK_ANSIC -DNODEBUG -DNOTLOG -DMINIDIAL -DEXTEN -DMYCURSES \
7817         -DNOSCRIPT -DNOCSETS -DNOSPL -DNOJC -DDIRENT -DNOLEARN \
7818         -DNOSETKEY -DNOESCSEQ $(KFLAGS) \
7819         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7820
7821 #MIPS Computer Systems with UMIPS RISC/OS 4.52 = AT&T UNIX System V R3.0.
7822 #Remove -DNOJC if job control can be safely used.
7823 mips:
7824         @echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7825         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7826         "CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC -DNOLEARN -DPID_T=int \
7827         -DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)"
7828
7829 #As above, but with TCP/IP and fullscreen support.
7830 mipstcpc:
7831         @echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7832         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7833         "CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC \
7834         -DTCPSOCKET -DCK_CURSES -I/usr/include/bsd \
7835         -DPID_T=int -DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)" \
7836         "LIBS = -lcurses -lbsd"
7837
7838 #Motorola Delta System V/68 R3, signal() is void rather than int.
7839 #Uses dirent.h and Honey DanBer uucp.  Supports TCP/IP.
7840 #After building, use "mcs -d" to reduce size of the executable program.
7841 sv68r3:
7842         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3...'
7843         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7844         "CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DTCPSOCKET \
7845         -DNOUNICODE -DNOLEARN -DUSE_MEMCPY $(KFLAGS) -O" "LNKFLAGS ="
7846
7847 #Motorola Delta System V/68 R3V5, signal() is void rather than int.
7848 #Uses dirent.h and Honey DanBer UUCP.  Supports TCP/IP.
7849 #After building, use "mcs -d" to reduce size of the executable program.
7850 sv68r3v5:
7851         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5'
7852         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7853         "CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DUSE_MEMCPY \
7854         -DTCPSOCKET -DINADDRX -DNOUNICODE -DFNFLOAT -DNOLEARN $(KFLAGS) -O" \
7855         "LNKFLAGS =" "LIBS = -linet -lm"
7856
7857 #Motorola MVME147 System V/68 R3 V5.1. Requires gcc 2.1 to compile.
7858 #After building, use "mcs -d" to reduce size of the executable program.
7859 sv68r3v51:
7860         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5.1'
7861         $(MAKE) wermit "CC=gcc-delta" "CC2=gcc-delta" \
7862         KTARGET=$${KTARGET:-$(@)} \
7863         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNODEBUG -DNO_DNS_SRV -DNOLEARN \
7864         -DNOUNICODE -DFNFLOAT -DSV68 -DUSE_MEMCPY $(KFLAGS) \
7865         -O2 -v -ftraditional" \
7866         "LNKFLAGS = -s -v" "LIBS = -lm881 -lm"
7867
7868 #Motorola MVME147 System V/68 R3V6. derived from Motorola Delta System R3V5.
7869 #Checked on larger Motorola System V/68 R3V6 (with NSE Network Services Ext.)
7870 #After building, use "strip" to reduce size of the executable program.
7871 # "LIBS = -lnsl" removed in C-Kermit 6.1 - put back if needed.
7872 # "LIBS = lm" added in 7.1/8.0 for floating-point math.
7873 # ckuusr.c clobbers the optimizer.
7874 sv68r3v6:
7875         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V6'
7876         $(MAKE) ckuusr.$(EXT) KTARGET=$${KTARGET:-$(@)} \
7877         "CFLAGS = -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
7878         -DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
7879         -DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)"
7880         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7881         "CFLAGS = -O -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
7882         -DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
7883         -DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)" \
7884         "LNKFLAGS =" "LIBS = -lm"
7885
7886 #Motorola Delta System V/88 R32, signal() is void rather than int.
7887 #Uses dirent.h and Honey DanBer uucp.  Needs <sys/utime.h> for setting
7888 #file dates.  Supports TCP/IP.
7889 #After building, use "mcs -d" to reduce size of the executable program.
7890 sv88r32:
7891         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R32...'
7892         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7893         "CFLAGS = -DSV88R32 -DDIRENT -DHDBUUCP -DTCPSOCKET \
7894         -DSYSUTIMEH -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG $(KFLAGS) -O" \
7895         "LIBS= -lcurses -lresolv" "LNKFLAGS = -s"
7896
7897 #Motorola Delta System V/88 R40.  Has <sys/termiox.h>, regular Berkeley
7898 #sockets library, i.e. in.h and inet.h are not misplaced in sys (rather than
7899 #netinet and arpa, respectively).  Uses ANSI C constructs, advisory file
7900 #locking on devices, etc.  curses support added.  Reportedly, the
7901 #/usr/include/sys/vnode.h file has a bug which must be fixed before this
7902 #makefile entry can work correctly.  The "if DEBUG" directive at about line
7903 #320 must be changed to "ifdef DEBUG" (Reportedly, this was fixed in
7904 #in System V/88 R4.3).
7905 #After building, use "mcs -d" to reduce size of the executable program.
7906 sv88r40:
7907         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R40...'
7908         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7909         "CFLAGS = -O -DSVR4 -DMOTSV88R4 -DDIRENT -DHDBUUCP -DSTERMIOX \
7910         -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG -DFNFLOAT \
7911         $(KFLAGS)" \
7912         "LIBS= -lsocket -lnsl -lcurses -lresolv -lm" "LNKFLAGS = -s"
7913
7914 #As above but without the floating-point math library.
7915 sv88r40nm:
7916         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R40...'
7917         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7918         "CFLAGS = -O -DSVR4 -DMOTSV88R4 -DDIRENT -DHDBUUCP -DSTERMIOX \
7919         -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG $(KFLAGS)" \
7920         "LIBS= -lsocket -lnsl -lcurses -lresolv" "LNKFLAGS = -s"
7921
7922 #As above but with floating-point math library support \ffp...() functions
7923 #and S-Expressions.
7924
7925 #Olivetti X/OS R2.3, 3.x.
7926 #NOTES:
7927 # . If you build the executable on 2.x X/OS, it will also run on 3.x.
7928 # . If you build it on 3.x X/OS, it will NOT run on 2.x.
7929 # . Kermit can run with no privileges unless the uucp lines are protected,
7930 #   in which case kermit must be owned by uucp with suid bit set:
7931 #   chown uucp kermit ; chmod 4111 kermit.
7932 xos23:
7933         @echo 'Making C-Kermit $(CKVER) for Olivetti X/OS...'
7934         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7935         'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP $(KFLAGS)' \
7936         "LIBS=" "LNKFLAGS="
7937
7938 #As above, but with curses.
7939 xos23c:
7940         @echo 'Making C-Kermit $(CKVER) for Olivetti X/OS with curses...'
7941         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7942         'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP -DCK_CURSES $(KFLAGS)' \
7943         "LIBS=-lcurses" "LNKFLAGS="
7944
7945 ckuuid:
7946         @echo 'building C-Kermit $(CKVER) set-UID/set-GID test programs'
7947         $(CC) -DANYBSD -DSAVEDUID -o ckuuid1 ckuuid.c
7948         $(CC) -DANYBSD -o ckuuid2 ckuuid.c
7949         $(CC) -DANYBSD -DNOSETREU -o ckuuid3 ckuuid.c
7950         $(CC) -DANYBSD -DSETEUID -DNOSETREU -o ckuuid4 ckuuid.c
7951         $(CC) -o ckuuid5 ckuuid.c
7952         @echo 'Read the top of ckuuid.c for directions...for testing'
7953         @echo 'you must make these programs setuid and setgid'
7954
7955 ############################################################################
7956 # A N T I Q U I T I E S
7957 #
7958 # The following are antique targets from C-Kermit 5A or earlier.  They have
7959 # not been updated or tested in years.  Most of them will need recent features
7960 # disabled, usually with some combination of -DNOUNICODE, -DNOIKSD, -DNOANSI,
7961 # -DNOCKGHNLHOST, -DNO_DNS_SRV, -DNOREDIRECT, -DNOREALPATH, -DNOCURSES, etc.
7962 # They are also missing the KTARGET=$${KTARGET:-$(@)} business.
7963 # For details see ckuins.txt and ckccfg.txt.
7964 #
7965 ############################################################################
7966
7967 #Berkeley Unix 2.8, 2.9 for PDP-11s with I&D space, maybe also Ultrix-11???
7968 #C-Kermit(5A) is simply too large (even turning off almost every feature
7969 #available) to run without both I&D space plus overlays.  The old comment
7970 #suggested running 'pcc' but that won't help.  Changing 'cc' to 'ckustr.sed'
7971 #will cause a string extraction to be done, saving D space by moving strings
7972 #to a file.
7973 bsd29:
7974         @echo Making C-Kermit $(CKVER) for 2.8 or 2.9BSD.
7975         @echo Read the makefile if you have trouble with this...
7976         $(MAKE) ovwermit \
7977         "CFLAGS= -DBSD29 -DNODEBUG -DNOTLOG -DNOCSETS -DNOHELP \
7978         -DNOSCRIPT -DNOSPL -DNOXMIT -DNODIAL $(KFLAGS)" \
7979         "LNKFLAGS= -i -lndir" "CC= cc " "CC2= cc"
7980
7981 bsd210:
7982         @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.10BSD.
7983
7984 bsd211:
7985         @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.11BSD.
7986
7987 #Charles River Data Systems Universe with UNOS Version 9.2
7988 crds:
7989         @echo 'Making C-Kermit $(CKVER) for Charles River Data Systems...'
7990         make xermit \
7991         "CFLAGS = -DATTSV -DNOANSI -DDIRENT -DLONGFN -DTCPSOCKET \
7992         -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DNOSETREU \
7993         -Dsuspend=ksuspend $(KFLAGS) -O" "LNKFLAGS ="
7994
7995 #Microport SV/AT for IBM PC/AT 286 and clones, System V R2.
7996 #The -O flag may fail on some modules (like ckuus2.c), in which case you
7997 #should compile them by hand, omitting the -O.  If you get "hash table
7998 #overflow", try adding -DNODEBUG.
7999 #Also, reportedly this compiles better with gcc than with cc.
8000 mpsysv:
8001         @echo 'Making C-Kermit $(CKVER) for Microport SV/AT 286...'
8002         $(MAKE) wermit \
8003         "CFLAGS= -DATTSV -DNOLEARN $(KFLAGS) -O -Ml" "LNKFLAGS = -Ml"
8004
8005 #Microsoft "Xenix/286" e.g. for IBM PC/AT
8006 xenix:
8007         @echo 'Making C-Kermit $(CKVER) for Xenix/286'
8008         $(MAKE) wermit \
8009         "CFLAGS= -DXENIX -DNOFILEH -DNOLEARN $(KFLAGS) -Dunix -F 3000 -i" \
8010         "LNKFLAGS = -F 3000 -i"
8011
8012 #PC/IX, Interactive Corp System III for IBM PC/XT
8013 pcix:
8014         @echo 'Making C-Kermit $(CKVER) for PC/IX...'
8015         $(MAKE) wermit \
8016         "CFLAGS= -DPCIX -DISIII -DNOLEARN $(KFLAGS) \
8017         -Dsdata=sdatax -O -i" "LNKFLAGS = -i"
8018
8019 #Integrated Solutions Inc V8S VME 68020
8020 isi:
8021         @echo Making C-Kermit $(CKVER) for 4.2BSD on ISI...
8022         $(MAKE) wermit "CC = cc" \
8023         "CFLAGS= -DBSD4 -DTCPSOCKET -DINADDRX -DDCLPOPEN -DDEBUG -DNOSETREU \
8024         -DCK_CURSES -DNOLEARN $(KFLAGS)" "LIBS = -lcurses -ltermcap"
8025
8026 #Interactive Corp version of AT&T System III
8027 #is3: (very old, probably not sufficient for 5A or later)
8028 #       @echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8029 #       make wermit "CFLAGS = -DISIII -Ddata=datax -O -i" "LNKFLAGS = -i"
8030 #The following should work, use it if you don't have gcc.
8031 #Use is3gcc if you have gcc.
8032 is3:
8033         @echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8034         $(MAKE) wermit \
8035         "CFLAGS= -DISIII $(KFLAGS) -Ddata=datax -DNAP -DHDBUUCP
8036         -DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O -i" "LNKFLAGS = -i"
8037
8038 #Interactive UNIX System V R3, no network support.  Uses <dirent.h> and Honey
8039 #DanBer UUCP.  If this entry does not compile correctly, try any or all of the
8040 #following.  These suggestions also apply more or less to the other is5r3xxx
8041 #entries that follow this one.
8042 # . Remove the UID_T and GID_T definitions, or change them as required.
8043 # . Change -DDIRENT to -DSDIRENT.
8044 # . Add -DSIGTYP=void.
8045 # . Remove -g from LNKFLAGS.
8046 # . Add -DNOANSI to remove compiler complaints about ANSI C constructions
8047 # . Add other -DNOxxx's to save space (e.g. -DNOCSETS)
8048 # See the next few makefile entries for related examples.
8049 # Also see sys5r32is for making a portable i386 SVR3 binary.
8050 is5r3:
8051         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8052         @echo 'If this does not work please read the makefile entry.'
8053         $(MAKE) wermit \
8054         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8055         -DUID_T=ushort -DGID_T=ushort -DI386IX $(KFLAGS)" \
8056         "LNKFLAGS = -g"
8057
8058 #Interactive Corp System System V R3 with gcc
8059 is3gcc:
8060         @echo 'Making C-Kermit $(CKVER) for Interactive System V R3 / gcc...'
8061         $(MAKE) wermit CC=gcc CC2=gcc \
8062         'CFLAGS = -D_SYSV3 -DISIII -Ddata=datax -DNAP -DHDBUUCP -DNOREALPATH \
8063         -DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O' "LNKFLAGS ="
8064
8065 #Interactive UNIX System V R3, POSIX variant.  Untested.
8066 #Uses dirent.h and Honey DanBer uucp.  Read comments in is5r3 entry.
8067 is5r3p:
8068         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8069         $(MAKE) wermit \
8070         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8071         -DI386IX -DPOSIX $(KFLAGS)" "LNKFLAGS=" "LIBS=-lcposix"
8072
8073 #Interactive UNIX SVR3 2.2.1, job control, curses, no net, gcc.
8074 is5r3gcc:
8075         $(MAKE) wermit CC=gcc CC2=gcc \
8076         "CFLAGS=-g -posix -DSVR3 -DDIRENT -DNOREALPATH \
8077         -DHDBUUCP -O -DNOCSETS -DI386IX -DSVR3JC -DCK_CURSES \
8078         $(KFLAGS)" LNKFLAGS="-posix" LIBS="-lcurses -lc_s"
8079
8080 #Interactive UNIX System V R3 with TCP/IP network support.
8081 #Needs -linet for net functions.  signal() is void rather than int.
8082 #Uses dirent.h and Honey DanBer uucp. Read comments in is5r3 entry.
8083 #Also see is5r3net2 if you have trouble with this entry.
8084 is5r3net:
8085         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8086         @echo 'If this does not work please read the makefile entry.'
8087         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8088         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOREALPATH \
8089         -DI386IX $(KFLAGS) -O" "LIBS = -linet"
8090
8091 is5r3netgcc:
8092         $(MAKE) is5r3net CC=gcc CC2=gcc
8093
8094 #Interactive UNIX System V R3, no job control, signal() void rather than int.
8095 #Uses dirent.h and Honey DanBer uucp.  Needs -linet for net functions.
8096 #Read comments in is5r3 entry.  Use this entry if is5r3net fails.
8097 #Saves some space by stripping (-s) and using shared library (-lc_s).
8098 is5r3net2:
8099         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8100         $(MAKE) wermit \
8101         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOJC -DNOREALPATH \
8102         -DSIGTYP=void -DNOANSI -DI386IX $(KFLAGS) -O" \
8103         "LNKFLAGS= -s" "LIBS = -linet -lc_s"
8104
8105 #Interactive UNIX System V R3 (version 2.2 or later) with job control & curses.
8106 #Uses dirent.h and Honey DanBer UUCP.
8107 is5r3jc:
8108         @echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8109         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8110         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8111         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8112         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD \
8113         $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
8114
8115 is5r3jcgcc:
8116         $(MAKE) is5r3jc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8117         KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8118
8119 #Sunsoft/Interactive UNIX System V R3 (version 2.2 or later)
8120 #with job control, curses, and TCP/IP networking.
8121 #Uses dirent.h and Honey DanBer UUCP.
8122 is5r3netjc:
8123         @echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8124         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8125         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8126         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8127         -DPOSIX_JC -DCK_REDIR -DTCPSOCKET -DSELECT \
8128         $(KFLAGS)" "LIBS=-linet -lcurses -lc_s"
8129
8130 is5r3netjcgcc:
8131         $(MAKE) is5r3netjc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8132         KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8133
8134 #Masscomp System III
8135 rtu:
8136         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU System III...'
8137         $(MAKE) wermit \
8138         "CFLAGS= -UFIONREAD -DATTSV $(KFLAGS) -O" "LNKFLAGS =" "LIBS= -ljobs"
8139
8140 #Masscomp/Concurrent RTU 4.0 or later, Berkeley environment.
8141 #Includes <ndir.h> = /usr/include/ndir.h
8142 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8143 rtubsd:
8144         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8145         ucb make wermit \
8146         "CFLAGS= -DBSD4 -DRTU -DNDIR -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
8147         "LIBS = -lndir"
8148
8149 #Masscomp/Concurrent RTU 4.0 or later, same as above,
8150 #Includes "usr/lib/ndir.h"
8151 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8152 rtubsd2:
8153         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8154         ucb make wermit \
8155         "CFLAGS= -DBSD4 -DRTU -DXNDIR -DHDBUUCP $(KFLAGS)" \
8156         "LIBS = -lndir"
8157
8158 #Masscomp/Concurrent RTU 4.0 or later, same as above,
8159 #Includes <sys/ndir.h>
8160 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8161 rtubsd3:
8162         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x BSD...'
8163         ucb make wermit "CFLAGS= -DBSD4 -DRTU -DHDBUUCP $(KFLAGS)" \
8164         "LIBS = -lndir"
8165
8166 #Masscomp/Concurrent RTU 4.0 or later, System V R2, using <dirent.h>.
8167 #In case of problems, add back the -DRTU switch.
8168 #In case -DTCPSOCKET gives trouble, remove it.
8169 rtus5:
8170         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x...'
8171         $(MAKE) wermit \
8172         "CFLAGS= -DATTSV -DHDBUUCP -DDIRENT -DTCPSOCKET $(KFLAGS)"
8173
8174 #Masscomp/Concurrent RTU 4.x, System V R3, using <dirent.h>.
8175 #Use this one if rtus5 gives warnings about pointer type mismatches.
8176 #In case of problems, add back the -DRTU switch.
8177 rtus5r3:
8178         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU Sys V R3...'
8179         $(MAKE) wermit "CFLAGS= -DSVR3 -DHDBUUCP -DDIRENT $(KFLAGS)"
8180
8181 #DEC Pro-3xx with Pro/Venix V1.0 or V1.1
8182 # Requires code-mapping on non-I&D-space 11/23 processor, plus some
8183 # fiddling to get interrupt targets into resident code section.
8184 # This almost certainly doesn't work any more.
8185 provx1:
8186         @echo 'Making C-Kermit $(CKVER) for DEC Pro-3xx, Pro/Venix 1.x...'
8187         $(MAKE) wart "CFLAGS= -DPROVX1 $(KFLAGS)" "LNKFLAGS= "
8188         $(MAKE) wermit "CFLAGS = -DPROVX1 -DNOFILEH -md780" \
8189                 "LNKFLAGS= -u _sleep -lc -md780"
8190
8191 #Nixdorf Targon/31.
8192 #AT&T UNIX System V R3, signal() is void rather than int.
8193 #Uses dirent.h without Honey DanBer uucp.
8194 t31tos40x:
8195         @echo 'Making C-Kermit $(CKVER) for Targon/31 with TOS 4.0.xx...'
8196                 $(MAKE) wermit \
8197                 "CFLAGS= -DSVR3 -DDIRENT $(KFLAGS) -O" \
8198                 "LNKFLAGS="
8199
8200 #NCR Tower 1632, OS 1.02
8201 tower1:
8202         @echo 'Making C-Kermit $(CKVER) for NCR Tower 1632, OS 1.02...'
8203         $(MAKE) wermit "CFLAGS= -DTOWER1 $(KFLAGS)"
8204
8205 #NCR Tower 32, OS Release 1.xx.xx
8206 tower32-1:
8207         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 1 System V R2...'
8208         @echo 'Add KFLAGS=-DISDIRBUG if you get errors about S_ISREG/S_ISDIR.'
8209         $(MAKE) wermit \
8210         "CFLAGS = -DATTSV $(KFLAGS) -O" "LNKFLAGS = -n"
8211
8212 #NCR Tower 32, OS Release 2.xx.xx
8213 tower32-2:
8214         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 2 System V R2...'
8215         $(MAKE) wermit \
8216         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -O2" \
8217         "LNKFLAGS = -n"
8218
8219 #NCR Tower 32, OS Releases based on System V R3
8220 #Don't add -DNAP (doesn't work right) or -DRDCHK (not available in libc).
8221 tower32:
8222         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3...'
8223         $(MAKE) wermit \
8224         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8225         -DUID_T=ushort -DGID_T=ushort -O1"
8226
8227 #NCR Tower 32, OS Releases based on System V R3
8228 tower32g:
8229         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3, gcc...'
8230         $(MAKE) wermit "CC = gcc" \
8231         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8232         DUID_T=ushort -DGID_T=ushort -O -fstrength-reduce -fomit-frame-pointer"
8233
8234 #Fortune 32:16, For:Pro 1.8 (mostly like 4.1bsd)
8235 ft18:
8236         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 1.8...'
8237         $(MAKE) wermit \
8238         "CFLAGS= -DNODEBUG -DBSD4 -DFT18 -DNOFILEH $(KFLAGS) \
8239         -DPID_T=short"
8240
8241 #Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd).
8242 #The modules that break the optimizer are compiled separately.
8243 ft21:
8244         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'
8245         $(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8246         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8247         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8248         $(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8249         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8250         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8251         $(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8252         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8253         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8254         $(MAKE) wermit \
8255         "CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \
8256         -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8257         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8258
8259 #Valid Scaldstar
8260 #Berkeleyish, but need to change some variable names.
8261 valid:
8262         @echo 'Making C-Kermit $(CKVER) for Valid Scaldstar...'
8263         $(MAKE) wermit \
8264         "CFLAGS= -DBSD4 -DNODEBUG -DNOTLOG -Dcc=ccx -DFREAD=1 $(KFLAGS)"
8265
8266 #IBM IX/370 on IBM 370 Series mainframes
8267 #Mostly like sys3, but should buffer packets.
8268 ix370:
8269         @echo 'Making C-Kermit $(CKVER) for IBM IX/370...'
8270         $(MAKE) wermit "CFLAGS = -DIX370 -DATTSV $(KFLAGS) -i -O" \
8271         "LNKFLAGS = -i"
8272
8273 #Amdahl UTS 2.4 on IBM 370 series compatible mainframes.
8274 #Mostly like V7, but can't do initrawq() buffer peeking.
8275 uts24:
8276         @echo 'Making C-Kermit $(CKVER) for Amdahl UTS 2.4...'
8277         $(MAKE) wermit "CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
8278         -DUTS24 -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
8279         -DNPTYPE=$(NPTYPE) $(DIRECT) $(KFLAGS)"
8280
8281 #Amdahl UTSV UNIX System V = System V R2 or earlier.
8282 utsv:
8283         @echo 'Making C-Kermit $(CKVER) for Amdahl UTSV...'
8284         $(MAKE) wermit \
8285         "CFLAGS = -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i"
8286
8287 #Amdahl UTSV UNIX System V = System V R2 or earlier, with TCP sockets library.
8288 utsvtcp:
8289         @echo 'Making C-Kermit $(CKVER) for Amdahl UTSV w/tcp...'
8290         $(MAKE) wermit "CFLAGS = \
8291         -DTCPSOCKET -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i" \
8292         "LIBS = -lsocket"
8293
8294 #BBN C/70 with IOS 2.0
8295 #Mostly Berkeley-like, but with some ATTisms
8296 c70:
8297         @echo 'Making C-Kermit $(CKVER) for BBN C/70 IOS 2.0...'
8298         $(MAKE) wermit "CFLAGS= -DBSD4 -DC70 $(KFLAGS)"
8299
8300 #Zilog ZEUS 3.21
8301 zilog:
8302         @echo 'Making C-Kermit $(CKVER) for Zilog Zeus 3.21...'
8303         $(MAKE) wermit \
8304         "CFLAGS = -DATTSV -DZILOG -DNODEBUG $(KFLAGS) -i -O" \
8305         "LNKFLAGS = -i -lpw"
8306
8307 #Whitechapel MG-1 Genix 1.3
8308 white:
8309         @echo 'Making C-Kermit $(CKVER) for Whitechapel MG-1 Genix 1.3...'
8310         @touch ckcpro.c
8311         $(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0  $(KFLAGS)"
8312
8313 #Pixel 1000
8314 pixel:
8315         @echo 'Making C-Kermit $(CKVER) for Pixel 1000...'
8316         $(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0 $(KFLAGS)"
8317
8318 ptx:
8319         $(MAKE) "MAKE=$(MAKE)" dynixptx12
8320
8321 #CDC VX/VE 5.2.1
8322 vxve:
8323         @echo 'Making C-Kermit $(CKVER) for CDC VX/VE 5.2.1...'
8324         $(MAKE) wermit \
8325         "CFLAGS = -DATTSV -DVXVE -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8326         "LNKFLAGS = -i"
8327
8328 #DIAB DS90 or LUXOR ABC-9000 with pre-5.2 DNIX.  Sys V with nap() and rdchk().
8329 # nd = no opendir(), readdir(), closedir(), etc.
8330 # Some of the modules fail to compile with -O.
8331 dnixnd:
8332         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with very old DNIX 5.2.'
8333         $(MAKE) wermit \
8334         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDCLPOPEN \
8335         -U__STDC__ $(KFLAGS)"
8336
8337 #DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8338 # This one has opendir(), readdir(), closedir(), etc.
8339 # Some of the modules fail to compile with -O.
8340 dnix:
8341         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8342         $(MAKE) wermit \
8343         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8344         -U__STDC__ $(KFLAGS)"
8345
8346 #DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8347 # As above, but with curses and TCP/IP.
8348 # You might get complaints about redefinition of O_RDONLY, etc, because
8349 # of bugs in the DNIX header files, which can be fixed by adding #ifndef...
8350 # around the offending definitions in the header files.
8351 dnixnetc:
8352         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8353         $(MAKE) wermit \
8354         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8355         -DTCPSOCKET -DCK_CURSES -I/usr/include/bsd -U__STDC__ $(KFLAGS)" \
8356         "LIBS = -ln -lcurses"
8357
8358 #DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk().
8359 dnix5r3:
8360         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8361         @echo 'with Honey DanBer UUCP'
8362         $(MAKE) wermit \
8363         "CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8364         -DCK_CURSES -DRENAME $(KFLAGS) -O" "LIBS= -lcurses"
8365
8366 #DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk() + TCP/IP
8367 dnix5r3net:
8368         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8369         @echo 'with Honey DanBer UUCP and TCP/IP'
8370         $(MAKE) wermit \
8371         "CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8372         -DTCPSOCKET -DCK_CURSES -DRENAME $(KFLAGS) -O \
8373         -I/usr/include/bsd" "LIBS = -ln -lcurses"
8374
8375 #DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8376 #ANSI C compilation and libraries.
8377 #Note that for DNIX 5.3 2.2 you have to correct a bug in /usr/include/stdlib.h:
8378 #change "extern void free(char *str);"
8379 #to     "extern void free(void *str);"
8380 #NOTE: This bug is reportedly fixed in DNIX 5.3 2.2.1.
8381 #Should you get fatal errors caused by harmless pointer-type mismatches,
8382 #like between signed and unsigned char, just remove -X7.
8383 dnix5r3ansi:
8384         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8385         @echo 'with ANSI C Honey DanBer UUCP'
8386         $(MAKE) wermit \
8387         "CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8388         -DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS)" \
8389         "LIBS= -lcurses"
8390
8391 #DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8392 # + TCP/IP, ANSI C compilation and libraries.
8393 #Should you get fatal errors caused by harmless pointer-type mismatches,
8394 #like between signed and unsigned char, just remove -X7.
8395 dnix5r3ansinet:
8396         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8397         @echo 'with ANSI C Honey DanBer UUCP'
8398         $(MAKE) wermit \
8399         "CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8400         -DTCPSOCKET -DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS) \
8401         -I/usr/include/bsd" "LIBS= -ln -lcurses"
8402
8403 #Ridge 32 with ROS 3.2
8404 ridge32:
8405         @echo 'Making C-Kermit $(CKVER) Ridge 32 ROS 3.2'
8406         $(MAKE) wermit \
8407         "CFLAGS = -DATTSV -DNOFILEH -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8408         "LNKFLAGS = -i"
8409
8410 #Altos 486, 586, or 986 with Xenix 3.0
8411 altos:
8412         @echo 'Making C-Kermit $(CKVER) for Altos x86 with Xenix 3.0...'
8413         $(MAKE) wermit \
8414         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8415         "LNKFLAGS= -i"
8416
8417 #Altos 986 with Xenix 3.0, as above, but command-line only, minimal size.
8418 #For systems with small memories.  It might also be necessary to chop certain
8419 #modules up into smaller pieces, e.g. ckuus3-6, because of symbol table
8420 #overflow.   If this makefile is too big or complex for the Altos, compile
8421 #and link by hand or write shell scripts.
8422 altosc:
8423         @echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, remote...'
8424         $(MAKE) wermit \
8425         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8426         -DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOICP $(KFLAGS) -Mm -O" \
8427         "LNKFLAGS= -Mm -s"
8428
8429 #Altos 986 with Xenix 3.0, as above, but interactive only, minimal size.
8430 altosi:
8431         @echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, local...'
8432         $(MAKE) wermit \
8433         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8434         -DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOCMDL -DNOFRILLS -DNOHELP \
8435         -DNOSETKEY $(KFLAGS) -Mm -O" "LNKFLAGS= -Mm -s"
8436
8437 # Altos ACS68000 68000 System, UNIX System 3 Release 2, 512k memory.
8438 # also needs getcwd() external function; see ckuins.txt file.
8439 # also, sys/types.h needed modifying:
8440 #   #ifdef __SYS_TYPES_H__, #define ..., #endif
8441 # also, ckuus2.c MUST be compiled NOOPT else symbol table is destroyed!
8442 # Submission by Robert Weiner/Programming Plus, rweiner@progplus.com.
8443 #
8444 altos3:
8445         @echo 'Making C-Kermit $(CKVER) for Altos ACS68k UNIX System III'
8446         $(MAKE) ckuus2.$(EXT) "CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8447         -DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i"
8448         $(MAKE) wermit \
8449         "CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8450         -DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i -O" \
8451         "LNKFLAGS = -i" "LIBS = getcwd.$(EXT)"
8452
8453 #MINIX - Original PC version with 64K+64K limit.
8454 # Reportedly, the linker (asld) can run out of space while linking.  The only
8455 # way around this is to make a copy of libc.a from which all modules that are
8456 # not used by Kermit are removed.  If you have trouble compiling or running
8457 # wart, "touch wart".  If that doesn't help, "touch ckcpro.c".
8458 # The version configured below has no interactive command parser.
8459 # If you can build this version successfully, maybe there will be room for
8460 # a minimal interactive command parser too; try replacing -DNOICP with
8461 # -DNOSPL, plus every other -DNOxxx flag there is, except for -DNOICP
8462 # (see ckccfg.txt).
8463 minix:
8464         @echo 'Making C-Kermit $(CKVER) for MINIX, no command parser...'
8465         @echo 'TOTALLY UNTESTED!'
8466         $(MAKE) wermit EXT=s \
8467         "CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8468         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V \
8469         -DNOXMIT -DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
8470         -DNOSCRIPT -DNOCSETS -DNOICP -DNOSETKEY $(KFLAGS)" \
8471         "LNKFLAGS= -i -T"
8472
8473 #MINIX - PC version with 64K+64K limit, new (as yet unreleased) ACK 2.0 beta C
8474 #compiler, which outputs .o object files, rather than .s.  But 'make' still
8475 #expects .s files, so must be patched to use .o.  Tested on Minix 1.5.10.
8476 minix15:
8477         @echo 'Making C-Kermit $(CKVER) for MINIX (new ACK 2.0 compiler),'
8478         @echo 'no command parser...  TOTALLY UNTESTED!'
8479         $(MAKE) wermit \
8480         "CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8481         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V -DNODIAL \
8482         -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOICP $(KFLAGS)" \
8483         "LNKFLAGS= -i -T"
8484
8485 #MINIX3 - MINIX 3.0 (no VM) - May-Aug 2005 (not sure if this ever worked...)
8486 minix3:
8487         @echo 'Making C-Kermit $(CKVER) for MINIX3...'
8488         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8489         "CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -DMINIX2 \
8490         -DMINIX3 -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8491         -DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DDNOREALPATH \
8492         -DTCPSOCKET -DNOTIMEZONE -DNOFTP -DNO_DNS_SRV -O"
8493
8494 #MINIX315 - MINIX 3 1.5 - January 2010
8495 minix315:
8496         @echo 'Making C-Kermit $(CKVER) for Minix 3 1.5...'
8497         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8498         "CFLAGS= -DMINIX315 -DPOSIX -DNOUUCP -DNOJC -DNOLEARN $(KFLAGS) \
8499         -DHAVE_OPENPTY -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8500         -DSYSTIMEH -DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DNOREALPATH \
8501         -DTCPSOCKET -DNOTIMEZONE -DNO_DNS_SRV -DNOFTP -O"
8502
8503 #PFU Compact A Series UNIX System V R3, SX/A TISP V10/L50 (Japan)
8504 #Maybe the -i link option should be removed?
8505 sxae50:
8506         @echo 'Making C-Kermit $(CKVER) for PFU SX/A V10/L50...'
8507         $(MAKE) xermit \
8508         "CFLAGS= -DSVR3 -DDIRENT -DsxaE50 -DTCPSOCKET $(KFLAGS) -i -O" \
8509         "LNKFLAGS= "
8510
8511 #Tektronix 6130, 4319, 4301, etc, with UTek OS, /usr/spool/uucp/LCK./...
8512 #The models that support hardware flow control.
8513 utek:
8514         @echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, hardware flow control'
8515         $(MAKE) wermit \
8516         "CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8517         -DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8518         -DTRMBUFL=2048 -DCK_DTRCTS $(KFLAGS)"
8519
8520 #Tektronix 4315, 4316, 4317 with UTek OS, /usr/spool/uucp/LCK./...
8521 #The models that do not fully support hardware flow control.
8522 uteknohwfc:
8523         @echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, no h/w flow control'
8524         $(MAKE) wermit \
8525         "CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8526         -DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8527         -DTRMBUFL=2048 $(KFLAGS)"
8528
8529 #Tektronix XD88 with  UTekV OS
8530 utekvr3:
8531         @echo 'Making C-Kermit $(CKVER) for Tektronix XD88 UTekV R3...'
8532         $(MAKE) wermit \
8533         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP \
8534         -DTCPSOCKET -DSYSUTIMEH -DCK_CURSES $(KFLAGS) -O" \
8535         "LIBS= -lcurses" "LNKFLAGS= -s"
8536
8537 #Perkin-Elmer 3200 Xelos R02 or earlier
8538 ccop1:
8539         @echo 'Making C-Kermit $(CKVER) for Xelos & Public Domain Dirent calls'
8540         @echo 'or System V R2 or earlier...'
8541         $(MAKE) wermit \
8542         "CFLAGS = -DATTSV -Dvoid=int -DDIRENT -DCK_CURSES \
8543         $(KFLAGS) -O" "LNKFLAGS =" "LIBS= -lcurses -ltermlib"
8544
8545 #Encore, UMAX 4.3 (BSD) but without acucntrl program.
8546 encore:
8547         $(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=$(KFLAGS)"
8548
8549 #Encore, as above, but with curses file transfer display included.
8550 encorec:
8551         $(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=-DCK_CURSES $(KFLAGS)" \
8552         "LIBS= -lcurses -ltermcap"
8553
8554 #Encore, UMAX 4.3 (BSD) but without acucntrl program.
8555 umax43:
8556         @echo Making C-Kermit $(CKVER) for Encore UMAX 4.3...
8557         $(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8558         "CFLAGS= -DBSD43 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8559
8560 #Encore, UMAX 4.2 (BSD)
8561 umax42:
8562         @echo Making C-Kermit $(CKVER) for Encore UMAX 4.2...
8563         $(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8564         "CFLAGS= -DBSD4 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8565
8566 #Encore 88K UMAX 5.3 with TCP/IP support
8567 encore88k:
8568         @echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP...'
8569         $(MAKE) xermit \
8570         "CFLAGS = -q ext=pcc -DSVR3 -DTCPSOCKET -DDIRENT \
8571         -DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8572
8573 #Encore 88K UMAX 5.3 with TCP/IP support
8574 encore88kgcc:
8575         @echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP, gcc...'
8576         $(MAKE) xermit CC=gcc CC2=gcc \
8577         "CFLAGS = -DSVR3 -DTCPSOCKET -DDIRENT \
8578         -DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8579
8580 #SONY NEWS, NEWS-OS 4.01C
8581 sonynews:
8582         @echo Making C-Kermit $(CKVER) for SONY NEWS-OS 4.01C...
8583         $(MAKE) xermit "CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O"
8584
8585 #Run Lint on this mess for selected versions.
8586 #These are pretty much obsolete since ANSI C / gcc.
8587 lintsun:
8588         @echo 'Running Lint on C-Kermit $(CKVER) sources for SunOS version...'
8589         lint -x -DSUNOS4 -DDIRENT -DTCPSOCKET -DSAVEDUID \
8590         ck[cu]*.c > ckuker.lint.sun
8591
8592 lintbsd:
8593         @echo 'Running Lint on C-Kermit $(CKVER) sources for BSD 4.2 version..'
8594         lint -x -DBSD4 -DTCPSOCKET ck[cu]*.c > ckuker.lint.bsd42
8595
8596 lints5:
8597         @echo 'Running Lint on C-Kermit $(CKVER) sources for Sys V version...'
8598         lint -x -DATTSV ck[cu]*.c > ckuker.lint.s5
8599
8600 #Who remembers TECO?
8601 love:
8602         @echo 'Not war?'