debian/watch: remove boilerplate
[ckermit.git] / makefile
1 # makefile / Makefile / ckuker.mak / CKUKER.MAK
2 #
3 # Tue Jun 21 13:04:45 2011
4 BUILDID=20110621
5 CKVER= "9.0.299"
6 TESTID= "Beta.02"
7 #
8 # -- Makefile to build C-Kermit for UNIX and UNIX-like platforms --
9 #
10 # Copyright (C) 1985, 2011,
11 #   Trustees of Columbia University in the City of New York.
12 #   All rights reserved.  See the C-Kermit COPYING.TXT file or the
13 #   copyright text in the ckcmai.c module for disclaimer and permissions.
14 #   In case you can't find the COPYING.TXT file, it contains the 
15 #   Simplified 3-Clause BSD License, which is an Open Source license.
16 #
17 # Author: Frank da Cruz, Columbia University
18 # 612 West 115th Street, New York NY 10025-7799, USA
19 # Email: fdc@columbia.edu
20 # Web:   http://kermit.columbia.edu/
21 # FTP:   ftp://kermit.columbia.edu/kermit/
22 #
23 # Note: Author is no longer at Columbia University or at the 115th Street
24 # address effective 1 July 2011.  The email address should still work,
25 # as well as the website and FTP addresses, for the foreseeable future.
26 #
27 # Contributions from many others.  Special thanks to Jeff Altman for the
28 # secure-build targets, Peter Eichhorn, assyst GmbH, for the consolidated
29 # HP-UX targets and the "uninstall" target, to Robert Lipe for the updated
30 # and consolidated SCO UNIX / ODT / OSR5 targets, to Ric Anderson for the
31 # IRIX 6.x targets, to Seth Theriault for major improvements to the
32 # Mac OS X targets.
33 #
34 # C-Kermit is written and produced by hand without any automated procedures
35 # such as autoconf / automake / configure, although some of the targets below
36 # (especially the linux target) inspect the environment and make some
37 # decisions in the most portable way possible. The automated tools are not
38 # used because (a) C-Kermit predates them, and (b) they are not portable to
39 # all the platforms where C-Kermit must be (or once was) built, and (c) to
40 # keep C-Kermit as independent as possible from external tools over which
41 # we have no control.
42 #
43 # Most entries use the "xermit" target, which uses the select()-based CONNECT
44 # module, ckucns.c.  The "wermit" target uses the original fork()-based CONNECT
45 # module, ckucon.c, which has some drawbacks but was portable to every Unix
46 # variant whether it had TCP/IP or not (select() is part of the TCP/IP
47 # library, which was not standard on older Unixes).  If your target still uses
48 # the "wermit" target, please try substituting the "xermit" one and if it
49 # works, let us know (mailto:kermit-support@columbia.edu).  When changing a
50 # target over from wermit to xermit, also remove -DNOLOEARN.
51 #
52 # CAREFUL: Don't put the lowercase word "if", "define", or "end" as the first
53 # word after the "#" comment introducer in the makefile, even if it is
54 # separated by whitespace.  Some versions of "make" understand these as
55 # directives.  Uppercase letters remove the danger, e.g. "# If you have..."
56
57 # WARNING: This is a huge makefile.  Although
58 # this is less likely since the turn of the century, some "make" programs
59 # might run out of memory.  If this happens to you, edit away the parts that
60 # do not apply to your platform and try again.
61 #
62 # WARNING 2: In many cases this file invokes itself recursively, sometimes
63 # several levels deep (as in the Linux targets); i.e. some targets are used
64 # as 'subroutines' of other targets, with parameters passed by setting
65 # environment variables.  For that reason, don't use 'make -e'.
66 #
67 # Certain UNIX variations have their own separate makefiles:
68 #  . For 2.10 or 2.11 BSD on the DEC PDP-11, use ckubs2.mak.
69 #  . For Plan 9, use ckpker.mk.
70 #
71 # Separate build procedures are provided non-UNIX platforms: VMS, VOS,
72 # AOS/VS, etc.  See the ckaaaa.txt file or the Kermit website for details.
73 #
74 #
75 # DIRECTIONS FOR UNIX
76 #
77 # Rename this file to "makefile" or "Makefile" if necessary.  Pick out the
78 # entry most appropriate for your UNIX version from the list below and then
79 # give the appropriate "make" command, for example "make aix", "make macosx",
80 # "make linux".  If you experience any difficulties with the build procedure,
81 # then please also read any comments that accompany the make entry itself
82 # (search for the make entry name on the left margin).
83 #
84 # Other targets:
85 #  'make install' is an installation script (read accompanying comments!).
86 #  'make uninstall' undoes 'make install' (read accompanying comments!).
87 #  'make clean' removes intermediate and object files.
88 #  'make show' tells the default include and lib paths for secure builds.
89 #
90 # IMPORTANT:
91 #   For more detailed installation instructions, read the files ckuins.txt
92 #   and ckccfg.txt, also available at the Kermit website in HTML form:
93 #   http://www.columbia.edu/kermit/ckuins.html
94 #   http://www.columbia.edu/kermit/ckccfg.html
95 #
96 #  For descriptions of known problems and limitations,
97 #   read the files ckcbwr.txt and ckubwr.txt (the "beware files") or:
98 #   http://www.columbia.edu/kermit/ckcbwr.html
99 #   http://www.columbia.edu/kermit/ckubwr.html
100 #
101 # Most targets build C-Kermit with its symbol table included.  To reduce the
102 # size of the executable program, add "LNKFLAGS=-s" to the end of your 'make'
103 # command or to the makefile entry, or 'strip' the executable after
104 # building.  To further reduce the size after building, use 'mcs -d' if your
105 # Unix version has such a command.  For further details on size reduction, read
106 # ckccfg.txt to find out how to remove features that you don't need.
107 #
108 # TCP/IP networking support: If your C-Kermit version does not include TCP/IP
109 # networking, but your UNIX system does, try adding -DTCPSOCKET to the CFLAGS
110 # of your makefile entry.  If that doesn't work, look at some of the other
111 # targets that include this flag for ideas about what libraries might need to
112 # be included (typically -lsocket and/or -lBSD and/or -lnsl and/or -linet).
113 # NOTE: In some cases (old versions of SCO or HP-UX), you might need not only
114 # a C compiler, but also a "TCP/IP developers kit" for the required object
115 # libraries and header files.
116 #
117 # Please report modifications, failures (preferably with fixes) or successes
118 # to the author, fdc@columbia.edu.
119 #
120 # TARGETS FOR DIFFERENT UNIX PLATFORMS AND VERSIONS:
121 #
122 # + Marks those that have been built successfully for C-Kermit 9.0 or later.
123 # - Those that once built OK but no longer do (e.g. too big).
124 # ? Those that worked in a previous version but have not been tested recently.
125 # --------------------------
126 # Some commonly used targets:
127 #
128 # + "make linux" should work for any version of Linux on any hardware.
129 # + "make linux+ssl" ditto, with OpenSSL security added.
130 # + "make linux+krb5" ditto, with Kerberos 5 security added.
131 # + "make linux+krb5+ssl" Linux with OpenSSL and Kerberos 5.
132 # + "make netbsd", NetBSD, any version.
133 # + "make netbsd+ssl", NetBSD with OpenSSL 0.9.7 or later.
134 # + "make netbsd+krb5", NetBSD with Kerberos 5.
135 # + "make netbsd+krb5+ssl", NetBSD with Kerberos 5 and OpenSSL 0.9.7 or later.
136 # + "make freebsd", FreeBSD 4.1 or later.
137 # + "make freebsd+ssl", FreeBSD 5.0 or later with OpenSSL 0.9.7 or later.
138 # + "make openbsd", OpenBSD 2.3 or later.
139 # + "make openbsd+ssl", OpenBSD 2.3 or later with OpenSSL 0.9.7 or later.
140 # + "make mirbsd", MirBSD.
141 # + "make mirbsd+ssl", MirBSD with OpenSSL 0.9.7 or later.
142 # + "make macosx" should work for any Mac OS X version 10.3.9 or later.
143 # + "make macosx+krb5+openssl" Mac OS X 10.3.9 or later + Kerberos V + OpenSSL.
144 # + "make aix" should work for any version of AIX 4.2 or later.
145 # + "make aixg" should work for any version of AIX 4.2 or later, using gcc.
146 # + "make aix+ssl" ditto, with OpenSSL (specifying SSLLIB and SSLINC)
147 # + "make aix+ibmssl" ditto, with IBM OpenSSL
148 # + "make solaris9", "make solaris10" for Solaris 9 or 10 with Sun cc.
149 # + "make solaris9g", "make solaris10g" for Solaris 9 or 10 with gcc.
150 # + "make solaris11" for Solaris 11 with Sun CC
151 # + "make solaris11g" for Solaris 11 with gcc
152 # + "make sco_osr600" for SCO OpenServer 6.0.0.
153 #
154 # For other current OSs such as Solaris, HP-UX, and SCO there are separate
155 # targets for different combinations of OS version and compiler; see the
156 # complete list.  For older OS's see the complete list.  If an old target
157 # doesn't work in this release of C-Kermit you can get a previous release from
158 # the Kermit FTP site: ftp://kermit.columbia.edu/kermit/
159 #
160 # SECURE TARGETS (versions that support authentication and encryption)
161 #  are described after the following list.  Search for ******* below.
162 #
163 # --------------------------
164 # Complete list (alphabetical):
165 # ? for 386BSD (Jolix) 0.0, 0.1, "make 386bsd" (see comments in entry),
166 #     or (preferably, if it works) "make bsd44" or "make bsd44c".
167 # ? for Acorn RISCiX, "make riscix" or "make riscix-gcc"
168 # ? for Alliant FX/8 with Concentrix 4.1 or later, "make bsdlck"
169 # ? for Altos 486, 586, 986 with Xenix 3.0, "make altos"
170 # ? for Altos ACS68000, 8Mhz 68000, UNIX System 3 Rel 2, 512K, "make altos3"
171 # ? for Amdahl UTS 2.4 on IBM 370 series & compatible mainframes, "make uts24"
172 # ? for Amdahl UTSV IBM 370 series & compatible mainframes, "make utsv"
173 # ? for Amdahl UTSV IBM 370 series mainframes with TCP/IP, "make utsvtcp"
174 # ? for Amdahl mainframes with UNIX System V R 5.2.6b 580, "make sys3"
175 # ? for Apollo Aegis 9.x, DOMAIN/IX 9.x, "make aegis"
176 #    (Last tested in C-Kermit 5A(189))
177 # ? for Apollo DOMAIN/IX, if the above fails, try "make apollobsd"
178 # ? for Apollo with SR10.0 or later, BSD environment, "make sr10-bsd"
179 # ? for Apollo with SR10.0 or later, System V environment, "make sr10-s5r3"
180 # ? for Apple Macintosh II with A/UX pre-3.0, "make aux", "auxgcc" or "auxufs"
181 # ? for Apple Macintosh with A/UX 3.0 and gcc, "make aux3gcc" or aux3gccc
182 # ? for Apple PowerMac with MkLinux, "make mklinux" (read Linux entry first)
183 # ? for Apple PowerMac with LinuxPPC, "make linuxppc"
184 # ? for Apple Macintosh with Minix 1.5.10, "make minix68k" or "make minixc68"
185 # ? for Apple Macintosh with Mac OS X 1.0 (Rhapsody), "make macosx10"
186 #     (no curses), "make macosx10c" (curses), or "make macosx10nc" (ncurses).
187 #     Or "make macosx10ncx" (ncurses but "make macosx10nc" doesn't work).
188 # ? for Apple Macintosh with Mac OS X 10.2, "make macosx102nc" (ncurses).
189 # ? for Apple Macintosh with Mac OS X 10.3, "make macosx103"
190 # ? for Apple Macintosh with Mac OS X 10.3.9 or later, "make macosx"
191 # ? for Arix System 90 with AT&T SVR3, "make sys5r3na"
192 # - for AT&T 6300 with IN/ix, "make sys5"
193 # - for AT&T 6300 PLUS, "make att6300" or (with no debugging) "make att6300nd"
194 # ? for AT&T 6386 WGS UNIX PC, "make sys5r3"
195 # ? for AT&T 3B2, 3B20 systems, "make att3b2".
196 #   for AT&T 3B1, 7300 UNIX PC (see notes with the entries):
197 #     In C-Kermit 7.0, only the gcc entries work:
198 # ?   "make sys3upcg", "make sys3upcgc", "make att351gm"
199 #    The others fail with "too many defines" (usually in ckuusr.h):
200 # -   "make sys3upc", "make sys3upcold", "make sys3upcc", "make sys3upcx",
201 #       "make sys3upcm", "make att351m"
202 # ? for AT&T System III/System V R2 or earlier, "make sys3" or "make sys3nid"
203 # ? for AT&T System III/System V with Honey DanBer UUCP, "make sys3hdb"
204 # ? for AT&T System V on DEC VAX, "make sys3" or "make sys5r3"
205 # ? for AT&T System V R3, use "make sys5r3" or "make sys5r3c"
206 # ? for AT&T System V/386 R3.2 built on Interactive 4.1.1, "make sys5r32is".
207 # ? for AT&T System V/386 R320.0 Versyss Systems, use "make sys5r3"
208 #     or "make sys5r3c".
209 # ? for AT&T System V R4, "make sys5r4", "make sys5r4sx", or "make sys5r4nx",
210 #     or if the ANSI C function prototyping makes trouble, add -DNOANSI,
211 #     as in "sys5r4sxna" entry
212 # ? for AT&T (USL) System V R4.2 use the sys5r4* entries.
213 # ? for Atari Falcon with MiNT, "make posix"
214 # ? for Atari ST with Minix ST 1.5.10.3, "make minix68k" or "make minixc68"
215 # ? for BBN C/70 with IOS 2.0, "make c70"
216 # ? for BeBox with Be OS 1.x DR7, "make beboxdr7"
217 #     Compiles OK but doesn't link with default linker which is limited to 64K.
218 #     Links OK with "Code Warrior Gold".  Many hacks in the source code need
219 #     to be removed when DR8 and later come out.
220 #     (Last tested in C-Kermit 6.0)
221 # - for BeBox with Be OS 1.x DR8, "make bebox"
222 #     (Needed functions missing from operating system and/or not working.)
223 # - for Bell Labs UNIX Version 6 (6th Edition), there is no makefile entry.
224 # ? for Bell Labs UNIX Version 7 (7th Edition), "make v7" (but see notes below)
225 #    (last built successfully in C-Kermit 5A188)
226 # ? for Bell Labs Research UNIX Version 10, "make bellv10"
227 #    (last built successfully in C-Kermit 6.0)
228 # ? for Bell Labs / Lucent Plan 9, use separate makefile ckpker.mk:
229 #    can be built for Intel, MIPS, 680x0, and PowerPC (last built C-Kermit 7.0)
230 # ? for BSDI BSD/386 1.x, "make bsdi"
231 # ? for BSDI BSD/OS 2.x, "make bsdi2"
232 # ? for BSDI BSD/OS 3.0 or 3.1, "make bsdi3"
233 # ? for BSDI BSD/OS 4.x, "make bsdi4"
234 # ? for BSDI BSD/OS 4.x, to build a binary that also works on FreeBSD,
235 #     "make bsdix".
236 # ? for Berkeley Unix 2.4, "make v7" (but read v7 material below)
237 # ? for Berkeley Unix 2.9 (DEC PDP-11 or Pro-3xx), "make bsd29"
238 # - for Berkeley Unix 2.10, use ckubs2.mak (a separate makefile)
239 # - for Berkeley Unix 2.11, use ckubs2.mak (a separate makefile)
240 #     This makefile is too big.  Read the instructions in ckubs2.mak.
241 #     "make -f ckubs2.mak bsd210" or "make -f ckubs2.mak bsd211".
242 #     (last built successfully in C-Kermit 6.0 - later versions too big)
243 # ? for Berkeley Unix 2.11 "make -f ckubs2.mak bsd210noicp" (no command parser)
244 # ? for Berkeley Unix 4.1, "make bsd41"
245 # ? for Berkeley Unix 4.2 on VAX, "make bsd42" or "make bsd42c"
246 # ? for Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP, "make bsdhdb"
247 # ? for Berkeley Unix 4.3 on VAX, "make bsd43", "make bsd43nc".
248 # ? for Berkeley Unix 4.3 on VAX, no networking "make bsd43nonet.
249 # ? for Berkeley Unix 4.3 without acucntrl program, "make bsd42" or "bsd42c"
250 #     NOTE: all the C-Kermit 7.0 full builds for old BSDs fail with
251 #     "too many defines" in CPP, even on big architectures like VAX.  This
252 #     can be worked around with a clever ruse.  See comments at target.
253 # ? for Berkeley Unix 4.3, command-line only, "make bsdm".
254 # ? for Berkeley Unix 4.3-Tahoe, same as 4.3 BSD
255 # ? for Berkeley Unix 4.3-Reno, "make bsd43" or "make bsd44" or "make bsd44c"
256 # ? for Berkeley Unix 4.3-Carson City, "make bsd44" or "make bsd44c"
257 # ? for Berkeley Unix 4.4-Networking/2 or -Alpha, "make bsd44" or "make bsd44c"
258 # ? for Berkeley Unix 4.4, "make bsd44" or "make bsd44c"
259 # ? for Berkeley Unix 4.4-Lite, "make bsd44" or "make bsd44c"
260 # ? for Bull DPX/2 with BOS/X, "make bulldpx2"
261 # ? for Cadmus, "make sys3"
262 #   for Caldera, see SCO, Linux.
263 # ? for Callan Unistar, "make sys3"
264 # ? for CDC VX/VE 5.2.1 System V emulation, "make vxve"
265 # ? for Charles River Data Systems Universe 680x0 with UNOS 9.2, maybe
266 #     also other UNOS versions, "make crds"
267 # ? for CIE Systems 680/20 with Regulus, "make cie"
268 # ? for Commodore Amiga 3000UX Sys V R4, "make sys5r4sx"
269 # ? for Commodore Amiga 3000UX Sys V R4 and TCP/IP, "make svr4amiganet"
270 # ? for Commodore Amiga with Minix 1.5.10, "make minix68k" of "make minixc68"
271 # ? for Concurrent/Masscomp with RTU 4.0 or later, BSD environment, "make
272 #     rtubsd", "make rtubsd2", "make rtubsd3" (depending on where ndir.h
273 #     is stored, see entries below).
274 # ? for Concurrent/Masscomp with RTU 4.0 or later, System V R2, "make rtus5"
275 # ? for Concurrent (Perkin-Elmer) 3200 series, "make sys5".
276 # ? for Concurrent (Perkin-Elmer) 3200 series with <dirent.h>, "make ccop1"
277 # ? for Concurrent PowerMAX OS SVR4, "make powermax"
278 # ? for Consensys UNIX SV/386 R4V3, "make sys5r4sxtcpc" or "make sys5r4sx"
279 # ? for Convergent with CTIX Sys V R2, "make sys5"
280 # ? for Convergent with CTIX 6.4.1, "make ctix"
281 # ? for Convex C1, "make convex"
282 # ? for Convex C210 with Convex/OS 8, "make convex8"
283 # ? for Convex C2 with Convex/OS 9.1, "make convex9"
284 # ? for Convex C2 with Convex/OS 10.1 and gcc 2.x, "make convex10gcc"
285 # ? for Cray Research X/MP or YMP or C90 with UNICOS 6.x (System V R3),
286 #       "make cray"
287 # ? for Cray Research X/MP or YMP or C90 with UNICOS 7.x (System V R4),
288 #       "make cray"
289 # ? for Cray Research X/MP or YMP or C90 with UNICOS 8.0 Alpha, "make cray8"
290 # ? for Cray Research X/MP or Y-MP or C90 with UNICOS 9.0, "make cray9"
291 # ? for Cray Computer Cray-2 or Cray3 with CSOS, "make craycsos"
292 # ? for Cyber 910 (Silicon-Graphics Iris) with Irix 3.3, "irix33"
293 # ? for Data General AViiON with DG/UX 5.4 before R3.00, "make dgux540"
294 #     or "make dgux540c" (compile ckwart separately if necessary)
295 # ? for DG/UX 5.4 on AViiON Intel models, "make dgux540i" or dgux540ic.
296 # ? for DG/UX 5.4R4.11 on AViiON, all models, "make dgux54411"
297 # ? for DG/UX 5.4R4.20 on AViiON, all models, "make dgux54420"
298 # ? for Data General AViiON with DG/UX 4.3x using Sys V-isms, "make dgux430"
299 # ? for Data General AViiON with DG/UX 4.3x using BSD-isms, "make dgux430bsd"
300 # ? for Data General AViiON, earlier UNIX versions,
301 #     "make sys5r3" (maybe compile ckwart separately, or "touch ckcpro.c")
302 # ? for Data General MV systems with DG/UX, ???
303 # ? for Data General MV systems with MV/UX, use AOS/VS C-Kermit (CKDKER.MAK)
304 # ? for Data General MV systems with AOS/VS, use CKDKER.MAK (last = C-K 7.0)
305 # ? for DEC PDP-11 with Berkeley UNIX 2.x, see Berkeley UNIX 2.x.
306 # ? for DEC PDP-11 with Mini-UNIX (Bell 6th Edition for PDP-11 with no MMU),
307 #     probably no way to fit C-Kermit without I&D space.
308 # ? for DEC PDP-11 with Ultrix-11 3.x, ??? (probably needs overlays)
309 # ? for DEC VAX with Ultrix 1.x "make bsd"
310 # ? for DEC VAX with Ultrix 2.x "make ultrix2x"
311 # ? for DEC VAX or DECstation with Ultrix 3.0, 3.1, "make ultrix3x"
312 # ? for DECstation or VAX with Ultrix 4.0 or 4.1, "make ultrix40"
313 # ? for DECstation or VAX with Ultrix 4.2, "make ultrix42" or "make ultrix42c"
314 # ? for DECstation or VAX with Ultrix 4.x, POSIX world, "make posix"
315 # ? for DECstation or VAX with Ultrix 4.3, "make ultrix43".
316 # ? for DECstation or VAX with Ultrix 4.4, "make ultrix44".
317 # ? for DECstation 5000/50, /150 or /260 (R4x00 MIPS CPU), Ultrix 4.3A or later
318 #     "make ultrix43-mips3" or "make ultrix43c-mips3"
319 # ? for DECstation (MIPS) with Berkeley Sprite, "make bsd44"?
320 # ? for DECstation (MIPS) with OSF/1 V1.0 to 1.3, "make dec-osf"
321 # ? for DEC Alpha with OSF/1 1.0 to 1.3, "make dec-osf"
322 # ? for DEC PC 486 with OSF/1, "make dec-osf"
323 # ? for DEC Alpha with OSF/1 2.x, "make dec-osf20"
324 # ? for DEC Alpha with OSF/1 3.0, "make dec-osf30"
325 # ? for DEC Alpha with Digital UNIX 3.2, "make du32"
326 # ? for DEC Alpha with Digital UNIX 4.0-4.0D, "make du40" or "make du40gcc"
327 # ? for DEC Alpha with Digital UNIX 4.0E or higher, see Tru64.
328 # + for DEC Alpha with any version of DU or OSF/1, "make dec-osf1"
329 # - for DEC Pro-350 with Pro/Venix V1.x, "make provx1" (version 5A is too big)
330 # ? for DEC Pro-380 with Pro/Venix V2.0 (Sys V), "make sys3" or "make sys3nid"
331 # ? for DEC Pro-380 with 2.9, 2.10, or 2.11 BSD, "make bsd29" or "make bsd210"
332 #   for DEC PDP-11 with 2.xBSD (use separate makefile ckubs2.mak)
333 # ? for Dell UNIX Issue 2.x (= USL Sys V/386 R4.x + fixes), "make dellsys5r4"
334 #     or "make dellsys5r4c" (last tested in C-Kermit 5A).
335 # ? for DIAB DS90 with DNIX (any version) create an empty <sys/file.h> if
336 #     this file does not already exist (or add -DNOFILEH to the make entry).
337 # ? for DIAB DS90 with DNIX 5.2 (Sys V.2) or earlier, "make dnix",
338 #     "make dnixnd", or (to add curses and TCP/IP) "make dnixnetc",
339 # ? for DIAB DS90 with DNIX 5.3 (Sys V.3), "make dnix5r3"
340 # ? for DIAB DS90 with DNIX 5.3 (Sys V.3) and TCP/IP, "make dnix5r3net"
341 # ? for DIAB DS90 with DNIX 5.3 2.2 (Sys V.3), ANSI C, "make dnix5r3ansi"
342 #     or, to include TCP/IP, "make dnix5r3ansinet",
343 #     but you have to fix a bug in /usr/include/stdlib.h first:
344 #     change "extern void free(char *str);" to "extern void free(void *str);"
345 # ? for Dolphin Server Technology Triton 88/17 with SV/88 R3.2, "make sv88r32"
346 # ? for Encore Multimax 310, 510 with Umax 4.2, "make umax42"
347 # ? for Encore Multimax 310, 510 with Umax 4.3, "make umax43"
348 # ? for Encore Multimax 310, 510 with Umax V 2.2, use Berkeley cc, "make bsd"
349 # ? for Encore 88K with Umax V 5.2, "make encore88k"
350 # ? for ESIX System V R4.0.3 or 4.04 with TCP/IP support, "make esixr4"
351 #     NOTE: You can also build on Unixware 2.x with "make esixr4", and run
352 #     on ESIX, but there you must first:
353 #       ln /usr/lib/libsocket.so /usr/lib/libsocket.so.1
354 #       ln /usr/lib/libnsl.so /usr/lib/libnsl.so.1
355 #     (This worked for C-Kermit 6.0 but does not work for 7.0)
356 #     (But you can probably still build a non-networking version this way)
357 # ? for Everex STEP 386/25 Rev G with ESIX Sys V R3.2D, "make sys5r3"
358 # ? for Fortune 32:16, For:Pro 1.8, "make ft18"
359 # ? for Fortune 32:16, For:Pro 2.1, "make ft21"
360 # ? for FPS 500 with FPX 4.1, "made bsd"
361 # ? for FreeBSD 1.0, "make freebsd1"
362 # ? for FreeBSD 2.x, "make freebsd2" (ncurses) or "make freebsd2c" (curses)
363 # ? for FreeBSD 3.x, "make freebsd3" (ncurses) or "make freebsd3c" (curses)
364 # ? for FreeBSD 4.0, "make freebsd40"
365 # ? for FreeBSD 4.1 or later, "make freebsd"
366 # + NOTE: Just use "make freebsd" for any reasonably recent FreeBSD version.
367 # ? for Harris HCX-2900, "make sys5r3"
368 # ? for Harris Night Hawk 88K or 68K with CX/UX pre-6.1, "make sys5r3"
369 # ? for Harris Night Hawk 88K or 68K with CX/UX 6.1 or later, "make cx_ux"
370 # ? for Heurikon, "make sys3"
371 # ? for HP-3000, MPE/ix, "make posix"?
372 # ? for HP-9000 Series 300 with 4.4BSD, "make bsd44"
373
374 # NOTE: Most of the HP-UX targets were tested successfully in 2010.
375 # Verification needed for C-Kermit 9.0 Beta.01...
376
377 # ? for HP-9000 Series 500, HP-UX 5.21 and no networking "make hpux0500"
378 # ? for HP-9000 Series 500, HP-UX 5.21 with WIN/TCP 1.2 "make hpux0500wintcp"
379 # ? for HP-9000 Series, HP-UX 6.5, without long filenames,
380 #     "make hpux0650", "make hpux0650c" or "make hpux0650tcpc"
381 # ? for HP-9000 Series, HP-UX 7.0 or later no long filenames, "make hpux0700sf"
382 #     or (to include tcp/ip, curses, etc) "make hpux0700sftcpc"
383 # ? for HP-9000 Series with HP-UX 7.0, TCP/IP,long filenames,"make hpux0700lfn"
384 # ? for HP-9000 300/400 Series (680x0) with HP-UX 8.0, TCP/IP, "make hpux0800"
385 #      or "make hpux0800c"
386 # ? for HP-9000 700/800 Series (PA-RISC), HP-UX 8.0, TCP/IP, "make hpux0800pa"
387 #      or "make hpux0800pac"
388 # ? for HP-9000 Series with HP-UX 8.0, no TCP/IP, long filenames,
389 #      "make hpux0800notcp"
390 # ? for HP-9000 Series, HP-UX 9.0 - 9.10, TCP/IP, curses, restricted compiler
391 #     (no optimization, no ANSI), all models, "make hpux0900".  Read the
392 #     hpux0900 entry below for more info.
393 # ? for HP-9000 700 and 800 Series, HP-UX 9.x, TCP/IP, curses,
394 #     HP optimizing ANSI C compiler, "make hpux0900o700".
395 # ? for HP-9000 with Motorola CPUs, HP-UX 9.x, TCP/IP, curses,
396 #     HP optimizing ANSI C compiler, "make hpux0900mot".
397 # ? for HP-9000 on other CPUs, HP-UX 9.x, TCP/IP, curses,
398 #     HP optimizing ANSI C compiler, "make hpux0900o".
399 # ? for HP-9000 series, HP-UX 9.x, TCP/IP, curses, gcc, all models,
400 #     "make hpux0900gcc"
401 # ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
402 #     curses, restricted compiler (no optimization, no ANSI) "make hpux1000".
403 # ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
404 #     curses, HP ANSI/optimizing compiler "make hpux1000o" or "make hpux1000o+"
405 # ? for HP-9000 HP-UX 10.00 or later with gcc, "make hpux1000gcc"
406 # ? for Trusted HP-UX 10.xx "make hpux1000t", "make hpux1000to",
407 #     or make hpux1000to+"
408 # ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
409 #     (no optimization, no ANSI) "make hpux1100".
410 # ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
411 #     HP ANSI/optimizing compiler "make hpux1100o" or "make hpux1100o+"
412 # ? for Trusted HP-UX 11.xx "make hpux1100t", "make hpux1100to",
413 #     make hpux1100to+"
414 # ? for HP-9000 PA-RISC models with NeXTSTEP 3.3, "make nextquadfat".
415 # ? for HP-9000 PA-RISC models with OPENSTEP/Mach 4.1, "make nextquadfat".
416 # ? for IBM 370 Series with IX/370, "make ix370"
417 # ? for IBM 370 Series with AIX/370 1.2, "make aix370"
418 # ? for IBM 370 Series with AIX/370 3.0, "make aix370"
419 # ? for IBM 370 Series with AIX/ESA 2.1, "make aixesa"
420 # - for IBM PC/AT 286 & compatibles with Mark Williams Coherent OS,
421 #     command-line-only version, "make coherent" (version 5A & later too big)
422 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
423 #     minimum interactive version, "make coherentmi"
424 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
425 #     full interactive version, prior to v4.2, "make coherentmax"
426 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS 4.2,
427 #     "make coherent42"
428 # ? for IBM PC 386 & compatibles with LynxOS 2.0 or 2.1, "make lynx21"
429 # ? for IBM PC 386 & compatibles with LynxOS 2.2, "make lynx"
430 # - for IBM PC/AT & compatibles with original MINIX, "make minix" (too big)
431 # ? for IBM PC family, 386-based, with MINIX/386 1.5, "make minix386"
432 #     or if you have GNU CC, "make minix386gcc"
433 # ? for IBM PC family, 386-based, with MINIX 2.0, "make minix20"
434 # ? for IBM PC family, 386-based, with MINIX 3.0, "make minix3"
435 # + for IBM PC family, 386-based, with MINIX 3.0, "make minix315"
436 # ? for IBM PS/2 with PS/2 AIX 1.0, 1.1, or 1.2, "make ps2aix" or ps2aixnetc.
437 # ? for IBM PS/2 with PS/2 AIX 1.3, "make ps2aix3"
438 # ? for IBM RISC System/6000 with AIX 3.0, "make aix30"
439 # ? for IBM RISC System/6000 with AIX 3.1.x, "make aix31"
440 # ? for IBM RISC System/6000 with AIX 3.2.0 thru 3.2.5, "make aix32"
441 # ? for IBM RS/6000 or Power Series with AIX 4.1.x, "make aix41"
442 # ? for IBM RS/6000 or Power Series with AIX 4.1.x with gcc, "make aix41g"
443 # ? for IBM RS/6000 or Power Series with AIX 4.1 with X.25, "make aix41x25"
444 # ? for IBM RS/6000 or Power Series with AIX 4.2 or later: "make aix"
445 #  (the following "make aixnn" targets are no longer necessary except for gcc)
446 # ? for IBM RS/6000 or Power Series with AIX 4.2, "make aix42"
447 # ? for IBM RS/6000 or Power Series with AIX 4.3, "make aix43" (or aix43gcc)
448 # ? for IBM RS/6000 or Power Series with AIX 4.4, "make aix44" (or aix44gcc)
449 # ? for IBM RS/6000 or Power Series with AIX 4.5, "make aix45" (or aix45gcc)
450 # ? for IBM RS/6000 or Power Series with AIX 5.0, "make aix50" (or aix50gcc)
451 # ? for IBM RS/6000 or Power Series with AIX 5.1, "make aix51" (or aix51gcc)
452 # ? for IBM RS/6000 or Power Series with AIX 5.2, "make aix52" (or aix52gcc)
453 # ? for IBM RS/6000 or Power Series with AIX 5.3, "make aix53" (or aix53gcc)
454 # ? for IBM RS/6000 or Power Series with AIX 6.1, "make aix61" (or aix53gcc)
455 # ? for IBM RT PC with AIX 2.1, "make sys3"
456 # ? for IBM RT PC with AIX 2.2.1, "make rtaix" or "make rtaixc"
457 # ? for IBM RT PC with ACIS 4.2, "make bsd"
458 # ? for IBM RT PC with ACIS 4.3, "make rtacis" or "make bsd KFLAGS=-DNOANSI"
459 # ? for IBM RT PC with 4.3BSD/Reno, "make bsd44" or "make bsd44c"
460 # ? for ICL DRS400 or 400E, "make iclsys5r3"
461 # ? for ICL DRS3000 (80486) with DRS/NX, "make iclsys5r4_486"
462 # ? for ICL DRS6000 (SPARC) with DRS/NX, "make iclsys5r4"
463 # ? for ICL DRS6000 (SPARC) with DRS/NX 4.2MP 7MPlus, "make iclsys5r4m+"
464 # ?     Ditto but with IKSD support included, "make iclsys5r4m+iksd"
465 # ? for Integrated Solutions Inc V8S VME 68020, "make isi"
466 # ? for Intel 302 with Bell Tech Sys V/386 R3.2, "make sys5r3"
467 # ? for Intel Xenix/286, "make sco286"
468 # ? for Interactive System III (PC/IX), "make pcix" or "make is3"
469 # ? for Interactive System III (PC/IX) with gcc, "make is3gcc"
470 # ? for Interactive 386/ix 1.0.6 with TCP/IP networking, "make is5r3net2"
471 # ? for Interactive 386/ix 2.0.x, "make is5r3" or (POSIX) "make is5r3p"
472 # ? for Interactive 386/ix 2.0.x with TCP/IP networking, "make is5r3net"
473 #     or "make is5r3net2"
474 # ? for Interactive 386/ix 2.2.1, job control, curses, no net, gcc,
475 #     "make is5r3gcc"
476 # ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 without TCP/IP, "make is5r3jc"
477 # ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 with TCP/IP, "make is5r3netjc"
478 # ? for Intergraph Clipper, "make clix" or "make clixnet"
479 # ? for Jolix (see 386BSD)
480 # + for Linux 1.2 and later, "make linux".  Uses ncurses.  This version
481 #     handles serial speeds up to 460800 bps, Linux FSSTD 1.2, TCP/IP, and
482 #     should work on both libc and glibc systems.  For static linking, use
483 #     "make linux LNKFLAGS=-static".  Please read the comments that accompany
484 #     the linux entry.  As of 8.0.212 Dev.10, this also includes Large File
485 #     Support (LFS).
486 # + for Linux builds that fail with "sys/select.h: No such file or directory",
487 #     "make linuxns"
488 # + for Linux 1.2 and later but with curses.h and libcurses (rather than
489 #     ncurses.h and libncurses), use "make linuxc".
490 # + for Linux 1.2 and later with no curses support at all, "make linuxnc".
491 # + for Linux with no TCP/IP, "make linuxnotcp"
492 # (The following Linux targets are historic and might not work...)
493 # ? for Red Hat Linux 7.1 through RH9, fully configured (krb5, SSL, etc):
494 #     "make redhat71", "make redhat72", "make redhat73", "make redhat80"
495 #     "make redhat9"
496 #     NOTE: You must use this target for Red Hat 7.1 since it
497 #     also includes a workaround for its broken curses library.
498 #     WARNING: These targets create binaries that include code for
499 #     strong encryption and are therefore not exportable. DO NOT PUT
500 #     THESE BINARIES ON US OR CANADIAN WEB OR FTP SITES.
501 # ? for Linux on PowerMac (Mklinux DR3), "make mklinux".
502 # ? for Linux 1.2 and later, to build with egcs, "make linuxegcs".
503 # ? for Linux with lcc compiler, no TCP/IP, "make linuxnotcp-lcc"
504 # ? for Linux 1.0 or earlier, "make linux10".
505 # (End old linux targets)
506 # ? for Mach 2.6 on (anything, e.g. DECstation), "make bsd42" or "make bsd43".
507 # ? for MachTen (Tenon) 2.1.1.D on (e.g.) Apple Powerbook, "make machten".
508 # ? for Masscomp RTU AT&T System III, "make rtu"
509 #   for other Masscomp, see Concurrent.
510 # ? for Microport SV/AT (System V R2), "make mpsysv" (last edit tested: 144)
511 # ? for Microport SVR4 2.2, 3.1, or 4.1 "make sys5r4sx"
512 # ? for Microsoft,IBM Xenix (/286, PC/AT, etc), "make xenix" or "make sco286"
513 # ? for MIPS System with RISC/os (UMIPS) 4.52 = AT&T SVR3, "make mips"
514 #     or "make mipstcpc"
515 # ? for MkLinux on Power Macintosh, "make mklinux"
516 # ? for Modcomp 9730, Real/IX, "make sys5r3" (or modify to use gcc = GLS cc)
517 # ? for Modcomp Realstar 1000 with REAL/IX D.1, "make sv88r32"
518 # ? for Motorola Four Phase, "make sys3" or "make sys3nid"
519 # ? for Motorola Delta System V/68 R3, "make sv68r3"
520 # ? for Motorola Delta System V/68 R3V5, "make sv68r3v5"
521 # ? for Motorola Delta System V/68 R3V5.1, "make sv68r3v51"
522 # ? for Motorola Delta System V/68 R3V6 with NSE TCP/IP, "make sv68r3v6"
523 # ? for Motorola Delta System V/88 R32, "make sv88r32"
524 # ? for Motorola Delta System V/88 R40, "make sv88r40"
525 # ? for Mt Xinu Mach386 on 386/486-based PCs, "make bsd43"
526 # ? for NCR Tower 1632, OS 1.02, "make tower1"
527 # ? for NCR Tower 1632 or Minitower with System V R2, "make sys3"
528 #     or "make sys3nv"
529 # ? for NCR Tower 32, OS Release 1.xx.xx, "make tower32-1"
530 # ? for NCR Tower 32, OS Release 2.xx.xx, "make tower32-2"
531 # ? for NCR Tower 32, OS Releases based on Sys V R3, "make tower32"
532 # ? for NCR Tower 32, OS Releases based on Sys V R3 with gcc "make tower32g"
533 # ? for NCR System 3000, AT&T UNIX System V R4 2.0, "make sys5r4sxna"
534 # ? for NCR System 3000, AT&T UNIX System V R4 2.0 with Wollongong TCP/IP,
535 #     "make sys5r4net2" or "make sys5r4net2c".
536 #      Some header files might be misplaced; try this:
537 #       ln /usr/include/netinet/in.h /usr/include/sys/in.h
538 #       ln /usr/include/arpa/inet.h /usr/include/sys/inet.h
539 #       ln /usr/include/sys/termiox.h /usr/include/termiox.h
540 # ? for NCR System 3000, NCR UNIX 02.02.01, same as above.
541 # ? for NCR MP-RAS System V R4 V2.03 or 3.02, "make mpras" or "make mprastcpc"
542 # + for NetBSD any version on any architecture, "make netbsd"
543 # + for NetBSD with OpenSSL, "make netbsd+ssl"
544 # ? for NetBSD with ncurses specified instead of curses, "make netbsdn"
545 # ? for NetBSD with all curses support omitted, "make netbsdnc"
546 # ? for NeXT with NeXTSTEP 1.0 through 3.2, "make next" (on a NeXT)
547 # ? for NeXT with NeXTSTEP 3.3, "make next33"
548 # ? for NeXT with OPENSTEP/Mach 4.1, "make nextquadfat".
549 # ? for NeXT with OPENSTEP/Mach 4.2, "make openstep42".
550 # ? for NeXTSTEP/486, "make next" (on a PC)
551 # ? for NeXTSTEP portable binary (runs on Intel or Motorola), "make nextfat"
552 # ? for NeXTSTEP portable binary (Intel, Motorola, HP PA-RISC, or SPARC),
553 #     "make nextquadfat"
554 # ? for Nixdorf Targon/31, "make t31tos40x"
555 # ? for Norsk Data Uniline 88/17 with SV/88 R3.2, "make sv88r32"
556 #   for Novell UnixWare - see UnixWare
557 # ? for OSF/1 (vanilla, from OS/F), "make posix"
558 # ? for OkiStation 7300 Series, "make sys5r4sxtcp"
559 # ? for Olivetti LSX-3020 with X/OS R.2.3, "make xos23" or "make xos23c"
560 # + for OpenBSD, "make openbsd" (also see secure targets listed below).
561 # ? for OPENSTEP/Mach 4.1, "make nextquadfat" (NeXT, Intel, PA-RISC, SPARC)
562 # ? for OPENSTEP/Mach 4.2, "make openstep42" (tested on NeXT)
563 # ? for Perkin-Elmer (Concurrent) 3200 series, "make sys5".
564 # ? for Perkin-Elmer (Concurrent) 3200 series with <dirent.h>, "make ccop1"
565 # ? for Perkin-Elmer/Concurrent 3200 with Xelos R02, "make ccop1"
566 # ? for PFU Compact A Series SX/A TISP V10/E50 (Japan), "make sxae50"
567 # ? for Plexus, "make sys3"
568 # ? for Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1,
569 #     "ucb make pyramid" or for HDB UUCP, "ucb make pyramid-hdb" or:
570 # ? for Pyramid MIServer S or ES Series, DataCenter/OSx, "make pyrdcosx"
571 # ? for Pyramid MIS-S MIPS R3000, DataCenter OSx System V R4, "make pyrdcosx"
572 # ? for POSIX on anything, "make posix" (but adjustments might be necessary).
573 #      NOTE: this target is not very useful - many features are missing.
574 # ? for Prime 8000 MIPS, SVR3, "make mips" or "make mipstcpc"
575 # - for QNX 2.x (sorry we don't have a version of C-Kermit for QNX 2.x)
576 # ? for QNX 4.0 or 4.1, 16-bit, on 286 PC, Watcom C 8.5, "make qnx16_41"
577 # ? for QNX 4.21 - 4.22A (286+), and 4.23 (386+), or higher, 16-bit,
578 #     Watcom C 9.5x or higher, "make qnx16"
579 # + for QNX 4.21-4.25, 32-bit, 386 or above, Watcom C 10.6, "make qnx32"
580 #     NOTE: ("make qnx" == "make qnx32")
581 # ? for QNX Neutrino 2+, "make qnx_nto2+" (crosscompiled on QNX4 with Watcom C)
582 # ? for QNX 6 = Neutrino 2.xx, "make qnx6"
583 # ? for Ridge 32 (ROS3.2), "make ridge32"
584 # ? for Samsung MagicStation, "make sys5r4"
585 # ? for SCO Xenix 2.2.1 with development system 2.2 on 8086/8 "make sco86"
586 # ? for SCO Xenix/286 2.2.1 with development system 2.2 on 80286, "make sco286"
587 #     NOTE: reportedly this makefile is too long for SCO Xenix/286 make, but it
588 #     works with "makeL", or if some of the other make entries are edited out.
589 # ? for SCO Xenix/386 2.2.2, "make sco386"
590 # ? for SCO Xenix/386 2.3.x, "make sco3r2"
591 # ? for SCO Xenix/386 SCO 2.3.3 or 2.3.4 with gcc 1.37 or later,
592 #     "make sco386gcc" or (to add curses) "make sco386gccc".
593 # ? for SCO Xenix/386 or UNIX/386 with Excelan TCP/IP, "make sco3r2net"
594 #     or (to add curses support) "make sco3r2netc" or "sco386netc"
595 # + for SCO XENIX 2.3.4, "make sco234" or "make sco234c" to add curses.
596 # ? for SCO XENIX 2.3.4 with SCO TCP/IP & curses, "make sco234netc".
597 # ? for SCO Xenix 2.3.x with Racal-InterLan TCP/IP, "make sco3r2netri"
598 #   for other UNIX varieties with Racal Interlan TCP/IP, read sco3r2netri entry
599 # ? for SCO Xenix 2.3.x with SCO (Lachman) TCP/IP, "make sco3r2lai"
600 #     or (to add curses) "make sco3r2laic"
601 #   for SCO UNIX...  ALSO READ COMMENTS in the SCO UNIX entries for more info!
602 # ? for SCO UNIX/386 3.2.0 or 3.2.1, "make sco3r2" or "make sco3r2x"
603 # ? for SCO UNIX/386 3.2.2, "make sco3r22" or "make sco3r22gcc"
604 #     or "make sco3r22c"
605 # ? for SCO UNIX/386 3.2.2 with SCO TCP/IP, "make sco3r22net"
606 #     or "make sco3r22netc" (curses)
607 # ? for SCO ODT 1.1, "make sco3r22net" or "make sco3r22netc" (curses)
608 # ? for SCO UNIX/386 3.2 V4.x, no network support, "make sco32v4"
609 # ?   or "make sco32v4ns" (this one uses no select() or sockets library)
610 # ? for SCO UNIX/386 3.2 V4.x with TCP/IP, "make sco32v4net"
611 #     (also sco32v4gcc, sco32v4netgcc)
612 # ? for SCO UNIX/386 3.2 V5.0 - see SCO OpenServer.
613 # ? for SCO UNIX 3.2v4.x with TCP/IP, <dirent.h> for Extended Acer File
614 #     System (EAFS), curses, ANSI C compilation, "make sco32v4net"
615 # ?   or (to use select()-based CONNECT module) "make sco32v4netx".
616 # ? for SCO UNIX 3.2v4.2, "make sco-odt30" (includes TCP/IP).
617 # ? for SCO MPX 3.0 - The SCO UNIX binary runs on the corresponding MPX system.
618 #
619 # NOTE: Also see below for other entries that are variations on these.
620 # Also be sure to read the comments accompanying each SCO entry.
621 # Also see Unixware section.
622 #
623 # ? for SCO ODT 2.0, "make sco32v4net"
624 # ? for SCO ODT 3.0, "make sco-odt30"
625 # ? for SCO OpenServer 5.0 (OSR5), "make sco32v500"
626 # ? for SCO OpenServer 5.0 (OSR5) with networking, "make sco32v500net"
627 # ? for SCO OpenServer 5.0 (OSR5), gcc, "make sco32v500gcc"
628 # ? for SCO OpenServer 5.0 (OSR5), gcc, with networking, "make sco32v500netgcc"
629 # ? for SCO OpenServer 5.0 (OSR5), as above, ELF, "make sco32v500netgccelf"
630 # ? for SCO OpenServer 5.0.2, use "make sco32v502xxx" entries as above.
631 # ? for SCO OpenServer 5.0.4, use "make sco32v504xxx" entries as above.
632 # ? for SCO OpenServer 5.0.5, use "make sco32v505xxx" entries as above.
633 #     Use the sco32v505udkxxx entries if you have the UDK rather than /bin/cc.
634 # ? for SCO OpenServer 5.0.6, use "make sco32v506xxx" entries as above.
635 # ? for SCO OpenServer 5.0.6a,use "make sco32v506axxx" entries as above.
636 # ? for SCO OpenServer 5.0.7, use "make sco32v507", "make sco32v507net"
637 # ? for SCO (Univel) UnixWare 1.x, "make unixware" or "make unixwarenetc".
638 #     If there are problems with this in C-K 7+ see notes at unixware entry.
639 # + for SCO OpenServer 6.0.0, "make sco_osr600"
640 # ? for SCO UnixWare 2.0.x, "make uw20"
641 # ? for SCO UnixWare 2.1.0, "make uw21"
642 # ? for SCO UnixWare 2.1.3, "make uw213"
643 # + for SCO UnixWare 7, "make uw7" (includes large file support)
644 # ? for SCO UnixWare 7 with IKSD support, "make uw7iksd" or "make uw7iksdudk"
645 # ? for SCO UnixWare 7 with OpenSSL, "make uw7ssl"
646 # ? for SCO (Caldera) Open UNIX 8, "make ou8"
647 # ? for Sharp Zaurus SL5500 PDA, "make zsl5500".
648 # ? for Sequent with DYNIX/ptx 1.2.1, "make dynixptx12"
649 # ? for Sequent with DYNIX/ptx 1.3 or 1.4 with TCP/IP, "make dynixptx13"
650 # ? for Sequent with DYNIX/ptx 2.0 or 2.1 with TCP/IP, "make dynixptx20"
651 #     or "dynixptx20c"
652 # ? for Sequent with DYNIX/ptx 2.1.6 on i486, "dynixptx216c"
653 # ? for Sequent with DYNIX/ptx V4.1.3 with TCP/IP, "make dynixptx41c"
654 # ? for Sequent with DYNIX/ptx V4.4.2 with TCP/IP, "make dynixptx44"
655 # ? for Sequent Balance 8000 or B8 with DYNIX 3.0.xx, "make dynix3"
656 #    or "make dynix3noacu"
657 # ? for Sequent Symmetry S81 with DYNIX 3.0.xx, "make dynix3"
658 # ? for Sequent DYNIX 3.1.xx, "make dynix31" or "make dynix31c"
659 # ? for Siemens/Nixdorf SINIX-L Intel V5.41, "make sinix541i"
660 # + for Siemens/Nixdorf SINIX-N MIPS V5.42, "make sinix542"
661 # ? for Siemens/Nixdorf SINIX-P MIPS V5.42 with gcc, "make sinix542g"
662 # ? for Siemens/Nixdorf SINIX-Z Intel V5.42, "make sinix542i"
663 # ? for Siemens/Nixdorf Reliant UNIX V5.43, "make sni543"
664 # ? for Siemens/Nixdorf Reliant UNIX V5.44, "make sni544"
665 # ? for Silicon Graphics Iris System V IRIX 3.2 or earlier, "make iris"
666 # ? for Silicon Graphics Sys V R3 with IRIX 3.3 or later, "make sys5r3"
667 # ? for Silicon Graphics Iris Indigo with IRIX 4.0 or 5.0, "make irix40" or
668 #     (to include Yellow Pages and Curses) "make irix40ypc"
669 # ? for Silicon Graphics Iris Indigo or Elan with IRIX 4.0.x with microcode
670 #     optimization and -O4, "make irix40u" or "irix40uc" (and read notes
671 #     accompanying these entries).
672 # ? for Silicon Graphics IRIX 5.1, "make irix51" or "irix51x" (no optimize)
673 # ? for Silicon Graphics IRIX 5.2, "make irix52"
674 # ? for Silicon Graphics IRIX 5.3, "make irix53" or "irix53x" (no optimize)
675 # ? for Silicon Graphics IRIX 6.0, "make irix60".
676 # ? for Silicon Graphics IRIX 6.2, "make irix62".
677 # ? for Silicon Graphics IRIX 6.3, "make irix63".
678 # ? for Silicon Graphics IRIX 6.4, "make irix64" or "make irix64gcc".
679 # + for Silicon Graphics (SGI) IRIX 6.5, "make irix65"
680 # +   or "make irix65mips2" to force MIPS2, or "make irix65gcc" for GCC.
681 # + for Silicon Graphics (SGI) IRIX 6.5, "make irix65" or "make irix65mips2"
682 # ? for SGI IRIX 6.5 with SSL/TLS, SRP, and ZLIB "make irix65+ssl+srp+zlib"
683 # ? for Solaris 2.0-2.3 on SPARC or Intel, SunPro CC, "make solaris2x",
684 # ?   or to add SunLink X.25 8.0x support, "make solaris2x25".
685 # ? for Solaris 2.4 built with gcc, "make solaris24g".
686 # ? for Solaris 2.0-2.3 on SPARC or Intel, GNU CC, "make solaris2xg".
687 # ? for Solaris 2.4 with X.25, "make solaris24x25".
688 # ? for Solaris 2.5 on SPARC or Intel, SunPro CC, "make solaris25".
689 # ?   or to add SunLink X.25 8.0x support, "make solaris25x25".
690 # ? for Solaris 2.5 on SPARC or Intel, GNU CC, "make solaris25g".
691 # ? for Solaris 2.6 on SPARC or Intel, "make solaris26".
692 # ? for Solaris 7 on SPARC or Intel, SunPro CC, "make solaris7".
693 # ? for Solaris 7 on SPARC or Intel, GNU CC, "make solaris7g".
694 # ? for Solaris 8 on SPARC or Intel, SunPro CC, "make solaris8".
695 # ? for Solaris 8 on SPARC or Intel, GNU CC, "make solaris8g".
696 # + for Solaris 9 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris9".
697 # + for Solaris 9 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris9g".
698 # + for Solaris 9 on SPARC 100% 64-bit, SunPro CC, "make solaris9_64".
699 # + for Solaris 9 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris9g64".
700 # + for Solaris 10 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris10".
701 # + for Solaris 10 on SPARC 64-bit, SunPro CC, "make solaris10_64".
702 # + for Solaris 10 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris10g".
703 # ? for Solaris 10 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris10g64".
704 # ? for Solbourne 4/500 with OS/MP 4 "make sunos4"
705 # ? for Solbourne 4/500 with OS/MP 4.1 "make sunos41" or "make sunos41c"
706 # ? for SONY NEWS with NEWS-OS 4.0.1C, "make sonynews"
707 # ? for SONY NEWS with NEWS-OS 4.1.2C, "make sonynews"
708 # ? for Sperry/UNISYS 5000/20, UTS V 5.2 3R1, "make sys5"
709 # ? for Sperry/UNISYS 5000/30/35/50/55, UTS V 5.2 2.01, "make unisys5r2"
710 # ? for Sperry/UNISYS 5000/80 with System V R3, "make sys5r3"
711 # ? for Sperry/UNISYS 5000/95 with System V R3, "make sys5r3"
712 #     For UNISYS SVR3 it might be necessary to "make sys5r3 KFLAGS=-UDYNAMIC"
713 # ? for Stardent 1520, "make sys5r3"
714 # ? for Stratus FTX 2.x, try "make ftx" or else "make sys5r4" or "sys5r4sx"
715 # ? for Stratus FTX 3.x, PA-RISC 1.0 or 2.0, "make ftx" or "make ftxtcp"
716 # ? for Sun with Sun UNIX 3.5 and gcc, "make sunos3gcc"
717 # ? for Sun with pre-4.0 SunOS versions, "make bsd" (or appropriate variant)
718 # ? for Sun with SunOS 4.0, BSD environment, "make sunos4"
719 # ? for Sun with SunOS 4.0, BSD, with SunLink X.25, make sunos4x25
720 # ? for Sun with SunOS 4.1 or 4.1.1, BSD environment, "make sunos41"
721 #     or "make sunos41c" (curses) or "make sunos41gcc" (compile with gcc)
722 # ? for Sun with SunOS 4.1.x, BSD, with SunLink X.25 7.00 or earlier,
723 #     "make sunos41x25" or "make sunos41x25c" (curses)
724 # ? for Sun with SunOS 4.1, 4.1.1, AT&T Sys V R3 environment, "make sunos41s5"
725 # ? for Sun with SunOS 4.1.2, "make sunos41" or any of its variations.
726 #     NOTE:  All SunOS 4.x systems -- Shared libraries are used by default.
727 #       If this causes problems, add -Bstatic to CFLAGS.
728 #     NOTE2: When building C-Kermit under SunOS for the BSD universe,
729 #       but /usr/5bin/cc is ahead of /usr/ucb/cc in your PATH, add
730 #       "CC=/usr/ucb/cc CC2=/usr/ucb/cc" to the make entry.
731 #     NOTE3: If an executable built on one type of Sun hardware does not work
732 #       on another type, rebuild the program from source on the target machine.
733 #   for Sun with Solaris 1.x use SunOS 4.1 entries.
734 #   for Sun with Solaris 2.0 and higher use Solaris entries.
735 # + for Sun SPARC with Linux, "make linux"
736 # ? for Sun SPARC with OPENSTEP/Mach 4.1, "make nextquadfat"
737 # ? for Sun SPARC with OPENSTEP/Mach 4.2, "make openstep42"
738 # - for Tandy 16/6000 with Xenix 3.0, "make trs16" (C-Kermit 7.0 is too big)
739 # ? for Tektronix 6130/4132/43xx (e.g.4301) with UTek OS, "make utek"
740 #     or (for models without hardware flow control), "make uteknohwfc"
741 # ? for Tektronix XD88 series with UTekV OS, "make utekvr3"
742 # ? for Tri Star Flash Cache with Esix SVR3.2, "make sys5r3"
743 # NOTE: The Tru64 builds have been failing since 2010, but "make dec-osf" is OK
744 # ? for Tru64 UNIX 4.0E, "make tru64-40e"
745 # ? for Tru64 UNIX 4.0F, "make tru64-40f"
746 # ? for Tru64 UNIX 4.0G, "make tru64-40g"
747 # ? for Tru64 UNIX 5.0A, "make tru64-50a"
748 # ? for Tru64 UNIX 5.1A, "make tru64-51a"
749 # ? for Tru64 UNIX 5.1B, "make tru64-51b"
750 # ? for Unistar, "make sys5"
751 # ? for Unisys S/4040 68040 CTIX SVR3.2 6.4.1, "make ctix" or "make sys5r3"
752 # ? for Unisys U5000 UNIX SVR3 6.x, "make sys5r3" or "make sys5r3c"
753 # ? for Unisys U6000 UNIX SVR4 1.x, "make sys5r4nx" or "make sys5r4nxnetc"
754 #   for Unisys ... (also see Sperry)
755 #   for Univel - see UnixWare
756 #   for Unixware - see SCO
757 # ? for Valid Scaldstar, "make valid"
758 # ? for Whitechapel MG01 Genix 1.3, "make white"
759 # ? for Zilog ZEUS 3.21, "make zilog"
760 #
761 # The result should be a runnable program called "wermit" in the current
762 # directory.  After satisfactory testing, you can rename wermit to "kermit"
763 # and put it in some directory that's in everybody's PATH, such as
764 # /usr/local or /opt/local.
765 #
766 # To remove intermediate and object files, "make clean".
767 # If your C compiler produces files with an extension other than "o",
768 # then "make clean EXT=u", "make clean EXT=s", or whatever.
769 #
770 # To run lint on the source files, "make lintsun", "make lintbsd",
771 # "make lints5", as appropriate.
772 #
773 # ******************************
774 # SECURE TARGETS
775 #
776 # Beginning with C-Kermit 7.0, secure targets are included, as are the
777 # source modules (ckuat*.[ch], ck_*.[ch]) needed to build them.  Secure
778 # target names are like the regular names, but with security features
779 # indicated by plus (+) signs.  The features are:
780 #
781 # krb4     MIT Kerberos IV
782 # krb5     MIT Kerberos V
783 # openssl  OpenSSL (SSL/TLS)
784 # zlib     ZLIB compression for SSL/TLS
785 # srp      Stanford Secure Remote Password
786 # pam      PAM (pluggable authentication module)
787 # shadow   Shadow Password File
788 #
789 # You can build these targets if you have the Kermit source files and the
790 # required libraries (Kerberos, OpenSSL, SRP, etc) and header files.  See:
791 #   http://www.columbia.edu/kermit/security.html
792 # for specific details regarding supported versions.
793 #
794 # NOTE: OpenSSL 0.9.6 and earlier are not compatible with 0.9.7 and later.
795 # C-Kermit code was originally designed for 0.9.6.  To build with 0.9.7 you
796 # must add -DOPENSSL_097 to avoid missing symbols in the DES library and to
797 # use the entry points that were renamed to avoid conflict with Kerberos 4.
798 # If you have OpenSSL 0.9.8, add -DOPENSSL_098, which is a synonym for
799 # -DOPENSSL_097.  If you have 1.0.0 or later, add -DOPENSSL_100, which is
800 # another synonym.
801
802 # In OpenSSL builds add -ldl if you get unresolved references for
803 # dlopen, dlclose, dlsym, and/or dlerror.
804 #
805 # In order to build a secure version of Kermit, you need to know the location
806 # of the header (include) files and libraries for the desired form of
807 # security.  Unless you specify a location, this makefile looks in /usr/local
808 # and if the required files are not found, the build fails.
809 #
810 # If the secure headers and libraries are not on your computer, you have
811 # to download and install them, for example from http://www.openssl.org .
812 #
813 # The following symbols are used to specify library and header file locations:
814
815 prefix  = /usr/local
816 srproot = $(prefix)
817 sslroot = $(prefix)
818 manroot = $(prefix)
819
820 K4LIB=-L/usr/kerberos/lib
821 K4INC=-I/usr/kerberos/include
822 K5LIB=-L/usr/kerberos/lib
823 K5INC=-I/usr/kerberos/include
824 SRPLIB=-L$(srproot)/lib
825 SRPINC=-I$(srproot)/include
826 SSLLIB=-L$(sslroot)/ssl/lib
827 SSLINC=-I$(sslroot)/ssl/include
828
829 # To override these assignments; for example, if your OpenSSL files are
830 # not in /usr/local/ssl, invoke the desired target like this:
831
832 #  make solaris9+openssl "SSLINC=-I/opt/openssl-0.9.8k/include" \
833 #   "SSLLIB=-L/opt/openssl-0.9.8k/lib"
834 #
835 # (don't set the variables and then do "make -e" because that breaks 
836 # chaining of makefile targets.)
837 #
838 # Here are some up-to-date secure targets as of Sep 2009: 
839 #
840 # aix+openssl:                        IBM AIX 4.2 or later with OpenSSL
841 # freebsd44+srp+openssl               FreeBSD 4.4 with SRP and OpenSSL
842 # freebsd50+openssl                   FreeBSD 5.0 with OpenSSL
843 # hpux1100o+openssl:                  HP-UX 11.xx with OpenSSL
844 # hpux1000gcc+openssl:                HP-UX 10.xx with OpenSSL (build with gcc)
845 # hpux1100gcc+openssl:                HP-UX 11.xx with OpenSSL (build with gcc)
846 # irix6x+krb5:                        IRIX 6.x with Kerberos V
847 # irix65+krb5:                        etc etc...
848 # solaris9+openssl                    Solaris 9,10, or 11 with Openssl (Sun cc)
849 # solaris9g+openssl                   Solaris 9,10, or 11 with Openssl (gcc)
850 # linux+ssl                           OpenSSL only
851 # linux+krb5+ssl                      Linux with Kerberos 5 and OpenSSL
852 # linux+krb5:                         Kerberos 5 only
853
854 # The following secure Linux targets have not been updated or tested recently.
855 # linux+krb5+krb4:
856 # linux+srp:
857 # linux+srp+pam:
858 # linux+srp+gmp:
859 # linux+srp+gmp+no-des:
860 # linux+srp+gmp-export:
861 # linux+srp+gmp+pam:
862 # linux+shadow+pam:
863 # linux+openssl:
864 # linux+openssl+shadow:
865 # linux+openssl+zlib+shadow+pam:
866 # linux+srp+openssl:
867 # linux+krb5+krb4+srp:
868 # linux+krb5+krb4+srp+openssl:
869 # linux+krb5+krb4+openssl:
870 # linux+krb5+krb4+openssl+shadow:
871 # linux+krb5+krb4+openssl+zlib+shadow:
872 # linux+krb5+krb4+srp-export:
873 # linux+krb5+krb4+srp+pam:
874 # linux+krb5+krb4+srp+openssl+pam-debug:
875 # linux+krb5+krb4+srp+openssl+pam:
876 # linux+krb5+krb4+srp+openssl+zlib+pam:
877 # linux+krb5+krb4+openssl+shadow+pam:
878 # linux+krb5+openssl+zlib+shadow+pam:
879
880 # The following have not been tested recently either and might
881 # need adjustment.
882 #
883 # macosx+krb5+ssl:     Mac OS X 10.3.9 or later + OpenSSL and Kerberos 5
884 # macosx103+secure:    This one is probably redundant
885 # netbsd+openssl:      NetBSD with OpenSSL
886 # openbsd30+ssl:       OpenBSD 3.0 with OpenSSL
887 # redhat71,redhat72,redhat73,redhat80,redhat9 (Krb5,OpenSSL,Showdow,PAM,Zlib)
888 # sco32v500net+ssl:
889 # sco32v505net+ssl:
890 # solaris2x+krb4:
891 # solaris2xg+krb4:
892 # solaris2xg+openssl+pam+shadow:
893 # solaris2xg+openssl+zlib+pam+shadow:
894 # solaris2xg+krb5+krb4+openssl+shadow:
895 # solaris25+krb4:
896 # solaris25g+krb4:
897 # solaris26g+openssl:
898 # solaris8g+openssl+zlib+pam+shadow:
899 # solaris8g+krb4:
900 # solaris9g+openssl+zlib+pam+shadow:
901 # solaris9g+openssl+shadow+pam+zlib
902 # sunos41gcc+krb4:                    SunOS 4.1 built with gcc with Kerberos IV
903 # sunos41gcc+openssl:                 SunOS 4.1 built with gcc with OpenSSL
904 # sunos41gcc+krb4+openssl:            ...with Kerberos IV and OpenSSL
905 # sunos41gcc+krb4+openssl+zlib:       ditto, plus ZLIB compression
906 # sunos41gcc+krb4+srp+openssl+zlib:   ditto, plus SRP
907 # sunos41gcc+srp+openssl+zlib:
908 # tru64-51b-openssl:                  Tru64 (Digital) Unix 5.1B with OpenSSL
909 # uw7ssl                              Unixware 7 with SSL
910 #
911 ###########################################################################
912 #
913 #  Compile and Link variables:
914 #
915 #  EXT is the extension (file type) for object files, normally o.
916 #  See MINIX entry for what to do if another filetype must be used.
917 #
918 EXT=o
919 #LNKFLAGS=
920 SHAREDLIB=
921 CC= cc
922 CC2= cc
923 MAKE= make
924 SHELL=/bin/sh
925
926 ###########################################################################
927 # (Ancient) UNIX V7-specific variables.
928 # These are set up for Perkin-Elmer 3230 V7 Unix:
929 #
930 PROC=proc
931 DIRECT=
932 NPROC=nproc
933 NPTYPE=int
934 BOOTFILE=/edition7
935 #
936 # ( For old Tandy TRS-80 Model 16A or 6000 V7-based Xenix, use PROC=_proc,
937 #   DIRECT=-DDIRECT, NPROC=_Nproc, NPTYPE=short, BOOTFILE=/xenix )
938 #
939
940 ###########################################################################
941 # SAMPLE INSTALLATION SCRIPT
942 #
943 # Modify to suit your own computer's file organization and permissions.  If
944 # you don't have write access to the destination directories, "make install"
945 # fails.  In most cases, a real installation also requires you to chown /
946 # chgrp the Kermit binary for the UUCP lockfile and/or tty devices, and
947 # perhaps also to chmod +s the corresponding permission fields.
948 #
949 # Default binary, man, and doc directories are supplied below.  You can
950 # override them in your 'make' command.  Examples:
951 #
952 #   make install                                   # Accept defaults.
953 #   make "INFODIR=/usr/share/lib/kermit" install   # Override INFODIR default.
954 #
955 # You can also build and install in one step, e.g.:
956 #
957 #   make linux install
958 #
959 # If you use the 'install' target to install C-Kermit, it creates an
960 # UNINSTALL script that can be used to uninstall it.
961 #
962 WERMIT = makewhat
963 BINARY = wermit
964 DESTDIR =
965 BINDIR = $(prefix)/bin
966 MANDIR = $(manroot)/man/man1
967 MANEXT = 1
968 SRCDIR =
969 INFODIR =
970 CERTDIR =
971
972 TEXTFILES = COPYING.TXT ckcbwr.txt ckubwr.txt ckuins.txt ckccfg.txt \
973                 ckcplm.txt ckermit.ini ckermod.ini ckermit70.txt ckermit80.txt
974
975 ALL = $(WERMIT)
976
977 all: $(ALL)
978
979 .c.o:
980         $(CC) $(CFLAGS) -DKTARGET=\"$(KTARGET)\" -c $<
981
982 #Clean up intermediate and object files
983 clean:
984         @echo 'Removing object files...'
985         -rm -f ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
986 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckcpro.$(EXT) ckcfns.$(EXT) \
987 ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) \
988 ckufio.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) ckwart.$(EXT) ckuusx.$(EXT) \
989 ckuusy.$(EXT) ckcnet.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckusig.$(EXT) \
990 ckucns.$(EXT) ckcmdb.$(EXT) ckuath.$(EXT) ckctel.$(EXT) ckclib.$(EXT) \
991 ckcuni.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
992 ckcpro.c wart
993
994 show:
995         @echo prefix=$(prefix)
996         @echo srproot=$(srproot)
997         @echo sslroot=$(sslroot)
998         @echo manroot=$(manroot)
999         @echo K4LIB=$(K4LIB)
1000         @echo K4INC=$(K4INC)
1001         @echo K5LIB=$(K5LIB)
1002         @echo K5INC=$(K5INC)
1003         @echo SRPLIB=$(SRPLIB)
1004         @echo SRPINC=$(SRPINC)
1005         @echo SSLLIB=$(SSLLIB)
1006         @echo SSLINC=$(SSLINC)
1007         @exit
1008
1009 # Install C-Kermit after building -- IMPORTANT: Read the instructions above
1010 # (SAMPLE INSTALLATION SCRIPT).  For SSL/TLS versions, ca_certs.pem file
1011 # should be installed in the appropriate place for your OpenSSL library, e.g.:
1012 #
1013 #   cp ca_certs.pem /usr/local/ssl/
1014 #   cp ca_certs.pem /usr/share/ssl/
1015 #
1016 # To make sure 'man' notices the new source file and doesn't keep
1017 # showing the old formatted version, remove the old formatted version,
1018 # something like this:
1019 #               rm -f $(MANDIR)/../cat$(MANEXT)/kermit.$(MANEXT)
1020 # or this (which requires CATDIR to be defined):
1021 #               rm -f $(CATDIR)/kermit.$(MANEXT)
1022 #
1023 # As of C-Kermit 8.0.205 this target also builds an UNINSTALL script, and
1024 # so it might be too long for some old Bourne shells, in which case you can
1025 # use a different shell:
1026 #
1027 #   make SHELL=ksh install
1028 #   make SHELL=/bin/posix/sh install
1029 #
1030 install:
1031         @echo Installing C-Kermit version $(CKVER)...;\
1032         rm -f UNINSTALL;\
1033         exec 3>./UNINSTALL;\
1034         echo "# C-Kermit UNINSTALL script" >&3;\
1035         echo "# `date`\n" >&3;\
1036         echo "CKVER=$(CKVER)" >&3;\
1037         echo "PrN Uninstalling C-Kermit version $(CKVER)..." >&3;\
1038         echo DESTDIR=$(DESTDIR);\
1039         if test -n "$(DESTDIR)"; then\
1040                 if test -d $(DESTDIR); then\
1041                         echo  "$(DESTDIR) exists...\n";\
1042                 else\
1043                         echo "Creating $(DESTDIR)...";\
1044                         DESTDIR=`echo $(DESTDIR) | sed 's!/*$$!!'`;\
1045                         mkdir $$DESTDIR  || exit 1;\
1046                 fi;\
1047                 chmod 755 $(DESTDIR) || exit 1;\
1048         fi;\
1049         echo BINARY=$(BINARY);\
1050         if test -f $(BINARY); then\
1051                 ls -l $(BINARY);\
1052         else\
1053                 echo "?$(BINARY) not found";\
1054                 exit 1;\
1055         fi;\
1056         if test -z "$(DESTDIR)$(BINDIR)"; then\
1057                 echo "Binary directory not specified";\
1058                 exit 1;\
1059         fi;\
1060         if test -d $(DESTDIR)$(BINDIR); then\
1061                 echo  "$(DESTDIR)$(BINDIR) exists...";\
1062         else\
1063                 echo "Creating $(DESTDIR)$(BINDIR)/...";\
1064                 mkdir     $(DESTDIR)$(BINDIR) || exit 1;\
1065                 chmod 755 $(DESTDIR)$(BINDIR);\
1066         fi;\
1067         rm -f $(DESTDIR)$(BINDIR)/kermit;\
1068         cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1069         chmod 755    $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1070         rm -f        $(DESTDIR)$(BINDIR)/kermit-sshsub;\
1071         ln -s        $(DESTDIR)$(BINDIR)/kermit\
1072                      $(DESTDIR)$(BINDIR)/kermit-sshsub || exit 1;\
1073         echo 'set flag=f\nPrC Removing binaries' >&3;\
1074         echo "RmF $(DESTDIR)$(BINDIR)/kermit-sshsub" >&3;\
1075         echo "RmF $(DESTDIR)$(BINDIR)/kermit" >&3;\
1076         if test -f ckermit.ini; then\
1077                 echo "#!$(BINDIR)/kermit" >\
1078                         $(DESTDIR)$(BINDIR)/_tmp.ini;\
1079                 cat ckermit.ini >> $(DESTDIR)$(BINDIR)/_tmp.ini;\
1080                 mv $(DESTDIR)$(BINDIR)/_tmp.ini\
1081                    $(DESTDIR)$(BINDIR)/ckermit.ini;\
1082                 chmod 755 $(DESTDIR)$(BINDIR)/ckermit.ini;\
1083                 echo "RmF $(DESTDIR)$(BINDIR)/ckermit.ini" >&3;\
1084         fi;\
1085         echo;\
1086         echo 'EfM' >&3;\
1087         echo "Kermit binary installed:";\
1088         ls -l $(DESTDIR)$(BINDIR)/kermit\
1089               $(DESTDIR)$(BINDIR)/kermit-sshsub\
1090               $(DESTDIR)$(BINDIR)/ckermit.ini;\
1091         echo;\
1092         echo " WARNING: If C-Kermit is to be used for dialing out,";\
1093         echo " you must change its owner and group and permissions";\
1094         echo " to match the 'cu' program.  See the ckuins.txt file";\
1095         echo " for details.";\
1096         echo;\
1097         echo MANDIR=$(MANDIR);\
1098         if test -n "$(DESTDIR)$(MANDIR)"; then\
1099                 if test -d $(DESTDIR)$(MANDIR); then\
1100                         echo  "$(DESTDIR)$(MANDIR) exists...";\
1101                 else\
1102                         echo "Creating $(MANDIR)...";\
1103                         mkdir $(MANDIR) || exit 1;\
1104                         chmod 755 $(MANDIR) || exit 1;\
1105                 fi;\
1106                 rm -f $(DESTDIR)$(MANDIR)/kermit.$(MANEXT);\
1107                 cp ckuker.nr $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1108                 chmod 644 $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1109                 echo 'set flag=f\nPrC Removing man pages' >&3;\
1110                 echo "RmF $(DESTDIR)$(MANDIR)/kermit.$(MANEXT)" >&3;\
1111                 echo 'EfM' >&3;\
1112                 echo;\
1113         else\
1114                 echo "Not installing man page!\n";\
1115         fi;\
1116         echo CERTDIR=$(CERTDIR);\
1117         if test -n "$(CERTDIR)"; then\
1118                 if test -f ca_certs.pem; then\
1119                         if test -d $(CERTDIR); then\
1120                                 echo  "$(CERTDIR) exists...";\
1121                         else\
1122                                 echo "Creating $(CERTDIR)...";\
1123                                 mkdir $(CERTDIR) || exit 1;\
1124                                 chmod 755 $(CERTDIR) || exit 1;\
1125                         fi;\
1126                         echo "Installing certificates file...";\
1127                         cp ca_certs.pem $(CERTDIR) || exit 1;\
1128                         echo 'set flag=f' >&3;\
1129                         echo 'PrC Removing certificates file' >&3;\
1130                         echo "RmF $(CERTDIR)/ca_certs.pem" >&3;\
1131                         echo 'EfM' >&3;\
1132                         echo;\
1133                 fi;\
1134         else\
1135                 echo "Not installing certificates file!\n";\
1136         fi;\
1137         echo SRCDIR=$(DESTDIR)$(SRCDIR);\
1138         if test -n "$(SRCDIR)"; then\
1139                 echo "Installing source files...";\
1140                 if test -d $(DESTDIR)$(SRCDIR); then\
1141                         echo  "$(DESTDIR)$(SRCDIR) exists...";\
1142                 else\
1143                         echo "Creating $(DESTDIR)$(SRCDIR)/...";\
1144                         mkdir     $(DESTDIR)$(SRCDIR) || exit 1;\
1145                         chmod 755 $(DESTDIR)$(SRCDIR);\
1146                 fi;\
1147                 echo "Copying source files to $(DESTDIR)$(SRCDIR)...";\
1148                 echo 'set flag=f\nPrC Removing source files' >&3;\
1149                 for TextFile in COPYING.TXT ck[cuw_]*.[cwh] makefile; do\
1150                         cp $$TextFile $(DESTDIR)$(SRCDIR)/ && echo ".\c";\
1151                         echo "RmF $(DESTDIR)$(SRCDIR)/$$TextFile" >&3;\
1152                 done; echo;\
1153                 echo 'EfM' >&3;\
1154                 ( cd $(DESTDIR)$(SRCDIR)/ &&\
1155                 ls -l COPYING.TXT ck[cuw_]*.[cwh] makefile );echo;\
1156         else\
1157                 echo "Not installing source code!\n";\
1158         fi;\
1159         echo INFODIR=$(DESTDIR)$(INFODIR);\
1160         if test -n "$(INFODIR)"; then\
1161                 echo "Installing info files...";\
1162                 if test -d $(DESTDIR)$(INFODIR); then\
1163                         echo  "$(DESTDIR)$(INFODIR) exists...";\
1164                 else\
1165                         echo "Creating $(DESTDIR)$(INFODIR)/...";\
1166                         mkdir     $(DESTDIR)$(INFODIR) || exit 1;\
1167                         chmod 755 $(DESTDIR)$(INFODIR);\
1168                 fi;\
1169                 echo "Copying text files to $(DESTDIR)$(INFODIR)...";\
1170                 echo 'set flag=f\nPrC Removing text files' >&3;\
1171                 FileCopyList='';\
1172                 for TextFile in $(TEXTFILES); do\
1173                         test -f $$TextFile || continue;\
1174                         cp $$TextFile $(DESTDIR)$(INFODIR) && echo ".\c" &&\
1175                         FileCopyList="$$FileCopyList $$TextFile";\
1176                         echo "RmF $(DESTDIR)$(INFODIR)/$$TextFile" >&3;\
1177                 done; echo;\
1178                 echo 'EfM' >&3;\
1179                 ( cd $(DESTDIR)$(INFODIR)/ && chmod  644   $$FileCopyList );\
1180                 ( cd $(DESTDIR)$(INFODIR)/ && pwd && ls -l $$FileCopyList );\
1181         else\
1182                 echo "Not installing text files!\n";\
1183         fi;\
1184         echo "set flag=d\nPrN Removing empty dirs..." >&3;\
1185         echo "RmD $(DESTDIR)$(BINDIR)" >&3;\
1186         echo "RmD $(DESTDIR)$(SRCDIR)" >&3;\
1187         echo "RmD $(DESTDIR)$(INFODIR)" >&3;\
1188         echo "RmD $(CERTDIR)" >&3;\
1189         echo "RmD $(MANDIR)" >&3;\
1190         echo "RmD $(DESTDIR)" >&3;\
1191         echo "EfM" >&3;\
1192         echo "PrN C-Kermit version $(CKVER) is uninstalled!" >&3;\
1193         echo C-Kermit version $(CKVER) installed!
1194
1195 # UN-Install C-Kermit after building
1196 # Please to not remove the extra blanks before and after '{}' within the
1197 # functions. You would get syntax errors for some older Bourne shells! Best is 
1198 # you don't change or remove anything.
1199 #
1200 uninstall:
1201         @if test ! -f UNINSTALL; then\
1202                 echo "?C-Kermit UNINSTALL data file not found!";\
1203                 exit 1;\
1204         fi; \
1205         X=`grep '^CKVER='$(CKVER)'$$' ./UNINSTALL || :`;\
1206         if test -z "$$X"; then\
1207                 echo "?UNINSTALL file is not for C-Kermit version $(CKVER)";\
1208                 exit 2;\
1209         fi;\
1210         PrN () { echo "$$*"; };\
1211         PrC () { echo "$$* \c"; };\
1212         RmF () { test -f "$$1" && rm -f "$$1" && echo ".\c" && flag=F ; };\
1213         RmD () { \
1214         dir=$$1;\
1215         while test -d "$$dir"; do\
1216                 rmdir "$$dir" 2>&- || return && echo "$$dir" && flag=D;\
1217                 dir=`echo "$$dir" | sed 's!/[^/]*/*$$!!'`;\
1218         done; \
1219         };\
1220         EfM () { \
1221         case "$$flag" in\
1222                 f) echo "- Nothing to remove!";;\
1223                 d) echo "Nothing to remove!";;\
1224                 F) echo " done";;\
1225                 D) echo "done";;\
1226         esac; \
1227         };\
1228         while read Act Args; do\
1229                 case $$Act in\
1230                         EfM) EfM;;\
1231                         RmD) RmD $$Args;;\
1232                         RmF) RmF $$Args;;\
1233                         PrN) PrN $$Args;;\
1234                         PrC) PrC $$Args;;\
1235                         set) eval $$Args;;\
1236                 esac;\
1237         done < ./UNINSTALL
1238
1239 makewhat:
1240         @echo 'make what?  You must tell which platform to make C-Kermit for.'
1241         @echo Examples: make linux, make aix, make solaris10, make hpux1100.
1242         @echo Please read the comments at the beginning of the makefile.
1243
1244 ###########################################################################
1245 #
1246 # Dependencies Section:
1247
1248 wermit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1249                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1250                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1251                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1252                 ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1253                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1254                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1255         $(CC2) $(LNKFLAGS) -o wermit \
1256                 ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1257                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1258                 ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1259                 ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1260                 ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucon.$(EXT) \
1261                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1262                 ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1263                 $(LIBS)
1264
1265 # Preferred configuration with select()-based CONNECT
1266
1267 xermit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1268                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1269                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1270                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1271                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1272                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1273                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) ckuath.$(EXT) \
1274                 ck_crp.$(EXT) ck_ssl.$(EXT)
1275         $(CC2) $(LNKFLAGS) -o wermit \
1276                 ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1277                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1278                 ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1279                 ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1280                 ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) \
1281                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckusig.$(EXT) \
1282                 ckctel.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1283                 ckuath.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1284
1285 # Malloc Debugging version
1286
1287 mermit: ckcmdb.$(EXT) ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1288                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1289                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1290                 ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1291                 ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1292                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1293                 ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1294         $(CC2) $(LNKFLAGS) -o mermit ckcmdb.$(EXT) ckclib.$(EXT) ckcmai.$(EXT)\
1295                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1296                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1297                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1298                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1299                 ckuusr.$(EXT) ckucon.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1300                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckcuni.$(EXT) \
1301                 ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1302
1303 # Kerberized Version - Subject to USA export restrictions.
1304
1305 # NOTE: We don't use this any more -- As of 15 Feb 2003, the "xermit"
1306 # target is used for both secure and regular version.
1307
1308 krbmit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1309                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1310                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1311                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1312                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1313                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1314                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1315                 ckcftp.$(EXT) ck_ssl.$(EXT)
1316         $(CC2) $(LNKFLAGS) -o krbmit ckcmai.$(EXT) ckclib.$(EXT) \
1317                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1318                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1319                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1320                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1321                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1322                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1323                 ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1324                 ck_ssl.$(EXT) $(LIBS)
1325
1326 krbmit-debug:   ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1327                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1328                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1329                 ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1330                 ckuxla.$(EXT) ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1331                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1332                 ckusig.$(EXT) ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) \
1333                 ckupty.$(EXT) ck_ssl.$(EXT) ckcmdb.$(EXT) ckcftp.$(EXT)
1334         $(CC2) $(LNKFLAGS) -o krbmit ckcmdb.$(EXT) ckcmai.$(EXT) \
1335                 ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) \
1336                 ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) \
1337                 ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
1338                 ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) \
1339                 ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) \
1340                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1341                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1342                 ckcftp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1343
1344 # SRP(TM) Version - Subject to USA export restrictions.
1345
1346 srpmit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1347                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1348                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1349                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1350                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1351                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1352                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1353                 ckcftp.$(EXT) ck_ssl.$(EXT)
1354         $(CC2) $(LNKFLAGS) -o srpmit ckcmai.$(EXT) ckclib.$(EXT) \
1355                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1356                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1357                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1358                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1359                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1360                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1361                 ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ck_ssl.$(EXT) \
1362                 ckcftp.$(EXT) $(LIBS)
1363
1364 # Kerberized Version - Not subject to USA export restrictions.
1365
1366 krbmit-export:  ckcmai.$(EXT) \
1367                 ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1368                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1369                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1370                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1371                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1372                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1373                 ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1374         $(CC2) $(LNKFLAGS) -o krbmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1375                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1376                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1377                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1378                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1379                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1380                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1381                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1382
1383 # SRP(TM) Version - Not subject to USA export restrictions.
1384
1385 srpmit-export:  ckcmai.$(EXT) \
1386                 ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1387                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1388                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1389                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1390                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1391                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1392                 ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1393         $(CC2) $(LNKFLAGS) -o srpmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1394                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1395                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1396                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1397                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1398                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1399                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1400                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1401
1402 ###########################################################################
1403 # man page...
1404 #
1405 ckuker.nr:
1406         @echo This target is obsolete.
1407         @echo The ckuker.nr file no longer needs any preprocessing.
1408
1409 ###########################################################################
1410 # Dependencies for each module...
1411 #
1412 ckcmai.$(EXT): ckcmai.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h ckcsig.h \
1413                 ckuusr.h ckctel.h ckclib.h
1414
1415 ckclib.$(EXT): ckclib.c ckclib.h ckcdeb.h ckcasc.h ckcsym.h
1416
1417 ckcpro.$(EXT): ckcpro.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckclib.h
1418
1419 ckcpro.c: ckcpro.w wart ckcdeb.h ckcsym.h ckcasc.h ckcker.h ckcnet.h ckctel.h \
1420          ckclib.h
1421         ./wart ckcpro.w ckcpro.c
1422
1423 ckcfns.$(EXT): ckcfns.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckcuni.h \
1424                 ckuxla.h ckclib.h ckcnet.h
1425
1426 ckcfn2.$(EXT): ckcfn2.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1427                 ckuxla.h ckctel.h ckclib.h ckcnet.h ckcuni.h
1428
1429 ckcfn3.$(EXT): ckcfn3.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1430                 ckuxla.h ckclib.h ckcuni.h
1431
1432 ckuxla.$(EXT): ckuxla.c ckcker.h ckcsym.h ckcdeb.h ckcxla.h ckuxla.h ckclib.h \
1433                  ckcuni.h
1434
1435 ckcuni.$(EXT): ckcuni.c ckcdeb.h ckcker.h ckucmd.h ckcuni.h ckcxla.h ckuxla.h
1436
1437 ckuusr.$(EXT): ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcsym.h ckcdeb.h ckcxla.h \
1438                 ckuxla.h ckcasc.h ckcnet.h ckctel.h ckclib.h ckcuni.h
1439
1440 ckuus2.$(EXT): ckuus2.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 ckuus3.$(EXT): ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1444                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1445
1446 ckuus4.$(EXT): ckuus4.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1447                 ckcasc.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1448
1449 ckuus5.$(EXT): ckuus5.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1450                  ckcsym.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1451
1452 ckuus6.$(EXT): ckuus6.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1453                  ckcsym.h ckctel.h ckclib.h
1454
1455 ckuus7.$(EXT): ckuus7.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1456                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1457
1458 ckuusx.$(EXT): ckuusx.c ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcsym.h \
1459                 ckcsig.h ckcnet.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1460
1461 ckuusy.$(EXT): ckuusy.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1462                  ckclib.h
1463
1464 ckucmd.$(EXT): ckucmd.c ckcasc.h ckucmd.h ckcdeb.h ckcsym.h ckctel.h ckclib.h
1465
1466 ckufio.$(EXT): ckufio.c ckcdeb.h ckuver.h ckcsym.h ckclib.h \
1467                 ckcxla.h ckuxla.h ckcuni.h
1468
1469 ckutio.$(EXT): ckutio.c ckcdeb.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h
1470
1471 ckucon.$(EXT): ckucon.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1472                  ckclib.h
1473
1474 ckucns.$(EXT): ckucns.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1475                  ckclib.h ckcxla.h ckuxla.h ckcuni.h
1476
1477 ckcnet.$(EXT): ckcnet.c ckcdeb.h ckcker.h ckcnet.h ckcsym.h ckcsig.h ckctel.h \
1478                  ckclib.h
1479
1480 ckctel.$(EXT): ckcsym.h ckcdeb.h ckcker.h ckcnet.h ckctel.h ckclib.h
1481
1482 # ck_off_t: ck_off_t.$(EXT)
1483 #       $(CC) -o ck_off_t ck_off_t.$(EXT)
1484
1485 wart: ckwart.$(EXT)
1486         $(CC) $(LNKFLAGS) -o wart ckwart.$(EXT) $(LIBS)
1487
1488 ckcmdb.$(EXT): ckcmdb.c ckcdeb.h ckcsym.h ckclib.h
1489
1490 ckwart.$(EXT): ckwart.c
1491
1492 ckudia.$(EXT): ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckcsym.h ckcsig.h \
1493                 ckcnet.h ckctel.h ckclib.h
1494
1495 ckuscr.$(EXT): ckuscr.c ckcker.h ckcdeb.h ckcasc.h ckcsym.h ckcsig.h \
1496                 ckcnet.h ckctel.h ckclib.h
1497
1498 ckusig.$(EXT): ckusig.c ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h \
1499                 ckcsig.h ckctel.h ckclib.h
1500
1501 ckcftp.$(EXT): ckcftp.c ckcdeb.h ckcasc.h ckcker.h ckucmd.h ckuusr.h \
1502                 ckcnet.h ckctel.h ckcxla.h ckuxla.h ckcuni.h
1503
1504 ckupty.$(EXT): ckupty.c ckupty.h ckcdeb.h
1505
1506 ckuath.$(EXT): ckuath.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1507                  ckclib.h ckcnet.h
1508
1509 ck_crp.$(EXT): ck_crp.c ckcdeb.h ckcnet.h ckuath.h ckclib.h
1510
1511 ck_ssl.$(EXT): ck_ssl.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1512                  ckclib.h ck_ssl.h
1513
1514 ###########################################################################
1515 #
1516 # Entries to make C-Kermit for specific systems.
1517 #
1518 # Put the ones that need short makefiles first.
1519
1520 #Apollo Aegis 9.x.  Includes TCP/IP support.
1521 #You can also add processor-dependent optimization switches like -M570.
1522 aegis:
1523         @echo Making C-Kermit $(CKVER) for Apollo Aegis 9.x...
1524         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1525         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOCSETS -DCK_CURSES -O $(KFLAGS)" \
1526         "LIBS = -lcurses -ltermcap"
1527
1528 #Apple Mac II, A/UX pre-3.0
1529 #Warning, if "send *" doesn't work, try the auxufs makefile entry below.
1530 aux:
1531         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1532         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1533         "CFLAGS = -DAUX -DTCPSOCKET $(KFLAGS) -i -O" "LNKFLAGS = -i"
1534
1535 #Apple Mac II, A/UX pre-3.0, compiled with gcc
1536 auxgcc:
1537         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1538         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1539         "CFLAGS = -DAUX -DTCPSOCKET -traditional $(KFLAGS) -i -O" \
1540         "LNKFLAGS = " "CC = gcc" "CC2 = gcc"
1541
1542 #Apple Mac II, A/UX, pre-3.0, but with ufs file volumes, uses <dirent.h>.
1543 auxufs:
1544         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1545         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1546         "CFLAGS = -DAUX -DTCPSOCKET -DDIRENT $(KFLAGS) -i -O" "LNKFLAGS = -i"
1547
1548 #Apple Mac II, A/UX 3.0, compiled with gcc
1549 aux3gcc:
1550         @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1551         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1552         "CFLAGS = -DAUX -DHDBUUCP -DLFDEVNO -DTCPSOCKET -DDIRENT $(KFLAGS)" \
1553         "LNKFLAGS = -s" "LIBS = $(LIBS)" \
1554         "CC=gcc -pipe -traditional" "CC2=gcc -pipe -traditional"
1555
1556 #Apple Mac II, A/UX 3.0, compiled with gcc, uses curses
1557 aux3cgcc:
1558         @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1559         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) aux3gcc \
1560         KTARGET=$${KTARGET:-$(@)} \
1561         "KFLAGS=$(KFLAGS) -DCK_CURSES" "LIBS = -lcurses $(LIBS)"
1562
1563 # Tenon MachTen, tested on Apple Powerbook with MachTen 2.1.1.D.
1564 # NOTE: This doesn't do anything about UUCP.  It only works if /usr/spool/uucp
1565 # has permission of 777, and dialout device is world read/writeable.
1566 machten:
1567         @echo Making C-Kermit $(CKVER) for MachTen...
1568         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
1569         "CFLAGS= -DBSD43 -DTCPSOCKET -DSIG_V -DNDGPWNAM -DCK_CURSES -O \
1570         $(KFLAGS)"  "LIBS=-lcurses -ltermcap"
1571
1572 #Bell Labs Research UNIX V10
1573 #Can't add TCP/IP because there is no sockets library.  It would have to
1574 #be done using streams, but there is no code in C-Kermit for that.
1575 #Remove -DNOJC if desired (if your system has csh, ksh, or bash).
1576 bellv10:
1577         @echo Making C-Kermit $(CKVER) for Bell Labs Research UNIX V10...
1578         $(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1579         "CFLAGS= -DBELLV10 -DBSD4 -DNDIR -DNOJC -DNOSYSIOCTLH -DNOSETREU \
1580         -DNOCSETS -MINIDIAL $(KFLAGS)"
1581
1582 # WARNING: The early BSD entries do not build in version 7.0 with the stock
1583 # BSD compiler: "Too many defines".  Unless you can rebuild cpp to have more
1584 # space for defines, these builds must be accomplished by:
1585 # copying the /usr/include tree to someplace else, preprocessing there with cc
1586 # -E -I./include or whatever (plus all the same -D's, adding any necessary
1587 # -U/-D to override the architecture)), renaming the the resulting files back
1588 # to their original names, bringing them back to the original BSD system, and
1589 # running the make target there.  This technique was used for 4.2 and 4.3 BSD
1590 # on a VAX in C-Kermit 7.0 (later, cpp on that machine was rebuilt to allow
1591 # more symbols, so the C-Kermit 8.0 build proceeds normally).
1592
1593 #Berkeley Unix 4.1
1594 bsd41:
1595         @echo Making C-Kermit $(CKVER) for 4.1BSD...
1596         $(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1597         "CFLAGS= -DBSD41" "LIBS = -ljobs"
1598
1599 #Berkeley 4.2, 4.3, also Ultrix-32 1.x, 2.x, 3.x, many others
1600 # Add -O, -s, etc, if they work.
1601 # If you have a version of BSD but signal() is void rather than int,
1602 # "make bsd KFLAGS=-DSIG_V".
1603 bsd42:
1604         @echo Making C-Kermit $(CKVER) for 4.2BSD...
1605         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1606         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1607         -DCK_CURSES -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK -DBSD42HACK \
1608         $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1609
1610 bsd:
1611         $(MAKE) CC=$(CC) CC2=$(CC2) bsd42 KTARGET=$${KTARGET-$(@)}
1612
1613 #Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP
1614 bsdhdb:
1615         @echo Making C-Kermit $(CKVER) for 4.2BSD with HDB UUCP...
1616         $(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1617         "KFLAGS= -DHDBUUCP $(KFLAGS)"
1618
1619 #Berkeley Unix 4.3 with acucntrl program, curses, TCP/IP included.
1620 bsd43:
1621         @echo Making C-Kermit $(CKVER) for 4.3BSD...
1622         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1623         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1624         -DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1625         -DBSD42HACK $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1626
1627 #4.3BSD, curses excluded
1628 bsd43nc:
1629         @echo Making C-Kermit $(CKVER) for 4.3BSD...
1630         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1631         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH \
1632         -DACUCNTRL -DSYSTIMEBH -DNOIKSD -DNOPUTENV -DNOANSI -DBIGBUFOK \
1633         -DBSD42HACK $(KFLAGS)" "LIBS=$(LIBS)"
1634
1635 #4.3BSD, TCP/IP excluded.
1636 bsd43nonet:
1637         @echo Making C-Kermit $(CKVER) for 4.3BSD + curses...
1638         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1639         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1640         -DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1641         -DBSD42HACK -DNONET $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1642
1643 #Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
1644 #but without acucntrl program
1645 bsdlck:
1646         @echo Making C-Kermit $(CKVER) for 4.2BSD, /usr/spool/uucp/LCK/...
1647         $(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1648         "KFLAGS= -DLCKDIR $(KFLAGS)"
1649
1650 #Berkeley UNIX 4.4-Lite, 4.4-Encumbered, Net/2, etc (Post-Reno),
1651 #with TCP/IP networking.  This was the basis for FreeBSD, NetBSD, OpenBSD,
1652 #BSDI, BSD/OS, and Mac OS X (each of which has its own set of targets that
1653 #are newer than this one).
1654 #
1655 #NOTE: This is not a pure POSIX configuration.  Using -DPOSIX instead of
1656 # -DBSD44 prevents any kind of directory-reading (for wildcard expansion),
1657 #and disallows use of ENOTCONN symbol for detecting broken network
1658 #connections, and disallows RTS/CTS flow control, and would also require
1659 #definition of the appropriate UUCP lockfile convention.
1660 #Do not add -DCK_POSIX_SIG without reading <signal.h> first!  For example,
1661 #sigsetjmp(), etc, tend to be defined but not implemented.
1662 #
1663 #NOTE: originally crypt was in libc - later it was unbundled.
1664 #Remove the LIBS clause to build on an early 4.4BSD platform.
1665 #
1666 bsd44:
1667         @echo Making C-Kermit $(CKVER) for 4.4BSD...
1668         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1669         "CFLAGS= -DBSD44 -DTCPSOCKET $(KFLAGS) -O" "LIBS=-lcrypt"
1670
1671 #Berkeley UNIX 4.4, as above, but with curses for fullscreen display
1672 #Please read notes for bsd44 entry just above.
1673 # NOTE: This one dumped core on the real 4.4BSD development system at
1674 # UC Berkeley (an HP-9000/300), so the no-curses version was used
1675 # for that one, which was unplugged years ago.
1676 bsd44c:
1677         @echo Making C-Kermit $(CKVER) for 4.4BSD with curses...
1678         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1679         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O" \
1680         "LIBS= -lcurses -ltermcap -lcrypt $(LIBS)"
1681
1682 #For FreeBSD 1.x.
1683 freebsd1:
1684         @echo 'Making C-Kermit $(CKVER) for FreeBSD...'
1685         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1686         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1687         -DFNFLOAT -DNOHTERMCAP -DNOREALPATH -DNOSYSCONF $(KFLAGS) -O -pipe" \
1688         "LIBS= -lcurses -ltermcap -lm $(LIBS)"
1689
1690 #FreeBSD 2.x with ncurses
1691 freebsd2:
1692         @echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with ncurses...'
1693         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1694         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1695         -DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -funsigned-char \
1696         -DFNFLOAT $(KFLAGS) -O -pipe" \
1697         "LIBS= -lncurses -ltermlib -lcrypt -lm $(LIBS)"
1698
1699 #For FreeBSD 2.x -- Uses curses rather than ncurses
1700 freebsd2c:
1701         @echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with curses...'
1702         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1703         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1704         -DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -DFNFLOAT \
1705         -funsigned-char $(KFLAGS) -O -pipe" \
1706         "LIBS= -lcurses -ltermlib -lcrypt -lm $(LIBS)"
1707
1708 #FreeBSD 3.x with ncurses and uu_lock()
1709 #(Note: uu_lock() goes back to 2.2.2, but not necessarily 2.0)
1710 freebsd3:
1711         @echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with ncurses...'
1712         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1713         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1714         -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 -DUSE_UU_LOCK -DFNFLOAT \
1715         $(KFLAGS) -O -pipe" \
1716         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1717
1718 #As above but with curses rather than ncurses.
1719 freebsd3c:
1720         @echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with curses...'
1721         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1722         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_UU_LOCK \
1723         -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 $(KFLAGS) -DFNFLOAT \
1724         -funsigned-char -pipe -O" \
1725         "LIBS= -lcurses -lcrypt -lutil -lm $(LIBS)"
1726
1727 #FreeBSD 4.0 with ncurses and uu_lock().  Note - there is no curses in 4.0.
1728 #ncurses 5.0 is broken requiring us to work around with setbuf().
1729 freebsd40:
1730         @echo 'Making C-Kermit $(CKVER) for FreeBSD 4.x with ncurses...'
1731         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1732         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DFNFLOAT \
1733         -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD4 \
1734         -DNONOSETBUF -DUSE_UU_LOCK $(KFLAGS) -O -pipe" \
1735         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1736
1737 #FreeBSD 4.1 and above
1738 #Like FreeBSD 4.0 but without the NONOSETBUF hack and with CK_NEWTERM.
1739 #OK 2011/06/15 FreeBSD 3.3, 4,4, 4.7, and 8.2
1740 freebsd freebsd41 freebsd72:
1741         @echo 'Making C-Kermit $(CKVER) for FreeBSD 4.1 or later...'
1742         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1743         "CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \
1744         -DFREEBSD4 -DUSE_UU_LOCK -DFNFLOAT \
1745         -DHERALD=\"\\\" `uname` `uname -r`\\\"\" \
1746         -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR $(KFLAGS) -O -pipe" \
1747         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1748
1749 #FreeBSD 5.0 or later with OpenSSL 0.9.7 or later.
1750 #OK 2011/06/15 FreeBSD 4.7 and 8.2
1751 freebsd+ssl freebsd+openssl freebsd50+openssl:
1752         @echo 'Making C-Kermit $(CKVER) for FreeBSD 5.0, ncurses, openssl'
1753         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1754         "CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \
1755         -DCK_AUTHENTICATION -DCK_SSL $(SSLINC) -DZLIB \
1756         -DFREEBSD4 -DUSE_UU_LOCK -DFNFLOAT -funsigned-char -DTPUTSARGTYPE=int \
1757         -DFREEBSD41 -DFREEBSD42 -DFREEBSD43 -DFREEBSD44 -DFREEBSD45 \
1758         -DFREEBSD46 -DFREEBSD50 -DUSE_STRERROR $(KFLAGS) -O -pipe" \
1759         "LIBS= -lncurses -lcrypt -lssl -lcrypto -lutil -lm $(SSLLIB) $(LIBS)"
1760
1761 #NetBSD 1.4.1 or later with vanity banner automated with uname
1762 #and automatic inclusion of large file support if it is available.
1763 #This target tested successfully on NetBSD 1.4.1, 1.5.2, and 2.0.3 (Jan 2006).
1764 #Fails on NetBSD 2.0 on Sun/3 mc68030 with gcc 3.3.3 unless optimization is
1765 #disabled on ckcfn2.c ("KFLAGS=-O0") (Letter O Digit Zero).
1766 #(This could be automated by testing `uname -m` for "sun3".)
1767 #OK: 2011/06/15 on NetBSD 1.5.2 and 5.1.
1768 netbsd netbsd2 netbsd15 netbsd16 old-netbsd:
1769         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1770         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1771         "CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1772         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1773         -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DHAVE_OPENPTY \
1774         -funsigned-char -DHERALD=\"\\\" NetBSD `uname -r`\\\"\" \
1775         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1776         "LIBS= -lcurses -lcrypt -lm -lutil $(LIBS)"
1777
1778 #NetBSD 1.4.1 or later with OpenSSL
1779 #OK: 2011/06/15 on NetBSD 5.1 (but not 1.5.2 with OpenSSL 0.9.5a)
1780 netbsd+ssl netbsd+openssl:
1781         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL SSLLIB=$(SSLLIB)'
1782         @case `openssl version` in \
1783           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1784           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1785           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1786           *) OPENSSLOPTION="" ;; \
1787         esac; \
1788         HAVE_DES=''; \
1789         DES_LIB=''; \
1790         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1791            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1792               DES_LIB='-ldes'; \
1793               HAVE_DES='-DCK_DES -DLIBDES'; \
1794               echo "HAVE DES"; \
1795            else echo "NO DES"; \
1796         fi; \
1797         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
1798         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1799         -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1800         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1801         "LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB -lcurses \
1802         -lcrypto -lcrypt -lz -lm -lpam -lutil $(LIBS)"
1803
1804 #NetBSD with MIT Kerberos 5:
1805 # OK 2011/06/15 (once K5INC and K5LIB were set right).
1806 # NOT OK for Heimdal - Heimdal Kerberos support in C-Kermit needs work.
1807 netbsd+krb5:
1808         @echo 'Making C-Kermit $(CKVER) for NetBSD with Kerberos 5...'
1809         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...'
1810         @case `openssl version` in \
1811           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1812           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1813           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1814           *) OPENSSLOPTION="" ;; \
1815         esac; \
1816         HAVE_DES=''; \
1817         DES_LIB=''; \
1818         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1819            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1820               DES_LIB='-ldes'; \
1821               HAVE_DES='-DCK_DES -DLIBDES'; \
1822               echo "HAVE DES"; \
1823            else echo "NO DES"; \
1824         fi; \
1825         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
1826         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_KERBEROS -DKRB5 \
1827         -DCK_CAST $$HAVE_DES -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1828         $(KFLAGS)" \
1829         "LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lcurses $$DES_LIB \
1830         -lcrypto -lgssapi -lkrb5 -lm -lutil $(LIBS)"
1831
1832 # NetBSD - With Kerberos 5 and SSL and Zlib.
1833 # OK 2011/06/15
1834 netbsd+krb5+ssl netbsd+krb5+openssl+zlib:
1835         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...'
1836         @case `openssl version` in \
1837           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1838           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1839           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1840           *) OPENSSLOPTION="" ;; \
1841         esac; \
1842         HAVE_DES=''; \
1843         DES_LIB=''; \
1844         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1845            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1846               DES_LIB='-ldes'; \
1847               HAVE_DES='-DCK_DES -DLIBDES'; \
1848               echo "HAVE DES"; \
1849            else echo "NO DES"; \
1850         fi; \
1851         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
1852         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1853         -DCK_KERBEROS -DKRB5 -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1854         -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1855         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1856         "LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB \
1857         -lcrypto -lcrypt -lgssapi -lkrb5 -lz -lm -lpam -lutil -lcurses $(LIBS)"
1858
1859 #Special Security Enhanced NetBSD target with SRP, SSL, and zlib support.
1860 #To build this, you need to BUILD the pkgsrc srp_client package.  After
1861 #you build it, you must go into work/srp-x.y.z/libkrypto and "bmake install"
1862 #then go to work/srp-x.y.z/libsrp and "bmake install".  As of 2005Q3, the
1863 #pkgsrc install only installed the statically linked client applications.  You
1864 #need to manually install the libraries to build your own applications.
1865 #NOT TESTED RECENTLY - probably needs work.
1866 netbsd+ssl+srp+zlib:
1867         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1868         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1869         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DNETBSD15 \
1870         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DHAVE_OPENPTY \
1871         -I/usr/include/openssl -I/usr/pkg/include \
1872         -DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 -DCK_ENCRYPTION \
1873         -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DZLIB -DFNFLOAT $(KFLAGS) -O" \
1874         "LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lcurses -lsrp -lgmp -ldes \
1875         -lssl -lkrypto -lcrypto -lcrypt -lz -lm -lutil $(LIBS)"
1876
1877 #NetBSD with curses left out (e.g. for use as IKSD).
1878 netbsdnc:
1879         @echo Making C-Kermit $(CKVER) for NetBSD with no curses...
1880         $(MAKE) CC=$(CC) CC2=$(CC2) netbsd KTARGET=$${KTARGET:-$(@)} \
1881         "KFLAGS=-DNOCURSES"
1882
1883 #NetBSD with ncurses requested explicitly rather than curses-which-is-ncurses
1884 netbsdn:
1885         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1886         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1887         "CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1888         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1889         -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DHAVE_OPENPTY \
1890         -DHERALD=\"\\\" NetBSD `uname -r`\\\"\" \
1891         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1892         "LIBS= -L/usr/pkg/lib -lncurses -lcrypt -lm -lutil $(LIBS)"
1893
1894 #OpenBSD before 2.3.
1895 #Uses ncurses as its curses so use -ltermlib, not -ltermcap
1896 #But it doesn't use uu_lock() which was introduced in OpenBSD 2.3.
1897 #For that use the next entry.
1898 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1899 openbsdold:
1900         @echo Making C-Kermit $(CKVER) for OpenBSD...
1901         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1902         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1903         -DFNFLOAT -DNDSYSERRLIST $(KFLAGS) -O" "LIBS= -lcurses -ltermlib -lm"
1904
1905 #OpenBSD 2.3 or later
1906 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1907 #For C-Kermit 8.0 (Christian Weisgerber):
1908 # -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1909 # -DUSE_UU_LOCK and -lutil added for uu_lock()
1910 # -DNDSYSERRLIST changed to -DUSE_STRERROR
1911 #If this gives you trouble use the previous entry.
1912 openbsd:
1913         @echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later...
1914         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1915         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1916         -DHERALD=\"\\\" OpenBSD `uname -r`\\\"\" \
1917         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1918         "LIBS= -lcurses -lutil -lm"
1919
1920 #Better to chain to the openbsd target but...
1921 mirbsd:
1922         @echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later...
1923         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1924         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1925         -DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
1926         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1927         "LIBS= -lcurses -lutil -lm"
1928
1929 #OpenBSD 3.0 or later includes OpenSSL
1930 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1931 #For C-Kermit 8.0 (Christian Weisgerber):
1932 # -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1933 # -DUSE_UU_LOCK and -lutil added for uu_lock()
1934 # -DNDSYSERRLIST changed to -DUSE_STRERROR
1935 #If this gives you trouble use the previous entry.
1936 openbsd+ssl:
1937         @echo Making C-Kermit $(CKVER) for OpenBSD 3.0 or later...
1938         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1939         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1940         -DHERALD=\"\\\" OpenBSD `uname -r`\\\"\" \
1941         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
1942         -DCK_SSL $(KFLAGS) -O" \
1943         "LIBS= -lcurses -lutil -lm -lssl -lcrypto"
1944
1945 mirbsd+ssl:
1946         @echo Making C-Kermit $(CKVER) for OpenBSD 3.0 or later...
1947         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1948         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1949         -DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
1950         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
1951         -DCK_SSL -DNO_DCL_INET_ATON $(KFLAGS) -O" \
1952         "LIBS= -lcurses -lutil -lm -lssl -lcrypto"
1953
1954 # make 386bsd 0.0new, posix
1955 # for  386bsd 0.1.24, change /usr/include/termios.h to #define NCCS if
1956 #  _POSIX_SOURCE is #defined. (source: lewine, posix prgmrs guide, o`reilly)
1957 #NOTE: Lock directory is /var/spool/lock.  Formerly, it was /var/spool/uucp,
1958 #but reportedly <wjones@halcyon.com> that was due to a typo in 'man tip'.
1959 386bsd:
1960         @echo 'Making C-Kermit $(CKVER) for jolix 386BSD 0.0new and 0.1.24...'
1961         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1962         "CFLAGS= -DPOSIX -DSETREUID -DPIDSTRING -DUSLEEP \
1963         -D_386BSD -DCK_CURSES -DTCPSOCKET \
1964         -DLOCK_DIR=\\\"/var/spool/lock\\\" \
1965         $(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
1966
1967 # Mac OS X 10 early versions.
1968 # For 10.3.9 and later, use the macosx target below.
1969
1970 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP but no curses.
1971 oldmacosx10:
1972         @echo Making C-Kermit $(CKVER) for `uname -s`...
1973         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1974         "CFLAGS= -DMACOSX10 -DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
1975
1976 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and curses.
1977 #Note: curses must be obtained separately.  See next entry for ncurses.
1978 #Add "LIBS = -lcurses -ltermcap" if necessary (but reportedly it is not).
1979 oldmacosx10c:
1980         @echo Making C-Kermit $(CKVER) for `uname -s` + curses...
1981         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1982         "CFLAGS= -DMACOSX10 -DCK_CURSES -DTPUTSFNTYPE=void -DTPUTSISVOID \
1983         -DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
1984
1985 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and ncurses.
1986 #Note: ncurses must be obtained separately.
1987 #In the event of trouble with this one try the next one.
1988 oldmacosx10nc:
1989         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
1990         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1991         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
1992         $(KFLAGS)" "LIBS= -lncurses $(LIBS)"
1993
1994 #Mac OS X 10.2 (Jaguar) ncurses.
1995 oldmacosx102nc:
1996         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
1997         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1998         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
1999         $(KFLAGS) " "LIBS= -lncurses $(LIBS)"
2000
2001 #The problem here is that if curses.h also exists, it conflicts with
2002 #ncurses.h and and we have fatal errors.  If this happens to you, then
2003 #try this target.
2004 oldmacosx10ncx:
2005         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2006         @rm -f ./curses.h; touch ./curses.h
2007         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2008         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR \
2009         -I. -O $(KFLAGS) " \
2010         "LIBS= -lncurses $(LIBS)"
2011         @rm -f ./curses.h
2012
2013 #Mac OS X 10.3 (Panther) - Assumes ncurses is installed.
2014 oldmacosx103: 
2015         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2016         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2017         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2018         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -O \
2019         $(KFLAGS) " "LIBS= -lncurses -lresolv $(LIBS)"
2020
2021 #Mac OS X 10.3 (Panther) with Kerberos 5 and SSL, assumes ncurses is installed.
2022 oldmacosx103+secure:
2023         @echo Making Secure C-Kermit $(CKVER) for `uname -s` + ncurses...
2024         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2025         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET \
2026         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -O -DCK_PAM \
2027         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2028         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
2029         $(KFLAGS) " "LIBS= -lssl -lcrypto -lkrb5 -lcom_err \
2030         -lk5crypto -lgssapi_krb5 -lpam -lncurses -lresolv $(LIBS)"
2031
2032 # THIS IS THE MAIN MAC OS X TARGET (the next one is for Kerberos/SSL builds).
2033 # Use this target for 10.3.9 (or maybe earlier) through 10.6 (maybe later)
2034 # on both Power and Intel architectures.  This one uses utmp.h on 10.4 and
2035 # earlier and utmpx.h on 10.5 onwards.
2036 # Note: Mac OS X 10.5 and earlier are 32-bit; 10.6 and later 64-bit.
2037 # Note 2: As of C-Kermit 9.0 -NOUUCP is included by default because
2038 # Mac OS X doesn't support UUCP.  To undo this, use KFLAGS=-UNOUUCP.
2039 #OK: 2011/06/14 (for 10.4.11, 10.5.8, 10.6.7)
2040 macosx macosx10 macosx10.3.9 macosx10.4 macosx10.5 macosx10.6:
2041         @MACOSNAME=`/usr/bin/sw_vers -productName`; \
2042         MACOSV=`/usr/bin/sw_vers -productVersion`; \
2043         echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2044         MACCPU=$$HOSTTYPE; \
2045         if test `uname -r | cut -d . -f 1` -gt 8; \
2046         then if test -f /usr/include/utmpx.h ; \
2047         then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2048         else HAVE_UTMPX='' ; fi ; fi; \
2049         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2050         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2051         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2052         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2053         -funsigned-char -DNODCLINITGROUPS \
2054         -DNOUUCP -O -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2055         -DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2056         $(KFLAGS)" "LIBS= -lncurses -lresolv $(LIBS)"
2057
2058 # Mac OS X 10.3.9 or later with Kerberos 5 and OpenSSL...
2059 # NOTE: Apple has removed all support for DES in OpenSSL and Kerberos
2060 #   in Mac OS X 10.6 and later.  The DES flags are included or left out
2061 #   automatically based on the Mac OS X version number.
2062 # See note about UUCP in previous target.
2063 #OK: 2009/11/16 (for 10.3.9, 10.4.11, 10.5.8, 10.6.1)
2064 #OK: 2011/06/14 (for 10.4.11, 10.5.8, 10.6.7)
2065 macosx+krb5+ssl macosx10.5+krb5+ssl macosx10.6+krb5+ssl \
2066 macosx+krb5+openssl macosx10.5+krb5+openssl macosx10.6+krb5+openssl:
2067         @MACOSNAME=`/usr/bin/sw_vers -productName`; \
2068         MACOSV=`/usr/bin/sw_vers -productVersion`; \
2069         echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2070         MACCPU=$$HOSTTYPE; \
2071         if test `uname -r | cut -d . -f 1` -gt 8; \
2072         then if test -f /usr/include/utmpx.h ; \
2073         then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2074         else HAVE_UTMPX='' ; fi ; fi; \
2075         if test `uname -r | cut -d . -f 1` -eq 7; \
2076         then IS_MACOSX103='-DMACOSX103' ; \
2077         else IS_MACOSX103='' ; fi; \
2078         case $$MACOSV in \
2079           10.[012345].*) HAVE_DES='-DCK_DES -DLIBDES' ;; \
2080           *.*) HAVE_DES='' ;; \
2081         esac ; \
2082         if test -x /usr/bin/krb5-config ; \
2083         then HAVE_KRB5CONFIG=`/usr/bin/krb5-config --libs krb5 gssapi` ; \
2084         else HAVE_KRB5CONFIG='-lgssapi_krb5 -lkrb5 -lk5crypto \
2085         -lcom_err -lresolv' ; fi; \
2086         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2087         "CFLAGS= -DMACOSX10 $$IS_MACOSX103 -DCK_NCURSES -DTCPSOCKET \
2088         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2089         -DCKHTTP -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2090         -DNODCLINITGROUPS -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2091         -DCK_ENCRYPTION -DCK_CAST -DCK_SSL -DOPENSSL_098 $$HAVE_DES \
2092         -DNOUUCP -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2093         -DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2094         -funsigned-char -O $(KFLAGS)" \
2095         "LIBS= $$HAVE_KRB5CONFIG -lssl -lcrypto -lpam -lncurses $(LIBS)"
2096
2097 # End of Mac OS X Section
2098
2099 #Acorn RISCiX, based on ...
2100 #Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
2101 #but without acucntrl program
2102 riscix:
2103         @echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2104         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2105                 "CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2106                 -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2107                 -DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2108                 -DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2109                 -DNOANSI -w -O2 -fomit-frame-pointer" \
2110                 "LIBS= -lcurses -ltermcap " \
2111                 "CC= /usr/ucb/cc" \
2112                 "CC2= /usr/ucb/cc"
2113
2114 #Acorn RISCiX, as above, but using gcc
2115 riscix-gcc:
2116         @echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2117         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2118                 "CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2119                 -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2120                 -DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2121                 -DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2122                 -DNOANSI -w -O2 -fomit-frame-pointer" \
2123                 "LIBS= -lcurses -ltermcap " \
2124                 "CC= gcc -mbsd" \
2125                 "CC2= gcc -mbsd"
2126
2127 #Convergent CTIX 6.4.1
2128 ctix:
2129         @echo 'Making C-Kermit $(CKVER) for Convergent CTIX 6.4.1'
2130         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2131         "CFLAGS= -DSVR3 -DDIRENT -DTCPSOCKET -DHDBUUCP -DCK_CURSES \
2132         -DNONAWS -DNOLEARN -DNOLONGLONG $(KFLAGS) -XO" \
2133         "LNKFLAGS=-s" "LIBS=-lsocket -lcurses -lc_s"
2134         mcs -d wermit
2135
2136 # The following makefile entry should work for any Harris Night Hawk system
2137 # (either 88k or 68k based) running release 6.1 or later of the CX/UX
2138 # operating system. This is a POSIX and ANSI-C compliant system which also
2139 # supports BSD networking. (Earlier CX/UX releases will probably work with
2140 # sys5r3, but this has not been verified).
2141 #
2142 cx_ux:
2143         @echo Making C-Kermit $(CKVER) for Harris Night Hawk CX/UX 6.1 or later
2144         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2145         "CFLAGS=-DPOSIX -DTCPSOCKET -DHDBUUCP -DPID_T=pid_t -DWAIT_T=int \
2146         -Dd_ino=d_fileno -DUID_T=uid_t -DGID_T=gid_t -DNOLONGLONG \
2147         $(KFLAGS) -Xa -O3 -g" "LNKFLAGS=-O3"
2148
2149 #Intergraph Clipper, CLIX, job control, HDB UUCP.
2150 clix:
2151         @echo 'Making C-Kermit $(CKVER) for Intergraph CLIX...'
2152         $(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2153         "CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2154         -DNOGETUSERSHELL -DNOREALPATH -DNOLEARN $(KFLAGS) -O" \
2155         "LNKFLAGS=" "LIBS= -lbsd"
2156
2157 #As above + TCP/IP...
2158 clixnet:
2159         @echo 'Making networked C-Kermit $(CKVER) for Intergraph CLIX...'
2160         $(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2161         "CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2162         -DTCPSOCKET -DNOGETUSERSHELL -DNOLEARN -DNOREALPATH $(KFLAGS) -O" \
2163         "LNKFLAGS=" "LIBS= -lbsd"
2164
2165 #Mark Williams Coherent 286 or 386 on IBM PC family.
2166 #There is a 64K limit on program size, so this is a command-line only version.
2167 coherent:
2168         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOICP -DNOSETKEY -DNOLEARN \
2169         -DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG -DNOXMIT \
2170         -DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DSELECT_H $(KFLAGS) -VSUVAR" \
2171         -DNOFLOAT KTARGET=$${KTARGET:-$(@)} wermit
2172
2173 #Mark Williams Coherent 386 on IBM PC family.
2174 #This will make a "minimum interactive" version - no scripts,
2175 #no character sets, no help, no dial, no debug/transaction logging, no
2176 #transmit, msend, mail, type, etc.
2177 coherentmi:
2178         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOSETKEY -DNOLEARN \
2179         -DNOSHOW -DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG \
2180         -DNOXMIT -DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DNOSERVER -DNOUUCP \
2181         -DNOSPL -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ -DNOFLOAT \
2182         -DNOCMDL $(KFLAGS) -VSUVAR -DSELECT_H" KTARGET=$${KTARGET:-$(@)} \
2183         wermit
2184
2185 #Mark Williams Coherent 386 on IBM PC/AT family.
2186 coherentmax:
2187         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DSELECT_H -DNOLEARN \
2188         -DNOFLOAT -DNOSYSIOCTLH $(KFLAGS) -VSUVAR" "LNKFLAGS = -O -s" \
2189         KTARGET=$${KTARGET:-$(@)} wermit
2190
2191 #Mark Williams Coherent 386 4.2.  Includes curses but not TCP/IP.
2192 #Requires updates to the 4.2.10 compiler; the regular compiler fails to
2193 #to handle "complex expressions".  NOFLOAT is so it can work on old PCs
2194 #without floating-point hardware.
2195 coherent42:
2196         $(MAKE) "CFLAGS = -T500000 -DNOFLOAT -DCOHERENT -DNOANSI -DSELECT \
2197         -DNOSYSLOG -DDIRENT -DCK_CURSES -DCK_NEWTERM -DCK_WREFRESH -VSUVAR \
2198         -DDCLGETCWD -DNOSYSIOCTLH -DNOINITGROUPS -DNOSYMLINK -DSELECT_H \
2199         -DDCLGETCWD -O $(KFLAGS)" \
2200         "LNKFLAGS = -O -s" KTARGET=$${KTARGET:-$(@)} \
2201         "LIBS  = -lsocket -lcurses" wermit
2202
2203 #DEC Ultrix 2.x
2204 # Add -O, -DDYNAMIC, -s, etc, if they work.
2205 ultrix2x:
2206         @echo Making C-Kermit $(CKVER) for Ultrix 2.x ...
2207         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2208         "CFLAGS= -DBSD4 -DTCPSOCKET -DDU2 -DNOGETUSERSHELL $(KFLAGS)"
2209
2210 du2:
2211         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix2x
2212
2213 #DEC Ultrix 3.0 and 3.1
2214 ultrix30:
2215         @echo Making C-Kermit $(CKVER) for Ultrix 3.0...
2216         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2217         "CFLAGS= -DBSD4 -DTCPSOCKET -DDIRENT -DSIG_V -DNOGETUSERSHELL \
2218         -DULTRIX3 -DCK_CURSES $(KFLAGS) -O" "LIBS= -lcurses -ltermcap"
2219
2220 du3:
2221         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2222
2223 ultrix3x:
2224         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2225
2226 #DEC Ultrix 4.0 or 4.1 on DECstation, VAXstation, VAX, etc.
2227 ultrix40:
2228         @echo Making C-Kermit $(CKVER) for Ultrix 4.0 or 4.1...
2229         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2230         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DDU4 -DNOGETUSERSHELL \
2231         $(KFLAGS) -Olimit 1450" "LNKFLAGS = -s"
2232
2233 #DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2234 #Like ultrix40, except now C compiler supports -O2 optimization.
2235 ultrix42:
2236         @echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2237         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2238         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL $(KFLAGS) \
2239         -O2 -Olimit 1750" "LNKFLAGS = -s"
2240
2241 du42:
2242         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix42
2243
2244 #DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2245 #Like du42, but with curses support added and a couple features.
2246 ultrix42c:
2247         @echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2248         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2249         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2250         -DCK_CURSES -DNOIKSD $(KFLAGS)-G6 -O2 -Olimit 3000 " \
2251         "LNKFLAGS = -s" "LIBS= -lcurses -ltermcap"
2252
2253 ultrix43:
2254         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2255         "KFLAGS=-DULTRIX43 $(KFLAGS)" KTARGET=$${KTARGET-$(@)} ultrix42c
2256
2257 ultrix43notcp:
2258         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2259         "KFLAGS=-DULTRIX43 -DNONET $(KFLAGS)" \
2260         KTARGET=$${KTARGET-$(@)} ultrix42c
2261
2262 # NOTE: need -DNODEBUG on MIPS to avoid relocation errors at link time.
2263 # Actually now (8.0) that we have discovered the -G option maybe debugging
2264 # can be put back.
2265 ultrix44:
2266         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2267         "KFLAGS=-DULTRIX44 -G7 -DNODEBUG -DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2268         KTARGET=$${KTARGET-$(@)} ultrix42c
2269
2270 ultrix45:
2271         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2272         "KFLAGS=-DULTRIX45 $(KFLAGS)-DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2273         KTARGET=$${KTARGET-$(@)} ultrix42c
2274
2275 du42c:
2276         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2277         KTARGET=$${KTARGET-$(@)} ultrix42c
2278
2279 #DEC Ultrix 4.3A or later on DECsystem and DECstation 5000/50, /150 or /260
2280 #with MIPS R4x00 processor.  The "-mips3" switch generates R4000-specific
2281 #code, which is faster and more compact, but *won't* run on earlier
2282 #DECsystems and DECstations.
2283 ultrix43-mips3:
2284         @echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2285         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2286         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2287         $(KFLAGS) -O2 -Olimit 1750 -mips3" "LNKFLAGS = -s -mips3"
2288
2289 du43-mips3:
2290         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) ultrix43-mips3
2291
2292 #DEC Ultrix 4.3A or later on MIPS R4x000 based systems.
2293 #Like ultrix43-mips3 but with curses support added
2294 ultrix43c-mips3:
2295         @echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2296         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2297         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL -DCK_CURSES \
2298         $(KFLAGS) -O2 -Olimit 3000 -mips3" "LNKFLAGS = -s -mips3" \
2299         "LIBS= -lcurses -ltermcap"
2300
2301 du43c-mips3:
2302         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2303         KTARGET=$${KTARGET-$(@)} ultrix43c-mips3
2304
2305 #DEC Ultrix 4.4 on DECstation 5000/50 or /150 with R4000 MIPS processor,
2306 #or 5000/260 with R4400.  The "-mips3" switch generates R4000-specific code,
2307 #which is faster and more compact but *won't* run on earlier DECstations.
2308 ultrix44-mips3:
2309         @echo Making C-Kermit $(CKVER) for Ultrix 4.4, R4000 cpu ...
2310         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2311         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2312         $(KFLAGS) -O2 -Olimit 1450 -mips3" "LNKFLAGS = -s -mips3"
2313
2314 du44-mips3:
2315         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2316         KTARGET=$${KTARGET-$(@)} ultrix44c-mips3
2317
2318 #DEC Ultrix 4.2 on DECstation, VAXstation, VAX, etc, System V R4 environment
2319 ultrix42s5r4:
2320         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4 on Ultrix...'
2321         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2322         "CFLAGS = -O2 -Olimit 1500 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
2323         -DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
2324
2325 #OSF/1
2326 osf osf1:
2327         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2328         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2329         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT $(KFLAGS)" \
2330         "LNKFLAGS = -s" "LIBS = $(LIBS) -lbsd -lcurses -ltermcap -lm"
2331
2332 #DEC OSF/1 V1.0-1.3 on DECstation, VAX, Alpha, or PC.
2333 dec-osf dec-osf1:
2334         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2335         "CFLAGS= -DBSD4 -DOSF -DOSF13 -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2336         -DNOREALPATH -DNOIKSD -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DNODEBUG \
2337         -DNOUNICODE $(KFLAGS)" \
2338         "LNKFLAGS = -non_shared" "LIBS = -lbsd -lcurses -ltermcap -lm"
2339
2340 # This one causes "relocation out-of-range" errors in the linker.
2341 old-dec-osf:
2342         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V1.x...
2343         @echo If you are building for DEC OSF/1 2.0, please use dec-osf20.
2344         @echo Remove or adjust -O2 and/or -Olimit if they cause trouble.
2345         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2346         "KFLAGS= -O2 -Olimit 2400 $(KFLAGS)"
2347
2348 #DEC OSF/1 2.0 on Alpha and probably nowhere else.
2349 #The only difference from OSF/1 is that optimization is omitted.
2350 #The optimized version gets strange runtime errors, like the PAUSE command
2351 #not working.  Add "-unsigned" to make all chars unsigned.
2352 dec-osf20:
2353         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V2.0...
2354         @echo Optimization omitted because it causes runtime errors.
2355         @echo See comments in makefile.
2356         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2357         "KFLAGS= -DOSF20 $(KFLAGS)"
2358
2359 dec-osf30:
2360         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V3.0...
2361         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2362         "KFLAGS= -DOSF30 -O2 -Olimit 2400 $(KFLAGS)"
2363
2364 #Digital UNIX 3.2
2365 # Must compile ckuus[6x].c separately without optimization otherwise
2366 # the optimizer dumps core - keep CFLAGS here in sync with those from osf.
2367 du32:
2368         @echo Making C-Kermit $(CKVER) for Digital UNIX 3.2...
2369         $(MAKE) CC=$(CC) CC2=$(CC2) ckuus6.$(EXT) \
2370         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2371         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2372         $(MAKE) CC=$(CC) CC2=$(CC2) ckuusx.$(EXT) \
2373         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2374         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2375         $(MAKE) CC=$(CC) CC2=$(CC2) osf \
2376         "KFLAGS= -DOSF32 -DHDBUUCP -O2 -Olimit 3200 $(KFLAGS)"
2377
2378 dec-osf32:
2379         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) du32 \
2380         KTARGET=$${KTARGET:-$(@)}
2381
2382 #Digital UNIX 4.0 through 4.0D (use tru64 targets for 4.0E and above)...
2383 du40:
2384         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0...
2385         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2386         "KFLAGS= -DOSF40 -DHDBUUCP -DFNFLOAT \
2387         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2388
2389 du40gcc:
2390         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0 with gcc ...
2391         $(MAKE) osf CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
2392         "KFLAGS= -DOSF40 -DHDBUUCP $(KFLAGS)"
2393
2394 #Tru64 Unix 4.0E
2395 tru64-40e:
2396         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0E...
2397         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2398         "KFLAGS= -DOSF40 -DOSF40E -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2399         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2400
2401 tru64-40f:
2402         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0F...
2403         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2404         "KFLAGS= -DOSF40 -DOSF40F -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2405         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2406
2407 tru64-40g:
2408         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0G...
2409         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2410         "KFLAGS= -DOSF40 -DOSF40G -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2411         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2412
2413 tru64-50a:
2414         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.0A...
2415         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2416         "KFLAGS= -DTRU64 -DOSF50 -DHDBUUCP \
2417         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2418
2419 tru64-51a:
2420         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1A...
2421         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2422         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DHDBUUCP \
2423         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2424
2425 tru64-51b:
2426         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1B...
2427         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2428         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2429         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2430
2431 # Added 5.1b version with OpenSSL - CDW 6-13-2005...
2432 tru64-51b+openssl:
2433         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1b
2434         @echo  including OpenSSL...
2435         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2436         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2437         -unsigned -std1 -O3 -Olimit 2400 \
2438         -DCK_AUTHENTICATION -DCK_SSL $(SSLINC) $(KFLAGS)" \
2439         "LIBS= $(SSLLIB) -rpath $(sslroot)/ssl/lib -lssl -lcrypto"
2440
2441 du50:
2442         $(MAKE) CC=$(CC) CC2=$(CC2) tru64-50a KTARGET=$${KTARGET:-$(@)}
2443
2444 du40-ridiculous-checking:
2445         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0.
2446         @echo Checking everything - assumes DECC...
2447         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2448         "KFLAGS= -DOSF40 -DHDBUUCP -w0 -warnprotos -check -portable \
2449         -unsigned -std1 -O3 -Olimit 1760 $(KFLAGS)"
2450
2451 #Sequent DYNIX/ptx 1.2.1
2452 dynixptx12:
2453         @echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.2.1...
2454         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2455         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DPTX -DNOGETUSERSHELL -DNOLEARN \
2456         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t $(KFLAGS) -i -O" \
2457         "LNKFLAGS = -i"
2458
2459 #Sequent DYNIX/ptx 1.3 or 1.4
2460 dynixptx13:
2461         @echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.3 TCP/IP...
2462         $(MAKE) xermit "CFLAGS= -O KTARGET=$${KTARGET:-$(@)} \
2463         -DSVR3 -DDIRENT -DHDBUUCP -DPTX -DCK_POLL -DNOGETUSERSHELL \
2464         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DTCPSOCKET $(KFLAGS) -i" \
2465         "LNKFLAGS = -i" "LIBS = -lsocket -linet -lnsl"
2466
2467 #Sequent DYNIX/ptx 2.0, ANSI C compilation
2468 #Should work on any hardware platform when DYNIX/ptx runs, including
2469 #386, 486, Pentium.
2470 dynixptx20:
2471         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2472         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2473         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2474         -DWAIT_T=int -DPTX -DNOGETUSERSHELL $(KFLAGS) -O" \
2475         "LIBS = -lsocket -linet -lnsl"
2476
2477 #Sequent DYNIX/ptx 2.0, ANSI C compilation, with curses
2478 dynixptx20c:
2479         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2480         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2481         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int -DPTX -DCK_CURSES \
2482         -DCK_NEWTERM -DNOGETUSERSHELL $(KFLAGS) -O" \
2483         "LIBS = -lsocket -linet -lnsl -lcurses -ltermcap"
2484
2485 #Sequent DYNIX/ptx 2.1.6, 80486, ANSI C compilation, with curses:
2486 # -Xa -- use ANSI compiler.
2487 # -Wc,-pw -- suppress portability warnings.
2488 # -Wc,-i386 -- 80386 cpu.
2489 # -Wc,-i486 -- 80486 cpu.
2490 # -Wc,-P5 -- Pentium (default).
2491 # -Wc,-O3 -- highest optimization.
2492 # -Wa,-N17061 -- increase symbol table from default of 15013 for ckcuni.c.
2493 # Early versions of DYNIX/ptx 2.1.x may need -DCK_POLL instead of -DSELECT.
2494 # Add "$&" after the colon in the "xermit" target for parallel makes.
2495 dynixptx216c:
2496         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6'
2497         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2498         "CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2499         -DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2500         -DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2501         -DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2502         $(KFLAGS) -Xa -Wc,-pw -Wc,-i486 -Wc,-O3 -Wa,-N17061" \
2503         "LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2504         "LNKFLAGS = -s"
2505
2506 #Sequent DYNIX/ptx 2.1.6, gcc 2.7.2.2, with curses:
2507 dynixptx216cgcc:
2508         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6 gcc'
2509         $(MAKE) xermit "CC = gcc" "CC2 = gcc" KTARGET=$${KTARGET:-$(@)} \
2510         "CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2511         -DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2512         -DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2513         -DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2514         $(KFLAGS) -O3 -pipe -funsigned-char" \
2515         "LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2516         "LNKFLAGS = -s"
2517
2518 #Sequent DYNIX/ptx 4.0, ANSI C compilation, with curses
2519 dynixptx41c:
2520         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.0...'
2521         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2522         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2523         -DWAIT_T=int -DPTX -DPTX4 -DCK_CURSES -DCK_NEWTERM \
2524         -DNOGETUSERSHELL $(KFLAGS) -O" \
2525         "LIBS = -lsocket -lnsl -lcurses -ltermcap"
2526
2527 #Sequent DYNIX/ptx 4.4, ANSI C compilation, with curses
2528 dynixptx44:
2529         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.4...'
2530         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2531         "CFLAGS= -DPTX -DPTX4 -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int \
2532         -DCK_CURSES -DCK_NEWTERM -DBIGBUFOK -DSELECT -DNOGETUSERSHELL \
2533         $(KFLAGS) -O" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
2534
2535 #Sequent DYNIX 3.0.x
2536 dynix3:
2537         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2538         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2539         "CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O \
2540         -DPWUID_T=int -DGID_T=int $(KFLAGS)"
2541
2542 #Sequent DYNIX 3.0.x, no ACUCNTRL
2543 dynix3noacu:
2544         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2545         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2546         "CFLAGS= -DBSD43 -DLCKDIR -DTCPSOCKET -O \
2547         -DUID_T=int -DGID_T=int $(KFLAGS)"
2548
2549 #Sequent DYNIX 3.1.x
2550 dynix31:
2551         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.x...
2552         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2553         "CFLAGS= -O -DDCLPOPEN -DLCKDIR -DBSD4 -DTCPSOCKET $(KFLAGS)"
2554
2555 #Sequent DYNIX 3.1.2, as above but with curses, to be compiled by gcc 2.3.3.
2556 dynix31c:
2557         @echo 'Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.2, curses...'
2558         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2559         "CFLAGS= -O2 -DDCLPOPEN -DACUCNTRL \
2560         -DBSD43 -DTCPSOCKET -DCK_CURSES -DUID_T=int \
2561         $(KFLAGS)" "LIBS= -lcurses -ltermcap"
2562
2563 #Convex C1 with Berkeley Unix
2564 convex:
2565         @echo Making C-Kermit $(CKVER) for Convex C1 / BSD...
2566         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2567         "CFLAGS= -DBSD4 -DNOLEARN $(KFLAGS) -Dmsleep=mnap"
2568
2569 #Convex C210 with Convex/OS 8
2570 convex8:
2571         @echo Making C-Kermit $(CKVER) for Convex C210 with OS 8
2572         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2573         "CFLAGS= -DBSD4 -DTCPSOCKET -DNODEBUG -DDIRENT -DNOFILEH \
2574         $(KFLAGS) -DSIG_V -Dmsleep=mnap"
2575
2576 #Convex C2 with Convex OS 9.1 (should also work with 8.1 or later)
2577 #with ANSI C compiler, uses BSD 4.3 uucp lockfile convention.
2578 convex9:
2579         @echo Making C-Kermit $(CKVER) for Convex C210 with OS 9.1
2580         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2581         "CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2582         -D__STDC__ -DLCKDIR -Dmsleep=mnap -O -ext -tm c1 $(KFLAGS)" \
2583         "LNKFLAGS = -ext"
2584
2585 #Convex C2 with Convex OS 10.1 or later
2586 #with gcc 2.x C compiler
2587 convex10gcc:
2588         @echo Making C-Kermit $(CKVER) for Convex C2 with OS 10.1 using gcc
2589         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2590         "CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2591         -D__STDC__  -Dmsleep=mnap -O2 $(KFLAGS)" CC=gcc CC2=gcc
2592
2593 #Cray X-MP or Y-MP UNICOS 6.x or 7.x.
2594 #NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2595 #processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2596 cray:
2597         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 6.x or 7.0...
2598         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2599         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2600
2601 #Cray X-MP or Y-MP UNICOS 8.0 Alpha.
2602 cray8:
2603         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 8.0 Alpha...
2604         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2605         "CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2606
2607 #Cray X-MP or Y-MP UNICOS 9.0.
2608 #This one was executed successfully for C-Kermit 8.0.209.
2609 #Earlier versions of Unicos will probably need the same flags.
2610 cray9:
2611         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 9.0...
2612         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2613         "CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DNOLFDEVNO \
2614         -DTCPSOCKET $(KFLAGS) -O1"
2615
2616 #Cray-2 or Cray 3-CSOS
2617 #NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2618 #processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2619 craycsos:
2620         @echo 'Making C-Kermit $(CKVER) for Cray-2/3 CSOS
2621         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2622         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET \
2623         $(KFLAGS) -DCK_ANSIC -DCK_CURSES" "LIBS=-lnet"
2624
2625 #NeXTSTEP 1.0 through 3.2.
2626 #Includes fullscreen file transfer display (curses) and TCP/IP support.
2627 #Uses shared library to make executable program about 80K smaller.
2628 #Remove "LIBS = -lsys_s" if this causes trouble.
2629 next:
2630         @echo Making C-Kermit $(CKVER) for NeXTSTEP...
2631         @echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2632         @echo 'add KFGLAGS=-DNOREDIRECT to your make command.'
2633         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2634         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2635         -pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2636
2637 nextc:
2638         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2639         KTARGET=$${KTARGET:-$(@)}
2640
2641 nextg:
2642         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2643         KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2644
2645 nextgc:
2646         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2647         KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2648
2649 #NeXTSTEP 3.3.
2650 #Includes fullscreen file transfer display and TCP/IP.
2651 # You might have to add 1 line to 1 NeXT header file <ip.h>
2652 # to declare n_long as u_long by adding #include <bsd/netinet/in_systm.h>
2653
2654 next33:
2655         @echo Making C-Kermit $(CKVER) for NeXTSTEP 3.3...
2656         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2657         "CFLAGS= -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2658         -pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2659
2660 #OPENSTEP 4.2 for Sparc, m680x0, HP PA-RISC, and Intel.
2661 #Includes fullscreen file transfer display and TCP/IP.
2662 #ckcpro.c compiled without optimization because it crashes the compiler.
2663 openstep42:
2664         @echo Making C-Kermit $(CKVER) for OPENSTEP 4.2...
2665         $(MAKE) ckcpro.$(EXT) \
2666         "CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2667         -DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -w"
2668         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2669         "CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2670         -DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -O -w" \
2671         "LIBS = -lsys_s -lcurses -ltermcap"
2672
2673 #NeXT with malloc debugger
2674 nextmd:
2675         @echo Making C-Kermit $(CKVER) for NeXT with malloc debugging...
2676         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
2677         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2678         -DCK_CURSES $(KFLAGS) -O -w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
2679         "LIBS = -lsys_s -lcurses -ltermcap"
2680
2681 #Build for NeXTSTEP with "fat" binaries (MABs) that run on both Motorola
2682 #and Intel platforms.
2683 nextfat:
2684         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2685         next KTARGET=$${KTARGET:-$(@)} \
2686         "KFLAGS=-Wall -arch m68k -arch i386" "LNKFLAGS = -arch m68k -arch i386"
2687
2688 #NeXTSTEP on Intel Platforms.
2689 next486:
2690         @echo Making C-Kermit $(CKVER) for NeXTSTEP on Intel Platforms...
2691         @echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2692         @echo 'add KFGLAGS=D-DNOREDIRECT to your make command.'
2693         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2694         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2695         -DNODEBUG -O3 -fno-omit-frame-pointer -fschedule-insns2 -pipe \
2696         -DCK_CURSES $(KFLAGS) -w" "LIBS = -lsys_s -lcurses -ltermcap"
2697
2698 #Single binary that runs on NeXT 68030 and 68040, Intel, HP, and Sparc,
2699 #as well as on OpenStep/Mach.
2700 nextquadfat:
2701         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2702         KTARGET=$${KTARGET:-$(@)} \
2703         "KFLAGS=-Wall -arch m68k -arch i386 -arch hppa -arch sparc" \
2704         "LNKFLAGS = -arch m68k -arch i386 -arch hppa -arch sparc"
2705
2706 #BeBox
2707 beboxdr7:
2708         @echo 'Making C-Kermit $(CKVER) for the BeBox...'
2709         @echo 'Link step will fail with default Metroworks linker 64K limit.'
2710         @echo 'Code Warrior Gold required to link big programs.'
2711         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2712         "CC=/boot/develop/tools/mwcc" "CC2=/boot/develop/tools/mwld" \
2713         "CFLAGS= -DBEBOX -DBE_DR_7 -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2714
2715 #BeBox BeOS DR7 only
2716 bebox:
2717         @echo 'Making C-Kermit $(CKVER) for BeBox...'
2718         @echo 'Link step will fail with default Metroworks linker 64K limit.'
2719         @echo 'Code Warrior Pro 3.0 for BeBox required to link big programs.'
2720         $(MAKE) wermit "CC=mwcc" "CC2=mwld" KTARGET=$${KTARGET:-$(@)} \
2721         "CFLAGS= -DBEBOX -DPOSIX -DNOLEARN -DNOUUCP $(KFLAGS) -O"
2722
2723 #BeOS 4.5
2724 #We have to use the wermit target because 'fd_set' is unknown.
2725 beos45:
2726         $(MAKE) wermit "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
2727         "CFLAGS= -DBEOS -DBEOS45 -DPOSIX -DNOIKSD -DNOREALPATH -DSYSTIMEH \
2728         -DNOCOTFMC -DNOUUCP -DNOLEARN $(KFLAGS) -O" \
2729         "LIBS = $(LIBS)"
2730
2731 #BeOS 4.5
2732 beos45net:
2733         $(MAKE) CC=$(CC) CC2=$(CC2) beos45 \
2734         "KFLAGS=-DTCPSOCKET -DNO_DNS_SRV $(KFLAGS)" "LIBS=-lnet -lnetapi"
2735
2736 #Plan 9 from Bell Labs
2737 plan9:
2738         @echo 'C-Kermit for Plan 9 from Bell Labs - calling ckpker.mk...'
2739         make -f ckpker.mk
2740
2741 #POSIX
2742 posix:
2743         @echo 'Making C-Kermit $(CKVER) for pure POSIX...'
2744         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2745         "CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2746
2747 # PowerMAX OS (SVR4) from Concurrent (tested on PowerMAX 5.1)
2748 powermax:
2749         @echo 'Making C-Kermit $(CKVER) for Concurrent PowerMAX OS...'
2750         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2751         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DPOWERMAX \
2752         -DNETPTY -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
2753         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
2754         -DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
2755         "LIBS= -lsocket -lnsl -lresolv -lcurses -lgen -lc -lucbc"
2756
2757 #Berkeley Software Design Inc. BSDI
2758 # Substitute "LIBS= -lnewcurses -ltermcap" if desired.
2759 bsdi:
2760         @echo 'Making C-Kermit $(CKVER) for BSDI ...'
2761         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2762         "CFLAGS= -DBSD44 -DSETREUID -DSW_ACC_ID -DBIGBUFOK -DFIXCRTSCTS \
2763         -DTCPSOCKET -DCK_CURSES -DFNFLOAT $(KFLAGS) -O" \
2764         "LIBS= -lcurses -ltermcap -lm"
2765
2766 #Berkeley Software Design Inc. BSDI - has higher serial speeds than 1.x.
2767 bsdi2:
2768         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2769         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 $(KFLAGS)"
2770
2771 bsdi3:
2772         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2773         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 -DBSDI3 $(KFLAGS)"
2774
2775 bsdi4:
2776         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2777         KTARGET=$${KTARGET:-$(@)} \
2778         "KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2779         -DCKHTTP -m486 $(KFLAGS)"
2780
2781 # (old name for the above)
2782 bsdiposix:
2783         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi
2784
2785
2786 #Build a BSDI 4.x binary that also runs under FreeBSD (Terry Kennedy).
2787 #But watch out for details like serial-port locking.
2788 bsdix:
2789         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2790         KTARGET=$${KTARGET:-$(@)} \
2791         "KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2792         -m486 $(KFLAGS)" "LNKFLAGS=-static -Wl,-m,i386bsdi -Wl,-e,_start"
2793
2794 #Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1
2795 pyramid:
2796         @echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2797         ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2798         "CFLAGS= -DBSD43 -DTCPSOCKET -DPYRAMID -O $(KFLAGS)" "LNKFLAGS = -s"
2799
2800 #Pyramid Dual Port OSx using HoneyDanBer UUCP, curses and TCP
2801 pyramid-hdb:
2802         @echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2803         ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2804         "CFLAGS= -DBSD43 -DTCPSOCKET -DHBDUUCP -DCK_CURSES -O $(KFLAGS)" \
2805         "LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
2806
2807 #Pyramid DC/OSx (UNIX System V R4).
2808 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
2809 #are not misplaced in sys (rather than netinet and arpa, respectively).
2810 #Uses ANSI C.
2811 #NOTE: Remove -O and Olimit:2500 from CFLAGS if TELNET connections do not work.
2812 pyrdcosx:
2813         @echo 'Making C-Kermit $(CKVER) for Pyramid DC/OSx...'
2814         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2815         "CFLAGS = -Xa -O -DSVR4 -DDIRENT -DHDBUUCP -DSELECT -DNOGETUSERSHELL \
2816         -DCK_CURSES -DSTERMIOX -DTCPSOCKET -DPYRAMID -K Olimit:3100 \
2817         -DNO_DNS_SRV $(KFLAGS)" "LIBS= -lcurses -lsocket -lnsl" "LNKFLAGS = -s"
2818
2819 #IBM's AIX 3.0 on IBM 370 mainframe, tested on AIX F44 thru F50.
2820 aix370:
2821         @echo Making C-Kermit $(CKVER) for IBM System/370 AIX 3.0...
2822         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2823         "CFLAGS= -DAIX370 -DTCPSOCKET -DLCKDIR -DDIRENT $(KFLAGS)" \
2824         "LIBS = -lbsd"
2825
2826 #IBM's AIX/ESA 2.1 (OSF/1) on IBM mainframe
2827 aixesa:
2828         @echo Making C-Kermit $(CKVER) for IBM AIX/ESA...
2829         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2830         "CFLAGS= -DAIXESA -DTCPSOCKET $(KFLAGS) -O"
2831
2832 #IBM PS/2 with AIX 1.0 thru 1.3.
2833 #  Reports indicate that -O switch must be omitted.
2834 #  It is also possible that "make bsd" will work (reports welcome).
2835 #  One report said "make LIBS=-lbsd bsd" did the trick.
2836 #  NOTLOG is to get around a 'tlog' symbol defined in one of the headers.
2837 ps2aix:
2838         @echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2839         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2840         "CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DSIG_V \
2841         -DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2842         "LNKFLAGS = -i"
2843
2844 ps2aixnetc:
2845         @echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2846         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2847         "CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DTCPSOCKET -DCK_CURSES \
2848         -DSIG_V -DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2849         "LIBS = -lcurses" "LNKFLAGS = -i"
2850
2851 ps2aix3:
2852         $(MAKE) ps2aix KTARGET=$${KTARGET:-$(@)}
2853
2854 #IBM RT PC with AIX 2.2.1, valid as of C-Kermit 8.0.
2855 #NOTLOG because of a conflict in <sys/termio.h>.
2856 #This one has unique and strange lockfiles.
2857 #  -O removed on purpose (8.0).
2858 #  In case of "compiler error: symbol table full", increase the -Nn number.
2859 #  In case of "compiler error: Constant pool too big", boost the -Np number.
2860 #  Add -DNOPUTENV if putenv() causes trouble.
2861 #  Put -DNOIKSD back if IKSD-related problems occur.
2862 rtaix:
2863         @echo 'Making C-Kermit $(CKVER) for IBM RT PC, AIX 2.2.1...'
2864         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2865         "CFLAGS = -DATTSV -DRTAIX -DHDBUUCP -DDIRENT -DNOTLOG -DTCPSOCKET \
2866         -DNOGETUSERSHELL -DCLSOPN -DNOREALPATH -DNOUNICODE -DBSD_INCLUDES \
2867         -DUSE_LSTAT -DFNFLOAT -Nn2500 -Np1000 -Wq,-SJ2 -a -w $(KFLAGS)" \
2868         "LIBS = -lm $(LIBS)" "LNKFLAGS = -s"
2869
2870 #### IBM RT PC - these targets were last verified in C-Kermit 8.0.211.
2871
2872 #IBM RT PC with AIX 2.2.1 + curses
2873 rtaixc:
2874         $(MAKE) rtaix CC=$(CC) CC2=$(CC2) "KFLAGS=-DCK_CURSES" "LIBS=-lcurses"
2875
2876 #IBM RT PC with AIX (ACIS) 2.2.1 (BSD 4.3)
2877 # Add -O, -DDYNAMIC, -s, etc, if they work.
2878 rtacis:
2879         @echo Making C-Kermit $(CKVER) for RT PC with ACIS 2.2.1 = BSD 4.3...
2880         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2881         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOIKSD -DNOPUTENV \
2882         $(KFLAGS) -U__STDC__" "LNKFLAGS = -s"
2883
2884 #### IBM AIX.  The first two targets should work for any version of AIX
2885 #### from 4.2 onwards.  The ones after that are for older versions or
2886 #### specific configurations, and/or with gcc.
2887
2888 # This one should work for any AIX 4.2 or later: "make aix".
2889 # Other tags are for compatibility with old makefile targets.
2890 #OK: 2011/06/11
2891 aix aix42 aix43 aix44 aix45 aix50 aix51 aix52 aix53 aix54 aix61:
2892         @echo Making C-Kermit $(CKVER) for IBM AIX...
2893         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2894         "CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2895         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2896         -DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
2897         -DCKCPU=\\\"`uname -p`\\\" \
2898         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2899         -D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
2900
2901 # Same but using gcc instead of cc
2902 # This works but we get "gcc: unrecognized option '-qmaxmem-..'" each module.
2903 aixg:
2904         @echo "Using gcc..."
2905         $(MAKE) aix KTARGET=$${KTARGET:-$(@)} \
2906         CC=gcc CC2=gcc "KFLAGS=-pipe -funsigned-char"
2907
2908 # AIX 4.2 or later with OpenSSL 0.9.7 or later: "make aix+ssl"
2909 # For earlier OpenSSL remove -DOPENSSL_097 or add "KFLAGS=-UOPENSSL_097".
2910 # Synonym target names added to cover old redundant targets that were removed.
2911 # If SSL is not installed in the /usr/local tree (see SSLINC and SSLLIB
2912 # definitions near the top), you can specify the locations in your make
2913 # command as in this example:
2914 #
2915 #  SSLINC=-I/opt/ssl/include SSLLIB=-L/opt/ssl/lib make -e aix+ssl
2916 #
2917 # To build with gcc use "make aix CC=gcc CC2=gcc", or "make aixg"
2918 #
2919 #OK: 2011/06/15
2920 aix+ssl aix51+openssl aix52+openssl aix53+openssl:
2921         @echo "Making C-Kermit $(CKVER) for IBM AIX with OpenSSL..."
2922         @echo "SSLINC=$(SSLINC) SSLLIB=$(SSLLIB)"
2923         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2924         CC=$(CC) CC2=$(CC2) \
2925         "CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2926         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2927         -D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2928         -DCKCPU=\\\"`uname -p`\\\" \
2929         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2930         -DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $(SSLINC) $(KFLAGS)" \
2931         "LNKFLAGS=-s" "LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
2932
2933 # AIX 5.3 or 6.1 or later with IBM OpenSSL, which is always in the directories
2934 # shown below so you don't have to set SSLINC and SSLLIB.  If for some reason
2935 # the SSL include files and libraries are not in the places assumed, then use
2936 # "make aix+ssl" (just above) and set SSLINC and SSLLIB to indicate where the
2937 # SSL files are.  To build with gcc use "make aix+ibmssl CC=gcc CC2=gcc".
2938 aix+ibmssl:
2939         @echo "Making C-Kermit $(CKVER) for IBM AIX 6.1 with OpenSSL..."
2940         @echo "If this fails use 'make aix+ss' and specify SSLINC and SSLLIB"
2941         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2942         CC=$(CC) CC2=$(CC2) \
2943         "CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2944         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2945         -D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2946         -DCKCPU=\\\"`uname -p`\\\" \
2947         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2948         -DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_098 \
2949         -I/usr/include/openssl $(KFLAGS)" \
2950         "LNKFLAGS=-s" \
2951         "LIBS=-L/usr/lib/openssl -lssl -lcrypto -lcurses -lm -lcrypt"
2952
2953 # Old AIX versions...
2954
2955 #IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000.
2956 rs6000:
2957         @echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
2958         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2959         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
2960         -DCK_POLL -DCLSOPN -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
2961         "LNKFLAGS = -s"
2962
2963 #IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000, with curses.
2964 rs6000c:
2965         @echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
2966         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2967         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
2968         -DCK_POLL -DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -DNOREALPATH \
2969         -O $(KFLAGS)" "LIBS= -lcurses -ltermcap" "LNKFLAGS = -s"
2970
2971 aix30:
2972         $(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
2973
2974 aix31:
2975         $(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
2976
2977 #IBM AIX 3.2 for RISC System/6000.
2978 #In case of "subprogram too complex" warnings, add "-qmaxmem=16000" to CFLAGS.
2979 rs6aix32:
2980         @echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000...
2981         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2982         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
2983         -DSELECT_H -DCLSOPN -DNOTTYLOCK -O $(KFLAGS)" "LNKFLAGS = -s"
2984
2985 #IBM AIX 3.2 for RISC System/6000.
2986 rs6aix32c:
2987         @echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000, TCP+curses...
2988         @echo In case of Subprogram Too Complex warnings,
2989         @echo add -qmaxmem=16000 to CFLAGS.
2990         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2991         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
2992         -DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
2993         "LNKFLAGS = -s" "LIBS=-lcurses"
2994
2995 aix32:
2996         $(MAKE) rs6aix32c KTARGET=$${KTARGET:-$(@)}
2997
2998 #IBM AIX 4.1, 4.1.x on RISC System/6000 or Power Series.
2999 #Generates common binary for all platforms if using xlc (IBM C compiler).
3000 #When using gcc, add -mcpu=common to generate common binary.
3001 #Note that this one needs CK_NEWTERM.
3002 # Add -bbigtoc in case ld fails with TOC overflow.
3003 aix41:
3004         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3005         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3006         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3007         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3008         -DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
3009         "LNKFLAGS = -s" "LIBS=-lcurses"
3010
3011 #Ditto but with gcc.
3012 #Remove "CC=gcc CC2=gcc" if you have gcc installed as cc.
3013 aix41g:
3014         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3015         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
3016         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3017         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3018         -DNOGETUSERSHELL -O $(KFLAGS)" \
3019         "LNKFLAGS = -s -Xlinker -bbigtoc" "LIBS=-lcurses"
3020
3021 # Add -bbigtoc in case ld fails with TOC overflow.
3022 aix41+krb5+krb4:
3023         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3024         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3025         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3026         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3027         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3028         -DCK_ENCRYPTION -DCK_DES $(K5INC) $(K5INC)/krb5  \
3029         -DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
3030         "LNKFLAGS = -s" \
3031         "LIBS = $(K5LIB) -lcurses -lkrb4 -ldes425 -lkrb5 \
3032         -lcom_err -lk5crypto -lgssapi_krb5"
3033
3034 #Old name for "aix41".
3035 rs6aix41c:
3036         $(MAKE) aix41 KTARGET=$${KTARGET:-$(@)}
3037
3038 #IBM AIX 4.1, 4.1.x, or 4.2 on RISC System/6000 or Power Series,
3039 # with X.25 support
3040 #Generates common binary for all platforms if using xlc (IBM C compiler).
3041 #When using gcc, add -mcpu=common to generate common binary.
3042 # Add -bbigtoc in case ld fails with TOC overflow.
3043 aix41x25:
3044         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3045         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3046         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3047         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3048         -DIBMX25 -DDEBUG -DNOGETUSERSHELL -qmaxmem=16000 -g $(KFLAGS)" \
3049         "LNKFLAGS = -g -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3050         -@echo "\e]0;kermit done\a\c"
3051
3052 #As above but without -g in LNKFLAGS.
3053 # Add -bbigtoc in case ld fails with TOC overflow.
3054 aix41x25o:
3055         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3056         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3057         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3058         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3059         -DIBMX25 -DNODEBUG -DNOGETUSERSHELL -qmaxmem=16000 $(KFLAGS)" \
3060         "LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3061         -@echo "\e]0;kermit done\a\c"
3062
3063 #AIX 4.2 -- Use this target if the regular "make aix" doesn't work.
3064 # Must have CK_NEWTERM or echoing is lost after curses.
3065 # Add -bbigtoc in case ld fails with TOC overflow.  As of C-Kermit 8.0.212,
3066 # all AIX builds 4.2 and later include large file support.
3067 oldaix42:
3068         @echo Making C-Kermit $(CKVER) for IBM AIX 4.2 or higher...
3069         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3070         "CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3071         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
3072         -DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
3073         -DCKCPU=\\\"`uname -p`\\\" \
3074         -DHERALD=\\\"\ IBM\ AIX\ `uname -v`.`uname -r`\\\" \
3075         -D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
3076
3077 #AIX 4.3 - Use this target if the regular "make aix" doesn't work.
3078 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3079 # -bbigtoc needed on some systems but not others to avoid TOC overflow.
3080 # "man ld" says -bbigtoc makes program run slower.
3081 oldaix43:
3082         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher...
3083         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3084         "CFLAGS= -DAIXRS -DAIX41 -DAIX43 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3085         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3086         -DFNFLOAT -DNOGETUSERSHELL -qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3087         "LNKFLAGS = -s" "LIBS=-lcurses -lm"
3088
3089 #AIX 4.3 with IBM X.25.
3090 aix43x25:
3091         @echo "Making C-Kermit $(CKVER) for IBM AIX 4.3 with X.25..."
3092         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3093         "CFLAGS= -DAIXRS -DAIX41 -DAIX43 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3094         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3095         -DFNFLOAT -DNOGETUSERSHELL -DIBMX25 \
3096         -qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3097         "LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg -lm"
3098
3099 #AIX 4.3 -- Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3100 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3101 # "man ld" says -bbigtoc makes program run slower.
3102 aix43g:
3103         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3104         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3105         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3106         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3107         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3108         "LIBS=-lcurses -lm"
3109
3110 aix43gcc:
3111         $(MAKE) aix43g
3112
3113 # None of the following aix43gcc attempts work on a gcc-only AIX 4.3.3 box.
3114 # It just plain can't find the math routines (fmod, pow, exp, sqrt, log10,...)
3115 # Which is odd because nm /usr/lib/libC.a finds them...
3116
3117 #in case aix43gcc can't find its math library...
3118 aix43gccx:
3119         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3120         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3121         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3122         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3123         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3124         "LIBS= -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.1.0/2.95.2 \
3125         -lcurses -bloadmap -bnoquiet"
3126
3127 #in case aix43gccx can't find its math library...
3128 aix43gccy:
3129         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3130         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3131         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3132         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3133         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3134         "LIBS= -lcurses -bloadmap -bnoquiet"
3135
3136 #in case aix43gccx can't find its math library...
3137 aix43gccz:
3138         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3139         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3140         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3141         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3142         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3143         "LIBS= -L. -lcurses -bloadmap -bnoquiet"
3144
3145 #AIX 4.3 with MIT Kerberos 5 and Kerberos 4 compatibility mode
3146 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3147 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3148 # "man ld" says -bbigtoc makes program run slower.
3149 aix43gcc+krb5+krb4:
3150         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3151         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3152         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3153         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3154         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3155         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3156         -DCK_ENCRYPTION -DCK_DES -funsigned-char $(K5INC) $(K5INC)/krb5 \
3157         $(KFLAGS)" \
3158         "LIBS=$(K5LIB) -lcurses -lm -lkrb4 -ldes425 -lkrb5 \
3159         -lcom_err -lk5crypto -lcrypt -lgssapi_krb5"
3160
3161 #AIX 4.3 with MIT Kerberos 5, Kerberos 4 compatibility mode and OpenSSL
3162 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3163 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3164 # "man ld" says -bbigtoc makes program run slower.
3165 aix43gcc+krb5+krb4+openssl:
3166         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3167         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3168         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3169         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3170         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3171         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3172         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DLIBDES -DCK_SSL \
3173         -funsigned-char $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3174         "LIBS=$(K5LIB) $(SSLLIB) -lssl -lcrypto \
3175         -lcurses -lm -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt \
3176         -lgssapi_krb5"
3177
3178 aix43gcc+openssl:
3179         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/OpenSSL...
3180         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3181         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3182         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3183         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3184         -DCK_AUTHENTICATION -DCK_SSL -funsigned-char $(SSLINC) $(KFLAGS)" \
3185         "LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
3186
3187 aix44gcc:
3188         $(MAKE) aix43g "KFLAGS=-DAIX44 $(KFLAGS)" \
3189         KTARGET=$${KTARGET:-$(@)}
3190
3191 aix45gcc:
3192         $(MAKE) aix43g "KFLAGS=-DAIX45 $(KFLAGS)" \
3193         KTARGET=$${KTARGET:-$(@)}
3194
3195 aix50gcc:
3196         $(MAKE) aix43g "KFLAGS=-DAIX50 $(KFLAGS)" \
3197         KTARGET=$${KTARGET:-$(@)}
3198
3199 aix51gcc:
3200         $(MAKE) aix43g "KFLAGS=-DAIX51 $(KFLAGS)" \
3201         KTARGET=$${KTARGET:-$(@)}
3202
3203 aix52gcc:
3204         $(MAKE) aix43g "KFLAGS=-DAIX52 $(KFLAGS)" \
3205         KTARGET=$${KTARGET:-$(@)}
3206
3207 aix53gcc:
3208         $(MAKE) aix43g "KFLAGS=-DAIX53 $(KFLAGS)" \
3209         KTARGET=$${KTARGET:-$(@)}
3210
3211 #Bull DPX/2 with BOS/X, like AIX/RS6000
3212 bulldpx2:
3213         @echo Making C-Kermit $(CKVER) for Bull DPX/2 with BOS/X...
3214         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3215         "CFLAGS= -DSVR3 -DDIRENT -DCK_ANSIC -DCKTYP_H=<sys/types.h> \
3216         -DCK_POLL -DNOGETUSERSHELL -DCLSOPN -DNOLEARN -O $(KFLAGS)" \
3217         "LNKFLAGS = -s"
3218
3219 #Sun UNIX 3.5 with gcc 2.3.3.
3220 sunos3gcc:
3221         @echo Making C-Kermit $(CKVER) for Sun UNIX 3.5 and gcc...
3222         $(MAKE) xermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3223         CFLAGS="-g -O -DBSD4 -DTCPSOCKET $(KFLAGS)"
3224
3225 #SunOS version 4.0, BSD environment, has saved original euid feature.
3226 # Add "CC=/usr/ucb/cc CC2=/usr/ucb/cc" if necessary.
3227 # Note: Including Unicode crashes the assembler in ckcuni.c.
3228 sunos4:
3229         @echo Making C-Kermit $(CKVER) for SunOS 4.0, BSD environment...
3230         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3231         "CFLAGS= -O -DSUNOS4 -DFNFLOAT -DNOUNICODE $(KFLAGS)" \
3232         "LIBS=-lm"
3233
3234 #As above, but with SunLink X.25 support
3235 sunos4x25:
3236         @echo SunLink X.25 support
3237         $(MAKE) "MAKE=$(MAKE)" sunos4 KTARGET=$${KTARGET:-$(@)} \
3238         "KFLAGS=$(KFLAGS) -DFNFLOAT -DSUNX25" \
3239         "LIBS=-lm"
3240
3241 #SUN OS version 4.1 - 4.1.3, BSD environment, has saved original euid feature.
3242 #Uses Honey DanBer UUCP.  Requires presence of /usr/spool/locks directory.
3243 # /var/spool/ should be a symbolic link to  /usr/spool/.
3244 # ... or 'make xermit "CC= /usr/ucb/cc " \'
3245 # Note: "xermit" means use the select() version of the CONNECT module.
3246 # Note for C-Kermit 9.0: Reportedly 'you need to modify the sys/ioctl.h
3247 # include file, i.e. comment out the "struct winsize" and "struct
3248 # ttysize". Otherwise there will be a conflict with sys/ttycom.h (included by
3249 # termios.h) which also declares these structs. But you need both includes.'
3250 sunos41:
3251         @echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD...
3252         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3253         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE $(KFLAGS)" \
3254         "LIBS= $(LIBS) -lresolv -lm"
3255
3256 #As above, but compiled with gcc.  Gives 24-32K size reduction
3257 #with gcc 2.1 or 2.2.2.  CAUTION: make sure "fixincludes" has been run on
3258 #the include files, so gcc's are in sync with the regular Sun ones.
3259 #This includes the curses library for fullscreen file transfer display.
3260 #NDGPWNAM needed for GCC 2.5.6, not needed for 2.4.0, but it's uncertain
3261 #whether it will do any harm for 2.4.0 compilation -- if so, remove it.
3262 sunos41gcc:
3263         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3264         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3265         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3266         -funsigned-char $(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3267
3268 # As above, but without -funsigned-char so I can see the warnings that
3269 # everybody else will get when they use ANSI compilers that don't have this
3270 # option (gsc = gcc signed char).
3271 sunos41gsc:
3272         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3273         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3274         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3275         $(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3276
3277 #As above but with ckucon.c rather than ckucns.c (for testing only)
3278 sunos41gccfork:
3279         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3280         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3281         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3282         -DNOLEARN -funsigned-char $(KFLAGS)" \
3283         "LIBS= -lcurses -ltermcap -lresolv -lm"
3284
3285 #as above but configured for Kerberos IV
3286 sunos41gcc+krb4:
3287         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3288         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3289         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3290         -DTCPSOCKET -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3291         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK -funsigned-char \
3292         $(K4INC) $(KFLAGS)" \
3293         "LIBS= $(K4LIB) -lcurses -ltermcap -lresolv -lm -lkrb -ldes"
3294
3295 #as above but configured for SSL/TLS
3296 sunos41gcc+openssl:
3297         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, ssl...
3298         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3299         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3300         -DCK_AUTHENTICATION -funsigned-char \
3301         -DCK_SSL -DTCPSOCKET -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3302         "LIBS= $(SSLLIB) -lcurses -ltermcap -lresolv -lm -lssl -lcrypto"
3303
3304 #as above but configured for Kerberos IV and SSL/TLS
3305 sunos41gcc+krb4+openssl:
3306         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3307         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3308         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3309         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3310         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3311         $(K4INC) $(SSLINC) $(KFLAGS)" \
3312         "LIBS= $(K4LIB) $(SSLLIB) \
3313         -lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto"
3314
3315 #as above but configured for Kerberos IV and ZLIB enabled SSL/TLS
3316 sunos41gcc+krb4+openssl+zlib:
3317         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3318         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3319         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3320         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3321         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3322         -DZLIB $(K4INC) $(SSLINC) \
3323         $(KFLAGS)" \
3324         "LIBS= $(K4LIB) $(SSLLIB) \
3325         -lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto -lz"
3326
3327 #as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3328 sunos41gcc+krb4+srp+openssl+zlib:
3329         @echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,krb4,srp,ssl,zlib..."
3330         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3331         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3332         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3333         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3334         -DZLIB -DCK_SRP $(K4INC) $(SRPINC) $(SSLINC) $(KFLAGS)" \
3335         "LIBS= $(K4LIB) $(SRPLIB) $(SSLLIB) \
3336         -lcurses -ltermcap -lresolv -lm -lkrb -lkrypto \
3337         -lsrp -lssl -lcrypto -lz"
3338
3339 #as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3340 sunos41gcc+srp+openssl+zlib:
3341         @echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,srp,ssl,zlib..."
3342         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3343         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3344         -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES \
3345         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3346         -DZLIB -DCK_SRP $(SRPINC) $(SSLINC) \
3347         $(KFLAGS)" \
3348         "LIBS= $(SRPLIB) $(SSLLIB) \
3349         -lcurses -ltermcap -lresolv -lm -lkrypto -lsrp -lssl -lcrypto -lz "
3350
3351 #SUNOS 4.1 as sunos41 above, but also with curses support
3352 sunos41c:
3353         @echo Curses support
3354         $(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
3355         "KFLAGS=$(KFLAGS) -DCK_CURSES -DFNFLOAT " \
3356         "LIBS= -lcurses -ltermcap"
3357
3358 #As SunOS 4.1.x, gcc, configured as Internet Kermit Server.
3359 # . NOLOCAL removes capability to make connections
3360 # . TNCODE allows server-side Telnet negotiation.
3361 # . used to include -lpwent, why?
3362 # . used to include -L/usr/local/lib -lm, why?
3363 sunos41giks:
3364         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc for IKS...
3365         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3366         "CFLAGS= -O -DSUNOS41 -DNDGPWNAM -DFNFLOAT \
3367         -DNOLOCAL -DTCPSOCKET -DTNCODE -DNOPUSH $(KFLAGS)" \
3368         "LIBS= -lm -lresolv"
3369
3370 #SUNOS 4.1 with SunLink X.25 support
3371 sunos41x25:
3372         @echo SunLink X.25 support
3373         $(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3374         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3375         -DNOLEARN $(KFLAGS)" "LIBS= $(LIBS) -lresolv -lm"
3376
3377 #SUNOS 4.1 with SunLink X.25 support and curses
3378 sunos41x25c:
3379         @echo SunLink X.25 support + curses
3380         $(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3381         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3382         -DCK_CURSES -DNOLEARN $(KFLAGS)" \
3383         "LIBS= $(LIBS) -lcurses -ltermcap -lresolv -lm"
3384
3385 #SUN with Solaris 2.0 = SunOS 5.0.
3386 #Mostly the same as System V R4.  Don't use this with later Solaris versions.
3387 solaris20:
3388         @echo 'Making C-Kermit $(CKVER) for Sun with Solaris 2.0 and curses...'
3389         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3390         "CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3391         -DTCPSOCKET -DCK_CURSES -DFNFLOAT -DCK_POLL $(KFLAGS)" \
3392         "LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s"
3393
3394 #SUN with Solaris 2.0.
3395 #As above, but built with the gcc compiler from the Cygnus CD-ROM.
3396 solaris20g:
3397         @echo 'Making C-Kermit $(CKVER) for Sun Solaris 2.0, gcc, and curses..'
3398         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3399         "CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3400         -DTCPSOCKET -DCK_CURSES -DCK_POLL -DFNFLOAT $(KFLAGS)" \
3401         "LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s" \
3402         CC=/opt/cygnus-sol2-1.1/bin/gcc CC2=/opt/cygnus-sol2-1.1/bin/gcc
3403
3404 #SunOS 5.1 = Solaris 2.1.
3405 #NOTE: A C compiler is no longer bundled with SunOS 5.1, so to compile C
3406 #programs, you might have to change your PATH to include the directory
3407 #/usr/ccs/bin AFTER the directory containing the compiler.  SunPRO C is
3408 #installed by default in /opt/SUNWspro/bin.  So a sample PATH might be:
3409 #
3410 # /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3411 # /usr/ucb:/usr/sbin:/sbin:.
3412 #
3413 # or:
3414 #
3415 # /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3416 #
3417 #NOTE 2: Compilation with the Apogee C compiler (apcc) might not work,
3418 #because it refuses to allow "-Usun".  Reportedly, newer releases of apcc
3419 #(such as 1.2.17) work OK, use: "make -e sunos51 CC=apcc CC2=apcc".
3420 solaris21:
3421         @echo 'Making C-Kermit $(CKVER) for SunOS 5.x....'
3422         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3423         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DFNFLOAT \
3424         -DSELECT -DNODEBUG -DSTERMIOX $(KFLAGS)" "LIBS = -lm" "LNKFLAGS = -s"
3425
3426 #Solaris 2.0 - 2.4, SunPro compiler, includes curses and TCP/IP.
3427 #When using SUNWspro CC 2.0.1 under Solaris 2.3, be sure all cc patches
3428 #are applied, otherwise corrupt or truncated object files can result.
3429 #To build, set your PATH as follows:
3430 #  /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3431 #  /usr/ucb:/usr/sbin:/sbin:.
3432 # or (depending on where the compiler has been installed):
3433 #  /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3434 #For additional optimization try using "-fast -xO4 -xdepend".
3435 solaris2x:
3436         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3437         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3438         "CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3439         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
3440         "LNKFLAGS = -s" "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv"
3441
3442 #as above but configured for Kerberos IV
3443 solaris2x+krb4:
3444         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x, SunPro cc, krb4...'
3445         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3446         "CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3447         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET  \
3448         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3449         -DCK_ENCRYPTION -DCK_DES -DCK_CAST $(K4INC) $(KFLAGS)" \
3450         "LNKFLAGS = -s" \
3451         "LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes"
3452
3453 #C-Kermit for Solaris 2.0-2.4 compiled with gcc, includes curses and TCP/IP.
3454 #Change -O2 to -O if -O2 gives trouble.
3455 #Remove -Usun if it causes trouble.
3456 #Your PATH should start with something like:
3457 #  /usr/local/gnu/bin:/usr/ccs/bin:
3458 #Produces a huge executable -- strip with /usr/ccs/bin/strip (not Gnu strip).
3459 #Also don't add "LNKFLAGS = -s" -- strip manually instead.
3460 #Also note: this can NOT be linked statically - Sun makes it impossible.
3461 #And for Solaris 2.4, you might have to replace:
3462 # /usr/local/lib/gcc-lib/i486-sun-solaris2/2.4.5/include/sys/stat.h
3463 #with /usr/include/sys/stat.h.
3464 solaris2xg:
3465         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc...'
3466         @echo 'Please read the comments that accompany the solaris2xg target.'
3467         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3468         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3469         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3470         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3471
3472 #ditto but no curses.
3473 solaris2xgnc:
3474         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc...'
3475         @echo 'Please read the comments that accompany the solaris2xg target.'
3476         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3477         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3478         -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3479         "LIBS= -lsocket -lnsl -lm -lresolv $(LIBS)"
3480
3481 #and with Kerberos IV
3482 solaris2xg+krb4:
3483         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc, krb4...'
3484         @echo 'Please read the comments that accompany the solaris2xg target.'
3485         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3486         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3487         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3488         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 -DCK_ENCRYPTION \
3489         -DCK_DES -DCK_CAST -DBIGBUFOK $(K4INC) $(KFLAGS)" \
3490         "LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes \
3491         $(LIBS)"
3492
3493 #and with OpenSSL,ZLIB,PAM,SHADOW
3494 solaris2xg+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 CC2=gcc \
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 #Ditto but with GCC 3.1 in which you have to specify 32-bit with -m32.
3506 #In Solaris 9 (and maybe 8) you'll also need specifiy the Library path.
3507 #Reportedly this can be done here, but only with:
3508 # crle -l /usr/lib:/usr/local/ssl/lib
3509 #prior to building.  Note: 64-bit not tested with SSL.
3510 #For no-crypto 64-bit builds see the solaris9g64 target.
3511 solaris2xg32+openssl+zlib+pam+shadow:
3512         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3513         @echo 'Please read the comments that accompany the solaris2xg target.'
3514         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC="gcc -m32" CC2="gcc -m32" \
3515         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3516         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3517         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW  -DZLIB \
3518         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3519         "LIBS= $(SSLLIB) -ltermlib \
3520         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz"
3521
3522 #and with Krb5,Krb4,OpenSSL,SHADOW
3523 solaris2xg+krb5+krb4+openssl+shadow:
3524         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc,k5,k4,ssl...'
3525         @echo 'Please read the comments that accompany the solaris2xg target.'
3526         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3527         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3528         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3529         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3530         -DCK_ENCRYPTION -DCK_SSL -DCK_DES -DCK_CAST -DBIGBUFOK \
3531         $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3532         "LIBS= $(K5LIB) $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3533         -lkrb4 -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3534         -ldes $(LIBS)"
3535
3536 #and with OpenSSL
3537 solaris2xg+openssl+pam+shadow:
3538         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3539         @echo 'Please read the comments that accompany the solaris2xg target.'
3540         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3541         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3542         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3543         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW \
3544         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3545         "LIBS= $(SSLLIB) -ltermlib \
3546         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam"
3547
3548 solaris2xg+openssl+zlib+srp+pam+shadow: 
3549         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3550         @echo 'Please read the comments that accompany the solaris2xg target.'
3551         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3552         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3553         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DBIGBUFOK \
3554         -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES -DLIBDES -DCK_CAST \
3555         -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DCK_SRP $(SSLINC) $(KFLAGS)" \
3556         "LIBS= $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv -lsrp -lssl \
3557         -ldes -lkrypto -lcrypto -lpam -lz"
3558
3559 solaris22g:
3560         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3561         KTARGET=$${KTARGET:-$(@)}
3562
3563 solaris23g:
3564         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3565         KTARGET=$${KTARGET:-$(@)}
3566
3567 #Solaris 2.4 built with gcc
3568 solaris24g:
3569         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} \
3570         solaris2xg "KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3571
3572 #Solaris 2.0-2.3, SunPro compiler, with SunLink X.25 support.
3573 #This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3574 #exists and can be dynamically linked.
3575 #NOTE: Do not change target to xermit -- it doesn't support X.25.
3576 solaris2x25:
3577         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x+X.25 with SunPro cc...'
3578         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3579         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DDIRENT \
3580         -DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DNOLEARN \
3581         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3582         "LNKFLAGS = -s" \
3583         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3584         -lsockx25 -lsocket -lnsl -lm -lresolv"
3585
3586 #Solaris 2.0-2.4, gcc, SunLink X.25 added.
3587 #NOTE: Can't use xermit target with X.25.
3588 solaris2xgx25:
3589         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x + X.25 with GNU cc...'
3590         @echo 'Please read the comments that accompany the solaris2xg entry.'
3591         $(MAKE) wermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3592         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DSUNX25 \
3593         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DFNFLOAT \
3594         -DNOLEARN $(KFLAGS)" \
3595         "LIBS= -ltermlib -lm -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3596         -lsockx25 -lsocket -lnsl"
3597
3598 #Solaris 2.4, SunPro compiler, with SunLink X.25 support.
3599 #This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3600 #exists and can be dynamically linked.
3601 solaris24x25:
3602         @echo 'Making C-Kermit $(CKVER) for Solaris 2.4+X.25 with SunPro cc...'
3603         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3604         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DSOLARIS24 -DDIRENT -DNOLEARN \
3605         -DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DPOSIX_CRTSCTS \
3606         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3607         "LNKFLAGS = -s" \
3608         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3609         -lsockx25 -lsocket -lnsl -lm -lresolv"
3610
3611 #Solaris 2.5, SunPro compiler, with SunLink X.25 support.
3612 solaris25x25:
3613         @echo 'Making C-Kermit $(CKVER) for Solaris 2.5+X.25 with SunPro cc...'
3614         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3615         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS25 -DDIRENT -DSUNX25 \
3616         -DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES \
3617         -DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3618         -I/opt/SUNWconn/include $(KFLAGS)" \
3619         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3620         -lsockx25 -lsocket -lnsl -lm -lresolv"
3621
3622 solaris23:
3623         $(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3624         "KFLAGS=$(KFLAGS)"
3625
3626 solaris24:
3627         $(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3628         "KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3629
3630 # template for Solaris 2.5 and above.
3631 solaris25x:
3632         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3633         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3634         "CFLAGS = -DFNFLOAT -O -Usun -i $(KFLAGS)" \
3635         "LNKFLAGS = -s" \
3636         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3637
3638 #Solaris 2.5, SunPro compiler, curses, TCP/IP
3639 solaris25:
3640         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3641         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3642
3643 #Solaris 2.5, SunPro compiler, curses, TCP/IP, Kerberos IV
3644 solaris25+krb4:
3645         $(MAKE) "MAKE=$(MAKE)" solaris25x+krb4 KTARGET=$${KTARGET:-$(@)} \
3646         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3647
3648 #Solaris 2.5 built with gcc
3649 solaris25g:
3650         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3651         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3652
3653 #Solaris 2.5 built with gcc and Kerberos IV
3654 solaris25g+krb4:
3655         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3656         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3657
3658 #Solaris 2.5 built with gcc and Kerberos V/IV, SSL, ...
3659 solaris25g+krb5+krb4+openssl+shadow:
3660         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3661         KTARGET=$${KTARGET:-$(@)} \
3662         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3663
3664 #Solaris 2.5, gcc, SunLink X.25 added.
3665 solaris25gx25:
3666         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3667         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3668
3669 #Solaris 2.6, gcc, SunLink X.25 added.
3670 solaris26gx25:
3671         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3672         "KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3673         "LIBS= -lpam"
3674
3675 #Solaris 2.6, SunPro compiler, curses, TCP/IP
3676 solaris26:
3677         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3678         "KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3679         "LIBS= -lpam"
3680
3681 #Solaris 2.6 with gcc
3682 solaris26g:
3683         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xg \
3684         "KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3685         "LIBS = -lpam"
3686
3687 #Solaris 2.6 with gcc and SSL
3688 solaris26g+openssl:
3689         $(MAKE) "MAKE=$(MAKE)"  solaris2xg+openssl+pam+shadow \
3690         KTARGET=$${KTARGET:-$(@)} "KFLAGS= -DSOLARIS26 $(KFLAGS)"
3691
3692 #Solaris 2.6 with gcc, no curses (e.g. because libtermlib is missing).
3693 solaris26gnc:
3694         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgnc \
3695         "KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3696         "LIBS= -lpam"
3697
3698 #Solaris 2.6, SunPro compiler, with SunLink X.25 support.
3699 solaris26x25:
3700         @echo 'Making C-Kermit $(CKVER) for Solaris 2.6+X.25 with SunPro cc...'
3701         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3702         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS26 -DDIRENT -DSUNX25 \
3703         -DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES -DCK_PAM -DCK_SHADOW \
3704         -DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3705         -I/opt/SUNWconn/include $(KFLAGS)" \
3706         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3707         -lsockx25 -lsocket -lnsl -lm -lresolv -lpam"
3708
3709 #Solaris 7 (2.7) with Sun CC
3710 solaris7:
3711         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3712         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3713         "LIBS= -lpam"
3714
3715 #Solaris 7 with gcc (32-bit)
3716 solaris7g:
3717         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3718         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3719         "LIBS= -lpam"
3720
3721 #Solaris 7 with gcc + Kerberos IV (32-bit)
3722 solaris7g+krb4:
3723         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3724         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3725         "LIBS= -lpam"
3726
3727 solaris7g+openssl+zlib+pam+shadow:
3728         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3729         KTARGET=$${KTARGET:-$(@)} \
3730         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3731
3732 #Solaris 7 with gcc + OpenSSL (32-bit)
3733 solaris7g+openssl+zlib+srp+pam+shadow:
3734         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+srp+pam+shadow \
3735         KTARGET=$${KTARGET:-$(@)} \
3736         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3737
3738 #Solaris 8
3739 solaris8:
3740         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3741         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3742         "LIBS= -lpam"
3743
3744 #Solaris 8 with gcc (32-bit)
3745 solaris8g:
3746         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3747         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3748         "LIBS= -lpam"
3749
3750 # In OpenSSL builds add -ldl if you get unresolved references for
3751 # dlclose, dlsym, dlopen, dlerror.
3752
3753 #Solaris 8 with gcc + OpenSSL (32-bit)
3754 solaris8g+openssl+zlib+pam+shadow:
3755         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3756         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DSOLARIS8 $(KFLAGS)"
3757
3758 #Solaris 8 with gcc + Kerberos IV (32-bit)
3759 solaris8g+krb4:
3760         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3761         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3762         "LIBS= -lpam"
3763
3764 solaris9nolfs:
3765         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3766         "KFLAGS=-DSOLARIS9 -DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3767         "LIBS= -lpam"
3768
3769 #Solaris 9 with malloc debugging
3770 solaris9md:
3771         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
3772         "CFLAGS = -DFNFLOAT -O -Usun -i -D_FILE_OFFSET_BITS=64 \
3773         -DSOLARIS9 -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG \
3774         -DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3775         "LIBS= -lpam -ltermlib -lsocket -lnsl -lm -lresolv"
3776
3777 #Solaris 9 with gcc + OpenSSL + Shadow (32-bit)
3778 #Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3779 solaris9g+openssl+shadow+pam+zlib:
3780         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3781         KTARGET=$${KTARGET:-$(@)} \
3782         "KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
3783         -DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
3784         "LIBS= -lpam -ldes425 -lz $(LIBS)"
3785
3786 #Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow (32-bit)
3787 #Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3788 solaris9g+krb5+krb4+openssl+shadow+pam+zlib:
3789         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3790         KTARGET=$${KTARGET:-$(@)} \
3791         "KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
3792         -DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
3793         "LIBS= -lpam -ldes -lz $(LIBS)"
3794
3795 #Solaris 9 with gcc + Kerberos 4 and 5:
3796 solaris9g+krb5+krb4:
3797         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3798         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3799         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3800         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3801         -D_FILE_OFFSET_BITS=64 \
3802         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK \
3803         $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3804         "LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3805         -lkrb4 -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3806         -ldes $(LIBS)"
3807
3808 #Solaris 9 with gcc + Kerberos 5.
3809 #Columbia Only - libdes has a version number in its name.
3810 #In the general case, change -ldes425 to -des.
3811 #If you have Kerberos 1.4 or later and and krb5_init_ets can't be found
3812 #at link time, add -DNO_KRB5_INIT_ETS.
3813 cu-solaris9g+krb5:
3814         @case `openssl version` in \
3815           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3816           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3817           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3818           *) OPENSSLOPTION="" ;; \
3819         esac ; \
3820         HAVE_DES=''; \
3821         DES_LIB=''; \
3822         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3823               DES_LIB='-ldes425'; \
3824               HAVE_DES='-DCK_DES -DLIBDES'; \
3825               echo "HAVE DES"; \
3826            else echo "NO DES"; \
3827         fi; \
3828         GSSAPILIB=''; \
3829         K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
3830         echo K5DIR=$$K5DIR; \
3831         if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
3832               GSSAPILIB='-lgssapi_krb5'; \
3833           else GSSAPILIB='-lgssapi'; \
3834         fi; \
3835         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3836         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3837         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET  -DBIGBUFOK \
3838         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DCK_ENCRYPTION -DCK_CAST \
3839         $$OPENSSLOPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3840         "LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lcrypto \
3841         $$GSSAPILIB -lkrb5 -lcom_err -lk5crypto $$DES_LIB $(LIBS)"
3842
3843 #Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow + Long files
3844 #Columbia Only, mainly because of the -R clause.
3845 # (I tried adding -DCK_SRP and -lsrp but got a lot of symbol referencing
3846 #  errors at link time.)
3847 cu-solaris9g+krb5+krb4+openssl+shadow+pam+zlib:
3848         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3849         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3850         -DSOLARIS9 -D_FILE_OFFSET_BITS=64 -DBIGBUFOK \
3851         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3852         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3853         -DCK_ENCRYPTION -DCK_SSL -DCK_DES -DCK_CAST -DNO_KRB5_INIT_ETS \
3854         -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES -DOPENSSL_097 -DCK_FORWARD_X \
3855         $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3856         "LIBS= $(K5LIB) $(SSLLIB) -R/opt/local/lib -ltermlib -lsocket -lnsl \
3857         -lm -lresolv -lkrb4 -lssl -lcrypto -lgssapi_krb5 -lkrb5 \
3858         -lcom_err -lk5crypto -lpam -ldes425 -lz $(LIBS)"
3859
3860 #Solaris 9, 10, or 11 with gcc...  
3861 #Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3862 #This target is chained to be the secure solaris9g+xxx targets below.
3863 solaris9g solaris10g solaris11g:
3864         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with gcc'
3865         @case `uname -r` in \
3866           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3867           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3868           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3869           *) SOLARISVERSION="-DSOLARIS" ;; \
3870         esac ; \
3871         $(MAKE) "MAKE=$(MAKE)" CC="gcc -m32" CC2="gcc -m32" xermit \
3872         KTARGET=$${KTARGET:-$(@)} \
3873         "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3874         -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW -funsigned-char \
3875         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3876         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3877         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3878         -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3879         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3880
3881 #Solaris 9, 10, or 11 with Sun CC, 64 bit build.
3882 #DON'T USE THIS ONE ON PC ARCHITECTURE - It compiles and links but won't run.
3883 #OK: 2009/11/16 (but not tested on Solaris 11)
3884 solaris9_64 solaris10_64 solaris11_64:
3885         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 64-bit Sun CC'
3886         $(MAKE) "MAKE=$(MAKE)" solaris9 KTARGET=$${KTARGET:-$(@)} \
3887         "KFLAGS=-xarch=generic64 -U_FILE_OFFSET_BITS -DNOARROWKEYS" \
3888         "LNKFLAGS= -xarch=generic64"
3889
3890 #Solaris 9, 10, or 11 with gcc, 64 bit build.
3891 #Peeking inside FILE struct not allowed in 64-bit world.
3892 #DON'T USE THIS ONE ON PC ARCHITECTURE - It compiles and links but won't run.
3893 #OK: 2009/09/25 (but not tested on Solaris 11)
3894 solaris9g64 solaris10g64 solaris11g64:
3895         @echo 'Making C-Kermit $(CKVER) for Solaris 9++ with gcc 64-bit'
3896         @case `uname -r` in \
3897           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3898           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3899           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3900           *) SOLARISVERSION="-DSOLARIS" ;; \
3901         esac ; \
3902         $(MAKE) "MAKE=$(MAKE)" CC="gcc -m64" CC2="gcc -m64" xermit \
3903         KTARGET=$${KTARGET:-$(@)} \
3904         "CFLAGS = -g -O -Usun -funsigned-char \
3905         -DSVR4 $$SOLARISVERSION -DNOARROWKEYS \
3906         -DSTERMIOX -DSELECT -DFNFLOAT -DUSE_STRERROR -DCK_PAM -DCK_SHADOW \
3907         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3908         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3909         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3910         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3911
3912 #Solaris 9, 10, or 11 with SunPro CC
3913 #Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3914 #This target is chained to by the secure targets below.
3915 #OK: 2011/06/15
3916 solaris9 solaris10 solaris11:
3917         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with Sun CC'
3918         @case `uname -r` in \
3919           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3920           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3921           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3922           *) SOLARISVERSION="-DSOLARIS" ;; \
3923         esac ; \
3924         $(MAKE) "MAKE=$(MAKE)" xermit KTARGET=$${KTARGET:-$(@)} \
3925         "CFLAGS = -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3926         -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW \
3927         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3928         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3929         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3930         -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3931         "LIBS= $(LIBS) -ltermlib -lsocket -lnsl -lm -lresolv -lpam"
3932
3933 # Solaris 9, 10, or 11 with OpenSSL built with Sun CC.
3934 # Here's an example of how to invoke this target in case your OpenSSL
3935 # headers and libraries are not in /usr/local:
3936 #
3937 # make solaris9+openssl "SSLINC=" "SSLLIB=" \
3938 #  "KFLAGS= -I/opt/openssl-0.9.8k/include -L/opt/openssl-0.9.8k/lib"
3939 #
3940 # Don't use 'make -e' because that inhibits passing of KFLAGS to
3941 # the base (solaris9) target.
3942 #
3943 #OK: 2011/06/14
3944 solaris9+ssl solaris10+ssl solaris11+ssl \
3945 solaris9+openssl solaris10+openssl solaris11+openssl:
3946         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: cc'
3947         @case `openssl version` in \
3948           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3949           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3950           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3951           *) OPENSSLOPTION="" ;; \
3952         esac ; \
3953         HAVE_DES=''; \
3954         DES_LIB=''; \
3955         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3956               DES_LIB='-ldes425'; \
3957               HAVE_DES='-DCK_DES -DLIBDES'; \
3958               echo "HAVE DES"; \
3959            else echo "NO DES"; \
3960         fi; \
3961         $(MAKE) "MAKE=$(MAKE)" solaris9 KTARGET=$${KTARGET:-$(@)} \
3962         "KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
3963         -DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
3964         "LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto  $(LIBS)"
3965
3966 # Solaris 9 or later with OpenSSL, built with gcc.
3967 # Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.  This target nicely
3968 # chains to the solaris{9,10,11}g target but for some reason it doesn't work if
3969 # you add the -DFORWARD_X option, thus the solaris9g+openssl+forward_x target.
3970 #
3971 #OK: 2020/06/15
3972 solaris9g+ssl solaris10g+ssl solaris11g+ssl \
3973 solaris9g+openssl solaris10g+openssl solaris11g+openssl:
3974         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: gcc'
3975         @case `openssl version` in \
3976           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3977           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3978           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3979           *) OPENSSLOPTION="" ;; \
3980         esac ; \
3981         HAVE_DES=''; \
3982         DES_LIB=''; \
3983         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3984               DES_LIB='-ldes425'; \
3985               HAVE_DES='-DCK_DES -DLIBDES'; \
3986               echo "HAVE DES"; \
3987            else echo "NO DES"; \
3988         fi; \
3989         $(MAKE) "MAKE=$(MAKE)" solaris9g KTARGET=$${KTARGET:-$(@)} \
3990         "KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
3991         -DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
3992         "LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto  $(LIBS)"
3993
3994 # Solaris 9 or later with gcc + OpenSSL + Shadow (32-bit).
3995 # Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.
3996 # Includes long file support - not sure if this was available before Solaris 9.
3997 # Detects Solaris version automatically.
3998 #
3999 solaris9g+openssl+forward_x:
4000         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with OpenSSL...'
4001         @case `openssl version` in \
4002           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
4003           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
4004           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
4005           *) OPENSSLOPTION="" ;; \
4006         esac ; case `uname -r` in \
4007           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
4008           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
4009           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
4010           *) SOLARISVERSION="-DSOLARIS" ;; \
4011         esac ; \
4012         $(MAKE) xermit  KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
4013         "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION \
4014         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
4015         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
4016         -DSTERMIOX -DSELECT -DFNFLOAT -DBIGBUFOK -D_FILE_OFFSET_BITS=64 \
4017         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DLIBDES \
4018         -DFORWARD_X $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
4019         "LIBS= $(SSLLIB) -lpam -ldes425 -lz -ltermlib \
4020         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz $(LIBS)"
4021
4022 # These two should be folded in with the ones just above.
4023
4024 #Solaris 9 with gcc 3.1 + OpenSSL (32-bit)
4025 solaris9g+openssl+zlib+pam+shadow:
4026         $(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4027         KTARGET=$${KTARGET:-$(@)} \
4028         "KFLAGS=-DSOLARIS9 -DUSE_STRERROR $(KFLAGS)"
4029
4030 #Solaris 10 with gcc 3.1 + OpenSSL (32-bit)
4031 solaris10g+openssl+zlib+pam+shadow:
4032         $(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4033         KTARGET=$${KTARGET:-$(@)} \
4034         "KFLAGS=-DSOLARIS10 -DUSE_STRERROR $(KFLAGS)"
4035
4036 #The following (old, old) sunosxxx entries are for debugging and testing only.
4037
4038 sunos41x:
4039         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4040         "CFLAGS= -O -DSUNOS41 -DDIRENT -DNOTLOG -DNOMSEND \
4041         -DNOUUCP -DNOSIGWINCH -DNOREDIRECT -DNOPUSH -DNOCCTRAP \
4042         -DNOICP -DNOLOCAL $(KFLAGS)"
4043
4044 #SunOS 4.1.x, debugging with Pure Software, Inc., Purify 2 (commercial runtime
4045 #error-detection software for catching wild array references, etc).
4046 #Before running the resulting wermit, you'll also need to define and export
4047 #the following environment variables (as in this example):
4048 #PURIFYHOME=/usr/local/purify ; export PURIFYHOME
4049 #PURIFYCACHEDIR=/tmp ; export PURIFYCACHEDIR
4050 sunos41cp:
4051         @echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD / Curses / Purify...
4052         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4053         "CC2= purify -cache_dir=/usr/tmp cc" \
4054         "CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4055         -DSAVEDUID -DCK_CURSES $(KFLAGS)" \
4056         "LIBS= -lcurses -ltermcap"
4057
4058 #SunOS 4.1 with malloc debugger
4059 sunos41md:
4060         @echo Making C-Kermit $(CKVER) for SunOS 4.1 malloc debug...
4061         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
4062         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4063         -DSAVEDUID $(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG"
4064
4065 sunos41gmd:
4066         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
4067         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4068         "CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4069         -DNDGPWNAM -DSAVEDUID -DCK_CURSES -DRLOGCODE \
4070         $(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
4071         "LIBS= -lcurses -ltermcap"
4072
4073 #SunOS version 4.1, gcc, profiling with gprof, no debugging.
4074 #To get profile, "make sunos41p" (on Sun), then "./wermit".  After running
4075 #wermit, "gprof ./wermit | lpr" (or whatever) to get execution profile.
4076 sunos41p:
4077         @echo Making C-Kermit $(CKVER) for SunOS 4.x with profiling...
4078         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4079         "CFLAGS= -DSUNOS41 -DNODEBUG -DSAVEDUID -DDIRENT -DTCPSOCKET \
4080         -DNDGPWNAM $(KFLAGS) -pg" "LNKFLAGS = -pg"
4081
4082 #SunOS version 4.1 or later, BSD environment, minimum features.
4083 sunos41min:
4084         @echo Minimum interactive
4085         $(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
4086         "KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNORETRY \
4087         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS \
4088         -DNOSHOW -DNOSETKEY -DNOUUCP -DNORECALL -DNOREDIRECT \
4089         -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ \
4090         -DNONET -DCK_SMALL -DNOCKSPEED -DNOCKTIMERS -DNOLOGIN \
4091         -DNOCKXYZ -DNOKERBEROS -DNOMKDIR -DNOPATTERNS -DNOPERMS -DNOPIPESEND \
4092         -DNORECURSIVE -DNORENAME -DNORESEND -DNOSETKEY \
4093         -DNOTRIGGER -DNOTUNING $(KFLAGS)" "LNKFLAGS = -s"
4094
4095 #SunOS version 4.1, BSD environment, min size, command-line only...
4096 sunos41m:
4097         @echo Minimum size
4098         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4099         "KFLAGS=-DNOICP $(KFLAGS)"
4100
4101 #SunOS version 4.1, BSD environment, min size, cmd-line only, remote only...
4102 #
4103 sunos41mr:
4104         @echo Minimum size
4105         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4106         "KFLAGS=-DNOICP -DNOLOCAL $(KFLAGS)"
4107
4108 #SunOS version 4.1, BSD environment, min size, interactive...
4109 sunos41mi:
4110         @echo Minimum size
4111         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4112         "KFLAGS=-DNOCMDL $(KFLAGS)"
4113
4114 #SunOS version 4.1, BSD environment, min size, interactive, remote only...
4115 sunos41mir:
4116         @echo Minimum size
4117         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4118         "KFLAGS=-DNOCMDL -DNOLOCAL $(KFLAGS)"
4119
4120 #SunOS 4.1, System V R3 environment (-i option omitted).
4121 sunos41s5:
4122         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4123         @echo For testing purposes only - NOT for production use.
4124         @echo For a useable version, make sunos41 instead.
4125         $(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4126         KTARGET=$${KTARGET:-$(@)} \
4127         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN -DCK_POLL $(KFLAGS) -O"
4128
4129 #As above, but with curses support
4130 sunos41s5c:
4131         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4132         @echo Curses included.
4133         @echo For testing purposes only - NOT for production use.
4134         @echo For a useable version, make sunos41 instead.
4135         $(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4136         KTARGET=$${KTARGET:-$(@)} \
4137         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN \
4138         -DCK_POLL -DCK_CURSES -DCK_NEWTERM $(KFLAGS) -O" "LIBS= -lcurses"
4139
4140 #As above, but with curses support AND net support
4141 sunos41s5tcpc:
4142         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4143         @echo TCP/IP and curses included.  No debug log.
4144         @echo For testing purposes only - NOT for production use.
4145         @echo For a useable version, make sunos41 instead.
4146         $(MAKE) xermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4147         KTARGET=$${KTARGET:-$(@)} \
4148         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DCK_POLL \
4149         -DNODEBUG -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET $(KFLAGS) -O" \
4150         "LIBS= -lcurses -lresolv"
4151
4152 # (End of SunOS test entries...)
4153
4154 #Apollo with Domain SR10.0 or later, BSD environment
4155 #Reportedly, it might also help to add '-A,systype=bsd4.3' to CFLAGS.
4156 #Reportedly, there is also a problem with getc & putc macros that can
4157 #be handled by using '#ifdef apollo' somewhere to redefine them???
4158 #On the other hand, other reports indicate that it works fine as-is.
4159 #NOTE: This entry was previously like this:
4160 #       $(MAKE) wermit "CFLAGS= -DNOFILEH -DBSD4 $(KFLAGS) -Uaegis \
4161 #       -DTCPSOCKET -U__STDC__"
4162 #Reports (Dec 91) indicate SR10 has an ANSI-compliant C compiler,
4163 #in addition to an older one that claimed to be ANSI-compliant but wasn't.
4164 #The following make entry (plus checks that are made in ckcdeb.h) detect
4165 #which compiler is used and define the CK_ANSIC or NOANSI flags accordingly.
4166 sr10-bsd:
4167         @echo Making C-Kermit $(CKVER) for Apollo SR10.0 / BSD ...
4168         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4169         "CFLAGS= -O -DAPOLLOSR10 -DBSD43 -DTCPSOCKET -DCK_CURSES -DNOLEARN \
4170         -Uaegis $(KFLAGS)" "LIBS= -lcurses -ltermcap"
4171
4172 #Apollo with Domain SR10.0 or later, System V R3 environment.
4173 #Don't use the optimizer (-O), it causes problems at runtime.
4174 sr10-s5r3:
4175         @echo Making C-Kermit $(CKVER) for Apollo SR10.0 / Sys V R3 ...
4176         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4177         "CFLAGS= -DNOFILEH -DSVR3 -DAPOLLOSR10 -DNOLEARN $(KFLAGS) \
4178         -Uaegis -U__STDC__"
4179
4180 #Apollo Domain/IX (untested, try this if sr10-bsd doesn't work)
4181 # -DTCPSOCKET can probably be added here.
4182 apollobsd:
4183         @echo Making C-Kermit $(CKVER) for Apollo Domain/IX...
4184         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4185         "CC= /bin/cc " "CC2= /bin/cc " \
4186         "CFLAGS= -DNOFILEH -DBSD4 -DAPOLLOBSD -DNOLEARN $(KFLAGS) -Uaegis"
4187
4188 #Version 7 Unix (see comments near top of makefile)
4189 v7:
4190         @echo Making C-Kermit $(CKVER) for UNIX Version 7.
4191         @echo Read the makefile if you have trouble with this...
4192         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4193         "CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
4194         -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
4195         -DNPTYPE=$(NPTYPE) $(DIRECT) -DO_RDWR=2 -DO_NDELAY=0 -DO_SCCS_ID \
4196         -DNOLEARN $(KFLAGS)"
4197
4198 #AT&T UNIX System V R3, signal() is void rather than int.
4199 #Uses dirent.h and Honey DanBer UUCP.
4200 #Add the -i link option if necessary.
4201 #If you get errors like "ws_row undefined" in ckutio.c, add -DNONAWS.
4202 sys5r3:
4203         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4204         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4205         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4206         "LNKFLAGS="
4207
4208 #As above, plus curses.
4209 sys5r3c:
4210         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3 + curses...'
4211         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4212         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES -DNONAWS -DNOLEARN \
4213         $(KFLAGS) -O" "LNKFLAGS=" "LIBS = -ltermlib"
4214
4215 #System V R3.2 for PCs built on Interactive UNIX SV/386 R4.x
4216 #but with all calls to dup2() disabled because generic SVR3 does not have dup2.
4217 # (The -linet library might not need to be in this one.)
4218 sys5r32is:
4219         @echo 'Making C-Kermit $(CKVER) for System V/386 R32
4220         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
4221         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
4222         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES -DNONAWS \
4223         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD -DNOFDZERO -DNOREDIRECT \
4224         -DNOZEXEC -DNOLEARN $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
4225
4226 #System V R3.2 for PCs built on Interactive UNIX SV/386 R4.x
4227 #but with all calls to dup2() disabled because generic SVR3 does not have dup2.
4228 #With TCP/IP added.
4229 sys5r32isnet:
4230         @echo 'Making C-Kermit $(CKVER) for System V/386 R32 + TCP/IP
4231         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
4232         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
4233         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES -DNONAWS \
4234         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD -DNOFDZERO -DNOREDIRECT \
4235         -DNOLEARN -DNOZEXEC -DTCPSOCKET $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
4236
4237 iclsys5r3:
4238         make sys5r3 KTARGET=$${KTARGET:-$(@)} KFLAGS=-DICLSVR3
4239
4240 #AT&T UNIX System V R3.  As above, but no ANSI prototyping.
4241 sys5r3na:
4242         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4243         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4244         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOANSI -DNOLEARN $(KFLAGS) -O" \
4245         "LNKFLAGS="
4246
4247 #AT&T UNIX System V R3, for 3B computers with Wollongong TCP/IP.
4248 sys5r3net3b:
4249         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX SVR3/3B/Wollongong...'
4250         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4251         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DWOLLONGONG -DNOLEARN $(KFLAGS) \
4252         -O" "LIBS= -lnet -lnsl_s" "LNKFLAGS ="
4253
4254 #AT&T UNIX System V R3, signal() is void rather than int.
4255 #Uses dirent.h and Honey DanBer uucp, has <termiox.h>.
4256 #Has <termiox.h> for RTS/CTS flow control.
4257 sys5r3tx:
4258         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4259         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4260         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN \
4261         $(KFLAGS) -i -O" "LNKFLAGS ="
4262
4263 #AT&T UNIX System V R3, signal() is void rather than int.
4264 #Uses dirent.h and Honey DanBer uucp, has <termiox.h>.
4265 #Has <sys/termiox.h> for RTS/CTS flow control.
4266 sys5r3sx:
4267         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4268         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4269         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4270         $(KFLAGS) -i -O" "LNKFLAGS ="
4271
4272 #AT&T UNIX System V R4.
4273 #Has <termiox.h>.
4274 sys5r4:
4275         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4276         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4277         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN $(KFLAGS)" \
4278         "LNKFLAGS = -s"
4279
4280 #AT&T UNIX System V R4 with Wollongong TCP/IP.
4281 #Has <termiox.h>.
4282 sys5r4net:
4283         @echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4284         @echo ' If sockets-library routines are missing at link time, then'
4285         @echo ' try the sys5r4net2 entry.'
4286         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4287         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4288         -DTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4289
4290 #As above, but needs libs included.
4291 sys5r4net2:
4292         @echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4293         @echo ' (Search for WOLLONGONG...)'
4294         $(MAKE) sys5r4net KTARGET=$${KTARGET:-$(@)} "LIBS= -lsocket -lnsl"
4295
4296 #As above plus curses.
4297 sys5r4net2c:
4298         echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4299         @echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4300         @echo ' (Search for WOLLONGONG...)'
4301         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4302         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4303         -DTERMIOX -DWOLLONGONG -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4304         "LIBS= -lsocket -lnsl -lcurses"
4305
4306 #DELL UNIX System V R4.
4307 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4308 #are not misplaced in sys (rather than netinet and arpa, respectively).
4309 #Uses ANSI C constructs, advisory file locking on devices, etc.
4310 #Warning: -DSTERMIOX enables hardware flow control (RTS/CTS), but reportedly
4311 #this does not work with the normal drivers.  However, it might still work
4312 #on non-Dell systems, or even Dell systems with different drivers installed.
4313 dellsys5r4:
4314         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4315         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4316         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4317         -DTCPSOCKET -DSTERMIOX -DCK_POLL $(KFLAGS)" \
4318         "LIBS= -lsocket -lnsl" "LNKFLAGS = -s"
4319
4320 #As above, curses support added...
4321 dellsys5r4c:
4322         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4323         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4324         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4325         -DTCPSOCKET -DSTERMIOX -DCK_CURSES -DCK_POLL \
4326         $(KFLAGS)" "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4327
4328 #Minimum interactive: As above, but with every conceivable option removed.
4329 dellsys5r4mi:
4330         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4331         @echo 'Minimum-size interactive'
4332         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4333         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4334         -UTCPSOCKET -DNOCMDL -DNOSPL -DNOXMIT -DCK_POLL \
4335         -DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4336         -DNOSCRIPT -DNOCSETS -DNOSHOW -DNOSETKEY -DNOSERVER -DNOUUCP \
4337         -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ  \
4338         $(KFLAGS)" "LNKFLAGS = -s"
4339
4340 #Command-line only version.
4341 dellsys5r4m:
4342         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4343         @echo 'Command-line only'
4344         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4345         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4346         -UTCPSOCKET -DNOICP -DNOFRILLS -DNODIAL -DNODEBUG -DNOTLOG -DNOCSETS \
4347         -DNOSETKEY -DNOESCSEQ -DNOJC -DNOFDZERO -DCK_POLL \
4348         $(KFLAGS)" "LNKFLAGS = -s"
4349
4350 #AT&T UNIX System V R4.
4351 #Has <sys/termiox.h>.
4352 sys5r4sx:
4353         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4354         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4355         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4356         $(KFLAGS)" "LNKFLAGS = -s" "LIBS=$(LIBS)"
4357
4358 #AT&T UNIX System V R4.
4359 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4360 #are not misplaced in sys (rather than netinet and arpa, respectively).
4361 #Uses ANSI C constructs, <sys/termiox.h>, etc etc.
4362 sys5r4sxtcp:
4363         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4364         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4365         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4366         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4367         "LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4368
4369 #AT&T UNIX System V R4.
4370 #As above + curses.
4371 sys5r4sxtcpc:
4372         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4373         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4374         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4375         -DSTERMIOX  -DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4376         "LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)" "LNKFLAGS = -s"
4377
4378 #AT&T UNIX System V R4.  CONSENSYS SVR4.2-1.
4379 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4380 #are not misplaced in sys (rather than netinet and arpa, respectively).
4381 #Uses ANSI C constructs, <sys/termiox.h>, etc.
4382 # Fullscreen -DCK_CURSES added (with curses & termcap libs)
4383 # Submission by Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu
4384 sys5r4sxtcpf:
4385         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4386         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4387         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4388         -DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
4389         "LIBS= -lsocket -lnsl -L/usr/ccs/lib -lcurses -ltermcap" \
4390         "LIBS=$(LIBS)" "LNKFLAGS = -s"
4391
4392 #Smallest possible version for System V R4
4393 s5r4m:
4394         @echo Minimum size
4395         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4396         "KFLAGS=$(KFLAGS) -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4397         -DNOSCRIPT -DNOCSETS -DNOICP -DNOMSEND -UTCPSOCKET" "LNKFLAGS = -s"
4398
4399 #Smallest possible interactive version of above
4400 s5r4mi:
4401         @echo Minimum interactive
4402         $(MAKE) "MAKE=$(MAKE)" sys5r4sx \
4403         "KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNOSHOW \
4404         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOSETKEY \
4405         -UTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
4406
4407 #AT&T UNIX System V R4, has <sys/termiox.h>
4408 #ANSI C function prototyping disabled.
4409 sys5r4sxna:
4410         @echo No ANSI C prototyping...
4411         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4412         "KFLAGS=$(KFLAGS) -DNOANSI"
4413
4414 #Stratus FTX.
4415 ftx:
4416         @echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4417         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4418         "CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DSTERMIOX \
4419         -DNOGETUSERSHELL -DNOLEARN +DA1.1 $(KFLAGS)" \
4420         "LNKFLAGS = -s" "LIBS=$(LIBS)"
4421
4422 #Stratus FTX + TCP/IP.
4423 ftxtcp:
4424         @echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4425         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4426         "CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4427         -DSTERMIOX -DTCPSOCKET -DNO_DNS_SRV +DA1.1 $(KFLAGS)" \
4428         "LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4429
4430 #NCR MP-RAS 2.03 or 3.02
4431 mpras:
4432         @echo 'Making C-Kermit $(CKVER) for NCR MP-RAS...'
4433         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4434         "CFLAGS = -O -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX \
4435         -DNOGETUSERSHELL -DUSE_FILE__CNT -DNOLEARN -DNO_DNS_SRV $(KFLAGS)" \
4436         "LNKFLAGS = -s" "LIBS=$(LIBS)"
4437
4438 #NCR MP-RAS 2.03 or 3.02 with TCP/IP and curses
4439 mprastcpc:
4440         @echo 'Making C-Kermit $(CKVER) for NCR MP-RAS + TCP/IP + curses...'
4441         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CFLAGS=-DTCPSOCKET \
4442         -DCK_CURSES -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4443         -DNOGETUSERSHELL -DNO_DNS_SRV DUSE_FILE__CNT -O $(KFLAGS)" \
4444         "LNKFLAGS = -s" "LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)"
4445
4446 #SINIX-L V5.41 - includes curses, tcp/ip - Use this one for i386.
4447 #This version of SINIX doesn't like fdopen() or popen().
4448 sinix541:
4449         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX V5.41/i386'
4450         $(MAKE) ckcpro.$(EXT) "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP \
4451         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV \
4452         -DSNI541 -DNOGETUSERSHELL -DNONETCMD -DNOPOPEN -kansi -W0 $(KFLAGS)"
4453         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4454         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DNOPOPEN \
4455         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4456         -DSNI541 -DNOGETUSERSHELL -DNONETCMD -kansi -W0 -O $(KFLAGS)" \
4457         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4458
4459 sinix541i:
4460         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sinix541
4461
4462 #SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for MIPS.
4463 # As of C-Kermit 7.1, optimization removed -- takes (literally) forever.
4464 sinix542:
4465         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4466         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4467         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4468         -DSNI542 -DNOGETUSERSHELL -kansi -W0 $(KFLAGS)" \
4469         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4470
4471 #SINIX V5.42 gcc - includes curses, tcp/ip, everything.
4472 #This one was used to build the Pyramid-architecture RM600 version
4473 #on SINIX-P 5.42 A10 with gcc but should work for SINIX 5.42 on any other
4474 #architecture with gcc.
4475 sinix542g:
4476         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4477         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4478         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4479         -DSNI542 -DNOGETUSERSHELL $(KFLAGS)" \
4480         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4481         "LNKFLAGS = -s"
4482
4483 #SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for Intel.
4484 # (Note: SNI discontinued Intel support after 5.42.)
4485 sinix542i:
4486         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX-Z V5.42...'
4487         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4488         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DFNFLOAT -DSTERMIOX \
4489         -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV -kansi \
4490         -DSNI542 $(KFLAGS)" \
4491         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4492         "LNKFLAGS = -s"
4493
4494 #Siemens Nixdorf Reliant UNIX V5.43 - includes curses, tcp/ip, everything:
4495 # . gettimeofday() suddenly has only one arg instead of two (GTODONEARG).
4496 # . The syntax of the Olimit specifier changed.
4497 # . The name was changed from SINIX to Reliant UNIX in version 5.43C.
4498 sni543:
4499         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.43'
4500         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4501         "CFLAGS = -DSINIX -DSNI543 -DSVR4 -DDIRENT -DHDBUUCP \
4502         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4503         -DNO_DNS_SRV -kansi -W0 -O -F Olimit,3100 $(KFLAGS)" \
4504         "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4505
4506 #Siemens Nixdorf Reliant UNIX V5.44 - Like 5.43 but with different banner.
4507 sni544:
4508         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.44'
4509         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4510         "CFLAGS = -DSINIX -DSNI544 -DSVR4 -DDIRENT -DHDBUUCP \
4511         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4512         -DNO_DNS_SRV -kansi -W0 -O -K Olimit,3100 $(KFLAGS)" \
4513         "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4514
4515 #Commodore Amiga with AT&T UNIX System V R4 and TCP/IP support.
4516 #Has <sys/termiox.h>.
4517 svr4amiganet:
4518         @echo 'Making C-Kermit $(CKVER) for Amiga SVR4 + TCP/IP...'
4519         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4520         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX \
4521         -DTCPSOCKET -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4522         "LIBS = -lsocket -lnsl -ltermlib"
4523
4524 #SCO (Novell (Univel)) UnixWare 1.x or 2.0, no TCP/IP.
4525 #This assumes the Novell SDK 1.0, which has <sys/termiox.h>.
4526 #UnixWare users with the "Prime Time Freeware" CD-ROM SDK will probably have
4527 #to use the sys5r4 entry (no termiox.h file, so no hardware flow control).
4528 #Change -DSELECT to -DCK_POLL if -DSELECT causes problems.
4529 # NOTE: Unixware 1.x builds have not been tried in C-Kermit 7.0.
4530 unixware:
4531         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4532         "KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4533         -DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt"
4534
4535 #UnixWare 1.x or 2.0 with TCP/IP and curses.
4536 #fork()-based CONNECT - no high serial speeds.
4537 unixwarenetc:
4538         $(MAKE) "MAKE=$(MAKE)" sys5r4sxtcpc KTARGET=$${KTARGET:-$(@)} \
4539         "KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4540         -DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt -lresolv"
4541
4542 uw10:
4543         $(MAKE) unixwarenetc KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4544
4545 #This is for Unixware 2.0.x only - use unixware21 for UW 2.1.x.
4546 #Has special library search and enables special kludge around library
4547 #foulup regarding vfork() (which Kermit doesn't use).  Forces POSIX-style
4548 #hangup.
4549 unixware20:
4550         @echo 'Making C-Kermit $(CKVER) for UnixWare 2.0.x...'
4551         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4552         "CFLAGS = -O -DOLD_UNIXWARE -DUNIXWARE2 -DSELECT -DSVR4 -DDIRENT \
4553         -DHDBUUCP -DBIGBUFOK -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES \
4554         -DTCPSOCKET -DUW200 -DFNFLOAT -DCK_NEWTERM -DNOSYSLOG $(KFLAGS)" \
4555         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lgen -lm -lresolv" \
4556         "LNKFLAGS = -s"
4557
4558 uw20:
4559         $(MAKE) unixware20 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4560
4561 #Adds big buffers ("large memory model") - otherwise the same as UnixWare 1.x.
4562 unixware21:
4563         @echo 'Making C-Kermit $(CKVER) for UnixWare 2.1.x...'
4564         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4565         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4566         -DNOSYSLOG -DSTERMIOX  -DCK_CURSES -DTCPSOCKET \
4567         -DCK_NEWTERM -DFNFLOAT -DUNIXWARE2 $(KFLAGS)" \
4568         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4569         $(LIBS)" "LNKFLAGS = -s"
4570
4571 #Unixware 2.1.0
4572 uw21:
4573         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4574
4575 #Unixware 2.1.3
4576 uw213:
4577         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4578         "KFLAGS=-DUSE_FILE__CNT $(KFLAGS)"
4579
4580 #Unixware 2.1 with IKSD support
4581 uw21iksd:
4582         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4583         "KFLAGS=-DCK_SHADOW $(KFLAGS)" "LIBS= -lgen"
4584
4585 #UnixWare 7 with tc[gs]etspeed() high serial speeds & select()-based CONNECT
4586 #and as of C-Kermit 8.0.212, large file support (LFS).
4587 #NOTE: This is the one we use.
4588 unixware7t:
4589         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4590         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4591         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4592         -DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4593         -DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4594         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNEEDMDMDEFS $(KFLAGS)" \
4595         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4596         "LNKFLAGS = -s"
4597
4598 #UnixWare 7 - select()-based CONNECT - no POSIX i/o - no high serial speeds.
4599 #In other words, just like the UnixWare 1 and 2 builds.
4600 unixware7x:
4601         @echo 'Making C-Kermit $(CKVER) for UnixWare 7...'
4602         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4603         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4604         -DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4605         -DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4606         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4607         "LNKFLAGS = -s"
4608
4609 #UnixWare 7 with POSIX cfset[oi]speed() to allow high serial speeds.
4610 #(but the high speeds don't work)
4611 unixware7p:
4612         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4613         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4614         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4615         -DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4616         -DFNFLOAT -DCK_NEWTERM -DNOLSTAT $(KFLAGS)" \
4617         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4618         "LNKFLAGS = -s"
4619
4620 # UnixWare 7 built with gcc - This does not work at all...
4621 # Reportedly gcc 2.8.1 is broken on Unixware 7.  Try egcs?
4622 unixware7g:
4623         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with gcc...'
4624         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4625         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
4626         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4627         -DUW7 -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4628         -DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4629         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4630         "LNKFLAGS = -s"
4631
4632 unixware7:
4633         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4634         KTARGET=$${KTARGET:-$(@)}
4635
4636 uw7:
4637         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4638         KTARGET=$${KTARGET:-$(@)}
4639
4640 #SCO OpenUNIX 8.0
4641 ou8:
4642         @echo 'Making C-Kermit $(CKVER) for Open UNIX 8...'
4643         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DOU8 $(KFLAGS)" unixware7t \
4644         KTARGET=$${KTARGET:-$(@)}
4645
4646 #UnixWare 7 with OpenSSL
4647 uw7ssl uw7+ssl:
4648         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 and OpenSSL...'
4649         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4650         "CFLAGS = -O -DCK_AUTHENTICATION -DCK_SSL -DCK_SHADOW \
4651         -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4652         -DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4653         -DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4654         $(SSLINC) $(KFLAGS)" \
4655         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4656         -lgen -lcudk70 $(SSLLIB) -lssl -lcrypto $(LIBS)" \
4657         "LNKFLAGS = -s"
4658
4659 #As above but includes Shadow password support needed for IKSD.
4660 uw7iksd:
4661         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4662         KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen" unixware7t
4663
4664 #As above but links with static API for realpath() so a binary built
4665 #with this target on UW7.1 will also work on 7.0.  Requires SCO UDK
4666 #rather than the stock compiler.
4667 uw7iksdudk:
4668         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4669         KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen -lcudk70" unixware7t
4670
4671 #ESIX SVR4.0.3 or 4.04 with TCP/IP support.
4672 #Has <sys/termiox.h>, ANSI C function prototyping disabled.
4673 #Add -m486 to CFLAGS if desired.
4674 esixr4:
4675         @echo 'Making C-Kermit $(CKVER) for ESIX SVR4 + TCP/IP...'
4676         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4677         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOANSI \
4678         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s" \
4679         "LIBS = -lsocket -lnsl"
4680
4681 #AT&T UNIX System V R4.
4682 #Has <sys/termiox.h>, Wollongong WIN/TCP TCP/IP.
4683 sys5r4sxnet:
4684         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4685         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4686         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4687         -DSTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4688
4689 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>.
4690 sys5r4nx:
4691         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4692         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4693         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS)" \
4694         "LNKFLAGS = -s"
4695
4696 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, curses, TCP/IP.
4697 sys5r4nxnetc:
4698         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4699         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4700         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4701         -DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4702         "LIBS = -lcurses -lsocket -lnsl -ltcpip" \
4703         "LNKFLAGS = -s"
4704
4705 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, Wollongong TCP/IP.
4706 sys5r4nxtwg:
4707         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4708         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4709         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DWOLLONGONG $(KFLAGS)"
4710         "LNKFLAGS = -s"
4711
4712 #ICL UNIX System V R4.(DRS N/X) version :-
4713 #UNIX System V Release 4.0 ICL DRS 6000 (SPARC)
4714 #DRS/NX 6000 SVR4 Version 5  Level 1  Increment 4
4715 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4716 #are not misplaced in sys (rather than netinet and arpa, respectively).
4717 #Uses ANSI C constructs, advisory file locking on devices, etc.
4718 #Remove -lnsl if it causes trouble.
4719 iclsys5r4:
4720         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 (DRS N/X)'
4721         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4722         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4723         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4724         "LIBS= -lsocket -lnsl -lresolv " "LNKFLAGS = -s"
4725
4726 #As above but for DRS/NX 4.2MP 7MPlus.
4727 iclsys5r4m+:
4728         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4729         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4730         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOIKSD \
4731         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4732         "LIBS= -lsocket -lnsl -lm -lc -g -lgen " "LNKFLAGS = -s"
4733
4734 #As above but for DRS/NX 4.2MP 7MPlus with IKSD support.
4735 iclsys5r4m+iksd:
4736         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4737         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4738         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4739         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4740         "LIBS= -lsocket -lnsl -lm -lc -g -lgen -lresolv " "LNKFLAGS = -s"
4741
4742 iclsys5r4_486:
4743         $(MAKE) "MAKE=$(MAKE)" iclsys5r4 KTARGET=$${KTARGET:-$(@)}
4744
4745 #Data General DG/UX 4.30 (System V R3) for DG AViiON, with TCP/IP support.
4746 dgux430:
4747         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4748         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4749         "CFLAGS = -O -DDGUX430 -DSVR3 -DDIRENT -DTCPSOCKET \
4750         -DNOINADDRX -DNOGETUSERSHELL $(KFLAGS)"
4751
4752 #Data General DG/UX 4.30 for DG AViiON, with TCP/IP support with BSDisms.
4753 dgux430bsd:
4754         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4755         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4756         "CFLAGS = -O -DDGUX430 -D_BSD_SOURCE -DBSD4 \
4757         -DNOINADDRX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)"
4758
4759 #Data General DG/UX 5.4 (System V R4) for DG AViiON, with TCP/IP support.
4760 #Add -lsocket -lnsl if inet_addr comes up missing...
4761 #Hmmm - I really think CK_POLL can be removed from this one in which case
4762 #there is no difference between dgux540 and dgux540i.
4763 dgux540:
4764         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4765         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4766         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4767         -DSTERMIOX -DTCPSOCKET -DCK_POLL -DNOGETUSERSHELL $(KFLAGS)"
4768
4769 #Data General DG/UX 5.40 (System V R4) for Intel AViiON, with TCP/IP support.
4770 dgux540i:
4771         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4772         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4773         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4774         -DSTERMIOX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)" \
4775         "LIBS = -lsocket -lnsl"
4776
4777 dgux54:
4778         make dgux540 KTARGET=$${KTARGET:-$(@)}
4779
4780 #Data General DG/UX 5.4 (= System V R4) for DG AViiON, with TCP/IP support.
4781 # And curses.
4782 dgux540c:
4783         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4...'
4784         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4785         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4786         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4787         $(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4788
4789 #As above but for Intel - only difference is name library names.
4790 dgux540ic:
4791         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4792         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4793         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4794         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4795         $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4796
4797 dgux54c:
4798         make dgux540c KTARGET=$${KTARGET:-$(@)}
4799
4800 #DG/UX 5.4R3.10
4801 dgux54310:
4802         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4R3...'
4803         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4804         "CFLAGS = -DDGUX540 -DDGUX54310 -DDIRENT -DHDBUUCP -DSELECT \
4805         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4806         -DNOINADDRX $(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4807
4808 #DG/UX 5.4R4.10 - Includes everything.
4809 dgux54410:
4810         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.10...'
4811         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4812         "CFLAGS = -O -DDGUX540 -DDGUX54410 -DDIRENT -DHDBUUCP -DSELECT \
4813         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4814         -DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4815
4816 #DG/UX 5.4R4.11 - Includes everything.
4817 dgux54411:
4818         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.11...'
4819         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4820         "CFLAGS = -O -DDGUX540 -DDGUX54411 -DDIRENT -DHDBUUCP -DSELECT \
4821         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4822         -DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4823
4824 #DG/UX 5.4R4.20 - Includes everything.
4825 dgux54420:
4826         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.20...'
4827         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4828         "CFLAGS = -O -DDGUX540 -DDGUX54420 -DDIRENT -DHDBUUCP -DSELECT \
4829         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4830         -DNOINADDRX $(KFLAGS)" \
4831         "LIBS = -lsocket -lresolv -lnsl -lcurses -ltermcap"
4832
4833 #Silicon Graphics System V R3 with BSD file system (IRIS)
4834 iris:
4835         @echo Making C-Kermit $(CKVER) for Silicon Graphics IRIX pre-3.3...
4836         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4837         "CFLAGS = -O -DSVR3 -DLONGFN -DNOLEARN $(KFLAGS) -I/usr/include/bsd" \
4838         "LIBS = -lbsd"
4839
4840 #Silicon Graphics IRIS System V R3
4841 irix33:
4842         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 3.3...'
4843         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4844         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4845         "LNKFLAGS = -s"
4846
4847 #Silicon Graphics Iris Indigo with IRIX 4.0.0 or 5.0...
4848 #Strict ANSI C compilation, TCP/IP support included
4849 irix40:
4850         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4851         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4852         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4853         -DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O -Olimit 1600 -I/usr/include/bsd" \
4854         "LNKFLAGS = -s"
4855
4856 #As above, but with fullscreen display (curses) and Sun Yellow Pages support.
4857 #NOTE: IRIX versions prior to 5 run COFF binaries.
4858 irix40ypc:
4859         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0.'
4860         @echo 'Includes fullscreen file display and Sun Yellow Pages...'
4861         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4862         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES \
4863         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET $(KFLAGS) \
4864         -O -Olimit 1600 -I/usr/include/bsd" \
4865         "LIBS = -lcurses -lsun" "LNKFLAGS = -s"
4866
4867 # Silicon Graphics Iris Series 4D/*, IRIX 4.0.x, -O4 ucode optimized.
4868 # Huge temporary file space needed for ucode optimizer.  If you get an error
4869 # like "ugen: internal error writing to /tmp/ctmca08777: Error 0", define the
4870 # the TMPDIR environment variable to point to a file system that has more
4871 # space available, e.g. "setenv TMPDIR /usr/tmp".
4872 irix40u:
4873         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4874         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4875         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4876         -DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4877         "LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u"
4878
4879 # As above, with Curses Support added
4880 irix40uc:
4881         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4882         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4883         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4884         -DCK_ANSIC -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4885         "LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u" "LIBS= -lcurses -ltermcap"
4886
4887 #Silicon Graphics IRIX 5.x.
4888 #Yellow Pages and Curses support included.
4889 #IRIX version 5.x can run COFF or ELF binaries.
4890 irix51:
4891         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 5.x'
4892         @echo 'Includes fullscreen file display and Yellow Pages...'
4893         @echo 'Add -mips<n> to CFLAGS specify a particular hardware target.'
4894         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4895         "CFLAGS = -DIRIX51 -DSVR4 -DDIRENT -DHDBUUCP -DCK_CURSES -DCK_NEWTERM \
4896         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET -DSELECT -DNOGETUSERSHELL \
4897         -DSYSTIMEH -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) -ansi -O -Olimit 3000" \
4898         "LIBS = -lcurses" "LNKFLAGS = -s"
4899
4900 #Use this one if irix51 blows up due to lack of swap space or whatever.
4901 irix51x:
4902         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 5.x'
4903         @echo 'Includes fullscreen file display and Yellow Pages...'
4904         @echo 'Add -mips<n> to CFLAGS specify a particular hardware target.'
4905         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4906         "CFLAGS = -DIRIX51 -DSVR4 -DDIRENT -DHDBUUCP -DCK_CURSES -DCK_NEWTERM \
4907         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET -DSELECT -DNOGETUSERSHELL \
4908         -DSYSTIMEH -DDCLPOPEN -DDCLFDOPEN $(KFLAGS)" \
4909         "LIBS = -lcurses" "LNKFLAGS = -s"
4910
4911 irix51ypc:
4912         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4913         "KFLAGS= $(KFLAGS)"
4914
4915 #IRIX 5.2 adds RTS/CTS
4916 irix52:
4917         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4918         "KFLAGS=-DIRIX52 -DCK_RTSCTS $(KFLAGS)"
4919
4920 irix53:
4921         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4922         "KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4923
4924 irix53x:
4925         $(MAKE) "MAKE=$(MAKE)" irix51x KTARGET=$${KTARGET:-$(@)} \
4926         "KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4927
4928 #Silicon Graphics IRIX 6.[024] common stuff.
4929 #Yellow Pages and Curses support included.
4930 #IRIX version 6.0 and later runs only ELF binaries.
4931 #Depends on code changes in ckcdeb.h that make -DIRIX6x define all
4932 #lower IRIX6x values and IRIX51.
4933 irix6x:
4934         @echo 'Includes fullscreen file display and Yellow Pages...'
4935         @echo 'Add -mips<n> to specify a particular hardware target.'
4936         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4937         "CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4938         -DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET \
4939         -DSELECT -DCK_RTSCTS -O $(KFLAGS)" \
4940         "LIBS = -lcurses" "LNKFLAGS = -s $(LNKFLAGS)"
4941
4942 #Silicon Graphics IRIX 6.0.
4943 irix60:
4944         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.0'
4945         @$(MAKE) "MAKE=$(MAKE)" \
4946         "KFLAGS=-DIRIX60 -Olimit 2138 $(KFLAGS)" \
4947         irix6x KTARGET=$${KTARGET:-$(@)}
4948
4949 #Silicon Graphics IRIX 6.2.
4950 #Serial speeds > 38400 are available in IRIX 6.2 on O-class machines only.
4951 #Note: Olimit must be a number > 0.
4952 irix62:
4953         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.2'
4954         @$(MAKE) "MAKE=$(MAKE)" \
4955         LNKFLAGS="-Wl,-woff,84" \
4956         "KFLAGS=-DIRIX62 -Olimit 4700 $(KFLAGS)" \
4957         irix6x KTARGET=$${KTARGET:-$(@)}
4958
4959 #Silicon Graphics IRIX 6.3.
4960 irix63:
4961         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.3'
4962         @$(MAKE) "MAKE=$(MAKE)" irix62 KTARGET=$${KTARGET:-$(@)} \
4963         "KFLAGS=-DIRIX63"
4964
4965 #Silicon Graphics IRIX 6.4.
4966 # -woff,84 to linker stops complaints about no symbols loaded from
4967 # curses, and -woff 1110 stops complaints about unreachable "break;"
4968 # statements in ckcpro.c among others.
4969 # tested on SGI Octane, running IRIX 6.4 up to 115200 bps.
4970 # -Olimit 0 means infinite.
4971 irix64:
4972         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4'
4973         @$(MAKE) "MAKE=$(MAKE)" \
4974         LNKFLAGS="-Wl,-woff,84" \
4975         "KFLAGS=-DIRIX64 -DCK_RTSCTS -Olimit 3000 -woff 1110 $(KFLAGS)" \
4976         irix6x KTARGET=$${KTARGET:-$(@)}
4977
4978 irix64gcc:
4979         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4 gcc'
4980         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
4981         "CFLAGS= -DSVR4 -DIRIX64 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4982         -DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
4983         -DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
4984         $(KFLAGS) -O" "LIBS= -lcurses -ltermcap -lcrypt"
4985
4986 #Note the new Optimization option syntax for MIPSpro CC 7.2.1.2m.
4987 #See note on irix65gcc target about Large File Support (LFS).
4988 irix65:
4989         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
4990         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
4991         "KFLAGS=-DIRIX65 -D_LARGEFILE_SOURCE -DCK_RTSCTS -OPT:Olimit=0 \
4992         -woff 1110,1552,1174 $(KFLAGS)" \
4993         irix6x KTARGET=$${KTARGET:-$(@)}
4994
4995 #Build for those that have GCC instead of MIPSpro.
4996 #
4997 # Large File Support note: use the define _LARGEFILE_SOURCE to enable support
4998 # for files larger than 2GB.  This may work on releases of Irix prior to
4999 # 6.5.xx.  To verify, check the man page for fstat and verify that off_t is a
5000 # 64 bit value for an -n32 build.  Also check the manpage for fseek and ftell
5001 # to verify that the fseek64 and ftell64 functions are provided.  If so, then
5002 # LFS support should work and you can try adding -D_LARGEFILE_SOURCE to CFLAGS
5003 # for your selected Irix target.
5004 #
5005 irix65gcc:
5006         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 with gcc'
5007         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5008         "CC = gcc" "CC2 = gcc" \
5009         "CFLAGS= -DSVR4 -DIRIX65 -D_LARGEFILE_SOURCE -DDIRENT -DHDBUUCP \
5010         -DNOGETUSERSHELL -DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
5011         -DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
5012         $(KFLAGS) -O" "LIBS= -lcurses"
5013
5014 # The 64-bit IRIX target works but presumably is no longer needed given the
5015 # large file support in the more portable and compact 32-bit version.
5016 irix65_64:
5017         @echo 'Making C-Kermit $(CKVER) 64-bit for SGI IRIX 6.5'
5018         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
5019         "KFLAGS=-DIRIX65 -64 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5020         -DCK_64BIT $(KFLAGS)" \
5021         irix6x KTARGET=$${KTARGET:-$(@)}
5022
5023 #Dumb down to MIPS-2 if building on R5000 or higher...
5024 irix65mips2:
5025         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 MIPS-2'
5026         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-o32 -mips2 -Wl,-woff,84" \
5027         "KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -o32 -mips2 \
5028         -woff 1110,1552,1174 $(KFLAGS)" \
5029         irix6x KTARGET=$${KTARGET:-$(@)}
5030
5031 #Special target that adds srp, ssl, and zlib support.  This requires
5032 #that you have pkgsrc installed instead of Irix Freeware.  See
5033 #NetBSD.org for pkgsrc for Irix.  You will need to BUILD the srp_client
5034 #package yourself.  Install it manually using the directions found
5035 #in the netbsds+ssl+srp+zlib target comments.
5036 irix65+ssl+srp+zlib:
5037         @echo 'Making C-Kermit $(CKVER) for IRIX 6.5 with gcc and SSL SRP ZLIB'
5038         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5039         "CC = gcc" "CC2 = gcc" \
5040         "CFLAGS= -DIRIX65 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL -DSELECT \
5041         -DTCPSOCKET -DNOCOTFMC -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC \
5042         -I/usr/pkg/include -DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 \
5043         -DCK_RTSCTS -DCK_NCURSES -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DCK_SSL \
5044         -DLIBDES -DZLIB -DFNFLOAT -I/usr/pkg/include/openssl $(KFLAGS) -O" \
5045         "LIBS= -L/usr/pkg/lib -rpath /usr/pkg/lib -lncurses -lsrp -lgmp -ldes \
5046         -lssl -lkrypto -lcrypto -lcrypt -lz -lm"
5047
5048 irix6x+krb5:
5049         @echo 'Includes fullscreen file display and Yellow Pages...'
5050         @echo 'Add -mips<n> to specify a particular hardware target.'
5051         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5052         "CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
5053         -DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET\
5054         -DSELECT -DCK_RTSCTS -O \
5055         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DCK_ENCRYPTION -DCK_DES \
5056         $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
5057         "LIBS = -lcurses $(K5LIB) -ldes425 -lkrb5 \
5058         -lcom_err -lcrypto -lcrypt -lgssapi_krb5" \
5059         "LNKFLAGS = -s $(LNKFLAGS)"
5060
5061 irix65+krb5:
5062         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
5063         @$(MAKE) "MAKE=$(MAKE)" \
5064         LNKFLAGS="-Wl,-woff,84" \
5065         "KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5066         $(KFLAGS)" \
5067         irix6x+krb5 KTARGET=$${KTARGET:-$(@)}
5068
5069 #In case they type "make sys5"...
5070 sys5:
5071         $(MAKE) "MAKE=$(MAKE)" sys3 KTARGET=$${KTARGET:-$(@)}
5072
5073 #Generic ATT System III or System V (with I&D space)
5074 sys3:
5075         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5076         @echo 'or System V R2 or earlier...'
5077         @echo 'add -DNOMKDIR if mkdir is an undefined symbol.'
5078         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5079         "CFLAGS = -DATTSV -DNOUNICODE -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL \
5080         -DNOINITGROUPS -DNOFTRUNCATE -DNOREALPATH -DNOLEARN $(KFLAGS) -i -O" \
5081         "LNKFLAGS = -i"
5082
5083 #Generic ATT System III or System V (no I&D space)
5084 sys3nid:
5085         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5086         @echo 'or System V R2 or earlier, no I&D space...'
5087         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5088         "CFLAGS = -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOSYMLINK \
5089         -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE -DNOLEARN $(KFLAGS) -O" \
5090         "LNKFLAGS ="
5091
5092 #Generic ATT System III or System V R2 or earlier, "no void":
5093 #special entry to remove "Illegal pointer combination" warnings.
5094 sys3nv:
5095         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5096         @echo 'or System V R2 or earlier...'
5097         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5098         "CFLAGS= -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOGETUSERSHELL \
5099         -DNOSYMLINK -DNOFTRUNCATE -DNOINITGROUPS -DNOLEARN \
5100         -Dvoid=int $(KFLAGS) -i -O" \
5101         "LNKFLAGS = -i"
5102
5103 # AT&T 7300 UNIX PC.  As of C-Kermit 6.1, many of these entries don't work
5104 # any more due to "Out of memory" or "Too many defines" errors during
5105 # compilation, at least not on systems without lots of memory.  The sys3upcgc
5106 # entry works (using gcc) with optimization removed, and might also work
5107 # with optimization enabled on machines with larger memories.
5108
5109 #AT&T 7300/UNIX PC (3B1) systems, sys3 but special handling for internal modem.
5110 #Link with the shared library -- the conflict with openi in shared library
5111 #is solved with -Dopeni=xopeni.  Note that the xermit target can't be used
5112 #for the Unix PC; there is no select().
5113 sys3upc:
5114         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5115         @echo 'If shared lib causes trouble, use make sys3upcold.'
5116         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5117         "CFLAGS = -O -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOREALPATH -DNOLEARN \
5118         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5119         -DNOREDIRECT -DNOGFTIMER -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5120         "CC2 = ld /lib/crt0s.o /lib/shlib.ifile" "LNKFLAGS = -s"
5121
5122 #AT&T 7300/Unix PC systems, minimum kermit for those with smaller amounts
5123 #of memory.
5124 sys3upcm:
5125         @echo Minimum interactive
5126         $(MAKE) "MAKE=$(MAKE)" sys3upc KTARGET=$${KTARGET:-$(@)} \
5127         "KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5128         -DNOSYSLOG -DNOSETKEY -DNOREALPATH"
5129
5130 #AT&T 7300/UNIX PC (3B1) systems, with curses support.
5131 #Curses and the shared library don't get along, so we don't use the
5132 #shared library.  We need to include CK_NEWTERM to avoid a conflict
5133 #with curses and buffering on stdout.  Merged with submission by
5134 #Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu.
5135 #We don't need -Dopeni=xopeni since we're not using the shared library,
5136 #but we keep it to be consistent with the other entries.
5137 sys3upcc:
5138         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5139         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5140         "CFLAGS = -O -DATT7300 -DNOREALPATH \
5141         -DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DNOLEARN \
5142         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5143         -DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5144         "LIBS = -lcurses" "LNKFLAGS = -s"
5145
5146 #Like sys3upcc but for AT&T UNIX 3.51m (released as a patch on Fix Disk 2),
5147 #adds hardware flow control.
5148 att351m:
5149         $(MAKE) "MAKE=$(MAKE)" sys3upcc KTARGET=$${KTARGET:-$(@)} \
5150         "KFLAGS=-DCK_RTSCTS -DUNIX351M"
5151
5152 #As above but with gcc.
5153 att351gm:
5154         $(MAKE) "MAKE=$(MAKE)" sys3upcgc KTARGET=$${KTARGET:-$(@)} \
5155         "KFLAGS=-DCK_RTSCTS -DUNIX351M"
5156
5157 #AT&T 7300 UNIX PC (3B1), as above, but no newterm().
5158 sys3upcx:
5159         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5160         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5161         "CFLAGS = -O -DATT7300 -DNOREALPATH -DNOUNICODE -DNOLEARN \
5162         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5163         -DCK_CURSES -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DUSE_MEMCPY $(KFLAGS) \
5164         -Dopeni=xopeni" "LIBS = -lcurses -ltermcap" "LNKFLAGS = -s"
5165
5166 #AT&T 7300/UNIX PC (3B1) systems, with curses and shared library support.
5167 sys3upcshcc:
5168         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5169         @echo 'With curses.  Requires shcc.'
5170         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5171         "CFLAGS = -O -DATT7300 -DNOMKDIR -DNOREALPATH -DNOLEARN \
5172         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5173         -DCK_NEWTERM -DCK_CURSES  -DNOREDIRECT -DNOGFTIMER \
5174         -DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5175         "LNKFLAGS = -i -s" "CC = shcc" "CC2 = shcc" "LIBS = -lcurses"
5176
5177 #AT&T 7300/UNIX PC (3B1) systems, as above, no curses, but use gcc.
5178 sys3upcg:
5179         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5180         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5181         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5182         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5183         -DNOGFTIMER -DNOMKDIR -DNOREALPATH $(KFLAGS) -Dopeni=xopeni" \
5184         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
5185
5186 #AT&T 7300/UNIX PC (3B1) systems, curses and gcc.
5187 #Optimization omitted -- add it back in if your machine has lots of memory.
5188 sys3upcgc:
5189         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5190         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5191         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOGFTIMER -DNOUNICODE \
5192         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5193         -DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREALPATH -DNOLEARN $(KFLAGS)" \
5194         "CC = gcc" "CC2 = gcc" "LIBS = -lcurses" "LNKFLAGS = -s"
5195
5196 #AT&T 7300/UNIX PC (3B1) systems, special handling for internal modem.
5197 #No FULLSCREEN file transfer display (curses).
5198 sys3upcold:
5199         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5200         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5201         "CFLAGS = -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5202         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5203         -DNOGFTIMER -DNOREDIRECT -DNOREALPATH $(KFLAGS) -O" "LNKFLAGS = -i"
5204
5205 #As above, but with gcc. mininum features - fits on a 400K UNIX PC floppy
5206 #after compression with room to spare; add -DNOSHOW or other -DNOxxxx items
5207 #to reduce size even further.
5208 sys3upcgm:
5209         @echo Minimum interactive
5210         $(MAKE) "MAKE=$(MAKE)" sys3upcg KTARGET=$${KTARGET:-$(@)} \
5211         "KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5212         -DNOSETKEY $(KFLAGS)"
5213
5214 #This target is designed to create a version with the most features possible
5215 #that, after compression, still fits on a 400K UNIX PC floppy.
5216 sys3upcgfd:
5217         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC floppy...'
5218         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5219         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOSPL -DNOLEARN \
5220         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5221         -DNOGFTIMER -DNOREALPATH -Dopeni=xopeni \
5222         -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5223         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5224
5225 #AT&T 6300 PLUS (warning, -O might make it run out of space).
5226 #NOTE: Remove -DHDBUUCP if not using Honey DanBer UUCP.
5227 att6300:
5228         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5229         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5230         "CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOREALPATH -DNOLEARN \
5231         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5232         -DNOUNICODE $(KFLAGS) -O -Ml -i" "LNKFLAGS = -i -Ml"
5233
5234 #As above, but with curses support.  Debugging disabled to prevent thrashing.
5235 att6300c:
5236         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5237         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5238         "CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOCSETS -DNOREALPATH \
5239         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5240         -DCK_CURSES -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) -O -Ml -i" \
5241         "LNKFLAGS = -i -Ml" "LIBS = -lcurses"
5242
5243 #AT&T 6300 PLUS with no curses, no debugging (about 34K smaller)
5244 # -Optimization saves about 20K too.
5245 att6300nd:
5246         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS, no debugging...'
5247         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5248         "CFLAGS = -DATT6300 -DHDBUUCP -DNODEBUG -DNOFILEH -DNOREALPATH \
5249         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5250         -DNOUNICODE -DNOLEARN $(KFLAGS) -O -i -Ml" "LNKFLAGS = -i -Ml"
5251
5252 #AT&T 3B2 and maybe 3B20-series computers running AT&T UNIX System V R3.
5253 #This one was actually used to build C-Kermit 7.0 successfully on a 3B2/300.
5254 att3b2:
5255         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2'
5256         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5257         "CFLAGS = -DATTSV -DNOREDIRECT -DUSE_MEMCPY \
5258         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5259         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5260         -DNOGFTIMER -DNOREALPATH -Dopeni=xopeni -DNOFRILLS -DNOLEARN \
5261         -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5262         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5263
5264 # The next two are likely not to work as-is.
5265
5266 #AT&T 3B2, 3B20-series computers running AT&T UNIX System V.
5267 #This is just generic System V with Honey DanBer UUCP, so refer to sys3hdb.
5268 #Remove -DNONAWS if you can get away with it.
5269 att3bx:
5270         $(MAKE) "MAKE=$(MAKE)" sys3hdb KTARGET=$${KTARGET:-$(@)} \
5271         "KFLAGS=$(KFLAGS) -DNONAWS -DNOTIMEVAL"
5272
5273 # 3Bx with charsets (except Unicode) but no curses.
5274 att3bx1:
5275         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5276         @echo 'with Honey DanBer UUCP  no curses...'
5277         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5278         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5279         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5280         -DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5281         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5282         -DNOREALPATH -DNOUNICODE -i" \
5283         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s"
5284
5285 #AT&T 3B2, 3B20-series computers running AT&T UNIX System V,
5286 #with fullscreen file transfer display.
5287 att3bxc:
5288         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5289         @echo 'with Honey DanBer UUCP and curses...'
5290         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5291         "CFLAGS = -DATTSV -DHDBUUCP -DNONAWS -DNOTIMEVAL $(KFLAGS) \
5292         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5293         -DNOREALPATH -DCK_CURSES -DCK_NEWTERM -DNOUNICODE -DNOLEARN -i -O" \
5294         "LNKFLAGS = -i" "LIBS=-lcurses"
5295
5296 #3bx with curses but no charsets
5297 att3bxc3:
5298         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5299         @echo 'with Honey DanBer UUCP with curses...  no CSETS'
5300         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5301         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5302         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5303         -DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5304         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5305         -DNOREALPATH -DNOCSETS -DCK_CURSES -DCK_NEWTERM -i" \
5306         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s" "LIBS = -lcurses"
5307
5308 #Any System V R2 or earlier with Honey DanBer UUCP (same as above)
5309 sys3hdb:
5310         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5311         @echo 'or System V R2 or earlier with Honey DanBer UUCP...'
5312         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5313         "CFLAGS = -DATTSV -DHDBUUCP -DNOREALPATH -DNOUNICODE -DNOLEARN \
5314         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5315         $(KFLAGS) -i -O" "LNKFLAGS = -i"
5316
5317 #Sperry/UNISYS 5000 UTS V 5.2 (System V R2), Honey DanBer UUCP
5318 unisys5r2:
5319         @echo 'Making C-Kermit $(CKVER) for Sperry/UNISYS 5000 UTS V 5.2...'
5320         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5321         "CFLAGS = -DATTSV -DUNISYS52 -DHDBUUCP -DNOREALPATH -DNOUNICODE \
5322         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5323         -DNOLEARN $(KFLAGS) -i -O" "LNKFLAGS = -i"
5324
5325 #In case they say "make sys5hdb" instead of "make sys3hdb"...
5326 sys5hdb:
5327         $(MAKE) "MAKE=$(MAKE)" sys3hdb
5328
5329 #Create the common header line for all hpux[5-11]* entries and above. This 
5330 #extra entry is here because our header message length may differ for each 
5331 #C-Kermit version. Don't use 'fold -s' for HP-UX 5.x - 7.x! This option is 
5332 #available only for HP-UX 8.0 and above!
5333 hpux-header:
5334         @HPUX=`uname -r | sed -e 's/^[^1-9]*//' -e 's/\.00$$/.0/'` ; \
5335         [ "$(MESSAGE0)" ] && MESSAGE1="$(MESSAGE0)" ; \
5336         Message0='Making C-Kermit $(CKVER) for HP9000 HP-UX' ; \
5337         Message1=$${MESSAGE1:='without any extra compiler optimization'} ; \
5338         MessageH="$$Message0 $$HPUX" ; \
5339         case $$HPUX in \
5340           [567].*) echo "$$MessageH\n$$Message1" ;; \
5341               *.*) echo "$$MessageH $${Message1}$(MESSAGE1A)" | fold -s ;; \
5342         esac | sed -e 's/^ //' -e 's/ *$$//'
5343
5344 # Peter E's updated HP-UX 5.xx entries Oct 2001.
5345
5346 #HP-9000 500 HP-UX 5.xx, no TCP/IP.
5347 # Last known successful build: C-Kermit 8.0.206 2002/20/27.
5348 hpux0500:
5349         @MESSAGE0="no TCP/IP and no compiler optimization";\
5350         MESSAGE0=$${MESSAGE1:-$$MESSAGE0} \
5351         $(MAKE) hpux-header
5352         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5353         "CFLAGS = -DHPUX -DHPUX5 -DHPUXPRE65 -DNOREDIRECT -DDCLGETCWD \
5354         -DNOGETUSERSHELL -DNOGFTIMER -DNOSYSLOG -DNOTOMACROS -DNOLSTAT \
5355         -DNOSYMLINK -DNOINITGROUPS -DNOUNICODE -DNOLEARN -DNOLONGLONG \
5356         $(KFLAGS)" "LIBS = $(LIBS)" "LNKFLAGS = "
5357
5358 #HP-9000 500 HP-UX 5.21 with Wollongong WIN/TCP 1.2 TCP/IP.
5359 #Requires /usr/wins/usr/include and /usr/lib/libnet.a from Wollongong.
5360 #Optimization skipped - takes forever.  Really.
5361 # WARNING: this doesn't work if a file called "hpux0500" is on the disk.
5362 # Last known successful build: C-Kermit 8.0.206 2002/20/27.
5363 hpux0500wintcp:
5364         @MESSAGE1="with WIN/TCP but without any extra compiler optimization" \
5365         $(MAKE) hpux0500 KTARGET=$${KTARGET:-$(@)} \
5366         "KFLAGS = -DTCPSOCKET -DHPUX5WINTCP -DINADDRX -DNO_DNS_SRV -DNOMHHOST \
5367         -DNOHADDRLIST -DNOLONGLONG -I/usr/wins/usr/include $(KFLAGS)" \
5368         "LIBS = /usr/lib/libnet.a"
5369
5370 #HP-UX 6.5, short filenames, no network and no curses support.
5371 #ckcpro, ckuusr, ckuus3 and others are broken out because they make the
5372 #optimizer run away.  Note that the XERMIT target does not work with HP-UX 6.5!
5373 #
5374 #If you get compiler warnings like:
5375 #'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5376 #other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5377 #switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5378 #needs 257 table entries (C-Kermit Version "9.0.299").
5379 #OK: 2010/03/26
5380 hpux0650:
5381         @$(MAKE) hpux-header
5382         @MESSAGE2=$${MESSAGE2:-'and NO network'}; \
5383         echo "supporting: NO long filenames $$MESSAGE2."
5384
5385         $(MAKE) KTARGET=$${KTARGET:-$(@)} \
5386                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
5387                 ckuusr.$(EXT) ckuxla.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5388         "CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5389         -DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5390         $(KFLAGS)"
5391
5392         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5393         "CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5394         -DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5395         $(KFLAGS) -Wc,-Nw260 $(OFLAGS)" "LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5396
5397 #Exactly as above, plus curses:
5398 #OK: 2009/10/06
5399 hpux0650c:
5400         @MESSAGE2="and NO network but with curses" \
5401         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5402         "KFLAGS = -DCK_CURSES $(KFLAGS)" \
5403         "LIBS = -lcurses"
5404
5405 #Exactly as above, plus curses + network:
5406 #OK: 2009/10/02
5407 hpux0650tcpc:
5408         @MESSAGE2="but with curses and with TCP/IP" \
5409         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5410         "KFLAGS=-DCK_CURSES -DTCPSOCKET -DNOHADDRLIST \
5411         -DINTSELECT -DNOCKGETFQHOST $(KFLAGS)" \
5412         "LIBS=-lcurses"
5413
5414 #Exactly as hpux0650 but with compiler optimization:
5415 #OK: 2009/10/06
5416 hpux0650o:
5417         @MESSAGE1="with compiler optimization" \
5418         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5419         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5420
5421 #Exactly as hpux0650c but with compiler optimization:
5422 #OK: 2009/10/06
5423 hpux0650oc:
5424         @MESSAGE1="with compiler optimization" \
5425         $(MAKE) hpux0650c KTARGET=$${KTARGET:-$(@)} \
5426         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5427
5428 #Exactly as hpux0650tcpc but with compiler optimization:
5429 #OK: 2009/10/06
5430 hpux0650otcpc:
5431         @MESSAGE1="with compiler optimization" \
5432         $(MAKE) hpux0650tcpc KTARGET=$${KTARGET:-$(@)} \
5433         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5434
5435 #Take this as startup entry for all 'non-optimized' files under HP-UX 7.x!
5436 #Make sure we don't call it with the '-O' option because this will blow up
5437 #the compiler!
5438 #OK: 2009/09/30
5439 hpux0700noopt:
5440         @case "$(CFLAGS)" in \
5441         *-O*) echo "Don't use CFLAGS= -O here!" ;; \
5442            *) $(MAKE) KTARGET=$${KTARGET:-$(@)} \
5443               ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
5444               ckuus6.$(EXT) ckuus7.$(EXT) ckuxla.$(EXT) \
5445               ckcuni.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5446               ;; \
5447         esac
5448
5449 #HP-UX 7.0, no long filenames, no network support, no curses.
5450 #If you get compiler warnings like:
5451 #'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5452 #other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5453 #switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5454 #needs 257 table entries (C-Kermit Version "9.0.299").
5455 #OK: 2010/10/26
5456 hpux0700sf:
5457         @$(MAKE) hpux-header
5458         @echo 'supporting: NO long filenames, NO network, NO curses.'
5459         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5460         "CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5461         -DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260"
5462
5463         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5464         "CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5465         -DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260 $(OFLAGS)" \
5466         "LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5467
5468 #Exactly as hpux0700sf but with compiler optimization:
5469 #OK: 2009/09/30
5470 hpux0700osf:
5471         @MESSAGE1="with compiler optimization" \
5472         $(MAKE) hpux0700sf KTARGET=$${KTARGET:-$(@)} \
5473         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5474
5475 #HP-UX 7.0, short filenames, but with tcp/ip and curses.
5476 #To use this, you must have bought the ARPA Services Product from HP, and you
5477 #must have /usr/lib/libBSD.a.
5478 #
5479 #If you get compiler warnings like:
5480 #'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5481 #other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5482 #symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5483 #needs 2031 table entries (C-Kermit Version "9.0.299").
5484 #OK: 2010/03/24
5485 hpux0700sftcpc:
5486         @$(MAKE) hpux-header
5487         @echo 'supporting: NO long filenames, \c'
5488         @echo 'but with networking, curses, HDB uucp...'
5489         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5490         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5491         -DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5492         -DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5493         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5494
5495         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5496         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5497         -DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5498         -DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5499         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5500         "LNKFLAGS = -s" "LIBS = -lm -lBSD -lcurses"
5501
5502 #Exactly as above but with compiler optimization:
5503 #OK: 2009/09/30
5504 hpux0700osftcpc:
5505         @MESSAGE1="with compiler optimization" \
5506         $(MAKE) hpux0700sftcpc KTARGET=$${KTARGET:-$(@)} \
5507         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5508
5509 #HP 9000 series 300/800 HP-UX 7.0, long filenames, network support, HDB uucp,
5510 #but NO curses. See comments in hpux0700sftcpc about TCP/IP support.
5511 #
5512 #If you get compiler warnings like:
5513 #'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5514 #other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5515 #symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5516 #needs 2031 table entries (C-Kermit Version "9.0.299").
5517 #OK: 2010/03/24
5518 hpux0700lfn:
5519         @$(MAKE) hpux-header
5520         @echo 'supporting: long filenames, networking, HDB uucp$(MESSAGE2)...'
5521         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5522         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5523         -DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5524         -DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5525         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5526
5527         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5528         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5529         -DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5530         -DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5531         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5532         "LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5533
5534 #Exactly as above + curses.
5535 #OK: 2009/09/30
5536 hpux0700lfnc:
5537         @MESSAGE2=', curses' \
5538         $(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5539         "KFLAGS = -DCK_CURSES $(KFLAGS)" \
5540         "LIBS = -lcurses"
5541
5542 #Exactly as above hpux0700lfn but with compiler optimization:
5543 #OK: 2009/09/30
5544 hpux0700olfn:
5545         @MESSAGE1="with compiler optimization" \
5546         $(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5547         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5548
5549 #Exactly as above hpux0700lfnc but with compiler optimization:
5550 #OK: 2009/09/30
5551 hpux0700olfnc:
5552         @MESSAGE1="with compiler optimization" \
5553         $(MAKE) hpux0700lfnc KTARGET=$${KTARGET:-$(@)} \
5554         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5555
5556 #HP 9000 Series 300 or 400, HP-UX 8.0, long filenames and TCP/IP support.
5557 #This one should also work on 700/800, but without PA-specific optimization.
5558 #In case -DCK_RTSCTS and -DCK_REDIR make trouble, remove them.
5559 #NOTE: ckcpro.c, ckuusr.c and ckuus3.c blow up the optimizer, so don't optimize
5560 #them.
5561 #For HP-UX 8.0 on Motorola CPUs, you might have to reinstall your kernel with
5562 #maxdsiz >= 0x03000000.  But if physical memory is small, that still will not
5563 #help much.
5564 #OK: 2009/10/01
5565 hpux0800:
5566         @$(MAKE) hpux-header
5567         @MESSAGE3=$${MESSAGE3:='TCP/IP'}; \
5568         echo "supporting: long filenames, $$MESSAGE3, HDB UUCP$(MESSAGE2)..."
5569         $(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
5570         ckcpro.$(EXT) ckuusr.$(EXT) ckuus3.$(EXT) \
5571         "CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5572         -DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5573         -DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5574         -DNOLONGLONG $(KFLAGS)"
5575
5576         $(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" xermit KTARGET=$${KTARGET:-$(@)} \
5577         "CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5578         -DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5579         -DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5580         -DNOLONGLONG -DNODCLENDUSERSHELL $(KFLAGS) $(OFLAGS)" \
5581         "LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5582
5583 #Exactly as above hpux0800 + curses.
5584 #OK: 2009/10/01
5585 hpux0800c:
5586         @MESSAGE2=', curses' \
5587         $(MAKE) hpux0800  KTARGET=$${KTARGET:-$(@)} \
5588         "KFLAGS = $(KFLAGS) -DCK_CURSES" "LIBS = -lcurses"
5589
5590 #HP 9000 HP-UX 8.0, no TCP/IP because /usr/lib/libBSD.a can't be found,
5591 #or TCP/IP header files missing.
5592 #OK: 2009/10/01
5593 hpux0800notcp:
5594         @MESSAGE3='NO network, NO curses' \
5595         $(MAKE) "MAKE=$(MAKE)" hpux0800 KTARGET=$${KTARGET:-$(@)} \
5596         "KFLAGS = $(KFLAGS) -UTCPSOCKET"
5597
5598 #Now the same as above hpux0800 but with compiler optimization
5599 #OK: 2009/10/01
5600 hpux0800o:
5601         @MESSAGE1="with compiler optimization" \
5602         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5603         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5604
5605 #Exactly as above hpux0800 + curses and with compiler optimization.
5606 #OK: 2009/10/01
5607 hpux0800oc:
5608         @MESSAGE1="with compiler optimization" \
5609         $(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5610         "KFLAGS = $(KFLAGS)" "OFLAGS = -O" "LIBS = -lcurses"
5611
5612 #Exactly as above hpux0800notcp but with compiler optimization
5613 #OK: 2009/10/01
5614 hpux0800onotcp:
5615         @MESSAGE1="with compiler optimization" \
5616         $(MAKE) "MAKE=$(MAKE)" hpux0800notcp KTARGET=$${KTARGET:-$(@)} \
5617         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5618
5619 #HP 9000 Series 700 or 800, HP-UX 8.0, long filenames and TCP/IP support.
5620 # Like the previous entries, but with PA-RISC-specific optimization.
5621 #OK: 2009/10/01
5622 hpux0800pa:
5623         @MESSAGE1="with PA-RISC-specific optimization" \
5624         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5625         "KFLAGS = $(KFLAGS) +Obb1100"
5626
5627 #As above, but with curses.
5628 #OK: 2009/10/01
5629 hpux0800pac:
5630         @MESSAGE1="with PA-RISC-specific optimization" \
5631         $(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5632         "KFLAGS = $(KFLAGS) +Obb1100"
5633
5634 #As above, but compiled with GCC 2.3.3.
5635 #OK: 2009/10/01
5636 hpux0800pagcc:
5637         @MESSAGE1='using the gcc compiler' \
5638         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5639         "CC=gcc" "CC2=gcc" "KFLAGS = -funsigned-char $(KFLAGS)"
5640
5641 #HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5642 #configured.  Use this entry with the restricted compiler: no optimization, no
5643 #ANSI support.  If you get unresolved sockets library references at link time,
5644 #then try adding -lBSD to LIBS, or else remove -DTCPSOCKET to build a version
5645 #without TCP/IP support.
5646 #
5647 #Please note that we have to add the compiler option +DA1.0/+DA1.1 to avoid
5648 #core-dumps for large arguments in IF MATCH. The man page says these options
5649 #are default but C-Kermit dumps core without them! Therefore keep them
5650 #untouched. If you want to overwrite or disable the +DA1.0/+DA1.1 option use
5651 #'make hpux0900 OFLAGS=...'. An other possibility would be to create a new
5652 #kernel with maxssiz >= 0x01185000 (default maxssiz=0x00800000).
5653 #OK: 2009/09/24
5654 hpux0900:
5655         @MESSAGE1A='. Read hpux0900 entry comments if you have trouble.' \
5656         $(MAKE) hpux-header
5657         @case `uname -m` in \
5658           */[34]*) KFLAGS='-DNOLONGLONG $(KFLAGS)' ;; \
5659           */7*)    AFLAGS='+DA1.1' ;; \
5660           */8*)    AFLAGS='+DA1.0' ;; \
5661         esac ; \
5662         OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5663         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5664         "CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT -DUTIMEH \
5665         -DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME -DCK_REDIR -DLONGFN \
5666         -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5667         -DNODCLENDUSERSHELL $$KFLAGS $$OFLAGS" \
5668         "LNKFLAGS = -s" "LIBS = -lm -lcurses" "CC=$(CC)" "CC2=$(CC2)"
5669
5670 #Like hpux0900, but for the "value-added" compiler on all HP 9000 models.
5671 #Adds optimization and ANSI compilation:
5672 # +O2 makes smaller executable (= -O = Level-1 and global optimization)
5673 # +O3 adds interprocedural global optimization, makes bigger executable.
5674 # Please note: To support long-long we would need compiler switch '-Ae' but
5675 # this one works only on Risc systems. But the equivalant compiler flags
5676 # '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5677 # If optimization fails on some modules, you can add:
5678 #  +Obb<n>, +Olimit <n>, or +Onolimit, depending on your cc version,
5679 # where <n> is a number, e.g. +Obb1200.  In other words, if you get optimizer
5680 # warnings, add (for example) +Obb1200; if you still get optimizer warnings,
5681 # increase the number.  Repeat until warnings go away.  If your compiler
5682 # permits it, use +Onolimit. If optimizer blows up on ckcpro.c, see next entry.
5683 # Reportedly, on some configurations, such as HP9000/425e or /340, perhaps
5684 # depending on the amount of main memory, this entry might fail no matter what
5685 # you do ("Out of Memory", "cc: Fatal error in /lib/c.c1", etc).  In that case
5686 # use "make hpux0900" (no "o").
5687 #OK: 2009/09/24
5688 hpux0900o:
5689         @MESSAGE1=$${MESSAGE1:-"with compiler optimization"} \
5690         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5691         "KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5692
5693 # For HP-UX 9.0 on Motorola CPUs, optimization of ckcpro.c tends to blow up
5694 # the compiler.  You might have to reinstall your kernel with maxdsiz >=
5695 # 0x03000000.  But if physical memory is small, that still will not help much.
5696 # In that case, use this entry to skip optimization of ckcpro.c.  But for
5697 # C-Kermit 8.0.208 you need a kernel with maxdsiz >= 0x02000000 to compile an
5698 # optimized ckcftp.c.
5699 # Please note: To support long-long we would need compiler switch '-Ae' but
5700 # this one works only on Risc systems. But the equivalant compiler flags
5701 # '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5702 hpux0900m68ko:
5703         @MESSAGE1='without compiler optimization for ckcpro.$(EXT) ...' \
5704         $(MAKE) hpux-header
5705         $(MAKE) ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
5706         ckcftp.$(EXT) ckcpro.$(EXT) \
5707         "CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT \
5708         -DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME  -DCK_REDIR -DLONGFN \
5709         -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT $(KFLAGS)"
5710         @echo
5711         @MESSAGE1="with compiler optimization for the rest" \
5712         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5713         "KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5714
5715 # Old name for hpux0900m68ko.
5716 hpux0900mot:
5717         $(MAKE) hpux0900m68ko KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS)"
5718
5719 #Like hpux0900o but with additional model-700/800-specific optimizations.
5720 # +ESlit = consolidate strings in read-only memory.
5721 # +ESfsc = inline millicode calls when comparing pointers.
5722 hpux0900o700:
5723         @echo 'If you get optimizer warnings \c'
5724         @echo 'try "make hpux0900o700 KFLAGS=+Obb1200"'
5725         @MESSAGE1="with PA-RISC-specific optimizations" \
5726         $(MAKE) hpux0900o KTARGET=$${KTARGET:-$(@)} \
5727         "KFLAGS = $(KFLAGS) +ESlit +ESsfc"
5728
5729 #HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5730 #configured, built with gcc, all models except 800 series.
5731 #You might need to add the include path for gcc headers, for example:
5732 # 'KFLAGS=-I/usr/gnu/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5/include/'
5733 hpux0900gcc:
5734         @MESSAGE1='using the gcc compiler' \
5735         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5736         "KFLAGS = -DCK_ANSIC $(KFLAGS)" \
5737         "OFLAGS = -funsigned-char -O2 $(OFLAGS)"
5738
5739 #HP-9000 HP-UX 10.0 + TCP/IP + curses, fully configured.
5740 #Use with restricted (bundled) compiler: no optimization, no ANSI support.
5741 #libcurses needed for fullscreen file xfer display in HP-UX 10.00 and 10.01.
5742 #libHcurses (NOT libcurses!) for fullscreen display, to work around fatal bugs
5743 #in HP-UX 10.10 and 10.20 curses. Maybe we could use lcurses for 10.30, since
5744 #the 10.10 curses problem is supposedly fixed in 10.30.
5745 # +DA1.0 = Generate PA-RISC 1.0 code that runs on both 700 and 800 models.
5746 # +DA1.1 = Generate PA-RISC 1.1 code that runs on both 700 and 800 models.
5747 # Note that HP-UX 10.20 and upwards do not support PA-RISC 1.0 systems.
5748 # And that as of Dec 2001, 11.00 and 11.11 are PA-only and 11.20 is IA64-only.
5749 # Later 11.2x releases are expected to be for both.  Architecture can be
5750 # determined with the model command, at least in 10.20 and later...
5751 #For future releases, we need to include +DA1.1 for PA builds, so that a
5752 #binary built on PA 2.0 will still work on PA 1.1 machines, whereas +DA1.1
5753 #must NOT be included for IA64 builds.
5754 #4 Jan 2006 - Added Large File Support (LFS).  Large files (>2GB) are
5755 #possible in HP-UX 10.20 and later.  The only change is to add:
5756 # -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
5757 #to KFLAGS.  These should be harmless in 10.00 and 10.10, if any of examples
5758 #of those still exist, but I have no way to test this hypothesis.
5759 #OK: 2009/11/16
5760 hpux1000:
5761         @$(MAKE) hpux-header
5762         @LIBS='-lHcurses' ; \
5763         AFLAGS='+DA1.1' ; \
5764         case `uname -r` in \
5765            [AB].10.0*)  KFLAGS='-DHPUX1000 $(KFLAGS)' ; \
5766                         AFLAGS='+DA1.0' ; LIBS='-lcurses'  ;; \
5767            [AB].10.1*)  KFLAGS='-DHPUX1010 -D__HP_CURSES $(KFLAGS)' ; \
5768                         ;; \
5769            [AB].10.2*)  KFLAGS='-DHPUX1020 -D__HP_CURSES $(KFLAGS)' ; \
5770                         ;; \
5771            [AB].10.3*)  KFLAGS='-DHPUX1030 -D__HP_CURSES $(KFLAGS)' ; \
5772                         ;; \
5773            [AB].10.?*)  KFLAGS='-DHPUX10XX -D__HP_CURSES $(KFLAGS)' ; \
5774                         ;; \
5775            [AB].11.0*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5776                         ;; \
5777            [AB].11.1*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5778                         ;; \
5779            [AB].11.?*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5780                         AFLAGS='' ; LIBS='-lcurses' ;; \
5781         esac ; \
5782         OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5783         $(MAKE) "SHELL=/usr/bin/sh" xermit KTARGET=$${KTARGET:-$(@)} \
5784         "CC=$(CC)" "CC2=$(CC2)" \
5785         "CFLAGS = -DHPUX10 -DDIRENT -DSTERMIOX -DCK_DSYSINI -DHDBUUCP \
5786         -DCK_CURSES -DCK_WREFRESH -DTCPSOCKET -DCK_REDIR -DRENAME -DFNFLOAT \
5787         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
5788         $$KFLAGS $$OFLAGS" \
5789         "LNKFLAGS=-s $(LNKFLAGS)" "LIBS = -lm $$LIBS $(KLIBS)"
5790
5791 # This is a kludge, copying hpux0900gcc and adapting hpux1000
5792 # (add CC and CC2, drop the A1.[0||1])
5793 # Builds w/ no compiler warnings but minimally tested.
5794 #
5795 #OK: 2009/09/21
5796 hpux1000gcc:
5797         @MESSAGE1="using the gcc compiler $(MESSAGE1)" \
5798         $(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5799         "KFLAGS = $(KFLAGS)" "OFLAGS = -DCK_ANSIC -funsigned-char -O2"
5800
5801 # Trusted HP-UX 10
5802 # echo KFLAGS=$(KFLAGS) YTARGET YTARGET=$(YTARGET) $(XTARGET) ;
5803 hpux1000t:
5804         @case "$(KTARGET)" in \
5805            *+openssl | *+ssl) \
5806                 KENTRY=hpux1000o+openssl ;; \
5807            *gcc) \
5808                 KENTRY=hpux1000gcc ;; \
5809            *o+) KENTRY=hpux1000o+ ;; \
5810            *o)  KENTRY=hpux1000o ;; \
5811            *)   KENTRY=hpux1000 ;; \
5812         esac ; \
5813         MESSAGE1="and support for 'Trusted HP-UX'" \
5814         $(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5815         "KFLAGS = $(KFLAGS) -DHPUX10_TRUSTED" "KLIBS=-lsec"
5816
5817 hpux1000to:
5818         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5819
5820 hpux1000to+:
5821         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5822
5823 hpux1000tgcc:
5824         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5825
5826 hpux1000to+ssl hpux1000to+openssl:
5827         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5828
5829 hpux1000tgcc+ssl hpux1000tgcc+openssl:
5830         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5831
5832 #HP-9000 HP-UX 10.00 and higher with ANSI prototyping and optimization.
5833 #PA-RISC only, no Motorola or other hardware is support in HP-UX 10.00++.
5834 #The unbundled optional compiler is required.
5835 #Your path should start with /opt/ansic/bin.
5836 # -Wl,-Fw = Remove stack unwind table (info used by debuggers).
5837 # +O2 makes a smaller executable (= -O = Level-1 and global optimization).
5838 # +O3 adds interprocedural global optimization, makes a bigger executable.
5839 # +Onolimit allows all modules to be optimized, no matter how complex.  But:
5840 #  (a) +Onolimit does not seem to always be there in HP-UX 10.00, and:
5841 #  (b) some modules might take hours on low-memory and/or slow systems.
5842 # The following are PA-RISC-specific optimizations:
5843 # +ESlit = Consolidate strings in read-only memory.
5844 # +ESfsc = Inline millicode calls when comparing pointers.
5845 # You might need to configure your kernel for a maxdsiz of 0x0B000000 (176MB)
5846 # or greater to prevent the optimizer from running out of space.
5847 # December 2001: +ESlit +ESsfc removed because not supported on IA64.
5848 # Somebody who cares can use 'model' to see whether it's PA-RISC or IA64
5849 # and include the architecture-specific optimization flags.  Also note:
5850 # +DA1.1 is PA-only.  If this is included in in HP-UX 11.00 or later,
5851 # then +DS2.0 should be included too (but don't use +DS2.0 without +DA1.1,
5852 # or else the binary won't run on older PA hardware).
5853 #OK: 2009/09/21
5854 hpux1000o:
5855         @case `uname -m` in \
5856           ia64) ;; \
5857           *) MFLAGS='+ESlit +ESsfc' ;; \
5858         esac ; \
5859         MESSAGE1="with PA-RISC-specific optimizations $(MESSAGE1)" \
5860         $(MAKE) "SHELL=/usr/bin/sh" "PATH=/opt/ansic/bin:$$PATH" hpux1000 \
5861         KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS) \
5862         -Ae -D_HPUX_SOURCE -DCK_ANSIC -DUTIMEH \
5863         +O2 -Wl,-Fw $$MFLAGS"
5864
5865 #Like hpux1000o but with "+Onolimit".
5866 #On 700 series set kernel parameter maxdsiz >= 0x0D000000 (=208MB).
5867 #Takes a long time.
5868 hpux1000o+:
5869         @MESSAGE1="and +Onolimit $(MESSAGE1)" KTARGET=$${KTARGET:-$(@)} \
5870         $(MAKE) hpux1000o \
5871         "KFLAGS = $(KFLAGS) +Onolimit"
5872
5873 #HP-UX 10.xx + 11.xx with optimizing ANSI compiler and OpenSSL.
5874 #Define SSLLIB and SSLINC appropriately for your OpenSSL installation.
5875 #To overwrite the default SSLLIB and SSLINC settings you can also use the
5876 #command-line variable KSSLLIB and KSSLINC like:
5877 #make hpux1000o+openssl KSSLLIB=-L/opt/openssl/lib KSSLINC=-I/...
5878 #Ditto for the Zlib location.
5879 #This entry works for C-Kermit 8.0.206 on HP-UX 10.20 + 11.11
5880 #with OpenSSL 0.9.6 + 0.9.7
5881 #NOTE: an ANSI C compiler is required for the SSL interface.  If you don't
5882 #have the HP Optimizing ANSI compiler, see the hpux1000gcc+openssl target
5883 #below.
5884 hpux1000o+ssl hpux1000o+openssl:
5885         @case "$(KTARGET)" in \
5886            *gcc+*) \
5887                 KENTRY=hpux1000gcc ;; \
5888            *)   KENTRY=hpux1000o ;; \
5889         esac ; \
5890         case "$(KTARGET)" in \
5891            *-zlib*) \
5892                 DZLIB= LZLIB= ;; \
5893            *)   DZLIB=-DZLIB LZLIB='-L/opt/zlib/lib -lz' ;; \
5894         esac ; \
5895         SSLINC=$${KSSLINC:-$(SSLINC)}; \
5896         SSLLIB=$${KSSLLIB:-$(SSLLIB)}; \
5897         MESSAGE1="and with OpenSSL $(MESSAGE1)" \
5898         $(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5899         KFLAGS="-DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $$DZLIB \
5900         $$SSLINC $(KFLAGS)" \
5901         KLIBS="$(KLIBS) \
5902         $$SSLLIB -lssl -lcrypto \
5903         $$LZLIB \
5904         "
5905
5906 # Ditto but without Zlib:
5907 hpux1000o+ssl-zlib hpux1000o+openssl-zlib:
5908         @MESSAGE1="but without Zlib $(MESSAGE1)" \
5909         $(MAKE) hpux1000o+ssl KTARGET=$${KTARGET:-$(@)}
5910
5911 #HP-UX 10.00 or higher with OpenSSL 0.9.7.  Compiled with gcc.
5912 #From Chris Chaney, NEC America Inc.  His instructions:
5913 # (1) Install gcc version 3.2.3 & binutils version 2.13.2
5914 #     (used binary depot from http://hpux.cs.utah.edu/)
5915 # (2) Install gcc make version 3.80 from http://hpux.cs.utah.edu/
5916 #
5917 # or: gcc 2.9.2000-12-1 from "Linux to hp-ux 11.0/11i porting kit version 1.0
5918 #     (2CD)" free from:  http://www.software.hp.com
5919 #
5920 # (3) Install openSSL version 0.9.7b from http://www.software.hp.com
5921 # (4) Install flex version 2.5.4 from http://hpux.cs.utah.edu/
5922 # (5) Install gmp version 3.1.1 from http://hpux.cs.utah.edu/
5923 #
5924 #Note from Peter Eichhorn, assyst Munich. It works also without gcc make!
5925 hpux1000gcc+ssl hpux1000gcc+openssl:
5926         $(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5927
5928 # Ditto but without Zlib:
5929 hpux1000gcc+ssl-zlib hpux1000gcc+openssl-zlib:
5930         $(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5931
5932 # Same for HP-UX 11
5933 hpux1100o+ssl hpux1100o+openssl:
5934         $(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5935
5936 #OK: 2009/09/26
5937 hpux1100gcc+ssl hpux1100gcc+openssl:
5938         $(MAKE) hpux1000gcc+openssl KTARGET=$${KTARGET:-$(@)}
5939
5940 hpux1100o+ssl-zlib hpux1100o+openssl-zlib:
5941         $(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5942
5943 hpux1100gcc+ssl-zlib hpux1100gcc+openssl-zlib:
5944         $(MAKE) hpux1000gcc+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5945
5946 # HP-UX 11
5947 # Note: these are 32-bit builds even on IA64.
5948 # Adding +DD64 to CFLAGS produces 64-bit object files,
5949 # but the linker fails to find the needed 64-bit libs.
5950 #OK: 2009/09/26
5951 hpux1100:
5952         $(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)}
5953
5954 #OK: 2009/09/26
5955 hpux1100o:
5956         $(MAKE) hpux1000o KTARGET=$${KTARGET:-$(@)}
5957
5958 hpux1100o+:
5959         $(MAKE) hpux1000o+ KTARGET=$${KTARGET:-$(@)}
5960
5961 #OK: 2009/09/26
5962 hpux1100gcc:
5963         $(MAKE) hpux1000gcc KTARGET=$${KTARGET:-$(@)}
5964
5965 # Trusted HP-UX 11
5966 hpux1100t:
5967         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5968
5969 hpux1100to:
5970         $(MAKE) hpux1000to KTARGET=$${KTARGET:-$(@)}
5971
5972 hpux1100to+:
5973         $(MAKE) hpux1000to+ KTARGET=$${KTARGET:-$(@)}
5974
5975 hpux1100tgcc:
5976         $(MAKE) hpux1000tgcc KTARGET=$${KTARGET:-$(@)}
5977
5978 hpux1100to+ssl hpux1100to+openssl:
5979         $(MAKE) hpux1000to+openssl KTARGET=$${KTARGET:-$(@)}
5980
5981 hpux1100tgcc+ssl hpux1100tgcc+openssl:
5982         $(MAKE) hpux1000tgcc+openssl KTARGET=$${KTARGET:-$(@)}
5983
5984 #Regulus on CIE Systems 680/20
5985 cie:
5986         @echo 'Making C-Kermit $(CKVER) for CIE Systems 680/20 Regulus...'
5987         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5988         "CFLAGS = -DATTSV -DNOFILEH -DCIE -DNOLEARN $(KFLAGS) -O" "LNKFLAGS ="
5989
5990 # Linux 1.2 or later with gcc, dynamic libraries, ncurses, TCP/IP.
5991 #
5992 # If your Linux system has curses rather than ncurses, use the linuxc
5993 # entry, or if that doesn't work, linuxnc.
5994 #
5995 # The Kermit "large memory model" is used by default to configure big packet
5996 # and script buffers, etc.  For small-memory or limited-resource systems,
5997 # "make linux KFLAGS=-DNOBIGBUF".
5998 #
5999 # -DLINUXFSSTND (Linux File System Standard 1.2) gives UUCP lockfile /var/lock
6000 # with string pid.  Remove this to get /usr/spool/uucp with int pid, used in
6001 # very early Linux versions.  FSSTND 1.2 also says that the PID string in the
6002 # UUCP lock file has leading spaces.  This is a change from FSSTND 1.0, which
6003 # used leading zeros.  Add -DFSSTND10 to support FSSTND 1.0 instead of 1.2.
6004 # I hope subsequent editions of the file-system standard did not change these
6005 # again.
6006 #
6007 # Add -DOLINUXHISPEED (Old Linux High Speed support) to turn on an ugly kludge
6008 # in Linux 1.0 and earlier to support speeds of 57600 and 115200.  Extremely
6009 # old Linux systems (pre-0.99pl15) will not support this.  If OLINUXHISPEED is
6010 # not defined, then only the standard POSIX termios methods of setting the port
6011 # speed will be used, and in this case speeds can be as high as 460800 in most
6012 # modern Linux versions.
6013 #
6014 # -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
6015 # least 0.99.14; if it causes trouble for you, remove it from the CFLAGS.
6016 #
6017 # -pipe removes the need for temp files - remove it if it causes trouble.
6018 #
6019 # -funsigned-char makes all characters unsigned, as they should have been
6020 #  in the first place.
6021 #
6022 # Add -DCK_DSYSINI if you want a shared system-wide init file.
6023 #
6024 # See http://www.columbia.edu/kermit/ckubwr.html about -DNOCOTFMC.
6025 # Better still, should read the entire Linux section of that document.
6026 #
6027 # The "linuxa" entry can be referenced directly on LIBC systems, but not
6028 # GLIBC, where -lcrypt is required.  The "make linux" entry should normally
6029 # be used for all builds on all Linux distributions unless you have special
6030 # requirements, in which case keep reading.  CK_NEWTERM added after 7.0b04
6031 # due to new complaints about ncurses changing buffering of tty.
6032
6033 linuxa:
6034         @echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later...'
6035         @echo 'IMPORTANT: Read the comments in the linux section of the'
6036         @echo 'makefile if you have trouble.'
6037         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6038         "CFLAGS = -O -DLINUX -pipe -funsigned-char -DFNFLOAT -DCK_POSIX_SIG \
6039         -DCK_NEWTERM -DTCPSOCKET -DLINUXFSSTND -DNOCOTFMC -DPOSIX \
6040         -DUSE_STRERROR $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6041         "LIBS = $(LIBS) -lm"
6042
6043 # As above but with profiling
6044 linuxp:
6045         $(MAKE) linuxa KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS) -pg" \
6046         "LIBS=-pg -lcrypt -lresolv"
6047
6048 #Linux.  This entry should work for any Linux distribution on any platform,
6049 #32-bit or 64-bit, except for extremely ancient ones.  Automatically detects:
6050 # . curses, ncurses, or no curses
6051 # . Old versus new pty handling (new == glibc 2.1++)
6052 # . Presence or absence of libcrypt.a and <crypt.h>
6053 # . Presence or absence of libresolv.a
6054 # . Transitional Long File API for 32-bit platforms (SUS V2 UNIX 98 LFS).
6055 #Note: The HAVE_PTMX test was previously "if test -c /dev/ptmx" but this was
6056 #not sufficient for Debian 2.1, because although it had /dev/ptmx, it did not
6057 #have grantpt(), unlockpt(), or ptsname(), so has been changed to look for a
6058 #grantpt() prototype in the header files.  Modified in 8.0.206 to allow for
6059 #libraries that contain .so's but no .a's, e.g. Mandrake 9.0.
6060 #HAVE_BAUDBOY added in 8.0.210 for Red Hat -- it's like AIX ttylock().
6061 #Modified 17 Aug 2005 to use openpty() if available because the other stuff
6062 #dumps core in 64-bit ia64 and x86_64 builds.
6063 #Long file support for 32-bit builds added in 8.0.212 - if features.h contains
6064 #__USE_LARGEFILE64 then we set the flags that must be set before reading any
6065 #header files; on 32-bit platforms such as i386, this produces a 32-bit build
6066 #capable of accessing, sending, receiving, and managing long (> 2GB) files.
6067 #On 64-bit platforms, it does no harm.
6068 #As of 3 March 2009 we detect automatically if we have curses, ncurses,
6069 #or no curses at all.
6070 #Added HAVE_LOCKDEV as openSuSE >= 11.3 uses ttylock directly instead of
6071 #baudboy 2010/08/23
6072 #OK: 2011/06/18
6073 linux:
6074         @if test \
6075         `grep grantpt /usr/include/*.h /usr/include/sys/*.h | wc -l` -gt 0; \
6076         then if test -c /dev/ptmx; then HAVE_PTMX='-DHAVE_PTMX'; \
6077         else HAVE_PTMX=''; fi; fi ; \
6078         if test `grep openpty /usr/include/pty.h | wc -l` -gt 0; \
6079         then HAVE_OPENPTY='-DHAVE_OPENPTY'; \
6080         else HAVE_OPENPTY=''; fi ; \
6081         HAVE_LIBCURSES=''; \
6082         if test -f /usr/lib64/libncurses.so || \
6083            test -f /usr/lib/libncurses.a  || \
6084            test -f /usr/lib/libncurses.so; then \
6085           HAVE_LIBCURSES='-lncurses'; \
6086         else if test -f /usr/lib64/libcurses.so || \
6087            test -f /usr/lib/libcurses.a || \
6088            test -f /usr/lib/libcurses.so; then \
6089              HAVE_LIBCURSES='-lcurses'; fi; fi; \
6090         HAVE_CURSES=''; \
6091         if test -n '$$HAVE_LIBCURSES'; then \
6092           if test -f /usr/include/ncurses.h; then \
6093             HAVE_CURSES='-DCK_NCURSES  -I/usr/include/ncurses'; \
6094           else if test -f /usr/include/curses.h; then \
6095             HAVE_CURSES='-DCK_CURSES'; \
6096         fi; fi; fi; \
6097         if test -f /usr/include/baudboy.h || test -f /usr/include/ttylock.h; \
6098         then HAVE_LOCKDEV='-DHAVE_LOCKDEV' ; \
6099         else HAVE_LOCKDEV='' ; fi ; \
6100         if test -f /usr/include/baudboy.h ; \
6101         then HAVE_BAUDBOY='-DHAVE_BAUDBOY' ; \
6102         else HAVE_BAUDBOY='' ; fi ; \
6103         $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6104         "KFLAGS=$$HAVE_CURSES $$HAVE_PTMX $$HAVE_LOCKDEV \
6105         $$HAVE_BAUDBOY $$HAVE_OPENPTY \
6106         `grep __USE_LARGEFILE64 /usr/include/features.h > /dev/null && \
6107         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
6108         `if test -f /usr/include/crypt.h; then echo -DHAVE_CRYPT_H; fi` \
6109         $(KFLAGS)" \
6110         "LIBS=$(LIBS) $$HAVE_LIBCURSES \
6111         `if test -n '$$HAVE_OPENPTY'; then echo -lutil; fi` \
6112         `if test -f /usr/lib64/libresolv.a || test -f /usr/lib64/libresolv.so \
6113         || test -f /usr/lib/libresolv.a || test -f /usr/lib/libresolv.so \
6114         || ls /lib/x86_64-linux-gnu/libresolv.* > /dev/null 2> /dev/null; \
6115         then echo -lresolv; fi` \
6116         `if test -f /usr/lib64/libcrypt.a || test -f /usr/lib64/libcrypt.so \
6117         || test -f /usr/lib/libcrypt.a || test -f /usr/lib/libcrypt.so \
6118         || ls /lib/x86_64-linux-gnu/libcrypt.* > /dev/null 2> /dev/null; \
6119         then echo -lcrypt; fi` \
6120         `if test -f /usr/lib64/liblockdev.a || \
6121         test -f /usr/lib64/liblockdev.so || \
6122         test -f /usr/lib/liblockdev.a || \
6123         test -f /usr/lib/liblockdev.so; \
6124         then echo -llockdev; fi`" \
6125         linuxa
6126
6127 # Linux + Shadow passwords + PAM
6128 # OK 2011/06/18
6129 linux+shadow+pam:
6130         @echo 'Making C-Kermit $(CKVER) for Linux+Shadow+PAM...'
6131         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} \
6132         KFLAGS="-DCK_SHADOW -DCK_PAM $(KFLAGS)" \
6133         "LNKFLAGS = $(LNKFLAGS)" \
6134         "LIBS = -lpam"
6135
6136 # Linux systems that have no <sys/select.h>.
6137 # (not tested in recent years, perhaps no longer needed)
6138 linuxns:
6139         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} KFLAGS=-DNO_SYS_SELECT_H
6140
6141 # Linux-script-only:
6142 # A minimum-size version for Linux that does only scripting and
6143 # serial communication -- no networks, no file transfer, no security.
6144 # OK 2011/06/18
6145 linuxso:
6146         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6147         "CFLAGS = -O -DLINUX -pipe -funsigned-char -DPOSIX -DCK_POSIX_SIG \
6148         -DLINUXFSSTND -DNOCOTFMC -DNOXFER -DNODEBUG -DNOCSETS -DNOHELP \
6149         -DNONET -DMINIDIAL -DNOSCRIPT -DNOIKSD -DNOPUSH $(KFLAGS)" \
6150         "LNKFLAGS = $(LNKFLAGS)" "LIBS = "
6151
6152 # Secure targets for Linux.  These work on RHAS4, RHEL4, and RHEL5,
6153 # unlike some of the older targets that follow.  They hook into the main Linux
6154 # target so we pick up all the other new stuff - large files, baudboy.h, the
6155 # appropriate pty interface, etc.
6156
6157 # Linux with Kerberos 5.
6158 # Use "make linux+krb5 KFLAGS=-DNO_KRB5_INIT_ETS" if necessary.
6159 #OK 2011/06/16 on Fedora 14 with:
6160 # make linux+krb5 "LIBS=$LIBS /lib/libk5crypto.so.3 /lib/libcom_err.so.2"
6161 # On RHEL5: make linux+krb5 -UCK_DES
6162 linux+krb5:
6163         @echo 'Making C-Kermit $(CKVER) for Linux with Kerberos 5...'
6164         @case `openssl version` in \
6165           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6166           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6167           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6168           *) OPENSSLOPTION="" ;; \
6169         esac; \
6170         HAVE_DES=''; \
6171         DES_LIB=''; \
6172         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6173            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6174               DES_LIB='-ldes425'; \
6175               HAVE_DES='-DCK_DES -DLIBDES'; \
6176               echo "HAVE DES"; \
6177            else echo "NO DES"; \
6178         fi; \
6179         K5CRYPTO=''; \
6180         if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6181                 K5CRYPTO='-lk5crypto'; \
6182         else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
6183                 K5CRYPTO='-lk5crypto'; \
6184         fi; fi; \
6185         COM_ERR=''; \
6186         if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6187                 COM_ERR='-lcom_err'; \
6188         fi; \
6189         GSSAPILIB='-lgssapi'; \
6190         if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6191                 GSSAPILIB='-lgssapi_krb5'; \
6192         else if ls /usr/lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6193                 GSSAPILIB='-lgssapi_krb5'; \
6194         else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6195                 if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6196                         GSSAPILIB='-lgssapi_krb5'; \
6197         fi; fi; fi; \
6198         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6199         "KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 $$OPENSSLOPTION \
6200         -DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6201         -I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6202         "LIBS = $(K5LIB) $$DES_LIB -lcrypto $$GSSAPILIB -lkrb5 \
6203         $$K5CRYPTO $$COM_ERR $(LIBS)" ; \
6204         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
6205                 echo ""; \
6206                 echo "If build failed try:"; \
6207                 echo ""; \
6208                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
6209                 echo ""; \
6210         fi
6211
6212 # Linux with Kerberos 5 and Kerberos 4.
6213 # Use "make linux+krb5 KFLAGS=-DNO_KRB5_INIT_ETS" if necessary.
6214 # Add "KFLAGS=-UCK_DES" if failure messages look DES-related.
6215 # UNTESTED (because I can't find a box with Krb4 and Krb5 installed)
6216 linux+krb5+krb4:
6217         @echo 'Making C-Kermit for Linux with Kerberos 4 and Kerberos 5'
6218         $(MAKE) linux+krb5 KTARGET=$${KTARGET:-$(@)} \
6219         "KFLAGS=-DKRB4 -DKRB524 $(KFLAGS)" "LIBS=$(LIBS) -lkrb4"
6220
6221 # Linux with OpenSSL 
6222 # In Linux, SSL libs are often in /lib or /usr/lib and so found by default.
6223 # This targets takes into account the DES library might or might not
6224 # exist.  If it does exist, however, the target will require some editing
6225 # if its basename is not libdes425.  - fdc Tue Sep 21 14:28:00 2010
6226 # IMPORTANT: Some Linux platforms have DES libraries but they are missing
6227 # functions used by Kermit.  In that case you will get fatal errors at
6228 # link time involving routines such as des_ecb3_encrypt, des_random_seed,
6229 # and des_set_odd_parity.  In that case, "make linux KFLAGS=-UCK_DES"
6230 # There's a new warning at the end that should come out if this happens,
6231 # and that should not come out if it didn't.
6232 #
6233 linux+ssl linux+openssl linux+openssl+zlib+shadow+pam linux+openssl+shadow:
6234         @echo 'Making C-Kermit $(CKVER) for Linux+OpenSSL SSLLIB=$(SSLLIB)'
6235         @case `openssl version` in \
6236           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6237           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6238           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6239           *) OPENSSLOPTION="" ;; \
6240         esac; \
6241         HAVE_DES=''; \
6242         DES_LIB=''; \
6243         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6244            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6245               DES_LIB='-ldes425'; \
6246               HAVE_DES='-DCK_DES -DLIBDES'; \
6247               echo "HAVE DES"; \
6248            else echo "NO DES"; \
6249         fi; \
6250         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6251         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
6252         -DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6253         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6254         "LIBS = $(SSLLIB) -lssl $$DES_LIB -lcrypto -lpam -ldl -lz $(LIBS)" ; \
6255         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
6256                 echo ""; \
6257                 echo "If build failed try:"; \
6258                 echo ""; \
6259                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
6260                 echo ""; \
6261         fi
6262
6263 # Linux with Kerberos 5 and OpenSSL
6264 # OK 2011/05/16
6265 # Add -UCK_DES if functions like des_ecb3_encrypt, es_random_seed,
6266 # come up missing at link time.
6267 linux+krb5+ssl linux+krb5+openssl:
6268         @echo 'Making C-Kermit $(CKVER) for Linux with Krb5 and OpenSSL...'
6269         @case `openssl version` in \
6270           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6271           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6272           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6273           *) OPENSSLOPTION="" ;; \
6274         esac; \
6275         HAVE_DES=''; \
6276         DES_LIB=''; \
6277         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6278            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6279               DES_LIB='-ldes425'; \
6280               HAVE_DES='-DCK_DES -DLIBDES'; \
6281               echo "HAVE DES"; \
6282            else echo "NO DES"; \
6283         fi; \
6284         K5CRYPTO=''; \
6285         if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6286                 K5CRYPTO='-lk5crypto'; \
6287         else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
6288                 K5CRYPTO='-lk5crypto'; \
6289         fi; fi; \
6290         COM_ERR=''; \
6291         if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6292                 COM_ERR='-lcom_err'; \
6293         fi; \
6294         GSSAPILIB='-lgssapi'; \
6295         if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6296                 GSSAPILIB='-lgssapi_krb5'; \
6297         else if ls /usr/lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6298                 GSSAPILIB='-lgssapi_krb5'; \
6299         else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6300                 if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6301                         GSSAPILIB='-lgssapi_krb5'; \
6302         fi; fi; fi; \
6303         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6304         "KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6305         -DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6306         -DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6307         -I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6308         "LIBS = $(K5LIB) $(SSLLIB) -lssl $$DES_LIB -lpam -lz \
6309         -lcrypto $$GSSAPILIB -lkrb5 $$K5CRYPTO $$COM_ERR $(LIBS)" ; \
6310         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
6311                 echo ""; \
6312                 echo "If build failed try:"; \
6313                 echo ""; \
6314                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
6315                 echo ""; \
6316         fi
6317
6318 # ::BEGIN_OLD_LINUX_TARGETS::
6319
6320 # The remaining Linux entries are for special or customized builds.  They have
6321 # not been generalized ("subroutinized") like the ones above.  Ideally, we
6322 # should allow for every combination of libc vs glibc, gcc vs egcs, curses vs
6323 # ncurses, Kerberos IV vs Kerberos V vs SRP (in any combination), and so on.
6324 # The best way to do this is to set KFLAGS and LIBS values and then chain to
6325 # the main "linux" target, as in the examples just above.  To skip past all of
6326 # these old targets (and there are many) search for ::END_OLD_LINUX_TARGETS::
6327 # (after this line).
6328
6329 #Sharp Zaurus SL-5500 - Linux based
6330 zsl5500:
6331         @echo 'Making C-Kermit $(CKVER) for Sharp Zaurus SL-5500...'
6332         @touch ckcpro.c
6333         @touch wart
6334         $(MAKE) linuxnc KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DZSL5500" \
6335         "CC = gcc" "CC2 = gcc"
6336
6337 #Mklinux DR3 has horrible bug in <utmpbits.h> - see ckufio.c.
6338 mklinux:
6339         $(MAKE) KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DUTMPBUG" \
6340         "LIBS=-lcrypt -lresolv" linuxa
6341
6342 #LinuxPPC 1999
6343 linuxppc:
6344         @echo 'Making C-Kermit $(CKVER) for LinuxPPC 1999...'
6345         @if test -f /usr/lib/libcrypt.a; then \
6346             if test -f /usr/lib/libresolv.a; then \
6347                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6348                 "KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6349                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6350                 "LIBS=-lncurses -lresolv -lcrypt" linuxa ; \
6351             else \
6352                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6353                 "KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6354                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6355                 "LIBS=-lncurses -lcrypt" linuxa ; \
6356             fi \
6357         else \
6358             if test -f /usr/lib/libresolv.a; then \
6359                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6360                 "KFLAGS=$(NCURSES_CPP) \
6361                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6362                 "LIBS=-lncurses -lresolv" linuxa ; \
6363             else \
6364                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6365                 "KFLAGS=$(NCURSES_CPP) \
6366                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6367                 "LIBS=-lncurses" linuxa ; \
6368             fi \
6369         fi
6370
6371
6372 # Like "make linux" but built with egcs rather than gcc.
6373 # If you get "Internal compiler error xxx, output pipe has been closed",
6374 # try removing -pipe.
6375 linuxegcs:
6376         @echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later with egcs...'
6377         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = egcs" "CC2 = egcs" \
6378         "CFLAGS = -O -DLINUX -pipe -funsigned-char \
6379         -DPOSIX -DCK_POSIX_SIG -DCK_NCURSES -DNOCOTFMC \
6380         -DTCPSOCKET -DLINUXFSSTND $(KFLAGS)" \
6381         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lncurses -lcrypt -lresolv"
6382
6383 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1 (no K4 compatibility).
6384 linux+krb5-old:
6385         @echo 'Making C-Kermit $(CKVER) for Linux on Intel with Kerberos...'
6386         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6387         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6388         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6389         -DCK_ENCRYPTION -DCK_DES -DCK_CURSES -DCK_POSIX_SIG \
6390         -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H $(K5INC) $(K5INC)/krb5 \
6391         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6392         "LIBS = $(K5LIB) -lncurses -ltermcap -ldes425 -lkrb5 \
6393         -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6394
6395 # Linux on Intel PC with SRP 1.7.4 using GNU MP, Krypto, and Eric Young's
6396 # DES library.  Remove the -DCK_DES, -DLIBDES and -ldes if you do not have
6397 # Eric Young's# libdes.a installed.
6398 #
6399 linux+srp+gmp:
6400         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6401         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6402         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6403         -DCK_AUTHENTICATION -DCK_SRP \
6404         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6405         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6406         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6407         "LIBS = $(SRPLIB) \
6408         -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto -lcrypt -lresolv"
6409
6410 linux+srp+gmp+no-des:
6411         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP ...'
6412         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6413         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6414         -DCK_AUTHENTICATION -DCK_SRP \
6415         -DCK_ENCRYPTION -DCK_CAST \
6416         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6417         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6418         "LIBS = $(SRPLIB) \
6419         -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lresolv"
6420
6421 linux+srp+gmp-export:
6422         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6423         $(MAKE) srpmit-export KTARGET=$${KTARGET:-$(@)} \
6424         "CC = gcc" "CC2 = gcc" \
6425         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6426         -DCK_AUTHENTICATION -DCK_SRP -DFNFLOAT \
6427         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6428         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6429         "LIBS = $(SRPLIB) \
6430         -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lm -lresolv"
6431
6432 linux+srp+gmp+pam:
6433         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6434         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6435         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6436         -DCK_AUTHENTICATION -DCK_SRP \
6437         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6438         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6439         -DCK_PAM -DFNFLOAT $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6440         "LIBS = $(SRPLIB) -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto \
6441         -lcrypt -lpam -ldl -lm -lresolv"
6442
6443 #Linux on Intel PC with SRP 1.7.4 built with OpenSSL for Big Number Math
6444 #and Cryptographic functionality.
6445 #
6446 linux+srp:
6447         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6448         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6449         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6450         -DCK_AUTHENTICATION -DCK_SRP \
6451         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6452         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6453         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6454         "LIBS = $(SRPLIB) $(SSLLIB) \
6455         -lncurses -ltermcap -lsrp -lkrypto -lcrypto -lcrypt -lresolv"
6456
6457 linux+srp+pam:
6458         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6459         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6460         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6461         -DCK_AUTHENTICATION -DCK_SRP \
6462         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6463         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6464         -DCK_PAM -DFNFLOAT $(SRPINC) $(SSLINC) $(KFLAGS)" \
6465         "LNKFLAGS = $(LNKFLAGS)" \
6466         "LIBS = $(SRPLIB) $(SSLLIB) -lncurses -ltermcap -lsrp -lkrypto \
6467         -lcrypto -lcrypt -lpam -ldl -lm -lresolv"
6468
6469 #Linux on Intel PC with SRP and SSL/TLS.
6470 #
6471 # libsrp.a should be build with OpenSSL
6472 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6473 #Remove -ltermcap if it causes trouble e.g. in Debian 2.2.
6474 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6475 linux+srp+openssl:
6476         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6477         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6478         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6479         -DCK_AUTHENTICATION -DCK_SRP \
6480         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6481         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6482         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6483         "LIBS = $(SRPLIB) $(SSLLIB) \
6484         -lncurses -ltermcap -lsrp -lssl -lkrypto -lcrypto \
6485         -lcrypt -lresolv"
6486
6487 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2 and SRP.
6488 #
6489 # libsrp.a should be build with GNU MP (libgmp.a)
6490 # instead of AT&T CryptoLib (libcrypt.a) due to naming conflicts with
6491 # standard distribution Linux libraries.
6492 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6493 linux+krb5+krb4+srp:
6494         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB54+SRP...'
6495         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6496         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6497         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6498         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6499         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6500         $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6501         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6502         "LIBS = $(K5LIB) $(SRPLIB) \
6503         -lncurses -ltermcap -lsrp -lgmp -lgssapi_krb5 -lkrypto \
6504         -ldes -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv"
6505
6506 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6507 #
6508 # libsrp.a should be build with OpenSSL
6509 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6510 # Requires OpenSSL 0.9.6a or higher
6511 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6512 linux+krb5+krb4+srp+openssl:
6513         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6514         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6515         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6516         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6517         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6518         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6519         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6520         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6521         "LIBS = $(K5LIB) $(SRPLIB) $(SSLLIB) \
6522         -lncurses -ltermcap -lsrp \
6523         -lkrb4 -lssl -lkrypto -lcrypto \
6524         -lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6525
6526 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SSL/TLS.
6527 #
6528 # libsrp.a should be build with OpenSSL
6529 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6530 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6531 linux+krb5+krb4+openssl:
6532         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6533         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6534         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6535         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6536         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6537         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6538         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6539         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6540         "LIBS = $(K5LIB) $(SSLLIB) \
6541         -lncurses -ltermcap \
6542         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6543         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6544
6545 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SSL/TLS.
6546 #
6547 # libsrp.a should be build with OpenSSL
6548 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6549 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6550 linux+krb5+krb4+openssl+shadow:
6551         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6552         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6553         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6554         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6555         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6556         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6557         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6558         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6559         "LIBS = $(K5LIB) $(SSLLIB)  \
6560         -lncurses -ltermcap \
6561         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6562         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6563
6564 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2, SSL/TLS.
6565 #
6566 # libsrp.a should be build with OpenSSL
6567 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6568 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6569 linux+krb5+krb4+openssl+zlib+shadow:
6570         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6571         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6572         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6573         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 -DZLIB \
6574         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6575         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6576         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6577         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6578         "LIBS = $(K5LIB) $(SSLLIB) \
6579         -lncurses -ltermcap \
6580         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6581         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lz"
6582
6583 linux+krb5+krb4+srp-export:
6584         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6585         $(MAKE) xermit-export KTARGET=$${KTARGET:-$(@)} \
6586         "CC = gcc" "CC2 = gcc" \
6587         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6588         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6589         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6590         $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6591         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6592         "LIBS = $(SRPLIB) $(K5LIB) \
6593         -lncurses -ltermcap -lsrp -lgmp -lkrb4 -ldes425 -lkrb5 -lgssapi_krb5 \
6594         -lcom_err -lk5crypto -lkrypto -lcrypt -lresolv"
6595
6596 linux+krb5+krb4+srp+pam:
6597         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6598         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6599         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6600         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6601         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6602         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6603         -DCK_PAM $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6604         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6605         "LIBS = $(SRPLIB) $(K5LIB) \
6606         -lncurses -ltermcap -lsrp -lgmp -ldes -lkrb4 -ldes425 -lkrb5 \
6607         -lcom_err -lk5crypto -lgssapi_krb5 -lkrypto -lcrypt -lpam -ldl \
6608         -lresolv"
6609
6610 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6611 # and PAM.
6612 #
6613 # libsrp.a should be build with OpenSSL
6614 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6615 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6616 linux+krb5+krb4+srp+openssl+pam-debug:
6617         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6618         $(MAKE) xermit-debug KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6619         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6620         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6621         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6622         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6623         -w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG $(K5INC) $(K5INC)/krb5 \
6624         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6625         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6626         -lncurses -ltermcap -lsrp -lkrb4 -lssl -lkrypto -lcrypto \
6627         -lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lpam -ldl"
6628
6629 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SRP and SSL/TLS.
6630 # and PAM.
6631 #
6632 # libsrp.a should be build with OpenSSL
6633 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6634 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6635 linux+krb5+krb4+srp+openssl+pam:
6636         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6637         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6638         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6639         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6640         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6641         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6642         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6643         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6644         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB)  \
6645         -lm -lncurses -ltermcap -lsrp \
6646         -lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6647         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6648
6649 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6650 # with ZLIB and PAM
6651 #
6652 # libsrp.a should be build with OpenSSL
6653 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6654 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6655 linux+krb5+krb4+srp+openssl+zlib+pam:
6656         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6657         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6658         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6659         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6660         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6661         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6662         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6663         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6664         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6665         -lm -lncurses -ltermcap -lsrp \
6666         -lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6667         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6668
6669 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6670 # with ZLIB, Shadow Passwords, and PAM
6671 #
6672 # libsrp.a should be build with OpenSSL
6673 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6674 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6675 linux+krb5+krb4+srp+openssl+zlib+shadow+pam:
6676         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6677         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6678         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6679         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6680         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6681         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6682         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6683         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6684         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6685         -lm -lncurses -ltermcap -lsrp -lkrypto \
6686         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6687         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6688
6689 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6690 # with Shadow Passwords, PAM
6691 #
6692 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6693 linux+krb5+krb4+openssl+shadow+pam:
6694         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL,...'
6695         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6696         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6697         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6698         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6699         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6700         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6701         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6702         "LIBS = $(K5LIB) $(SSLLIB) \
6703         -lm -lncurses -ltermcap \
6704         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6705         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6706
6707 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6708 # with ZLIB, Shadow Passwords, PAM
6709 #
6710 # libsrp.a should be build with OpenSSL
6711 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6712 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6713 linux+krb5+krb4+openssl+zlib+shadow+pam:
6714         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6715         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6716         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6717         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6718         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6719         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6720         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6721         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6722         "LIBS = $(K5LIB) $(SSLLIB) \
6723         -lm -lncurses -ltermcap \
6724         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6725         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6726
6727 #Red Hat 9 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6728 #Also works around bug in curses in which terminal goes dead after
6729 #returning from file-transfer display.  Assumes OpenSSL 0.9.7 or later.
6730 redhat9:
6731         @echo "Building SECURE Kermit for Red Hat 9.0..."
6732         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6733         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6734
6735 #Ditto plus SRP (which is not normally included with RH Linux).
6736 redhat9+srp:
6737         @echo "Building SECURE Kermit for Red Hat 9.0..."
6738         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6739         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6740
6741 #For Red Hat AS 2.1 with OpenSSL
6742 redhat21+ssl:
6743         @echo "Building SECURE Kermit for Red Hat 2.1..."
6744         $(MAKE) linux+openssl+zlib+shadow+pam \
6745         KTARGET=$${KTARGET:-$(@)} "KFLAGS =  $(KFLAGS)"
6746
6747 #Red Hat Linux 8.0 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6748 #Also works around bug in curses in which terminal goes dead after
6749 #returning from file-transfer display.
6750 redhat80:
6751         @echo "Building SECURE Kermit for Red Hat 8.0..."
6752         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6753         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6754
6755 redhat80+srp:
6756         @echo "Building SECURE Kermit for Red Hat 8.0..."
6757         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6758         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6759
6760 #Red Hat Linux 7.3 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6761 #Also works around bug in curses in which terminal goes dead after
6762 #returning from file-transfer display.
6763 redhat73:
6764         @echo "Building SECURE Kermit for Red Hat 7.3..."
6765         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6766         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6767
6768 redhat73+srp:
6769         @echo "Building SECURE Kermit for Red Hat 7.3..."
6770         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6771         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6772
6773 #Red Hat Linux 7.2 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6774 #Also works around bug in curses in which terminal goes dead after
6775 #returning from file-transfer display.
6776 redhat72:
6777         @echo "Building SECURE Kermit for Red Hat 7.2..."
6778         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6779         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6780
6781 redhat72+srp:
6782         @echo "Building SECURE Kermit for Red Hat 7.2..."
6783         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6784         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6785
6786 #Red Hat Linux 7.1 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6787 #Also works around bug in curses in which terminal goes dead after
6788 #returning from file-transfer display.
6789 redhat71:
6790         @echo "Building SECURE Kermit for Red Hat 7.1..."
6791         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6792         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6793
6794 redhat71+srp:
6795         @echo "Building SECURE Kermit for Red Hat 7.1..."
6796         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6797         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6798
6799 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6800 # with ZLIB and PAM and Shadow passwords
6801 linux+krb5+openssl+zlib+shadow+pam:
6802         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB5,SSL...'
6803         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6804         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6805         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DCK_SHADOW -DHAVE_PTMX \
6806         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6807         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6808         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6809         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6810         "LIBS = $(K5LIB) $(SSLLIB) \
6811         -lm -lncurses -ltermcap -lssl -lcrypto -lgssapi_krb5 \
6812         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6813
6814 linuxnotcp:
6815         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DNONET $(KFLAGS)"
6816
6817 # "make linuxnotcp" with lcc (see http://www.cs.princeton.edu/software/lcc)
6818 # lcc does not understand various gcc extensions:
6819 #  "__inline__" -- can be eliminated by adding "-D__inline__="
6820 #  "__asm__ and "long long" -- in header files, should be surrounded by
6821 #                              "#ifndef(__STRICT_ANSI__)"/"#endif"
6822 #  however, TCP requires some __asm__ functions, so cannot be compiled
6823 linuxnotcp-lcc:
6824         @echo 'Making C-Kermit $(CKVER) for Linux with lcc ...'
6825         @echo 'Read comments in makefile for additional information.'
6826         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = lcc" "CC2 = lcc" \
6827         "CFLAGS = -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG \
6828         -UTCPSOCKET -DLINUXFSSTND -DNOLEARN $(KFLAGS)" \
6829         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6830
6831 # Linux 0.99.14 thru 1.0 with gcc, dynamic libraries, curses, TCP/IP.
6832 # For Linux 1.2 or later, use "make linux" (above).
6833 #
6834 # -DLINUXFSSTND (Linux File System Standard) gives UUCP lockfile /var/lock with
6835 # string pid.  Remove this and get /usr/spool/uucp with int pid, which was used
6836 # in early Linux versions.
6837 #
6838 # If you get compiler errors regarding <linux/serial.h>, add -DNOHISPEED.
6839 #
6840 # -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
6841 # least 0.99.14; if it causes trouble for you, just remove it.
6842 #
6843 # -DCK_CURSES: Here we link with the regular curses library.  But you should
6844 # be using ncurses.  Internally, the ckuusx.c module includes <curses.h>, but
6845 # this really should be <ncurses.h>.  Thus if you have the new curses
6846 # material, you should either install it with the standard names, or else
6847 # create symbolic links from the standard names to the new ones.  If you get
6848 # compile-time errors complaining about data definitions in termcap.h, it
6849 # means you have new kernel material mixed with older libc header files.  To
6850 # fix, add "#include <termios.h>" to the <termcap.h> file.  Or if all this is
6851 # too confusing, create a new makefile entry based on this one, but with
6852 # -DCK_CURSES removed from CFLAGS and the entire LIBS= clause removed.
6853 #
6854 # But wait, there's more.  On most Linux systems, -ltermcap must be included
6855 # in LIBS.  But on others, the linker complains that libtermcap can't be
6856 # found.  In that case, try removing -ltermcap from LIBS=.
6857 #
6858 # But wait, there's more.  The format of the PID string in the UUCP lockfile
6859 # changed between Linux FSSTND 1.0 and 1.2.  In the earlier standard, it had
6860 # leading zeros; in the second, it has leading spaces.  By default this entry
6861 # uses the newer standard.  To force the older one, add -DFSSTND10.
6862 #
6863 # "The nice thing about the Linux standard is there are so many to choose from"
6864 #
6865 # NOTE: Remove -DBIGBUFOK for small-memory or limited-resource systems.
6866 linux10:
6867         @echo 'Making C-Kermit $(CKVER) for Linux 1.0 or earlier...'
6868         @echo 'IMPORTANT: Read the comments in the linux section of the'
6869         @echo 'makefile if you get compilation or link errors.'
6870         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6871         "CFLAGS = -O -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DLINUX \
6872         -DTCPSOCKET -DLINUXFSSTND -DOLINUXHISPEED -DNOLEARN $(KFLAGS)" \
6873         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6874
6875 #This version was used for Linux prior to C-Kermit 6.0.192.
6876 #Now the "Linux File System Standard" is considered standard, ditto TCP/IP.
6877 linuxold:
6878         @echo 'Making C-Kermit $(CKVER) for Linux...'
6879         @echo 'For FSSTND-recommended UUCP lockfiles, use:'
6880         @echo '  make linux "KFLAGS=-DLINUXFSSTND".'
6881         @echo 'Read comments in makefile for additional options.'
6882         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6883         "CFLAGS = -O -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DNOLEARN \
6884         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6885
6886 # ::END_OLD_LINUX_TARGETS::
6887
6888 # LynxOS 2.2 with GCC compiler, TCP/IP and fullscreen display.
6889 # Probably also works with Lynx 2.1, and maybe even Lynx 2.0.
6890 # -X means use termios serial drivers rather than BSD4.3-style sgtty drivers.
6891 # If you have trouble with this, try "make bsd KFLAGS=-DNOFDZERO".
6892 lynx:
6893         @echo 'Making C-Kermit $(CKVER) for LynxOS 2.2 with TCP/IP'
6894         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6895         "CFLAGS= -O -DPOSIX -DDIRENT -DSETREUID -DCK_CURSES -DTCPSOCKET \
6896         -DCK_ANSIC -DLYNXOS -DNOLEARN" "LNKFLAGS = -X" "LIBS = -lcurses -lbsd"
6897
6898 lynx22:
6899         $(MAKE) lynx KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
6900
6901 # LynxOS 2.1 with GCC compiler 1.40 and TCP/IP.
6902 lynx21:
6903         @echo 'Making C-Kermit $(CKVER) for LynxOS 2.1 with TCP/IP'
6904         $(MAKE) kermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6905         "CFLAGS= -O -DSETREUID -DTCPSOCKET -DCK_ANSIC -DBSD4 -DLYNXOS" \
6906         "LIBS = -lbsd"
6907
6908 #SCO Xenix 2.2.1 for IBM PC, XT, PS2/30, or other 8088 or 8086 machine
6909 #Should this not work, try some of the tricks from sco286.
6910 #NOTE: -DRENAME is omitted for early SCO Xenix releases because it didn't
6911 #exist, or its semantics were different from the later POSIX-compliant
6912 #version of rename().
6913 sco86:
6914         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/86...'
6915         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6916         "CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOUNICODE -DNOLEARN \
6917         $(KFLAGS) -Dunix -F 3000 -i -M0me" \
6918         "LNKFLAGS = -F 3000 -i -s -M0me" "LIBS = -lx"
6919
6920 #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
6921 #Reportedly, this "make" can fail simply because of the size of this
6922 #makefile.  If that happens, use "makeL", or edit out some of the
6923 #other entries.  No debugging or character-set translation.
6924 sco286:
6925         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/286...'
6926         @echo 'If make fails, try using makeL.'
6927         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6928         "CFLAGS= -xenix -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
6929         -DNOIKSD -DNODEBUG -DNOTLOG -DNOCSETS -DNOLEARN \
6930         $(KFLAGS) -F 3000 -i -M2let16" \
6931         "LIBS = -lx" "LNKFLAGS = -xenix -s -O -LARGE -F 3000 -i -M2let16"
6932
6933 #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
6934 #As above, but with HDBUUCP (This one might need fixing -- see sco286).
6935 sco286hdb:
6936         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/286 with HDB UUCP...'
6937         @echo 'If make fails, try using makeL.'
6938         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6939         "CFLAGS= -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
6940         -DHDBUUCP -DNOIKSD -DNOUNICODE -DNOLEARN \
6941         $(KFLAGS) -F 3000 -i -M2let32" \
6942         "LIBS = -lx" "LNKFLAGS = -s -O -LARGE -F 3000 -i -M2let32"
6943
6944 #SCO Xenix/386 2.2.2 and 2.2.3
6945 sco386:
6946         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.2...'
6947         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6948         "CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOREDIRECT -DNOLEARN \
6949         -Dunix -DRDCHK -DNAP -DNOUNICODE $(KFLAGS) -Otcl -M3e" \
6950         "LNKFLAGS = -s" "LIBS = -lx"
6951
6952 #SCO XENIX/386 2.2.3 with Excelan TCP/IP + curses.
6953 # NOTE: This one might need some work in C-Kermit 6.0.
6954 # You might need to include /usr/include/sys/types.h
6955 # containing "typedef char *caddr_t;".  Then at least it compiles.
6956 sco386netc:
6957         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.3 + Excelan TCP'
6958         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6959         "CFLAGS= -I/usr/include/exos -DXENIX -DCK_CURSES -DNOUNICODE \
6960         -Dunix -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC -DNOMKDIR -DNOFILEH \
6961         -DNOLEARN -DNOREDIRECT -DNOIKSD -DNO_DNS_SRV $(KFLAGS) -Otcl -M3e" \
6962         "LNKFLAGS = -s" "LIBS = -lc -lx -lsocket -lcurses -ltermcap"
6963
6964 #SCO XENIX/386 2.3.3 with gcc 1.37 or later...
6965 sco386gcc:
6966         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
6967         @echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
6968         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6969         "CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
6970         -DNOJC -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) \
6971         -traditional -fpcc-struct-return -fstrength-reduce \
6972         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
6973         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
6974         -DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD -DNOREDIRECT \
6975         -DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx"
6976
6977 #As above, but with curses...
6978 sco386gccc:
6979         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
6980         @echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
6981         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6982         "CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
6983         -DNOJC -DNODEBUG -DCK_CURSES -DNOUNICODE -DNOLEARN $(KFLAGS) \
6984         -traditional -fpcc-struct-return -fstrength-reduce \
6985         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DNOREDIRECT \
6986         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
6987         -DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD \
6988         -DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx -lcurses -ltermlib"
6989
6990 #SCO UNIX (and ODT) entries...
6991 #
6992 #NOTE: All SCO UNIX entry LIBS should have "-lc_s -lc -lx" IN THAT ORDER (if
6993 #shared C library is desired), or else "-lc -lx" IN THAT ORDER.  Use shared C
6994 #libraries to save memory, but then don't expect to run the resulting binary
6995 #on a different machine.  When using -lc_s, you must also use -lc, because the
6996 #shared C library does not contain all of libc.a.  And in all cases, -lc must
6997 #ALWAYS precede -lx.
6998 #
6999 #ANOTHER NOTE: -DRENAME is included in all SCO UNIX entries.  Remove it if it
7000 #causes trouble.  No harm is done by removing it (see ckuins.txt).
7001 #
7002 #AND ANOTHER: In theory, it should be possible to run SCO UNIX binaries on
7003 #SCO Xenix 2.3 and later.  In practice, this might not work because of the
7004 #libraries, etc.  Also, don't add the -link -z switch (which is supposed to
7005 #root out references to null pointers) because it makes UNIX binaries core
7006 #dump when they are run under Xenix.
7007
7008 #NOTE: -Otcl removed and replaced by -O, since -Otcl produced incorrect code.
7009 #SCO UNIX/386 3.2.0, 3.2.1, and SCO Xenix 2.3.x
7010 sco3r2:
7011         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.0 or 3.2.1 ...'
7012         @echo 'Warning: If make blows up, edit the makefile to join'
7013         @echo 'the following three continued lines into one line.'
7014         @echo 'Also, remove -DRENAME if _rename unresolved at link time.'
7015         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7016         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7017         -DRENAME -DNOIKSD -DNOJC $(KFLAGS) -O" \
7018         "LNKFLAGS = -s" "LIBS = -lc -lx"
7019
7020 #SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7021 #In case of compilation or runtime problems, try adding
7022 #"-DUID_T=int -DGID_T=int" to the CFLAGS.  If that doesn't work, try
7023 #"-DUID_T=uid_t -DGID_T=gid_t".
7024 sco3r2net:
7025         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan...'
7026         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7027         "CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7028         -DHDBUUCP -DRDCHK -DNAP -DRENAME -DTCPSOCKET -DEXCELAN -DNOJC \
7029         -DNOIKSD -DNOREDIRECT $(KFLAGS) -O" \
7030         "LNKFLAGS = -s" "LIBS = -lc -lx -lsocket"
7031
7032 #SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7033 #As above, with curses added.
7034 sco3r2netc:
7035         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan / curses...'
7036         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7037         "CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7038         -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC $(KFLAGS) \
7039         -DRENAME -DCK_CURSES -DNOREDIRECT -DNOIKSD -O" "LNKFLAGS = -s" \
7040         "LIBS = -lc -lx -lsocket -lcurses -ltermcap"
7041
7042 #SCO UNIX 3.2.x or SCO Xenix 2.3.x with Racal InterLan TCP/IP support
7043 # Extra compile flags for other version of Racal InterLan TCP/IP:
7044 # Xenix286/NP621-286, use -Ml -DPARAMH -DINTERLAN -Di286 -DSYSV
7045 # Xenix386/NP621-386, use -DPARAMH -DINTERLAN -Di386 -DSYSV
7046 # ISC386ix/NP622I, use -DSYSV -Di386
7047 # SCO Unix3.2/NP622S, use -DSYSV -Di386 -DSCO_UNIX
7048 # AT&T SVR3.2/NP622A, use -DSYSV -Di386 -DATT
7049 sco3r2netri:
7050         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Racal InterLan...'
7051         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7052         "CFLAGS= -I/usr/include/interlan -DXENIX -DNOFILEH -DHDBUUCP \
7053         -DSVR3 -DRDCHK -DNAP -DTCPSOCKET -DPARAMH -DINTERLAN -Di386 -DSYSV \
7054         -DRENAME -DNOREDIRECT -DNOIKSD -DNOJC -DNOLEARN $(KFLAGS) -Otcl -M3e" \
7055         "LNKFLAGS = -s" "LIBS = -lc -lx -ltcp"
7056
7057 # SCO XENIX/386 2.3.3 SysV with SCO TCP/IP
7058 # System V STREAMS TCP developed by Lachman Associates Inc and
7059 # Convergent Technologies.
7060 # -DRENAME removed since some reports indicate it is not supported
7061 # (whereas others say it is.)
7062 sco3r2lai:
7063         @echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7064         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7065         "CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7066         -DNAP -DTCPSOCKET -DPWID_T=int -DNOREDIRECT -DNOIKSD -DNOLEARN \
7067         $(KFLAGS) -Otcl -i -M3e" \
7068         "LNKFLAGS = -i -s" "LIBS = -lc -lx -lsocket"
7069
7070 sco3r2laic:
7071         @echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7072         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7073         "CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7074         -DNAP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES -DM_TERMINFO -DNOLEARN \
7075         -DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) -Otcl -i -M3e" \
7076         "LNKFLAGS = -i -s" "LIBS = -ltinfo -lc -lx -lsocket"
7077
7078 #SCO UNIX/386 3.2v2 (POSIX job control), shared libraries.
7079 sco3r22:
7080         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7081         make wermit KTARGET=$${KTARGET:-$(@)} \
7082         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7083         -DNAP -DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOIKSD \
7084         -DNOREDIRECT $(KFLAGS) -O" \
7085         "LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7086
7087 #SCO UNIX/386 3.2v2, POSIX job control, fullscreen file transfer display,
7088 #dynamic memory allocation, shared C library
7089 sco3r22c:
7090         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7091         @echo 'Warning: If make blows up, edit the makefile to join'
7092         @echo 'the following four continued lines into one line.'
7093         make wermit KTARGET=$${KTARGET:-$(@)} \
7094         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7095         -DCK_CURSES -DDIRENT -DRENAME -DNOREDIRECT -DNOIKSD \
7096         -DPID_T=pid_t -DPWID_T=int $(KFLAGS) -O" \
7097         "LNKFLAGS = -s" "LIBS = -lcurses -lc_s -lc -lx"
7098
7099 #SCO UNIX/386 3.2v2 with gcc 1.40 or later (POSIX job control)
7100 sco3r22gcc:
7101         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2, gcc'
7102         @echo 'Warning: If make blows up, edit the makefile to join'
7103         @echo 'the following seven continued lines into one line.'
7104         make wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" \
7105         "CFLAGS= -O -DPOSIX -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
7106         -DNOLEARN -DRENAME -traditional -fpcc-struct-return -fstrength-reduce \
7107         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
7108         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7109         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7110         -DPID_T=pid_t -DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) " \
7111         "LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7112
7113 #SCO UNIX/386 3.2v2 (ODT 1.1) (POSIX job control) with SCO TCP/IP, shared libs
7114 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7115 sco3r22net:
7116         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.2 + TCP/IP...'
7117         @echo 'Warning: If make blows up, edit the makefile to join'
7118         @echo 'the following three continued lines into one line.'
7119         make xermit KTARGET=$${KTARGET:-$(@)} \
7120         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET \
7121         -DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOREDIRECT -DNOIKSD \
7122         $(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lsocket -lc_s -lc -lx"
7123
7124 #As above, but with curses for fullscreen file transfer display.
7125 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7126 sco3r22netc:
7127         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 + TCP/IP...'
7128         @echo 'Warning: If make blows up, edit the makefile to join'
7129         @echo 'the following three continued lines into one line.'
7130         make xermit KTARGET=$${KTARGET:-$(@)} "CFLAGS= \
7131         -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DRENAME \
7132         -DCK_CURSES -DDIRENT -DNOIKSD -DNOREDIRECT \
7133         -DPID_T=pid_t -DPWID_T=int -O $(KFLAGS)" \
7134         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7135
7136 #SCO XENIX 2.3.4, no curses, no TCP/IP, no IKSD.
7137 #This one built and tested in C-Kermit 7.0.
7138 #lcfp is C library floating-point support.
7139 #Use -M3 to generate 32-bit i386 code instead of 16-bit segmented i286 code.
7140 #Use -Me to enable MS nonstandard keywords in system headers.
7141 #Use -W2 or W3 to increase the warning level.
7142 #OK: 2011/06/15
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 sco600:
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 # OK 2011/06/14
7626 qnx32:
7627         @echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit...'
7628         $(MAKE) xermit \
7629         "LNKFLAGS = -N4M -3r" \
7630         "CFLAGS = -ms -3r -DQNX -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7631         -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7632         -DNOINITGROUPS -DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7633         "LIBS= -lsocket -lncurses -ltermcap"
7634
7635 # As above but no networking since some QNX systems do not have TCP/IP
7636 # installed, or the TCP/IP developers kit, which includes all the needed
7637 # header files.  This entry has not been tested on a QNX system that, in
7638 # fact, does not have TCP/IP installed; some adjustments might be necessary,
7639 # in particular regarding the use of select(): is -lsocket needed, can we
7640 # get the needed definitions from non-TCP/IP header files (FD_SET, etc)?
7641 qnx32nonet:
7642         @echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit, no net...'
7643         $(MAKE) xermit \
7644         "LNKFLAGS = -N4M -3r" \
7645         "CFLAGS = -3r -ms -DQNX -DNONET -DNOIKSD -DCK_CURSES \
7646         -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7647         -DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7648         "LIBS= -lsocket -lncurses -ltermcap"
7649         @wermit -h >use.qnx
7650         @usemsg wermit use.qnx
7651         @rm use.qnx
7652
7653 # Synonym for qnx32.
7654 qnx:
7655         $(MAKE) qnx32 "KFLAGS=$(KFLAGS)"
7656
7657 # QNX 4.21 and above, 16-bit version, Watcom C 8.5 - and higher on i286 PCs
7658 # and above.
7659 #
7660 #       IMPORTANT: Do not use Watcom C 10.6!!!
7661 #       If you have it installed, add "-v9.52 to CFLAGS"
7662 #
7663 # NOTE: QNX 4.23 onward does not work on 286's anyway.
7664 # Stacksize 26000, objects larger than 100 bytes in their own segments,
7665 # string constants to the codesegment, etc.  Fully configured except job ctrl.
7666 # This entry works for building a 16-bit executable on a 32-bit system, but
7667 # has not been tested on a 16-bit system.  Uses large memory model, links
7668 # explicitly with large-model sockets library.  Correct-model curses library
7669 # is chosen automatically.  See comment in qnx32 entry about -DNOUUCP.
7670 #
7671 # WARNING:
7672 #
7673 # Watcom C prior to 10.6 never had released curses library. To link against it,
7674 # you must obtain ported free curses source from ftp://ftp.qnx.com/usr/free,
7675 # then compile and build library (cursesl.lib) and place it in /usr/lib.  You
7676 # must also copy curses.h to /usr/include.  Be aware that if you have Watcom
7677 # 10.6 installed, you should already have curses.h, which is the new ncurses
7678 # library. You must back it up and use free curses.h instead, since ncurses is
7679 # only for 32-bit applications and some definitions in these files are
7680 # different (e.g., clearok()).  For safety, curses is not defined in build.
7681 #
7682 # In 7.0 -DNOHELP added to keep ckuus2.c from blowing up; NOCSETS and NOSPL
7683 # added because ckuus4 was blowing up, and NOFLOAT just because it seemed
7684 # dangerous (remove -DNOFLOAT if you want to try it), The result works OK
7685 # except for some mysterious beeps upon termination of the top-level keyword.
7686 #
7687 # Things to try next time we get in trouble:
7688 #  . Change -zt100 to something smaller like -zt25
7689 #  . Change -Oatx to -Omilerat (enable stack checking)
7690 #  . Maybe get rid of -v9.52 -- it's only there because we were warned.
7691 #
7692 qnx16:
7693         @echo 'Making C-Kermit $(CKVER) for QNX 4.21, 16-bit...'
7694         $(MAKE) xermit \
7695         "LNKFLAGS = -2 -ml -N 26000" \
7696         "CFLAGS = -2 -Oatx -zc -zt100 -ml -DQNX -DQNX16 -DNOUUCP -DNOHELP \
7697         -DCK_REDIR -DSELECT -DSELECT_H -DNOJC -DNOGETUSERSHELL -DNOCSETS \
7698         -v9.52 -DTCPSOCKET -DCK_RTSCTS -DCK_ANSIC -DNOINITGROUPS -DNOKVERBS \
7699         -DNORANDOM -DNOCSETS -DNOSPL -DNOFLOAT -DPID_T=pid_t $(KFLAGS)"
7700
7701 # QNX 4.1, 16-bit version, with Watcom C 8.5 on i286 PCs and above.
7702 # stacksize 26000, objects larger than 100 bytes in their own segments,
7703 # string constants to the codesegment, etc.  Add -DNOUUCP if desired.
7704 qnx16_41:
7705         @echo 'Making C-Kermit $(CKVER) for QNX 4.1, 16-bit...'
7706         $(MAKE) xermit \
7707         "LNKFLAGS = -mh -N 26000" "CFLAGS = -Wc,-fpc -Wc,-j -DNOGETUSERSHELL \
7708         -Wc,-Ols -Wc,-zdf -Wc,-zc -Wc,-zt100 -mh -DPOSIX -DQNX -DDIRENT \
7709         -DNOCYRIL -DNODEBUG -DNOMSEND -DMINIDIAL -DNOXMIT -DNOSCRIPT -DNOSPL \
7710         -DNOSETKEY -DNOINITGROUPS -DQNX16 -DPID_T=pid_t $(KFLAGS)"
7711
7712 # QNX Neutrino 2 (pwaechtler@qnx.de) crosscompiled on QNX 4.25.
7713 # Gets lots of compiler warnings.
7714 qnx_nto2+:
7715         @echo 'Making C-Kermit $(CKVER) for QNX Neutrino 2+ '
7716         cc -o wart ckwart.c
7717         $(MAKE) xermit \
7718         "CC = qcc -Vgcc_ntox86" \
7719         "CC2 = qcc -Vgcc_ntox86" \
7720         "LNKFLAGS = " \
7721         "CFLAGS = -DNEUTRINO -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7722         -DNOUUCP -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS \
7723         -DNOJC -DNOINITGROUPS -DCK_ANSIC -DPID_T=pid_t -DUNIX -DDIRENT \
7724         -DMYREAD -DBSD44ORPOSIX -DSVORPOSIX -DNDGPWNAM $(KFLAGS)" \
7725         "LIBS= -lsocket -lncurses "
7726
7727 # QNX 6 (= Neutrino 2.xx) native build (kirussel@cisco.com).
7728 qnx6:
7729         @echo 'Making C-Kermit $(CKVER) for QNX6'
7730         $(MAKE) xermit KTARGET=QNX6 \
7731         "CFLAGS = -DPOSIX -DCK_POSIX_SIG -DNETPTY -DNOARROWKEYS \
7732         -DUSE_TIOCSDTR -DBIGBUFOK -DCKMAXOPEN=100 -DRLOGCODE -DNOREALPATH \
7733         -DMAXNAMLEN=48 -DQNX6 -DUSE_TERMIO -DINIT_SPTY \
7734         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DDYNAMIC \
7735         -DTCPSOCKET -DNOGETUSERSHELL -DCK_REDIR -DSELECT -DSELECT_H \
7736         -DCK_RTSCTS -DNOJC -DSVORPOSIX -DBSD44ORPOSIX -DNOUUCP -DCK_ANSIC \
7737         $(KFLAGS) -O" \
7738         "LIBS= -lsocket  -lncurses"
7739
7740 #MINIX/2.0 32 Bit version for intel 386+ running the POSIX-compliant MINIX
7741 # version 2.0 (The definition of fatal avoids a conflict with a symbol by
7742 # the same name in the curses library.) It is impossible to compile with
7743 # network support since Minix does not support Berkeley sockets.
7744 # Note: use chmem liberally on the compiler passes, make, and the final
7745 # kermit executable. (3 megabytes of memory for each is sufficient.)
7746 # From Terry McConnell, Syracuse U, and Will Rose.  Will says:
7747 # The stacks for make and some compiler passes needed to be increased
7748 # with chmem as follows:
7749 #   make 1MB
7750 #   /usr/lib/em_cemcom.ansi 3MB
7751 #   /usr/lib/em_opt 1MB
7752 #   /usr/lib/i386/cg 1MB
7753 #   /usr/lib/i386/as 1MB
7754 # The compiler temporary directory was set to /usr/tmp via the TMPDIR
7755 # environment variable; more than 1MB of temporary space was needed.
7756 # Kermit itself needs at least 1MB of stack.
7757 minix20:
7758         @echo 'Making C-Kermit $(CKVER) for MINIX 2.0/386...'
7759         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} EXT=o \
7760         "CFLAGS=  -wo -DV7 -DMINIX2 -DMINIX -DSIG_V -D_POSIX_SOURCE \
7761         -DCKCPU=\\\"i-386\\\" -DNOIKSD -Dfatal=myfatal -DCK_CURSES -DNOLEARN \
7762         -DNOSYSLOG -DUSE_MEMCPY -DNOREALPATH $(KFLAGS)" "LIBS= -lcurses"
7763
7764 #MINIX/386 (PC Minix modified by Bruce Evans in Australia for 386 addressing)
7765 # For MINIX 1.5+ (but < 2.0)
7766 minix386:
7767         @echo 'Making C-Kermit $(CKVER) for MINIX/386...'
7768         @echo 'TOTALLY UNTESTED!'
7769         $(MAKE) wermit EXT=s KTARGET=$${KTARGET:-$(@)} \
7770         "CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7771
7772 #MINIX/386 Minix modified by Bruce Evans in Australia to use 386 addressing
7773 minix386gcc:
7774         @echo 'Making C-Kermit $(CKVER) for MINIX/386 with gcc...'
7775         @echo 'TOTALLY UNTESTED!'
7776         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC=gcc -g -O" "CC2=gcc -g" \
7777         "CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7778
7779 #MINIX - 68k version with ACK compiler.
7780 # If you have trouble compiling or running wart, "touch wart".
7781 # If it still doesn't work, "touch ckcpro.c".
7782 # The version configured below has many features removed, including
7783 # the TRANSMIT, MSEND, HELP, and SCRIPT commands, international
7784 # character set support, and the entire script programming language.
7785 # But it does have an interactive command parser.
7786 # Make sure make(1) has (at least) 100000 chmemory!
7787 # If you are using the Amsterdam C compiler, you might have to add "-D__ACK__".
7788 minix68k:
7789         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with ACK...'
7790         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7791         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7792         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7793         -DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7794         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7795
7796 #MINIX - 68k version with c68 compiler.
7797 # If you have trouble compiling or running wart, "touch wart" or
7798 # "touch ckcpro.c". Compiling ckudia.c (no -DNODIAL!) might fail. :-(
7799 # Give c68 250000 bytes of stack+heap; make sure make(1) has at least
7800 # 100000 chmemory.  On a 1MB Atari ST this means that the recursive
7801 # call of make fails due to memory shortage.  Try "make -n minixc68 >makeit",
7802 # followed by ". makeit".  Otherwise, as above.
7803 minixc68:
7804         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7805         $(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7806         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7807         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7808         -DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7809         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7810
7811 #MINIX - 68k version with c68 compiler.
7812 #A variation on the above that was recently (Sep 95) reported to work.
7813 minixc68a:
7814         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7815         $(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7816         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE \
7817         -DCK_ANSIC -DNODEBUG -DNOTLOG -DMINIDIAL -DEXTEN -DMYCURSES \
7818         -DNOSCRIPT -DNOCSETS -DNOSPL -DNOJC -DDIRENT -DNOLEARN \
7819         -DNOSETKEY -DNOESCSEQ $(KFLAGS) \
7820         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7821
7822 #MIPS Computer Systems with UMIPS RISC/OS 4.52 = AT&T UNIX System V R3.0.
7823 #Remove -DNOJC if job control can be safely used.
7824 mips:
7825         @echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7826         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7827         "CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC -DNOLEARN -DPID_T=int \
7828         -DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)"
7829
7830 #As above, but with TCP/IP and fullscreen support.
7831 mipstcpc:
7832         @echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7833         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7834         "CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC \
7835         -DTCPSOCKET -DCK_CURSES -I/usr/include/bsd \
7836         -DPID_T=int -DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)" \
7837         "LIBS = -lcurses -lbsd"
7838
7839 #Motorola Delta System V/68 R3, signal() is void rather than int.
7840 #Uses dirent.h and Honey DanBer uucp.  Supports TCP/IP.
7841 #After building, use "mcs -d" to reduce size of the executable program.
7842 sv68r3:
7843         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3...'
7844         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7845         "CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DTCPSOCKET \
7846         -DNOUNICODE -DNOLEARN -DUSE_MEMCPY $(KFLAGS) -O" "LNKFLAGS ="
7847
7848 #Motorola Delta System V/68 R3V5, signal() is void rather than int.
7849 #Uses dirent.h and Honey DanBer UUCP.  Supports TCP/IP.
7850 #After building, use "mcs -d" to reduce size of the executable program.
7851 sv68r3v5:
7852         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5'
7853         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7854         "CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DUSE_MEMCPY \
7855         -DTCPSOCKET -DINADDRX -DNOUNICODE -DFNFLOAT -DNOLEARN $(KFLAGS) -O" \
7856         "LNKFLAGS =" "LIBS = -linet -lm"
7857
7858 #Motorola MVME147 System V/68 R3 V5.1. Requires gcc 2.1 to compile.
7859 #After building, use "mcs -d" to reduce size of the executable program.
7860 sv68r3v51:
7861         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5.1'
7862         $(MAKE) wermit "CC=gcc-delta" "CC2=gcc-delta" \
7863         KTARGET=$${KTARGET:-$(@)} \
7864         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNODEBUG -DNO_DNS_SRV -DNOLEARN \
7865         -DNOUNICODE -DFNFLOAT -DSV68 -DUSE_MEMCPY $(KFLAGS) \
7866         -O2 -v -ftraditional" \
7867         "LNKFLAGS = -s -v" "LIBS = -lm881 -lm"
7868
7869 #Motorola MVME147 System V/68 R3V6. derived from Motorola Delta System R3V5.
7870 #Checked on larger Motorola System V/68 R3V6 (with NSE Network Services Ext.)
7871 #After building, use "strip" to reduce size of the executable program.
7872 # "LIBS = -lnsl" removed in C-Kermit 6.1 - put back if needed.
7873 # "LIBS = lm" added in 7.1/8.0 for floating-point math.
7874 # ckuusr.c clobbers the optimizer.
7875 sv68r3v6:
7876         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V6'
7877         $(MAKE) ckuusr.$(EXT) KTARGET=$${KTARGET:-$(@)} \
7878         "CFLAGS = -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
7879         -DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
7880         -DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)"
7881         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7882         "CFLAGS = -O -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
7883         -DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
7884         -DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)" \
7885         "LNKFLAGS =" "LIBS = -lm"
7886
7887 #Motorola Delta System V/88 R32, signal() is void rather than int.
7888 #Uses dirent.h and Honey DanBer uucp.  Needs <sys/utime.h> for setting
7889 #file dates.  Supports TCP/IP.
7890 #After building, use "mcs -d" to reduce size of the executable program.
7891 sv88r32:
7892         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R32...'
7893         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7894         "CFLAGS = -DSV88R32 -DDIRENT -DHDBUUCP -DTCPSOCKET \
7895         -DSYSUTIMEH -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG $(KFLAGS) -O" \
7896         "LIBS= -lcurses -lresolv" "LNKFLAGS = -s"
7897
7898 #Motorola Delta System V/88 R40.  Has <sys/termiox.h>, regular Berkeley
7899 #sockets library, i.e. in.h and inet.h are not misplaced in sys (rather than
7900 #netinet and arpa, respectively).  Uses ANSI C constructs, advisory file
7901 #locking on devices, etc.  curses support added.  Reportedly, the
7902 #/usr/include/sys/vnode.h file has a bug which must be fixed before this
7903 #makefile entry can work correctly.  The "if DEBUG" directive at about line
7904 #320 must be changed to "ifdef DEBUG" (Reportedly, this was fixed in
7905 #in System V/88 R4.3).
7906 #After building, use "mcs -d" to reduce size of the executable program.
7907 sv88r40:
7908         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R40...'
7909         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7910         "CFLAGS = -O -DSVR4 -DMOTSV88R4 -DDIRENT -DHDBUUCP -DSTERMIOX \
7911         -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG -DFNFLOAT \
7912         $(KFLAGS)" \
7913         "LIBS= -lsocket -lnsl -lcurses -lresolv -lm" "LNKFLAGS = -s"
7914
7915 #As above but without the floating-point math library.
7916 sv88r40nm:
7917         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R40...'
7918         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7919         "CFLAGS = -O -DSVR4 -DMOTSV88R4 -DDIRENT -DHDBUUCP -DSTERMIOX \
7920         -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG $(KFLAGS)" \
7921         "LIBS= -lsocket -lnsl -lcurses -lresolv" "LNKFLAGS = -s"
7922
7923 #As above but with floating-point math library support \ffp...() functions
7924 #and S-Expressions.
7925
7926 #Olivetti X/OS R2.3, 3.x.
7927 #NOTES:
7928 # . If you build the executable on 2.x X/OS, it will also run on 3.x.
7929 # . If you build it on 3.x X/OS, it will NOT run on 2.x.
7930 # . Kermit can run with no privileges unless the uucp lines are protected,
7931 #   in which case kermit must be owned by uucp with suid bit set:
7932 #   chown uucp kermit ; chmod 4111 kermit.
7933 xos23:
7934         @echo 'Making C-Kermit $(CKVER) for Olivetti X/OS...'
7935         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7936         'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP $(KFLAGS)' \
7937         "LIBS=" "LNKFLAGS="
7938
7939 #As above, but with curses.
7940 xos23c:
7941         @echo 'Making C-Kermit $(CKVER) for Olivetti X/OS with curses...'
7942         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7943         'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP -DCK_CURSES $(KFLAGS)' \
7944         "LIBS=-lcurses" "LNKFLAGS="
7945
7946 ckuuid:
7947         @echo 'building C-Kermit $(CKVER) set-UID/set-GID test programs'
7948         $(CC) -DANYBSD -DSAVEDUID -o ckuuid1 ckuuid.c
7949         $(CC) -DANYBSD -o ckuuid2 ckuuid.c
7950         $(CC) -DANYBSD -DNOSETREU -o ckuuid3 ckuuid.c
7951         $(CC) -DANYBSD -DSETEUID -DNOSETREU -o ckuuid4 ckuuid.c
7952         $(CC) -o ckuuid5 ckuuid.c
7953         @echo 'Read the top of ckuuid.c for directions...for testing'
7954         @echo 'you must make these programs setuid and setgid'
7955
7956 ############################################################################
7957 # A N T I Q U I T I E S
7958 #
7959 # The following are antique targets from C-Kermit 5A or earlier.  They have
7960 # not been updated or tested in years.  Most of them will need recent features
7961 # disabled, usually with some combination of -DNOUNICODE, -DNOIKSD, -DNOANSI,
7962 # -DNOCKGHNLHOST, -DNO_DNS_SRV, -DNOREDIRECT, -DNOREALPATH, -DNOCURSES, etc.
7963 # They are also missing the KTARGET=$${KTARGET:-$(@)} business.
7964 # For details see ckuins.txt and ckccfg.txt.
7965 #
7966 ############################################################################
7967
7968 #Berkeley Unix 2.8, 2.9 for PDP-11s with I&D space, maybe also Ultrix-11???
7969 #C-Kermit(5A) is simply too large (even turning off almost every feature
7970 #available) to run without both I&D space plus overlays.  The old comment
7971 #suggested running 'pcc' but that won't help.  Changing 'cc' to 'ckustr.sed'
7972 #will cause a string extraction to be done, saving D space by moving strings
7973 #to a file.
7974 bsd29:
7975         @echo Making C-Kermit $(CKVER) for 2.8 or 2.9BSD.
7976         @echo Read the makefile if you have trouble with this...
7977         $(MAKE) ovwermit \
7978         "CFLAGS= -DBSD29 -DNODEBUG -DNOTLOG -DNOCSETS -DNOHELP \
7979         -DNOSCRIPT -DNOSPL -DNOXMIT -DNODIAL $(KFLAGS)" \
7980         "LNKFLAGS= -i -lndir" "CC= cc " "CC2= cc"
7981
7982 bsd210:
7983         @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.10BSD.
7984
7985 bsd211:
7986         @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.11BSD.
7987
7988 #Charles River Data Systems Universe with UNOS Version 9.2
7989 crds:
7990         @echo 'Making C-Kermit $(CKVER) for Charles River Data Systems...'
7991         make xermit \
7992         "CFLAGS = -DATTSV -DNOANSI -DDIRENT -DLONGFN -DTCPSOCKET \
7993         -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DNOSETREU \
7994         -Dsuspend=ksuspend $(KFLAGS) -O" "LNKFLAGS ="
7995
7996 #Microport SV/AT for IBM PC/AT 286 and clones, System V R2.
7997 #The -O flag may fail on some modules (like ckuus2.c), in which case you
7998 #should compile them by hand, omitting the -O.  If you get "hash table
7999 #overflow", try adding -DNODEBUG.
8000 #Also, reportedly this compiles better with gcc than with cc.
8001 mpsysv:
8002         @echo 'Making C-Kermit $(CKVER) for Microport SV/AT 286...'
8003         $(MAKE) wermit \
8004         "CFLAGS= -DATTSV -DNOLEARN $(KFLAGS) -O -Ml" "LNKFLAGS = -Ml"
8005
8006 #Microsoft "Xenix/286" e.g. for IBM PC/AT
8007 xenix:
8008         @echo 'Making C-Kermit $(CKVER) for Xenix/286'
8009         $(MAKE) wermit \
8010         "CFLAGS= -DXENIX -DNOFILEH -DNOLEARN $(KFLAGS) -Dunix -F 3000 -i" \
8011         "LNKFLAGS = -F 3000 -i"
8012
8013 #PC/IX, Interactive Corp System III for IBM PC/XT
8014 pcix:
8015         @echo 'Making C-Kermit $(CKVER) for PC/IX...'
8016         $(MAKE) wermit \
8017         "CFLAGS= -DPCIX -DISIII -DNOLEARN $(KFLAGS) \
8018         -Dsdata=sdatax -O -i" "LNKFLAGS = -i"
8019
8020 #Integrated Solutions Inc V8S VME 68020
8021 isi:
8022         @echo Making C-Kermit $(CKVER) for 4.2BSD on ISI...
8023         $(MAKE) wermit "CC = cc" \
8024         "CFLAGS= -DBSD4 -DTCPSOCKET -DINADDRX -DDCLPOPEN -DDEBUG -DNOSETREU \
8025         -DCK_CURSES -DNOLEARN $(KFLAGS)" "LIBS = -lcurses -ltermcap"
8026
8027 #Interactive Corp version of AT&T System III
8028 #is3: (very old, probably not sufficient for 5A or later)
8029 #       @echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8030 #       make wermit "CFLAGS = -DISIII -Ddata=datax -O -i" "LNKFLAGS = -i"
8031 #The following should work, use it if you don't have gcc.
8032 #Use is3gcc if you have gcc.
8033 is3:
8034         @echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8035         $(MAKE) wermit \
8036         "CFLAGS= -DISIII $(KFLAGS) -Ddata=datax -DNAP -DHDBUUCP
8037         -DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O -i" "LNKFLAGS = -i"
8038
8039 #Interactive UNIX System V R3, no network support.  Uses <dirent.h> and Honey
8040 #DanBer UUCP.  If this entry does not compile correctly, try any or all of the
8041 #following.  These suggestions also apply more or less to the other is5r3xxx
8042 #entries that follow this one.
8043 # . Remove the UID_T and GID_T definitions, or change them as required.
8044 # . Change -DDIRENT to -DSDIRENT.
8045 # . Add -DSIGTYP=void.
8046 # . Remove -g from LNKFLAGS.
8047 # . Add -DNOANSI to remove compiler complaints about ANSI C constructions
8048 # . Add other -DNOxxx's to save space (e.g. -DNOCSETS)
8049 # See the next few makefile entries for related examples.
8050 # Also see sys5r32is for making a portable i386 SVR3 binary.
8051 is5r3:
8052         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8053         @echo 'If this does not work please read the makefile entry.'
8054         $(MAKE) wermit \
8055         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8056         -DUID_T=ushort -DGID_T=ushort -DI386IX $(KFLAGS)" \
8057         "LNKFLAGS = -g"
8058
8059 #Interactive Corp System System V R3 with gcc
8060 is3gcc:
8061         @echo 'Making C-Kermit $(CKVER) for Interactive System V R3 / gcc...'
8062         $(MAKE) wermit CC=gcc CC2=gcc \
8063         'CFLAGS = -D_SYSV3 -DISIII -Ddata=datax -DNAP -DHDBUUCP -DNOREALPATH \
8064         -DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O' "LNKFLAGS ="
8065
8066 #Interactive UNIX System V R3, POSIX variant.  Untested.
8067 #Uses dirent.h and Honey DanBer uucp.  Read comments in is5r3 entry.
8068 is5r3p:
8069         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8070         $(MAKE) wermit \
8071         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8072         -DI386IX -DPOSIX $(KFLAGS)" "LNKFLAGS=" "LIBS=-lcposix"
8073
8074 #Interactive UNIX SVR3 2.2.1, job control, curses, no net, gcc.
8075 is5r3gcc:
8076         $(MAKE) wermit CC=gcc CC2=gcc \
8077         "CFLAGS=-g -posix -DSVR3 -DDIRENT -DNOREALPATH \
8078         -DHDBUUCP -O -DNOCSETS -DI386IX -DSVR3JC -DCK_CURSES \
8079         $(KFLAGS)" LNKFLAGS="-posix" LIBS="-lcurses -lc_s"
8080
8081 #Interactive UNIX System V R3 with TCP/IP network support.
8082 #Needs -linet for net functions.  signal() is void rather than int.
8083 #Uses dirent.h and Honey DanBer uucp. Read comments in is5r3 entry.
8084 #Also see is5r3net2 if you have trouble with this entry.
8085 is5r3net:
8086         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8087         @echo 'If this does not work please read the makefile entry.'
8088         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8089         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOREALPATH \
8090         -DI386IX $(KFLAGS) -O" "LIBS = -linet"
8091
8092 is5r3netgcc:
8093         $(MAKE) is5r3net CC=gcc CC2=gcc
8094
8095 #Interactive UNIX System V R3, no job control, signal() void rather than int.
8096 #Uses dirent.h and Honey DanBer uucp.  Needs -linet for net functions.
8097 #Read comments in is5r3 entry.  Use this entry if is5r3net fails.
8098 #Saves some space by stripping (-s) and using shared library (-lc_s).
8099 is5r3net2:
8100         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8101         $(MAKE) wermit \
8102         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOJC -DNOREALPATH \
8103         -DSIGTYP=void -DNOANSI -DI386IX $(KFLAGS) -O" \
8104         "LNKFLAGS= -s" "LIBS = -linet -lc_s"
8105
8106 #Interactive UNIX System V R3 (version 2.2 or later) with job control & curses.
8107 #Uses dirent.h and Honey DanBer UUCP.
8108 is5r3jc:
8109         @echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8110         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8111         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8112         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8113         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD \
8114         $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
8115
8116 is5r3jcgcc:
8117         $(MAKE) is5r3jc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8118         KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8119
8120 #Sunsoft/Interactive UNIX System V R3 (version 2.2 or later)
8121 #with job control, curses, and TCP/IP networking.
8122 #Uses dirent.h and Honey DanBer UUCP.
8123 is5r3netjc:
8124         @echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8125         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8126         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8127         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8128         -DPOSIX_JC -DCK_REDIR -DTCPSOCKET -DSELECT \
8129         $(KFLAGS)" "LIBS=-linet -lcurses -lc_s"
8130
8131 is5r3netjcgcc:
8132         $(MAKE) is5r3netjc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8133         KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8134
8135 #Masscomp System III
8136 rtu:
8137         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU System III...'
8138         $(MAKE) wermit \
8139         "CFLAGS= -UFIONREAD -DATTSV $(KFLAGS) -O" "LNKFLAGS =" "LIBS= -ljobs"
8140
8141 #Masscomp/Concurrent RTU 4.0 or later, Berkeley environment.
8142 #Includes <ndir.h> = /usr/include/ndir.h
8143 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8144 rtubsd:
8145         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8146         ucb make wermit \
8147         "CFLAGS= -DBSD4 -DRTU -DNDIR -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
8148         "LIBS = -lndir"
8149
8150 #Masscomp/Concurrent RTU 4.0 or later, same as above,
8151 #Includes "usr/lib/ndir.h"
8152 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8153 rtubsd2:
8154         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8155         ucb make wermit \
8156         "CFLAGS= -DBSD4 -DRTU -DXNDIR -DHDBUUCP $(KFLAGS)" \
8157         "LIBS = -lndir"
8158
8159 #Masscomp/Concurrent RTU 4.0 or later, same as above,
8160 #Includes <sys/ndir.h>
8161 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8162 rtubsd3:
8163         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x BSD...'
8164         ucb make wermit "CFLAGS= -DBSD4 -DRTU -DHDBUUCP $(KFLAGS)" \
8165         "LIBS = -lndir"
8166
8167 #Masscomp/Concurrent RTU 4.0 or later, System V R2, using <dirent.h>.
8168 #In case of problems, add back the -DRTU switch.
8169 #In case -DTCPSOCKET gives trouble, remove it.
8170 rtus5:
8171         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x...'
8172         $(MAKE) wermit \
8173         "CFLAGS= -DATTSV -DHDBUUCP -DDIRENT -DTCPSOCKET $(KFLAGS)"
8174
8175 #Masscomp/Concurrent RTU 4.x, System V R3, using <dirent.h>.
8176 #Use this one if rtus5 gives warnings about pointer type mismatches.
8177 #In case of problems, add back the -DRTU switch.
8178 rtus5r3:
8179         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU Sys V R3...'
8180         $(MAKE) wermit "CFLAGS= -DSVR3 -DHDBUUCP -DDIRENT $(KFLAGS)"
8181
8182 #DEC Pro-3xx with Pro/Venix V1.0 or V1.1
8183 # Requires code-mapping on non-I&D-space 11/23 processor, plus some
8184 # fiddling to get interrupt targets into resident code section.
8185 # This almost certainly doesn't work any more.
8186 provx1:
8187         @echo 'Making C-Kermit $(CKVER) for DEC Pro-3xx, Pro/Venix 1.x...'
8188         $(MAKE) wart "CFLAGS= -DPROVX1 $(KFLAGS)" "LNKFLAGS= "
8189         $(MAKE) wermit "CFLAGS = -DPROVX1 -DNOFILEH -md780" \
8190                 "LNKFLAGS= -u _sleep -lc -md780"
8191
8192 #Nixdorf Targon/31.
8193 #AT&T UNIX System V R3, signal() is void rather than int.
8194 #Uses dirent.h without Honey DanBer uucp.
8195 t31tos40x:
8196         @echo 'Making C-Kermit $(CKVER) for Targon/31 with TOS 4.0.xx...'
8197                 $(MAKE) wermit \
8198                 "CFLAGS= -DSVR3 -DDIRENT $(KFLAGS) -O" \
8199                 "LNKFLAGS="
8200
8201 #NCR Tower 1632, OS 1.02
8202 tower1:
8203         @echo 'Making C-Kermit $(CKVER) for NCR Tower 1632, OS 1.02...'
8204         $(MAKE) wermit "CFLAGS= -DTOWER1 $(KFLAGS)"
8205
8206 #NCR Tower 32, OS Release 1.xx.xx
8207 tower32-1:
8208         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 1 System V R2...'
8209         @echo 'Add KFLAGS=-DISDIRBUG if you get errors about S_ISREG/S_ISDIR.'
8210         $(MAKE) wermit \
8211         "CFLAGS = -DATTSV $(KFLAGS) -O" "LNKFLAGS = -n"
8212
8213 #NCR Tower 32, OS Release 2.xx.xx
8214 tower32-2:
8215         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 2 System V R2...'
8216         $(MAKE) wermit \
8217         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -O2" \
8218         "LNKFLAGS = -n"
8219
8220 #NCR Tower 32, OS Releases based on System V R3
8221 #Don't add -DNAP (doesn't work right) or -DRDCHK (not available in libc).
8222 tower32:
8223         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3...'
8224         $(MAKE) wermit \
8225         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8226         -DUID_T=ushort -DGID_T=ushort -O1"
8227
8228 #NCR Tower 32, OS Releases based on System V R3
8229 tower32g:
8230         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3, gcc...'
8231         $(MAKE) wermit "CC = gcc" \
8232         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8233         DUID_T=ushort -DGID_T=ushort -O -fstrength-reduce -fomit-frame-pointer"
8234
8235 #Fortune 32:16, For:Pro 1.8 (mostly like 4.1bsd)
8236 ft18:
8237         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 1.8...'
8238         $(MAKE) wermit \
8239         "CFLAGS= -DNODEBUG -DBSD4 -DFT18 -DNOFILEH $(KFLAGS) \
8240         -DPID_T=short"
8241
8242 #Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd).
8243 #The modules that break the optimizer are compiled separately.
8244 ft21:
8245         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'
8246         $(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8247         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8248         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8249         $(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8250         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8251         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8252         $(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8253         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8254         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8255         $(MAKE) wermit \
8256         "CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \
8257         -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8258         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8259
8260 #Valid Scaldstar
8261 #Berkeleyish, but need to change some variable names.
8262 valid:
8263         @echo 'Making C-Kermit $(CKVER) for Valid Scaldstar...'
8264         $(MAKE) wermit \
8265         "CFLAGS= -DBSD4 -DNODEBUG -DNOTLOG -Dcc=ccx -DFREAD=1 $(KFLAGS)"
8266
8267 #IBM IX/370 on IBM 370 Series mainframes
8268 #Mostly like sys3, but should buffer packets.
8269 ix370:
8270         @echo 'Making C-Kermit $(CKVER) for IBM IX/370...'
8271         $(MAKE) wermit "CFLAGS = -DIX370 -DATTSV $(KFLAGS) -i -O" \
8272         "LNKFLAGS = -i"
8273
8274 #Amdahl UTS 2.4 on IBM 370 series compatible mainframes.
8275 #Mostly like V7, but can't do initrawq() buffer peeking.
8276 uts24:
8277         @echo 'Making C-Kermit $(CKVER) for Amdahl UTS 2.4...'
8278         $(MAKE) wermit "CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
8279         -DUTS24 -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
8280         -DNPTYPE=$(NPTYPE) $(DIRECT) $(KFLAGS)"
8281
8282 #Amdahl UTSV UNIX System V = System V R2 or earlier.
8283 utsv:
8284         @echo 'Making C-Kermit $(CKVER) for Amdahl UTSV...'
8285         $(MAKE) wermit \
8286         "CFLAGS = -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i"
8287
8288 #Amdahl UTSV UNIX System V = System V R2 or earlier, with TCP sockets library.
8289 utsvtcp:
8290         @echo 'Making C-Kermit $(CKVER) for Amdahl UTSV w/tcp...'
8291         $(MAKE) wermit "CFLAGS = \
8292         -DTCPSOCKET -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i" \
8293         "LIBS = -lsocket"
8294
8295 #BBN C/70 with IOS 2.0
8296 #Mostly Berkeley-like, but with some ATTisms
8297 c70:
8298         @echo 'Making C-Kermit $(CKVER) for BBN C/70 IOS 2.0...'
8299         $(MAKE) wermit "CFLAGS= -DBSD4 -DC70 $(KFLAGS)"
8300
8301 #Zilog ZEUS 3.21
8302 zilog:
8303         @echo 'Making C-Kermit $(CKVER) for Zilog Zeus 3.21...'
8304         $(MAKE) wermit \
8305         "CFLAGS = -DATTSV -DZILOG -DNODEBUG $(KFLAGS) -i -O" \
8306         "LNKFLAGS = -i -lpw"
8307
8308 #Whitechapel MG-1 Genix 1.3
8309 white:
8310         @echo 'Making C-Kermit $(CKVER) for Whitechapel MG-1 Genix 1.3...'
8311         @touch ckcpro.c
8312         $(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0  $(KFLAGS)"
8313
8314 #Pixel 1000
8315 pixel:
8316         @echo 'Making C-Kermit $(CKVER) for Pixel 1000...'
8317         $(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0 $(KFLAGS)"
8318
8319 ptx:
8320         $(MAKE) "MAKE=$(MAKE)" dynixptx12
8321
8322 #CDC VX/VE 5.2.1
8323 vxve:
8324         @echo 'Making C-Kermit $(CKVER) for CDC VX/VE 5.2.1...'
8325         $(MAKE) wermit \
8326         "CFLAGS = -DATTSV -DVXVE -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8327         "LNKFLAGS = -i"
8328
8329 #DIAB DS90 or LUXOR ABC-9000 with pre-5.2 DNIX.  Sys V with nap() and rdchk().
8330 # nd = no opendir(), readdir(), closedir(), etc.
8331 # Some of the modules fail to compile with -O.
8332 dnixnd:
8333         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with very old DNIX 5.2.'
8334         $(MAKE) wermit \
8335         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDCLPOPEN \
8336         -U__STDC__ $(KFLAGS)"
8337
8338 #DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8339 # This one has opendir(), readdir(), closedir(), etc.
8340 # Some of the modules fail to compile with -O.
8341 dnix:
8342         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8343         $(MAKE) wermit \
8344         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8345         -U__STDC__ $(KFLAGS)"
8346
8347 #DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8348 # As above, but with curses and TCP/IP.
8349 # You might get complaints about redefinition of O_RDONLY, etc, because
8350 # of bugs in the DNIX header files, which can be fixed by adding #ifndef...
8351 # around the offending definitions in the header files.
8352 dnixnetc:
8353         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8354         $(MAKE) wermit \
8355         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8356         -DTCPSOCKET -DCK_CURSES -I/usr/include/bsd -U__STDC__ $(KFLAGS)" \
8357         "LIBS = -ln -lcurses"
8358
8359 #DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk().
8360 dnix5r3:
8361         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8362         @echo 'with Honey DanBer UUCP'
8363         $(MAKE) wermit \
8364         "CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8365         -DCK_CURSES -DRENAME $(KFLAGS) -O" "LIBS= -lcurses"
8366
8367 #DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk() + TCP/IP
8368 dnix5r3net:
8369         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8370         @echo 'with Honey DanBer UUCP and TCP/IP'
8371         $(MAKE) wermit \
8372         "CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8373         -DTCPSOCKET -DCK_CURSES -DRENAME $(KFLAGS) -O \
8374         -I/usr/include/bsd" "LIBS = -ln -lcurses"
8375
8376 #DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8377 #ANSI C compilation and libraries.
8378 #Note that for DNIX 5.3 2.2 you have to correct a bug in /usr/include/stdlib.h:
8379 #change "extern void free(char *str);"
8380 #to     "extern void free(void *str);"
8381 #NOTE: This bug is reportedly fixed in DNIX 5.3 2.2.1.
8382 #Should you get fatal errors caused by harmless pointer-type mismatches,
8383 #like between signed and unsigned char, just remove -X7.
8384 dnix5r3ansi:
8385         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8386         @echo 'with ANSI C Honey DanBer UUCP'
8387         $(MAKE) wermit \
8388         "CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8389         -DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS)" \
8390         "LIBS= -lcurses"
8391
8392 #DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8393 # + TCP/IP, ANSI C compilation and libraries.
8394 #Should you get fatal errors caused by harmless pointer-type mismatches,
8395 #like between signed and unsigned char, just remove -X7.
8396 dnix5r3ansinet:
8397         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8398         @echo 'with ANSI C Honey DanBer UUCP'
8399         $(MAKE) wermit \
8400         "CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8401         -DTCPSOCKET -DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS) \
8402         -I/usr/include/bsd" "LIBS= -ln -lcurses"
8403
8404 #Ridge 32 with ROS 3.2
8405 ridge32:
8406         @echo 'Making C-Kermit $(CKVER) Ridge 32 ROS 3.2'
8407         $(MAKE) wermit \
8408         "CFLAGS = -DATTSV -DNOFILEH -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8409         "LNKFLAGS = -i"
8410
8411 #Altos 486, 586, or 986 with Xenix 3.0
8412 altos:
8413         @echo 'Making C-Kermit $(CKVER) for Altos x86 with Xenix 3.0...'
8414         $(MAKE) wermit \
8415         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8416         "LNKFLAGS= -i"
8417
8418 #Altos 986 with Xenix 3.0, as above, but command-line only, minimal size.
8419 #For systems with small memories.  It might also be necessary to chop certain
8420 #modules up into smaller pieces, e.g. ckuus3-6, because of symbol table
8421 #overflow.   If this makefile is too big or complex for the Altos, compile
8422 #and link by hand or write shell scripts.
8423 altosc:
8424         @echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, remote...'
8425         $(MAKE) wermit \
8426         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8427         -DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOICP $(KFLAGS) -Mm -O" \
8428         "LNKFLAGS= -Mm -s"
8429
8430 #Altos 986 with Xenix 3.0, as above, but interactive only, minimal size.
8431 altosi:
8432         @echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, local...'
8433         $(MAKE) wermit \
8434         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8435         -DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOCMDL -DNOFRILLS -DNOHELP \
8436         -DNOSETKEY $(KFLAGS) -Mm -O" "LNKFLAGS= -Mm -s"
8437
8438 # Altos ACS68000 68000 System, UNIX System 3 Release 2, 512k memory.
8439 # also needs getcwd() external function; see ckuins.txt file.
8440 # also, sys/types.h needed modifying:
8441 #   #ifdef __SYS_TYPES_H__, #define ..., #endif
8442 # also, ckuus2.c MUST be compiled NOOPT else symbol table is destroyed!
8443 # Submission by Robert Weiner/Programming Plus, rweiner@progplus.com.
8444 #
8445 altos3:
8446         @echo 'Making C-Kermit $(CKVER) for Altos ACS68k UNIX System III'
8447         $(MAKE) ckuus2.$(EXT) "CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8448         -DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i"
8449         $(MAKE) wermit \
8450         "CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8451         -DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i -O" \
8452         "LNKFLAGS = -i" "LIBS = getcwd.$(EXT)"
8453
8454 #MINIX - Original PC version with 64K+64K limit.
8455 # Reportedly, the linker (asld) can run out of space while linking.  The only
8456 # way around this is to make a copy of libc.a from which all modules that are
8457 # not used by Kermit are removed.  If you have trouble compiling or running
8458 # wart, "touch wart".  If that doesn't help, "touch ckcpro.c".
8459 # The version configured below has no interactive command parser.
8460 # If you can build this version successfully, maybe there will be room for
8461 # a minimal interactive command parser too; try replacing -DNOICP with
8462 # -DNOSPL, plus every other -DNOxxx flag there is, except for -DNOICP
8463 # (see ckccfg.txt).
8464 minix:
8465         @echo 'Making C-Kermit $(CKVER) for MINIX, no command parser...'
8466         @echo 'TOTALLY UNTESTED!'
8467         $(MAKE) wermit EXT=s \
8468         "CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8469         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V \
8470         -DNOXMIT -DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
8471         -DNOSCRIPT -DNOCSETS -DNOICP -DNOSETKEY $(KFLAGS)" \
8472         "LNKFLAGS= -i -T"
8473
8474 #MINIX - PC version with 64K+64K limit, new (as yet unreleased) ACK 2.0 beta C
8475 #compiler, which outputs .o object files, rather than .s.  But 'make' still
8476 #expects .s files, so must be patched to use .o.  Tested on Minix 1.5.10.
8477 minix15:
8478         @echo 'Making C-Kermit $(CKVER) for MINIX (new ACK 2.0 compiler),'
8479         @echo 'no command parser...  TOTALLY UNTESTED!'
8480         $(MAKE) wermit \
8481         "CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8482         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V -DNODIAL \
8483         -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOICP $(KFLAGS)" \
8484         "LNKFLAGS= -i -T"
8485
8486 #MINIX3 - MINIX 3.0 (no VM) - May-Aug 2005 (not sure if this ever worked...)
8487 minix3:
8488         @echo 'Making C-Kermit $(CKVER) for MINIX3...'
8489         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8490         "CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -DMINIX2 \
8491         -DMINIX3 -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8492         -DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DDNOREALPATH \
8493         -DTCPSOCKET -DNOTIMEZONE -DNOFTP -DNO_DNS_SRV -O"
8494
8495 #MINIX315 - MINIX 3 1.5 - January 2010
8496 minix315:
8497         @echo 'Making C-Kermit $(CKVER) for Minix 3 1.5...'
8498         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8499         "CFLAGS= -DMINIX315 -DPOSIX -DNOUUCP -DNOJC -DNOLEARN $(KFLAGS) \
8500         -DHAVE_OPENPTY -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8501         -DSYSTIMEH -DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DNOREALPATH \
8502         -DTCPSOCKET -DNOTIMEZONE -DNO_DNS_SRV -DNOFTP -O"
8503
8504 #PFU Compact A Series UNIX System V R3, SX/A TISP V10/L50 (Japan)
8505 #Maybe the -i link option should be removed?
8506 sxae50:
8507         @echo 'Making C-Kermit $(CKVER) for PFU SX/A V10/L50...'
8508         $(MAKE) xermit \
8509         "CFLAGS= -DSVR3 -DDIRENT -DsxaE50 -DTCPSOCKET $(KFLAGS) -i -O" \
8510         "LNKFLAGS= "
8511
8512 #Tektronix 6130, 4319, 4301, etc, with UTek OS, /usr/spool/uucp/LCK./...
8513 #The models that support hardware flow control.
8514 utek:
8515         @echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, hardware flow control'
8516         $(MAKE) wermit \
8517         "CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8518         -DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8519         -DTRMBUFL=2048 -DCK_DTRCTS $(KFLAGS)"
8520
8521 #Tektronix 4315, 4316, 4317 with UTek OS, /usr/spool/uucp/LCK./...
8522 #The models that do not fully support hardware flow control.
8523 uteknohwfc:
8524         @echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, no h/w flow control'
8525         $(MAKE) wermit \
8526         "CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8527         -DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8528         -DTRMBUFL=2048 $(KFLAGS)"
8529
8530 #Tektronix XD88 with  UTekV OS
8531 utekvr3:
8532         @echo 'Making C-Kermit $(CKVER) for Tektronix XD88 UTekV R3...'
8533         $(MAKE) wermit \
8534         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP \
8535         -DTCPSOCKET -DSYSUTIMEH -DCK_CURSES $(KFLAGS) -O" \
8536         "LIBS= -lcurses" "LNKFLAGS= -s"
8537
8538 #Perkin-Elmer 3200 Xelos R02 or earlier
8539 ccop1:
8540         @echo 'Making C-Kermit $(CKVER) for Xelos & Public Domain Dirent calls'
8541         @echo 'or System V R2 or earlier...'
8542         $(MAKE) wermit \
8543         "CFLAGS = -DATTSV -Dvoid=int -DDIRENT -DCK_CURSES \
8544         $(KFLAGS) -O" "LNKFLAGS =" "LIBS= -lcurses -ltermlib"
8545
8546 #Encore, UMAX 4.3 (BSD) but without acucntrl program.
8547 encore:
8548         $(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=$(KFLAGS)"
8549
8550 #Encore, as above, but with curses file transfer display included.
8551 encorec:
8552         $(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=-DCK_CURSES $(KFLAGS)" \
8553         "LIBS= -lcurses -ltermcap"
8554
8555 #Encore, UMAX 4.3 (BSD) but without acucntrl program.
8556 umax43:
8557         @echo Making C-Kermit $(CKVER) for Encore UMAX 4.3...
8558         $(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8559         "CFLAGS= -DBSD43 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8560
8561 #Encore, UMAX 4.2 (BSD)
8562 umax42:
8563         @echo Making C-Kermit $(CKVER) for Encore UMAX 4.2...
8564         $(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8565         "CFLAGS= -DBSD4 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8566
8567 #Encore 88K UMAX 5.3 with TCP/IP support
8568 encore88k:
8569         @echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP...'
8570         $(MAKE) xermit \
8571         "CFLAGS = -q ext=pcc -DSVR3 -DTCPSOCKET -DDIRENT \
8572         -DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8573
8574 #Encore 88K UMAX 5.3 with TCP/IP support
8575 encore88kgcc:
8576         @echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP, gcc...'
8577         $(MAKE) xermit CC=gcc CC2=gcc \
8578         "CFLAGS = -DSVR3 -DTCPSOCKET -DDIRENT \
8579         -DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8580
8581 #SONY NEWS, NEWS-OS 4.01C
8582 sonynews:
8583         @echo Making C-Kermit $(CKVER) for SONY NEWS-OS 4.01C...
8584         $(MAKE) xermit "CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O"
8585
8586 #Run Lint on this mess for selected versions.
8587 #These are pretty much obsolete since ANSI C / gcc.
8588 lintsun:
8589         @echo 'Running Lint on C-Kermit $(CKVER) sources for SunOS version...'
8590         lint -x -DSUNOS4 -DDIRENT -DTCPSOCKET -DSAVEDUID \
8591         ck[cu]*.c > ckuker.lint.sun
8592
8593 lintbsd:
8594         @echo 'Running Lint on C-Kermit $(CKVER) sources for BSD 4.2 version..'
8595         lint -x -DBSD4 -DTCPSOCKET ck[cu]*.c > ckuker.lint.bsd42
8596
8597 lints5:
8598         @echo 'Running Lint on C-Kermit $(CKVER) sources for Sys V version...'
8599         lint -x -DATTSV ck[cu]*.c > ckuker.lint.s5
8600
8601 #Who remembers TECO?
8602 love:
8603         @echo 'Not war?'