dh_installchangelogs: adjust to use ckc301.txt. changelog: explain -O1 usage
[ckermit.git] / makefile
1 # makefile / Makefile / ckuker.mak / CKUKER.MAK
2 #
3 # Mon Jul 11 09:24:25 2011
4 BUILDID=20110711
5 CKVER= "9.0.301"
6 #
7 # -- Makefile to build C-Kermit for UNIX and UNIX-like platforms --
8 #
9 # Copyright (C) 1985, 2011,
10 #   Trustees of Columbia University in the City of New York.
11 #   All rights reserved.  See the C-Kermit COPYING.TXT file or the
12 #   copyright text in the ckcmai.c module for disclaimer and permissions.
13 #   In case you can't find the COPYING.TXT file, it contains the 
14 #   Simplified 3-Clause BSD License, which is an Open Source license.
15 #
16 # Author: Frank da Cruz, Columbia University
17 # 612 West 115th Street, New York NY 10025-7799, USA
18 # Email: fdc@columbia.edu
19 # Web:   http://kermit.columbia.edu/
20 # FTP:   ftp://kermit.columbia.edu/kermit/
21 #
22 # Note: Author is no longer at Columbia University or at the 115th Street
23 # address effective 1 July 2011.  The email address should still work,
24 # as well as the website and FTP addresses, for the foreseeable future.
25 #
26 # Contributions from many others.  Special thanks to Jeff Altman for the
27 # secure-build targets, Peter Eichhorn, assyst GmbH, for the consolidated
28 # HP-UX targets and the "uninstall" target, to Robert Lipe for the updated
29 # and consolidated SCO UNIX / ODT / OSR5 targets, to Ric Anderson for the
30 # IRIX 6.x targets, to Seth Theriault for major improvements to the
31 # Mac OS X targets.
32 #
33 # C-Kermit is written and produced by hand without any automated procedures
34 # such as autoconf / automake / configure, although some of the targets below
35 # (especially the linux target) inspect the environment and make some
36 # decisions in the most portable way possible. The automated tools are not
37 # used because (a) C-Kermit predates them, and (b) they are not portable to
38 # all the platforms where C-Kermit must be (or once was) built, and (c) to
39 # keep C-Kermit as independent as possible from external tools over which
40 # we have no control.
41 #
42 # Most entries use the "xermit" target, which uses the select()-based CONNECT
43 # module, ckucns.c.  The "wermit" target uses the original fork()-based CONNECT
44 # module, ckucon.c, which has some drawbacks but was portable to every Unix
45 # variant whether it had TCP/IP or not (select() is part of the TCP/IP
46 # library, which was not standard on older Unixes).  If your target still uses
47 # the "wermit" target, please try substituting the "xermit" one and if it
48 # works, let us know (mailto:kermit-support@columbia.edu).  When changing a
49 # target over from wermit to xermit, also remove -DNOLOEARN.
50 #
51 # CAREFUL: Don't put the lowercase word "if", "define", or "end" as the first
52 # word after the "#" comment introducer in the makefile, even if it is
53 # separated by whitespace.  Some versions of "make" understand these as
54 # directives.  Uppercase letters remove the danger, e.g. "# If you have..."
55
56 # WARNING: This is a huge makefile.  Although
57 # this is less likely since the turn of the century, some "make" programs
58 # might run out of memory.  If this happens to you, edit away the parts that
59 # do not apply to your platform and try again.
60 #
61 # WARNING 2: In many cases this file invokes itself recursively, sometimes
62 # several levels deep (as in the Linux targets); i.e. some targets are used
63 # as 'subroutines' of other targets, with parameters passed by setting
64 # environment variables.  For that reason, don't use 'make -e'.
65 #
66 # Certain UNIX variations have their own separate makefiles:
67 #  . For 2.10 or 2.11 BSD on the DEC PDP-11, use ckubs2.mak.
68 #  . For Plan 9, use ckpker.mk.
69 #
70 # Separate build procedures are provided non-UNIX platforms: VMS, VOS,
71 # AOS/VS, etc.  See the ckaaaa.txt file or the Kermit website for details.
72 #
73 #
74 # DIRECTIONS FOR UNIX
75 #
76 # Rename this file to "makefile" or "Makefile" if necessary.  Pick out the
77 # entry most appropriate for your UNIX version from the list below and then
78 # give the appropriate "make" command, for example "make aix", "make macosx",
79 # "make linux".  If you experience any difficulties with the build procedure,
80 # then please also read any comments that accompany the make entry itself
81 # (search for the make entry name on the left margin).
82 #
83 # Other targets:
84 #  'make install' is an installation script (read accompanying comments!).
85 #  'make uninstall' undoes 'make install' (read accompanying comments!).
86 #  'make clean' removes intermediate and object files.
87 #  'make show' tells the default include and lib paths for secure builds.
88 #
89 # IMPORTANT:
90 #   For more detailed installation instructions, read the files ckuins.txt
91 #   and ckccfg.txt, also available at the Kermit website in HTML form:
92 #   http://www.columbia.edu/kermit/ckuins.html
93 #   http://www.columbia.edu/kermit/ckccfg.html
94 #
95 #  For descriptions of known problems and limitations,
96 #   read the files ckcbwr.txt and ckubwr.txt (the "beware files") or:
97 #   http://www.columbia.edu/kermit/ckcbwr.html
98 #   http://www.columbia.edu/kermit/ckubwr.html
99 #
100 # Most targets build C-Kermit with its symbol table included.  To reduce the
101 # size of the executable program, add "LNKFLAGS=-s" to the end of your 'make'
102 # command or to the makefile entry, or 'strip' the executable after
103 # building.  To further reduce the size after building, use 'mcs -d' if your
104 # Unix version has such a command.  For further details on size reduction, read
105 # ckccfg.txt to find out how to remove features that you don't need.
106 #
107 # TCP/IP networking support: If your C-Kermit version does not include TCP/IP
108 # networking, but your UNIX system does, try adding -DTCPSOCKET to the CFLAGS
109 # of your makefile entry.  If that doesn't work, look at some of the other
110 # targets that include this flag for ideas about what libraries might need to
111 # be included (typically -lsocket and/or -lBSD and/or -lnsl and/or -linet).
112 # NOTE: In some cases (old versions of SCO or HP-UX), you might need not only
113 # a C compiler, but also a "TCP/IP developers kit" for the required object
114 # libraries and header files.
115 #
116 # Please report modifications, failures (preferably with fixes) or successes
117 # to the author, fdc@columbia.edu.
118 #
119 # TARGETS FOR DIFFERENT UNIX PLATFORMS AND VERSIONS:
120 #
121 # + Marks those that have been built successfully for C-Kermit 9.0 or later.
122 # - Those that once built OK but no longer do (e.g. too big).
123 # ? Those that worked in a previous version but have not been tested recently.
124 # --------------------------
125 # Some commonly used targets:
126 #
127 # + "make linux" should work for any version of Linux on any hardware.
128 # + "make linux+ssl" ditto, with OpenSSL security added.
129 # + "make linux+krb5" ditto, with Kerberos 5 security added.
130 # + "make linux+krb5+ssl" Linux with OpenSSL and Kerberos 5.
131 # + "make netbsd", NetBSD, any version.
132 # + "make netbsd+ssl", NetBSD with OpenSSL 0.9.7 or later.
133 # + "make netbsd+krb5", NetBSD with Kerberos 5.
134 # + "make netbsd+krb5+ssl", NetBSD with Kerberos 5 and OpenSSL 0.9.7 or later.
135 # + "make freebsd", FreeBSD 4.1 or later.
136 # + "make freebsd+ssl", FreeBSD 5.0 or later with OpenSSL 0.9.7 or later.
137 # + "make openbsd", OpenBSD 2.3 or later.
138 # + "make openbsd+ssl", OpenBSD 2.3 or later with OpenSSL 0.9.7 or later.
139 # + "make mirbsd", MirBSD.
140 # + "make mirbsd+ssl", MirBSD with OpenSSL 0.9.7 or later.
141 # + "make macosx" should work for any Mac OS X version 10.3.9 or later.
142 # + "make macosx+krb5+openssl" Mac OS X 10.3.9 or later + Kerberos V + OpenSSL.
143 # + "make aix" should work for any version of AIX 4.2 or later.
144 # + "make aixg" should work for any version of AIX 4.2 or later, using gcc.
145 # + "make aix+ssl" ditto, with OpenSSL (specifying SSLLIB and SSLINC)
146 # + "make aix+ibmssl" ditto, with IBM OpenSSL
147 # + "make solaris9", "make solaris10" for Solaris 9 or 10 with Sun cc.
148 # + "make solaris9g", "make solaris10g" for Solaris 9 or 10 with gcc.
149 # + "make solaris11" for Solaris 11 with Sun CC
150 # + "make solaris11g" for Solaris 11 with gcc
151 # + "make sco_osr600" for SCO OpenServer 6.0.0.
152 #
153 # For other current OSs such as Solaris, HP-UX, and SCO there are separate
154 # targets for different combinations of OS version and compiler; see the
155 # complete list.  For older OS's see the complete list.  If an old target
156 # doesn't work in this release of C-Kermit you can get a previous release from
157 # the Kermit FTP site: ftp://kermit.columbia.edu/kermit/
158 #
159 # SECURE TARGETS (versions that support authentication and encryption)
160 #  are described after the following list.  Search for ******* below.
161 #
162 # --------------------------
163 # Complete list (alphabetical):
164 # ? for 386BSD (Jolix) 0.0, 0.1, "make 386bsd" (see comments in entry),
165 #     or (preferably, if it works) "make bsd44" or "make bsd44c".
166 # ? for Acorn RISCiX, "make riscix" or "make riscix-gcc"
167 # ? for Alliant FX/8 with Concentrix 4.1 or later, "make bsdlck"
168 # ? for Altos 486, 586, 986 with Xenix 3.0, "make altos"
169 # ? for Altos ACS68000, 8Mhz 68000, UNIX System 3 Rel 2, 512K, "make altos3"
170 # ? for Amdahl UTS 2.4 on IBM 370 series & compatible mainframes, "make uts24"
171 # ? for Amdahl UTSV IBM 370 series & compatible mainframes, "make utsv"
172 # ? for Amdahl UTSV IBM 370 series mainframes with TCP/IP, "make utsvtcp"
173 # ? for Amdahl mainframes with UNIX System V R 5.2.6b 580, "make sys3"
174 # ? for Apollo Aegis 9.x, DOMAIN/IX 9.x, "make aegis"
175 #    (Last tested in C-Kermit 5A(189))
176 # ? for Apollo DOMAIN/IX, if the above fails, try "make apollobsd"
177 # ? for Apollo with SR10.0 or later, BSD environment, "make sr10-bsd"
178 # ? for Apollo with SR10.0 or later, System V environment, "make sr10-s5r3"
179 # ? for Apple Macintosh II with A/UX pre-3.0, "make aux", "auxgcc" or "auxufs"
180 # ? for Apple Macintosh with A/UX 3.0 and gcc, "make aux3gcc" or aux3gccc
181 # ? for Apple PowerMac with MkLinux, "make mklinux" (read Linux entry first)
182 # ? for Apple PowerMac with LinuxPPC, "make linuxppc"
183 # ? for Apple Macintosh with Minix 1.5.10, "make minix68k" or "make minixc68"
184 # ? for Apple Macintosh with Mac OS X 1.0 (Rhapsody), "make macosx10"
185 #     (no curses), "make macosx10c" (curses), or "make macosx10nc" (ncurses).
186 #     Or "make macosx10ncx" (ncurses but "make macosx10nc" doesn't work).
187 # ? for Apple Macintosh with Mac OS X 10.2, "make macosx102nc" (ncurses).
188 # ? for Apple Macintosh with Mac OS X 10.3, "make macosx103"
189 # ? for Apple Macintosh with Mac OS X 10.3.9 or later, "make macosx"
190 # ? for Arix System 90 with AT&T SVR3, "make sys5r3na"
191 # - for AT&T 6300 with IN/ix, "make sys5"
192 # - for AT&T 6300 PLUS, "make att6300" or (with no debugging) "make att6300nd"
193 # ? for AT&T 6386 WGS UNIX PC, "make sys5r3"
194 # ? for AT&T 3B2, 3B20 systems, "make att3b2".
195 #   for AT&T 3B1, 7300 UNIX PC (see notes with the entries):
196 #     In C-Kermit 7.0, only the gcc entries work:
197 # ?   "make sys3upcg", "make sys3upcgc", "make att351gm"
198 #    The others fail with "too many defines" (usually in ckuusr.h):
199 # -   "make sys3upc", "make sys3upcold", "make sys3upcc", "make sys3upcx",
200 #       "make sys3upcm", "make att351m"
201 # ? for AT&T System III/System V R2 or earlier, "make sys3" or "make sys3nid"
202 # ? for AT&T System III/System V with Honey DanBer UUCP, "make sys3hdb"
203 # ? for AT&T System V on DEC VAX, "make sys3" or "make sys5r3"
204 # ? for AT&T System V R3, use "make sys5r3" or "make sys5r3c"
205 # ? for AT&T System V/386 R3.2 built on Interactive 4.1.1, "make sys5r32is".
206 # ? for AT&T System V/386 R320.0 Versyss Systems, use "make sys5r3"
207 #     or "make sys5r3c".
208 # ? for AT&T System V R4, "make sys5r4", "make sys5r4sx", or "make sys5r4nx",
209 #     or if the ANSI C function prototyping makes trouble, add -DNOANSI,
210 #     as in "sys5r4sxna" entry
211 # ? for AT&T (USL) System V R4.2 use the sys5r4* entries.
212 # ? for Atari Falcon with MiNT, "make posix"
213 # ? for Atari ST with Minix ST 1.5.10.3, "make minix68k" or "make minixc68"
214 # ? for BBN C/70 with IOS 2.0, "make c70"
215 # ? for BeBox with Be OS 1.x DR7, "make beboxdr7"
216 #     Compiles OK but doesn't link with default linker which is limited to 64K.
217 #     Links OK with "Code Warrior Gold".  Many hacks in the source code need
218 #     to be removed when DR8 and later come out.
219 #     (Last tested in C-Kermit 6.0)
220 # - for BeBox with Be OS 1.x DR8, "make bebox"
221 #     (Needed functions missing from operating system and/or not working.)
222 # - for Bell Labs UNIX Version 6 (6th Edition), there is no makefile entry.
223 # ? for Bell Labs UNIX Version 7 (7th Edition), "make v7" (but see notes below)
224 #    (last built successfully in C-Kermit 5A188)
225 # ? for Bell Labs Research UNIX Version 10, "make bellv10"
226 #    (last built successfully in C-Kermit 6.0)
227 # ? for Bell Labs / Lucent Plan 9, use separate makefile ckpker.mk:
228 #    can be built for Intel, MIPS, 680x0, and PowerPC (last built C-Kermit 7.0)
229 # ? for BSDI BSD/386 1.x, "make bsdi"
230 # ? for BSDI BSD/OS 2.x, "make bsdi2"
231 # ? for BSDI BSD/OS 3.0 or 3.1, "make bsdi3"
232 # ? for BSDI BSD/OS 4.x, "make bsdi4"
233 # ? for BSDI BSD/OS 4.x, to build a binary that also works on FreeBSD,
234 #     "make bsdix".
235 # ? for Berkeley Unix 2.4, "make v7" (but read v7 material below)
236 # ? for Berkeley Unix 2.9 (DEC PDP-11 or Pro-3xx), "make bsd29"
237 # - for Berkeley Unix 2.10, use ckubs2.mak (a separate makefile)
238 # - for Berkeley Unix 2.11, use ckubs2.mak (a separate makefile)
239 #     This makefile is too big.  Read the instructions in ckubs2.mak.
240 #     "make -f ckubs2.mak bsd210" or "make -f ckubs2.mak bsd211".
241 #     (last built successfully in C-Kermit 6.0 - later versions too big)
242 # ? for Berkeley Unix 2.11 "make -f ckubs2.mak bsd210noicp" (no command parser)
243 # ? for Berkeley Unix 4.1, "make bsd41"
244 # ? for Berkeley Unix 4.2 on VAX, "make bsd42" or "make bsd42c"
245 # ? for Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP, "make bsdhdb"
246 # ? for Berkeley Unix 4.3 on VAX, "make bsd43", "make bsd43nc".
247 # ? for Berkeley Unix 4.3 on VAX, no networking "make bsd43nonet.
248 # ? for Berkeley Unix 4.3 without acucntrl program, "make bsd42" or "bsd42c"
249 #     NOTE: all the C-Kermit 7.0 full builds for old BSDs fail with
250 #     "too many defines" in CPP, even on big architectures like VAX.  This
251 #     can be worked around with a clever ruse.  See comments at target.
252 # ? for Berkeley Unix 4.3, command-line only, "make bsdm".
253 # ? for Berkeley Unix 4.3-Tahoe, same as 4.3 BSD
254 # ? for Berkeley Unix 4.3-Reno, "make bsd43" or "make bsd44" or "make bsd44c"
255 # ? for Berkeley Unix 4.3-Carson City, "make bsd44" or "make bsd44c"
256 # ? for Berkeley Unix 4.4-Networking/2 or -Alpha, "make bsd44" or "make bsd44c"
257 # ? for Berkeley Unix 4.4, "make bsd44" or "make bsd44c"
258 # ? for Berkeley Unix 4.4-Lite, "make bsd44" or "make bsd44c"
259 # ? for Bull DPX/2 with BOS/X, "make bulldpx2"
260 # ? for Cadmus, "make sys3"
261 #   for Caldera, see SCO, Linux.
262 # ? for Callan Unistar, "make sys3"
263 # ? for CDC VX/VE 5.2.1 System V emulation, "make vxve"
264 # ? for Charles River Data Systems Universe 680x0 with UNOS 9.2, maybe
265 #     also other UNOS versions, "make crds"
266 # ? for CIE Systems 680/20 with Regulus, "make cie"
267 # ? for Commodore Amiga 3000UX Sys V R4, "make sys5r4sx"
268 # ? for Commodore Amiga 3000UX Sys V R4 and TCP/IP, "make svr4amiganet"
269 # ? for Commodore Amiga with Minix 1.5.10, "make minix68k" of "make minixc68"
270 # ? for Concurrent/Masscomp with RTU 4.0 or later, BSD environment, "make
271 #     rtubsd", "make rtubsd2", "make rtubsd3" (depending on where ndir.h
272 #     is stored, see entries below).
273 # ? for Concurrent/Masscomp with RTU 4.0 or later, System V R2, "make rtus5"
274 # ? for Concurrent (Perkin-Elmer) 3200 series, "make sys5".
275 # ? for Concurrent (Perkin-Elmer) 3200 series with <dirent.h>, "make ccop1"
276 # ? for Concurrent PowerMAX OS SVR4, "make powermax"
277 # ? for Consensys UNIX SV/386 R4V3, "make sys5r4sxtcpc" or "make sys5r4sx"
278 # ? for Convergent with CTIX Sys V R2, "make sys5"
279 # ? for Convergent with CTIX 6.4.1, "make ctix"
280 # ? for Convex C1, "make convex"
281 # ? for Convex C210 with Convex/OS 8, "make convex8"
282 # ? for Convex C2 with Convex/OS 9.1, "make convex9"
283 # ? for Convex C2 with Convex/OS 10.1 and gcc 2.x, "make convex10gcc"
284 # ? for Cray Research X/MP or YMP or C90 with UNICOS 6.x (System V R3),
285 #       "make cray"
286 # ? for Cray Research X/MP or YMP or C90 with UNICOS 7.x (System V R4),
287 #       "make cray"
288 # ? for Cray Research X/MP or YMP or C90 with UNICOS 8.0 Alpha, "make cray8"
289 # ? for Cray Research X/MP or Y-MP or C90 with UNICOS 9.0, "make cray9"
290 # ? for Cray Computer Cray-2 or Cray3 with CSOS, "make craycsos"
291 # ? for Cyber 910 (Silicon-Graphics Iris) with Irix 3.3, "irix33"
292 # ? for Data General AViiON with DG/UX 5.4 before R3.00, "make dgux540"
293 #     or "make dgux540c" (compile ckwart separately if necessary)
294 # ? for DG/UX 5.4 on AViiON Intel models, "make dgux540i" or dgux540ic.
295 # ? for DG/UX 5.4R4.11 on AViiON, all models, "make dgux54411"
296 # ? for DG/UX 5.4R4.20 on AViiON, all models, "make dgux54420"
297 # ? for Data General AViiON with DG/UX 4.3x using Sys V-isms, "make dgux430"
298 # ? for Data General AViiON with DG/UX 4.3x using BSD-isms, "make dgux430bsd"
299 # ? for Data General AViiON, earlier UNIX versions,
300 #     "make sys5r3" (maybe compile ckwart separately, or "touch ckcpro.c")
301 # ? for Data General MV systems with DG/UX, ???
302 # ? for Data General MV systems with MV/UX, use AOS/VS C-Kermit (CKDKER.MAK)
303 # ? for Data General MV systems with AOS/VS, use CKDKER.MAK (last = C-K 7.0)
304 # ? for DEC PDP-11 with Berkeley UNIX 2.x, see Berkeley UNIX 2.x.
305 # ? for DEC PDP-11 with Mini-UNIX (Bell 6th Edition for PDP-11 with no MMU),
306 #     probably no way to fit C-Kermit without I&D space.
307 # ? for DEC PDP-11 with Ultrix-11 3.x, ??? (probably needs overlays)
308 # ? for DEC VAX with Ultrix 1.x "make bsd"
309 # ? for DEC VAX with Ultrix 2.x "make ultrix2x"
310 # ? for DEC VAX or DECstation with Ultrix 3.0, 3.1, "make ultrix3x"
311 # ? for DECstation or VAX with Ultrix 4.0 or 4.1, "make ultrix40"
312 # ? for DECstation or VAX with Ultrix 4.2, "make ultrix42" or "make ultrix42c"
313 # ? for DECstation or VAX with Ultrix 4.x, POSIX world, "make posix"
314 # ? for DECstation or VAX with Ultrix 4.3, "make ultrix43".
315 # ? for DECstation or VAX with Ultrix 4.4, "make ultrix44".
316 # ? for DECstation 5000/50, /150 or /260 (R4x00 MIPS CPU), Ultrix 4.3A or later
317 #     "make ultrix43-mips3" or "make ultrix43c-mips3"
318 # ? for DECstation (MIPS) with Berkeley Sprite, "make bsd44"?
319 # ? for DECstation (MIPS) with OSF/1 V1.0 to 1.3, "make dec-osf"
320 # ? for DEC Alpha with OSF/1 1.0 to 1.3, "make dec-osf"
321 # ? for DEC PC 486 with OSF/1, "make dec-osf"
322 # ? for DEC Alpha with OSF/1 2.x, "make dec-osf20"
323 # ? for DEC Alpha with OSF/1 3.0, "make dec-osf30"
324 # ? for DEC Alpha with Digital UNIX 3.2, "make du32"
325 # ? for DEC Alpha with Digital UNIX 4.0-4.0D, "make du40" or "make du40gcc"
326 # ? for DEC Alpha with Digital UNIX 4.0E or higher, see Tru64.
327 # + for DEC Alpha with any version of DU or OSF/1, "make dec-osf1"
328 # - for DEC Pro-350 with Pro/Venix V1.x, "make provx1" (version 5A is too big)
329 # ? for DEC Pro-380 with Pro/Venix V2.0 (Sys V), "make sys3" or "make sys3nid"
330 # ? for DEC Pro-380 with 2.9, 2.10, or 2.11 BSD, "make bsd29" or "make bsd210"
331 #   for DEC PDP-11 with 2.xBSD (use separate makefile ckubs2.mak)
332 # ? for Dell UNIX Issue 2.x (= USL Sys V/386 R4.x + fixes), "make dellsys5r4"
333 #     or "make dellsys5r4c" (last tested in C-Kermit 5A).
334 # ? for DIAB DS90 with DNIX (any version) create an empty <sys/file.h> if
335 #     this file does not already exist (or add -DNOFILEH to the make entry).
336 # ? for DIAB DS90 with DNIX 5.2 (Sys V.2) or earlier, "make dnix",
337 #     "make dnixnd", or (to add curses and TCP/IP) "make dnixnetc",
338 # ? for DIAB DS90 with DNIX 5.3 (Sys V.3), "make dnix5r3"
339 # ? for DIAB DS90 with DNIX 5.3 (Sys V.3) and TCP/IP, "make dnix5r3net"
340 # ? for DIAB DS90 with DNIX 5.3 2.2 (Sys V.3), ANSI C, "make dnix5r3ansi"
341 #     or, to include TCP/IP, "make dnix5r3ansinet",
342 #     but you have to fix a bug in /usr/include/stdlib.h first:
343 #     change "extern void free(char *str);" to "extern void free(void *str);"
344 # ? for Dolphin Server Technology Triton 88/17 with SV/88 R3.2, "make sv88r32"
345 # ? for Encore Multimax 310, 510 with Umax 4.2, "make umax42"
346 # ? for Encore Multimax 310, 510 with Umax 4.3, "make umax43"
347 # ? for Encore Multimax 310, 510 with Umax V 2.2, use Berkeley cc, "make bsd"
348 # ? for Encore 88K with Umax V 5.2, "make encore88k"
349 # ? for ESIX System V R4.0.3 or 4.04 with TCP/IP support, "make esixr4"
350 #     NOTE: You can also build on Unixware 2.x with "make esixr4", and run
351 #     on ESIX, but there you must first:
352 #       ln /usr/lib/libsocket.so /usr/lib/libsocket.so.1
353 #       ln /usr/lib/libnsl.so /usr/lib/libnsl.so.1
354 #     (This worked for C-Kermit 6.0 but does not work for 7.0)
355 #     (But you can probably still build a non-networking version this way)
356 # ? for Everex STEP 386/25 Rev G with ESIX Sys V R3.2D, "make sys5r3"
357 # ? for Fortune 32:16, For:Pro 1.8, "make ft18"
358 # ? for Fortune 32:16, For:Pro 2.1, "make ft21"
359 # ? for FPS 500 with FPX 4.1, "made bsd"
360 # ? for FreeBSD 1.0, "make freebsd1"
361 # ? for FreeBSD 2.x, "make freebsd2" (ncurses) or "make freebsd2c" (curses)
362 # ? for FreeBSD 3.x, "make freebsd3" (ncurses) or "make freebsd3c" (curses)
363 # ? for FreeBSD 4.0, "make freebsd40"
364 # ? for FreeBSD 4.1 or later, "make freebsd"
365 # + NOTE: Just use "make freebsd" for any reasonably recent FreeBSD version.
366 # ? for Harris HCX-2900, "make sys5r3"
367 # ? for Harris Night Hawk 88K or 68K with CX/UX pre-6.1, "make sys5r3"
368 # ? for Harris Night Hawk 88K or 68K with CX/UX 6.1 or later, "make cx_ux"
369 # ? for Heurikon, "make sys3"
370 # ? for HP-3000, MPE/ix, "make posix"?
371 # ? for HP-9000 Series 300 with 4.4BSD, "make bsd44"
372
373 # NOTE: Most of the HP-UX targets were tested successfully in 2010.
374 # Verification needed for C-Kermit 9.0 Beta.01...
375
376 # ? for HP-9000 Series 500, HP-UX 5.21 and no networking "make hpux0500"
377 # ? for HP-9000 Series 500, HP-UX 5.21 with WIN/TCP 1.2 "make hpux0500wintcp"
378 # ? for HP-9000 Series, HP-UX 6.5, without long filenames,
379 #     "make hpux0650", "make hpux0650c" or "make hpux0650tcpc"
380 # ? for HP-9000 Series, HP-UX 7.0 or later no long filenames, "make hpux0700sf"
381 #     or (to include tcp/ip, curses, etc) "make hpux0700sftcpc"
382 # ? for HP-9000 Series with HP-UX 7.0, TCP/IP,long filenames,"make hpux0700lfn"
383 # ? for HP-9000 300/400 Series (680x0) with HP-UX 8.0, TCP/IP, "make hpux0800"
384 #      or "make hpux0800c"
385 # ? for HP-9000 700/800 Series (PA-RISC), HP-UX 8.0, TCP/IP, "make hpux0800pa"
386 #      or "make hpux0800pac"
387 # ? for HP-9000 Series with HP-UX 8.0, no TCP/IP, long filenames,
388 #      "make hpux0800notcp"
389 # ? for HP-9000 Series, HP-UX 9.0 - 9.10, TCP/IP, curses, restricted compiler
390 #     (no optimization, no ANSI), all models, "make hpux0900".  Read the
391 #     hpux0900 entry below for more info.
392 # ? for HP-9000 700 and 800 Series, HP-UX 9.x, TCP/IP, curses,
393 #     HP optimizing ANSI C compiler, "make hpux0900o700".
394 # ? for HP-9000 with Motorola CPUs, HP-UX 9.x, TCP/IP, curses,
395 #     HP optimizing ANSI C compiler, "make hpux0900mot".
396 # ? for HP-9000 on other CPUs, HP-UX 9.x, TCP/IP, curses,
397 #     HP optimizing ANSI C compiler, "make hpux0900o".
398 # ? for HP-9000 series, HP-UX 9.x, TCP/IP, curses, gcc, all models,
399 #     "make hpux0900gcc"
400 # ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
401 #     curses, restricted compiler (no optimization, no ANSI) "make hpux1000".
402 # ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
403 #     curses, HP ANSI/optimizing compiler "make hpux1000o" or "make hpux1000o+"
404 # ? for HP-9000 HP-UX 10.00 or later with gcc, "make hpux1000gcc"
405 # ? for Trusted HP-UX 10.xx "make hpux1000t", "make hpux1000to",
406 #     or make hpux1000to+"
407 # ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
408 #     (no optimization, no ANSI) "make hpux1100".
409 # ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
410 #     HP ANSI/optimizing compiler "make hpux1100o" or "make hpux1100o+"
411 # ? for Trusted HP-UX 11.xx "make hpux1100t", "make hpux1100to",
412 #     make hpux1100to+"
413 # ? for HP-9000 PA-RISC models with NeXTSTEP 3.3, "make nextquadfat".
414 # ? for HP-9000 PA-RISC models with OPENSTEP/Mach 4.1, "make nextquadfat".
415 # ? for IBM 370 Series with IX/370, "make ix370"
416 # ? for IBM 370 Series with AIX/370 1.2, "make aix370"
417 # ? for IBM 370 Series with AIX/370 3.0, "make aix370"
418 # ? for IBM 370 Series with AIX/ESA 2.1, "make aixesa"
419 # - for IBM PC/AT 286 & compatibles with Mark Williams Coherent OS,
420 #     command-line-only version, "make coherent" (version 5A & later too big)
421 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
422 #     minimum interactive version, "make coherentmi"
423 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
424 #     full interactive version, prior to v4.2, "make coherentmax"
425 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS 4.2,
426 #     "make coherent42"
427 # ? for IBM PC 386 & compatibles with LynxOS 2.0 or 2.1, "make lynx21"
428 # ? for IBM PC 386 & compatibles with LynxOS 2.2, "make lynx"
429 # - for IBM PC/AT & compatibles with original MINIX, "make minix" (too big)
430 # ? for IBM PC family, 386-based, with MINIX/386 1.5, "make minix386"
431 #     or if you have GNU CC, "make minix386gcc"
432 # ? for IBM PC family, 386-based, with MINIX 2.0, "make minix20"
433 # ? for IBM PC family, 386-based, with MINIX 3.0, "make minix3"
434 # + for IBM PC family, 386-based, with MINIX 3.0, "make minix315"
435 # ? for IBM PS/2 with PS/2 AIX 1.0, 1.1, or 1.2, "make ps2aix" or ps2aixnetc.
436 # ? for IBM PS/2 with PS/2 AIX 1.3, "make ps2aix3"
437 # ? for IBM RISC System/6000 with AIX 3.0, "make aix30"
438 # ? for IBM RISC System/6000 with AIX 3.1.x, "make aix31"
439 # ? for IBM RISC System/6000 with AIX 3.2.0 thru 3.2.5, "make aix32"
440 # ? for IBM RS/6000 or Power Series with AIX 4.1.x, "make aix41"
441 # ? for IBM RS/6000 or Power Series with AIX 4.1.x with gcc, "make aix41g"
442 # ? for IBM RS/6000 or Power Series with AIX 4.1 with X.25, "make aix41x25"
443 # ? for IBM RS/6000 or Power Series with AIX 4.2 or later: "make aix"
444 #  (the following "make aixnn" targets are no longer necessary except for gcc)
445 # ? for IBM RS/6000 or Power Series with AIX 4.2, "make aix42"
446 # ? for IBM RS/6000 or Power Series with AIX 4.3, "make aix43" (or aix43gcc)
447 # ? for IBM RS/6000 or Power Series with AIX 4.4, "make aix44" (or aix44gcc)
448 # ? for IBM RS/6000 or Power Series with AIX 4.5, "make aix45" (or aix45gcc)
449 # ? for IBM RS/6000 or Power Series with AIX 5.0, "make aix50" (or aix50gcc)
450 # ? for IBM RS/6000 or Power Series with AIX 5.1, "make aix51" (or aix51gcc)
451 # ? for IBM RS/6000 or Power Series with AIX 5.2, "make aix52" (or aix52gcc)
452 # ? for IBM RS/6000 or Power Series with AIX 5.3, "make aix53" (or aix53gcc)
453 # ? for IBM RS/6000 or Power Series with AIX 6.1, "make aix61" (or aix53gcc)
454 # ? for IBM RT PC with AIX 2.1, "make sys3"
455 # ? for IBM RT PC with AIX 2.2.1, "make rtaix" or "make rtaixc"
456 # ? for IBM RT PC with ACIS 4.2, "make bsd"
457 # ? for IBM RT PC with ACIS 4.3, "make rtacis" or "make bsd KFLAGS=-DNOANSI"
458 # ? for IBM RT PC with 4.3BSD/Reno, "make bsd44" or "make bsd44c"
459 # ? for ICL DRS400 or 400E, "make iclsys5r3"
460 # ? for ICL DRS3000 (80486) with DRS/NX, "make iclsys5r4_486"
461 # ? for ICL DRS6000 (SPARC) with DRS/NX, "make iclsys5r4"
462 # ? for ICL DRS6000 (SPARC) with DRS/NX 4.2MP 7MPlus, "make iclsys5r4m+"
463 # ?     Ditto but with IKSD support included, "make iclsys5r4m+iksd"
464 # ? for Integrated Solutions Inc V8S VME 68020, "make isi"
465 # ? for Intel 302 with Bell Tech Sys V/386 R3.2, "make sys5r3"
466 # ? for Intel Xenix/286, "make sco286"
467 # ? for Interactive System III (PC/IX), "make pcix" or "make is3"
468 # ? for Interactive System III (PC/IX) with gcc, "make is3gcc"
469 # ? for Interactive 386/ix 1.0.6 with TCP/IP networking, "make is5r3net2"
470 # ? for Interactive 386/ix 2.0.x, "make is5r3" or (POSIX) "make is5r3p"
471 # ? for Interactive 386/ix 2.0.x with TCP/IP networking, "make is5r3net"
472 #     or "make is5r3net2"
473 # ? for Interactive 386/ix 2.2.1, job control, curses, no net, gcc,
474 #     "make is5r3gcc"
475 # ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 without TCP/IP, "make is5r3jc"
476 # ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 with TCP/IP, "make is5r3netjc"
477 # ? for Intergraph Clipper, "make clix" or "make clixnet"
478 # ? for Jolix (see 386BSD)
479 # + for Linux 1.2 and later, "make linux".  Uses ncurses.  This version
480 #     handles serial speeds up to 460800 bps, Linux FSSTD 1.2, TCP/IP, and
481 #     should work on both libc and glibc systems.  For static linking, use
482 #     "make linux LNKFLAGS=-static".  Please read the comments that accompany
483 #     the linux entry.  As of 8.0.212 Dev.10, this also includes Large File
484 #     Support (LFS).
485 # + for Linux builds that fail with "sys/select.h: No such file or directory",
486 #     "make linuxns"
487 # + for Linux 1.2 and later but with curses.h and libcurses (rather than
488 #     ncurses.h and libncurses), use "make linuxc".
489 # + for Linux 1.2 and later with no curses support at all, "make linuxnc".
490 # + for Linux with no TCP/IP, "make linuxnotcp"
491 # (The following Linux targets are historic and might not work...)
492 # ? for Red Hat Linux 7.1 through RH9, fully configured (krb5, SSL, etc):
493 #     "make redhat71", "make redhat72", "make redhat73", "make redhat80"
494 #     "make redhat9"
495 #     NOTE: You must use this target for Red Hat 7.1 since it
496 #     also includes a workaround for its broken curses library.
497 #     WARNING: These targets create binaries that include code for
498 #     strong encryption and are therefore not exportable. DO NOT PUT
499 #     THESE BINARIES ON US OR CANADIAN WEB OR FTP SITES.
500 # ? for Linux on PowerMac (Mklinux DR3), "make mklinux".
501 # ? for Linux 1.2 and later, to build with egcs, "make linuxegcs".
502 # ? for Linux with lcc compiler, no TCP/IP, "make linuxnotcp-lcc"
503 # ? for Linux 1.0 or earlier, "make linux10".
504 # (End old linux targets)
505 # ? for Mach 2.6 on (anything, e.g. DECstation), "make bsd42" or "make bsd43".
506 # ? for MachTen (Tenon) 2.1.1.D on (e.g.) Apple Powerbook, "make machten".
507 # ? for Masscomp RTU AT&T System III, "make rtu"
508 #   for other Masscomp, see Concurrent.
509 # ? for Microport SV/AT (System V R2), "make mpsysv" (last edit tested: 144)
510 # ? for Microport SVR4 2.2, 3.1, or 4.1 "make sys5r4sx"
511 # ? for Microsoft,IBM Xenix (/286, PC/AT, etc), "make xenix" or "make sco286"
512 # ? for MIPS System with RISC/os (UMIPS) 4.52 = AT&T SVR3, "make mips"
513 #     or "make mipstcpc"
514 # ? for MkLinux on Power Macintosh, "make mklinux"
515 # ? for Modcomp 9730, Real/IX, "make sys5r3" (or modify to use gcc = GLS cc)
516 # ? for Modcomp Realstar 1000 with REAL/IX D.1, "make sv88r32"
517 # ? for Motorola Four Phase, "make sys3" or "make sys3nid"
518 # ? for Motorola Delta System V/68 R3, "make sv68r3"
519 # ? for Motorola Delta System V/68 R3V5, "make sv68r3v5"
520 # ? for Motorola Delta System V/68 R3V5.1, "make sv68r3v51"
521 # ? for Motorola Delta System V/68 R3V6 with NSE TCP/IP, "make sv68r3v6"
522 # ? for Motorola Delta System V/88 R32, "make sv88r32"
523 # ? for Motorola Delta System V/88 R40, "make sv88r40"
524 # ? for Mt Xinu Mach386 on 386/486-based PCs, "make bsd43"
525 # ? for NCR Tower 1632, OS 1.02, "make tower1"
526 # ? for NCR Tower 1632 or Minitower with System V R2, "make sys3"
527 #     or "make sys3nv"
528 # ? for NCR Tower 32, OS Release 1.xx.xx, "make tower32-1"
529 # ? for NCR Tower 32, OS Release 2.xx.xx, "make tower32-2"
530 # ? for NCR Tower 32, OS Releases based on Sys V R3, "make tower32"
531 # ? for NCR Tower 32, OS Releases based on Sys V R3 with gcc "make tower32g"
532 # ? for NCR System 3000, AT&T UNIX System V R4 2.0, "make sys5r4sxna"
533 # ? for NCR System 3000, AT&T UNIX System V R4 2.0 with Wollongong TCP/IP,
534 #     "make sys5r4net2" or "make sys5r4net2c".
535 #      Some header files might be misplaced; try this:
536 #       ln /usr/include/netinet/in.h /usr/include/sys/in.h
537 #       ln /usr/include/arpa/inet.h /usr/include/sys/inet.h
538 #       ln /usr/include/sys/termiox.h /usr/include/termiox.h
539 # ? for NCR System 3000, NCR UNIX 02.02.01, same as above.
540 # ? for NCR MP-RAS System V R4 V2.03 or 3.02, "make mpras" or "make mprastcpc"
541 # + for NetBSD any version on any architecture, "make netbsd"
542 # + for NetBSD with OpenSSL, "make netbsd+ssl"
543 # ? for NetBSD with ncurses specified instead of curses, "make netbsdn"
544 # ? for NetBSD with all curses support omitted, "make netbsdnc"
545 # ? for NeXT with NeXTSTEP 1.0 through 3.2, "make next" (on a NeXT)
546 # ? for NeXT with NeXTSTEP 3.3, "make next33"
547 # ? for NeXT with OPENSTEP/Mach 4.1, "make nextquadfat".
548 # ? for NeXT with OPENSTEP/Mach 4.2, "make openstep42".
549 # ? for NeXTSTEP/486, "make next" (on a PC)
550 # ? for NeXTSTEP portable binary (runs on Intel or Motorola), "make nextfat"
551 # ? for NeXTSTEP portable binary (Intel, Motorola, HP PA-RISC, or SPARC),
552 #     "make nextquadfat"
553 # ? for Nixdorf Targon/31, "make t31tos40x"
554 # ? for Norsk Data Uniline 88/17 with SV/88 R3.2, "make sv88r32"
555 #   for Novell UnixWare - see UnixWare
556 # ? for OSF/1 (vanilla, from OS/F), "make posix"
557 # ? for OkiStation 7300 Series, "make sys5r4sxtcp"
558 # ? for Olivetti LSX-3020 with X/OS R.2.3, "make xos23" or "make xos23c"
559 # + for OpenBSD, "make openbsd" (also see secure targets listed below).
560 # ? for OPENSTEP/Mach 4.1, "make nextquadfat" (NeXT, Intel, PA-RISC, SPARC)
561 # ? for OPENSTEP/Mach 4.2, "make openstep42" (tested on NeXT)
562 # ? for Perkin-Elmer (Concurrent) 3200 series, "make sys5".
563 # ? for Perkin-Elmer (Concurrent) 3200 series with <dirent.h>, "make ccop1"
564 # ? for Perkin-Elmer/Concurrent 3200 with Xelos R02, "make ccop1"
565 # ? for PFU Compact A Series SX/A TISP V10/E50 (Japan), "make sxae50"
566 # ? for Plexus, "make sys3"
567 # ? for Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1,
568 #     "ucb make pyramid" or for HDB UUCP, "ucb make pyramid-hdb" or:
569 # ? for Pyramid MIServer S or ES Series, DataCenter/OSx, "make pyrdcosx"
570 # ? for Pyramid MIS-S MIPS R3000, DataCenter OSx System V R4, "make pyrdcosx"
571 # ? for POSIX on anything, "make posix" (but adjustments might be necessary).
572 #      NOTE: this target is not very useful - many features are missing.
573 # ? for Prime 8000 MIPS, SVR3, "make mips" or "make mipstcpc"
574 # - for QNX 2.x (sorry we don't have a version of C-Kermit for QNX 2.x)
575 # ? for QNX 4.0 or 4.1, 16-bit, on 286 PC, Watcom C 8.5, "make qnx16_41"
576 # ? for QNX 4.21 - 4.22A (286+), and 4.23 (386+), or higher, 16-bit,
577 #     Watcom C 9.5x or higher, "make qnx16"
578 # + for QNX 4.21-4.25, 32-bit, 386 or above, Watcom C 10.6, "make qnx32"
579 #     NOTE: ("make qnx" == "make qnx32")
580 # ? for QNX Neutrino 2+, "make qnx_nto2+" (crosscompiled on QNX4 with Watcom C)
581 # ? for QNX 6 = Neutrino 2.xx, "make qnx6"
582 # ? for Ridge 32 (ROS3.2), "make ridge32"
583 # ? for Samsung MagicStation, "make sys5r4"
584 # ? for SCO Xenix 2.2.1 with development system 2.2 on 8086/8 "make sco86"
585 # ? for SCO Xenix/286 2.2.1 with development system 2.2 on 80286, "make sco286"
586 #     NOTE: reportedly this makefile is too long for SCO Xenix/286 make, but it
587 #     works with "makeL", or if some of the other make entries are edited out.
588 # ? for SCO Xenix/386 2.2.2, "make sco386"
589 # ? for SCO Xenix/386 2.3.x, "make sco3r2"
590 # ? for SCO Xenix/386 SCO 2.3.3 or 2.3.4 with gcc 1.37 or later,
591 #     "make sco386gcc" or (to add curses) "make sco386gccc".
592 # ? for SCO Xenix/386 or UNIX/386 with Excelan TCP/IP, "make sco3r2net"
593 #     or (to add curses support) "make sco3r2netc" or "sco386netc"
594 # + for SCO XENIX 2.3.4, "make sco234" or "make sco234c" to add curses.
595 # ? for SCO XENIX 2.3.4 with SCO TCP/IP & curses, "make sco234netc".
596 # ? for SCO Xenix 2.3.x with Racal-InterLan TCP/IP, "make sco3r2netri"
597 #   for other UNIX varieties with Racal Interlan TCP/IP, read sco3r2netri entry
598 # ? for SCO Xenix 2.3.x with SCO (Lachman) TCP/IP, "make sco3r2lai"
599 #     or (to add curses) "make sco3r2laic"
600 #   for SCO UNIX...  ALSO READ COMMENTS in the SCO UNIX entries for more info!
601 # ? for SCO UNIX/386 3.2.0 or 3.2.1, "make sco3r2" or "make sco3r2x"
602 # ? for SCO UNIX/386 3.2.2, "make sco3r22" or "make sco3r22gcc"
603 #     or "make sco3r22c"
604 # ? for SCO UNIX/386 3.2.2 with SCO TCP/IP, "make sco3r22net"
605 #     or "make sco3r22netc" (curses)
606 # ? for SCO ODT 1.1, "make sco3r22net" or "make sco3r22netc" (curses)
607 # ? for SCO UNIX/386 3.2 V4.x, no network support, "make sco32v4"
608 # ?   or "make sco32v4ns" (this one uses no select() or sockets library)
609 # ? for SCO UNIX/386 3.2 V4.x with TCP/IP, "make sco32v4net"
610 #     (also sco32v4gcc, sco32v4netgcc)
611 # ? for SCO UNIX/386 3.2 V5.0 - see SCO OpenServer.
612 # ? for SCO UNIX 3.2v4.x with TCP/IP, <dirent.h> for Extended Acer File
613 #     System (EAFS), curses, ANSI C compilation, "make sco32v4net"
614 # ?   or (to use select()-based CONNECT module) "make sco32v4netx".
615 # ? for SCO UNIX 3.2v4.2, "make sco-odt30" (includes TCP/IP).
616 # ? for SCO MPX 3.0 - The SCO UNIX binary runs on the corresponding MPX system.
617 #
618 # NOTE: Also see below for other entries that are variations on these.
619 # Also be sure to read the comments accompanying each SCO entry.
620 # Also see Unixware section.
621 #
622 # ? for SCO ODT 2.0, "make sco32v4net"
623 # ? for SCO ODT 3.0, "make sco-odt30"
624 # ? for SCO OpenServer 5.0 (OSR5), "make sco32v500"
625 # ? for SCO OpenServer 5.0 (OSR5) with networking, "make sco32v500net"
626 # ? for SCO OpenServer 5.0 (OSR5), gcc, "make sco32v500gcc"
627 # ? for SCO OpenServer 5.0 (OSR5), gcc, with networking, "make sco32v500netgcc"
628 # ? for SCO OpenServer 5.0 (OSR5), as above, ELF, "make sco32v500netgccelf"
629 # ? for SCO OpenServer 5.0.2, use "make sco32v502xxx" entries as above.
630 # ? for SCO OpenServer 5.0.4, use "make sco32v504xxx" entries as above.
631 # ? for SCO OpenServer 5.0.5, use "make sco32v505xxx" entries as above.
632 #     Use the sco32v505udkxxx entries if you have the UDK rather than /bin/cc.
633 # ? for SCO OpenServer 5.0.6, use "make sco32v506xxx" entries as above.
634 # ? for SCO OpenServer 5.0.6a,use "make sco32v506axxx" entries as above.
635 # ? for SCO OpenServer 5.0.7, use "make sco32v507", "make sco32v507net"
636 # ? for SCO (Univel) UnixWare 1.x, "make unixware" or "make unixwarenetc".
637 #     If there are problems with this in C-K 7+ see notes at unixware entry.
638 # + for SCO OpenServer 6.0.0, "make sco_osr600"
639 # ? for SCO UnixWare 2.0.x, "make uw20"
640 # ? for SCO UnixWare 2.1.0, "make uw21"
641 # ? for SCO UnixWare 2.1.3, "make uw213"
642 # + for SCO UnixWare 7, "make uw7" (includes large file support)
643 # ? for SCO UnixWare 7 with IKSD support, "make uw7iksd" or "make uw7iksdudk"
644 # ? for SCO UnixWare 7 with OpenSSL, "make uw7ssl"
645 # ? for SCO (Caldera) Open UNIX 8, "make ou8"
646 # ? for Sharp Zaurus SL5500 PDA, "make zsl5500".
647 # ? for Sequent with DYNIX/ptx 1.2.1, "make dynixptx12"
648 # ? for Sequent with DYNIX/ptx 1.3 or 1.4 with TCP/IP, "make dynixptx13"
649 # ? for Sequent with DYNIX/ptx 2.0 or 2.1 with TCP/IP, "make dynixptx20"
650 #     or "dynixptx20c"
651 # ? for Sequent with DYNIX/ptx 2.1.6 on i486, "dynixptx216c"
652 # ? for Sequent with DYNIX/ptx V4.1.3 with TCP/IP, "make dynixptx41c"
653 # ? for Sequent with DYNIX/ptx V4.4.2 with TCP/IP, "make dynixptx44"
654 # ? for Sequent Balance 8000 or B8 with DYNIX 3.0.xx, "make dynix3"
655 #    or "make dynix3noacu"
656 # ? for Sequent Symmetry S81 with DYNIX 3.0.xx, "make dynix3"
657 # ? for Sequent DYNIX 3.1.xx, "make dynix31" or "make dynix31c"
658 # ? for Siemens/Nixdorf SINIX-L Intel V5.41, "make sinix541i"
659 # + for Siemens/Nixdorf SINIX-N MIPS V5.42, "make sinix542"
660 # ? for Siemens/Nixdorf SINIX-P MIPS V5.42 with gcc, "make sinix542g"
661 # ? for Siemens/Nixdorf SINIX-Z Intel V5.42, "make sinix542i"
662 # ? for Siemens/Nixdorf Reliant UNIX V5.43, "make sni543"
663 # ? for Siemens/Nixdorf Reliant UNIX V5.44, "make sni544"
664 # ? for Silicon Graphics Iris System V IRIX 3.2 or earlier, "make iris"
665 # ? for Silicon Graphics Sys V R3 with IRIX 3.3 or later, "make sys5r3"
666 # ? for Silicon Graphics Iris Indigo with IRIX 4.0 or 5.0, "make irix40" or
667 #     (to include Yellow Pages and Curses) "make irix40ypc"
668 # ? for Silicon Graphics Iris Indigo or Elan with IRIX 4.0.x with microcode
669 #     optimization and -O4, "make irix40u" or "irix40uc" (and read notes
670 #     accompanying these entries).
671 # ? for Silicon Graphics IRIX 5.1, "make irix51" or "irix51x" (no optimize)
672 # ? for Silicon Graphics IRIX 5.2, "make irix52"
673 # ? for Silicon Graphics IRIX 5.3, "make irix53" or "irix53x" (no optimize)
674 # ? for Silicon Graphics IRIX 6.0, "make irix60".
675 # ? for Silicon Graphics IRIX 6.2, "make irix62".
676 # ? for Silicon Graphics IRIX 6.3, "make irix63".
677 # ? for Silicon Graphics IRIX 6.4, "make irix64" or "make irix64gcc".
678 # + for Silicon Graphics (SGI) IRIX 6.5, "make irix65"
679 # +   or "make irix65mips2" to force MIPS2, or "make irix65gcc" for GCC.
680 # + for Silicon Graphics (SGI) IRIX 6.5, "make irix65" or "make irix65mips2"
681 # ? for SGI IRIX 6.5 with SSL/TLS, SRP, and ZLIB "make irix65+ssl+srp+zlib"
682 # ? for Solaris 2.0-2.3 on SPARC or Intel, SunPro CC, "make solaris2x",
683 # ?   or to add SunLink X.25 8.0x support, "make solaris2x25".
684 # ? for Solaris 2.4 built with gcc, "make solaris24g".
685 # ? for Solaris 2.0-2.3 on SPARC or Intel, GNU CC, "make solaris2xg".
686 # ? for Solaris 2.4 with X.25, "make solaris24x25".
687 # ? for Solaris 2.5 on SPARC or Intel, SunPro CC, "make solaris25".
688 # ?   or to add SunLink X.25 8.0x support, "make solaris25x25".
689 # ? for Solaris 2.5 on SPARC or Intel, GNU CC, "make solaris25g".
690 # ? for Solaris 2.6 on SPARC or Intel, "make solaris26".
691 # ? for Solaris 7 on SPARC or Intel, SunPro CC, "make solaris7".
692 # ? for Solaris 7 on SPARC or Intel, GNU CC, "make solaris7g".
693 # ? for Solaris 8 on SPARC or Intel, SunPro CC, "make solaris8".
694 # ? for Solaris 8 on SPARC or Intel, GNU CC, "make solaris8g".
695 # + for Solaris 9 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris9".
696 # + for Solaris 9 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris9g".
697 # ? for Solaris 9 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris9g64".
698 # + for Solaris 10 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris10".
699 # + for Solaris 10 on SPARC 64-bit, SunPro CC, "make solaris10_64".
700 # + for Solaris 10 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris10g".
701 # ? for Solaris 10 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris10g64".
702 # ? for Solbourne 4/500 with OS/MP 4 "make sunos4"
703 # ? for Solbourne 4/500 with OS/MP 4.1 "make sunos41" or "make sunos41c"
704 # ? for SONY NEWS with NEWS-OS 4.0.1C, "make sonynews"
705 # ? for SONY NEWS with NEWS-OS 4.1.2C, "make sonynews"
706 # ? for Sperry/UNISYS 5000/20, UTS V 5.2 3R1, "make sys5"
707 # ? for Sperry/UNISYS 5000/30/35/50/55, UTS V 5.2 2.01, "make unisys5r2"
708 # ? for Sperry/UNISYS 5000/80 with System V R3, "make sys5r3"
709 # ? for Sperry/UNISYS 5000/95 with System V R3, "make sys5r3"
710 #     For UNISYS SVR3 it might be necessary to "make sys5r3 KFLAGS=-UDYNAMIC"
711 # ? for Stardent 1520, "make sys5r3"
712 # ? for Stratus FTX 2.x, try "make ftx" or else "make sys5r4" or "sys5r4sx"
713 # ? for Stratus FTX 3.x, PA-RISC 1.0 or 2.0, "make ftx" or "make ftxtcp"
714 # ? for Sun with Sun UNIX 3.5 and gcc, "make sunos3gcc"
715 # ? for Sun with pre-4.0 SunOS versions, "make bsd" (or appropriate variant)
716 # ? for Sun with SunOS 4.0, BSD environment, "make sunos4"
717 # ? for Sun with SunOS 4.0, BSD, with SunLink X.25, make sunos4x25
718 # ? for Sun with SunOS 4.1 or 4.1.1, BSD environment, "make sunos41"
719 #     or "make sunos41c" (curses) or "make sunos41gcc" (compile with gcc)
720 # ? for Sun with SunOS 4.1.x, BSD, with SunLink X.25 7.00 or earlier,
721 #     "make sunos41x25" or "make sunos41x25c" (curses)
722 # ? for Sun with SunOS 4.1, 4.1.1, AT&T Sys V R3 environment, "make sunos41s5"
723 # ? for Sun with SunOS 4.1.2, "make sunos41" or any of its variations.
724 #     NOTE:  All SunOS 4.x systems -- Shared libraries are used by default.
725 #       If this causes problems, add -Bstatic to CFLAGS.
726 #     NOTE2: When building C-Kermit under SunOS for the BSD universe,
727 #       but /usr/5bin/cc is ahead of /usr/ucb/cc in your PATH, add
728 #       "CC=/usr/ucb/cc CC2=/usr/ucb/cc" to the make entry.
729 #     NOTE3: If an executable built on one type of Sun hardware does not work
730 #       on another type, rebuild the program from source on the target machine.
731 #   for Sun with Solaris 1.x use SunOS 4.1 entries.
732 #   for Sun with Solaris 2.0 and higher use Solaris entries.
733 # + for Sun SPARC with Linux, "make linux"
734 # ? for Sun SPARC with OPENSTEP/Mach 4.1, "make nextquadfat"
735 # ? for Sun SPARC with OPENSTEP/Mach 4.2, "make openstep42"
736 # - for Tandy 16/6000 with Xenix 3.0, "make trs16" (C-Kermit 7.0 is too big)
737 # ? for Tektronix 6130/4132/43xx (e.g.4301) with UTek OS, "make utek"
738 #     or (for models without hardware flow control), "make uteknohwfc"
739 # ? for Tektronix XD88 series with UTekV OS, "make utekvr3"
740 # ? for Tri Star Flash Cache with Esix SVR3.2, "make sys5r3"
741 # NOTE: The Tru64 builds have been failing since 2010, but "make dec-osf" is OK
742 # ? for Tru64 UNIX 4.0E, "make tru64-40e"
743 # ? for Tru64 UNIX 4.0F, "make tru64-40f"
744 # ? for Tru64 UNIX 4.0G, "make tru64-40g"
745 # ? for Tru64 UNIX 5.0A, "make tru64-50a"
746 # ? for Tru64 UNIX 5.1A, "make tru64-51a"
747 # ? for Tru64 UNIX 5.1B, "make tru64-51b"
748 # ? for Unistar, "make sys5"
749 # ? for Unisys S/4040 68040 CTIX SVR3.2 6.4.1, "make ctix" or "make sys5r3"
750 # ? for Unisys U5000 UNIX SVR3 6.x, "make sys5r3" or "make sys5r3c"
751 # ? for Unisys U6000 UNIX SVR4 1.x, "make sys5r4nx" or "make sys5r4nxnetc"
752 #   for Unisys ... (also see Sperry)
753 #   for Univel - see UnixWare
754 #   for Unixware - see SCO
755 # ? for Valid Scaldstar, "make valid"
756 # ? for Whitechapel MG01 Genix 1.3, "make white"
757 # ? for Zilog ZEUS 3.21, "make zilog"
758 #
759 # The result should be a runnable program called "wermit" in the current
760 # directory.  After satisfactory testing, you can rename wermit to "kermit"
761 # and put it in some directory that's in everybody's PATH, such as
762 # /usr/local or /opt/local.
763 #
764 # To remove intermediate and object files, "make clean".
765 # If your C compiler produces files with an extension other than "o",
766 # then "make clean EXT=u", "make clean EXT=s", or whatever.
767 #
768 # To run lint on the source files, "make lintsun", "make lintbsd",
769 # "make lints5", as appropriate.
770 #
771 # ******************************
772 # SECURE TARGETS
773 #
774 # Beginning with C-Kermit 7.0, secure targets are included, as are the
775 # source modules (ckuat*.[ch], ck_*.[ch]) needed to build them.  Secure
776 # target names are like the regular names, but with security features
777 # indicated by plus (+) signs.  The features are:
778 #
779 # krb4     MIT Kerberos IV
780 # krb5     MIT Kerberos V
781 # openssl  OpenSSL (SSL/TLS)
782 # zlib     ZLIB compression for SSL/TLS
783 # srp      Stanford Secure Remote Password
784 # pam      PAM (pluggable authentication module)
785 # shadow   Shadow Password File
786 #
787 # You can build these targets if you have the Kermit source files and the
788 # required libraries (Kerberos, OpenSSL, SRP, etc) and header files.  See:
789 #   http://www.columbia.edu/kermit/security.html
790 # for specific details regarding supported versions.
791 #
792 # NOTE: OpenSSL 0.9.6 and earlier are not compatible with 0.9.7 and later.
793 # C-Kermit code was originally designed for 0.9.6.  To build with 0.9.7 you
794 # must add -DOPENSSL_097 to avoid missing symbols in the DES library and to
795 # use the entry points that were renamed to avoid conflict with Kerberos 4.
796 # If you have OpenSSL 0.9.8, add -DOPENSSL_098, which is a synonym for
797 # -DOPENSSL_097.  If you have 1.0.0 or later, add -DOPENSSL_100, which is
798 # another synonym.
799
800 # In OpenSSL builds add -ldl if you get unresolved references for
801 # dlopen, dlclose, dlsym, and/or dlerror.
802 #
803 # In order to build a secure version of Kermit, you need to know the location
804 # of the header (include) files and libraries for the desired form of
805 # security.  Unless you specify a location, this makefile looks in /usr/local
806 # and if the required files are not found, the build fails.
807 #
808 # If the secure headers and libraries are not on your computer, you have
809 # to download and install them, for example from http://www.openssl.org .
810 #
811 # The following symbols are used to specify library and header file locations:
812
813 prefix  = /usr/local
814 srproot = $(prefix)
815 sslroot = $(prefix)
816 manroot = $(prefix)
817
818 K4LIB=-L/usr/kerberos/lib
819 K4INC=-I/usr/kerberos/include
820 K5LIB=-L/usr/kerberos/lib
821 K5INC=-I/usr/kerberos/include
822 SRPLIB=-L$(srproot)/lib
823 SRPINC=-I$(srproot)/include
824 SSLLIB=-L$(sslroot)/ssl/lib
825 SSLINC=-I$(sslroot)/ssl/include
826
827 # To override these assignments; for example, if your OpenSSL files are
828 # not in /usr/local/ssl, invoke the desired target like this:
829
830 #  make solaris9+openssl "SSLINC=-I/opt/openssl-0.9.8k/include" \
831 #   "SSLLIB=-L/opt/openssl-0.9.8k/lib"
832 #
833 # (don't set the variables and then do "make -e" because that breaks 
834 # chaining of makefile targets.)
835 #
836 # Here are some up-to-date secure targets as of Sep 2009: 
837 #
838 # aix+openssl:                        IBM AIX 4.2 or later with OpenSSL
839 # freebsd44+srp+openssl               FreeBSD 4.4 with SRP and OpenSSL
840 # freebsd50+openssl                   FreeBSD 5.0 with OpenSSL
841 # hpux1100o+openssl:                  HP-UX 11.xx with OpenSSL
842 # hpux1000gcc+openssl:                HP-UX 10.xx with OpenSSL (build with gcc)
843 # hpux1100gcc+openssl:                HP-UX 11.xx with OpenSSL (build with gcc)
844 # irix6x+krb5:                        IRIX 6.x with Kerberos V
845 # irix65+krb5:                        etc etc...
846 # solaris9+openssl                    Solaris 9,10, or 11 with Openssl (Sun cc)
847 # solaris9g+openssl                   Solaris 9,10, or 11 with Openssl (gcc)
848 # linux+ssl                           OpenSSL only
849 # linux+krb5+ssl                      Linux with Kerberos 5 and OpenSSL
850 # linux+krb5:                         Kerberos 5 only
851
852 # The following secure Linux targets have not been updated or tested recently.
853 # linux+krb5+krb4:
854 # linux+srp:
855 # linux+srp+pam:
856 # linux+srp+gmp:
857 # linux+srp+gmp+no-des:
858 # linux+srp+gmp-export:
859 # linux+srp+gmp+pam:
860 # linux+shadow+pam:
861 # linux+openssl:
862 # linux+openssl+shadow:
863 # linux+openssl+zlib+shadow+pam:
864 # linux+srp+openssl:
865 # linux+krb5+krb4+srp:
866 # linux+krb5+krb4+srp+openssl:
867 # linux+krb5+krb4+openssl:
868 # linux+krb5+krb4+openssl+shadow:
869 # linux+krb5+krb4+openssl+zlib+shadow:
870 # linux+krb5+krb4+srp-export:
871 # linux+krb5+krb4+srp+pam:
872 # linux+krb5+krb4+srp+openssl+pam-debug:
873 # linux+krb5+krb4+srp+openssl+pam:
874 # linux+krb5+krb4+srp+openssl+zlib+pam:
875 # linux+krb5+krb4+openssl+shadow+pam:
876 # linux+krb5+openssl+zlib+shadow+pam:
877
878 # The following have not been tested recently either and might
879 # need adjustment.
880 #
881 # macosx+krb5+ssl:     Mac OS X 10.3.9 or later + OpenSSL and Kerberos 5
882 # macosx103+secure:    This one is probably redundant
883 # netbsd+openssl:      NetBSD with OpenSSL
884 # openbsd30+ssl:       OpenBSD 3.0 with OpenSSL
885 # redhat71,redhat72,redhat73,redhat80,redhat9 (Krb5,OpenSSL,Showdow,PAM,Zlib)
886 # sco32v500net+ssl:
887 # sco32v505net+ssl:
888 # solaris2x+krb4:
889 # solaris2xg+krb4:
890 # solaris2xg+openssl+pam+shadow:
891 # solaris2xg+openssl+zlib+pam+shadow:
892 # solaris2xg+krb5+krb4+openssl+shadow:
893 # solaris25+krb4:
894 # solaris25g+krb4:
895 # solaris26g+openssl:
896 # solaris8g+openssl+zlib+pam+shadow:
897 # solaris8g+krb4:
898 # solaris9g+openssl+zlib+pam+shadow:
899 # solaris9g+openssl+shadow+pam+zlib
900 # sunos41gcc+krb4:                    SunOS 4.1 built with gcc with Kerberos IV
901 # sunos41gcc+openssl:                 SunOS 4.1 built with gcc with OpenSSL
902 # sunos41gcc+krb4+openssl:            ...with Kerberos IV and OpenSSL
903 # sunos41gcc+krb4+openssl+zlib:       ditto, plus ZLIB compression
904 # sunos41gcc+krb4+srp+openssl+zlib:   ditto, plus SRP
905 # sunos41gcc+srp+openssl+zlib:
906 # tru64-51b-openssl:                  Tru64 (Digital) Unix 5.1B with OpenSSL
907 # uw7ssl                              Unixware 7 with SSL
908 #
909 ###########################################################################
910 #
911 #  Compile and Link variables:
912 #
913 #  EXT is the extension (file type) for object files, normally o.
914 #  See MINIX entry for what to do if another filetype must be used.
915 #
916 EXT=o
917 #LNKFLAGS=
918 SHAREDLIB=
919 CC= cc
920 CC2= cc
921 MAKE= make
922 SHELL=/bin/sh
923
924 ###########################################################################
925 # (Ancient) UNIX V7-specific variables.
926 # These are set up for Perkin-Elmer 3230 V7 Unix:
927 #
928 PROC=proc
929 DIRECT=
930 NPROC=nproc
931 NPTYPE=int
932 BOOTFILE=/edition7
933 #
934 # ( For old Tandy TRS-80 Model 16A or 6000 V7-based Xenix, use PROC=_proc,
935 #   DIRECT=-DDIRECT, NPROC=_Nproc, NPTYPE=short, BOOTFILE=/xenix )
936 #
937
938 ###########################################################################
939 # SAMPLE INSTALLATION SCRIPT
940 #
941 # Modify to suit your own computer's file organization and permissions.  If
942 # you don't have write access to the destination directories, "make install"
943 # fails.  In most cases, a real installation also requires you to chown /
944 # chgrp the Kermit binary for the UUCP lockfile and/or tty devices, and
945 # perhaps also to chmod +s the corresponding permission fields.
946 #
947 # Default binary, man, and doc directories are supplied below.  You can
948 # override them in your 'make' command.  Examples:
949 #
950 #   make install                                   # Accept defaults.
951 #   make "INFODIR=/usr/share/lib/kermit" install   # Override INFODIR default.
952 #
953 # You can also build and install in one step, e.g.:
954 #
955 #   make linux install
956 #
957 # If you use the 'install' target to install C-Kermit, it creates an
958 # UNINSTALL script that can be used to uninstall it.
959 #
960 WERMIT = makewhat
961 BINARY = wermit
962 DESTDIR =
963 BINDIR = $(prefix)/bin
964 MANDIR = $(manroot)/man/man1
965 MANEXT = 1
966 SRCDIR =
967 INFODIR =
968 CERTDIR =
969
970 TEXTFILES = COPYING.TXT ckcbwr.txt ckubwr.txt ckuins.txt ckccfg.txt \
971                 ckcplm.txt ckermit.ini ckermod.ini ckermit70.txt ckermit80.txt
972
973 ALL = $(WERMIT)
974
975 all: $(ALL)
976
977 .c.o:
978         $(CC) $(CFLAGS) -DKTARGET=\"$(KTARGET)\" -c $<
979
980 #Clean up intermediate and object files
981 clean:
982         @echo 'Removing object files...'
983         -rm -f ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
984 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckcpro.$(EXT) ckcfns.$(EXT) \
985 ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) \
986 ckufio.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) ckwart.$(EXT) ckuusx.$(EXT) \
987 ckuusy.$(EXT) ckcnet.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckusig.$(EXT) \
988 ckucns.$(EXT) ckcmdb.$(EXT) ckuath.$(EXT) ckctel.$(EXT) ckclib.$(EXT) \
989 ckcuni.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
990 ckcpro.c wart
991
992 show:
993         @echo prefix=$(prefix)
994         @echo srproot=$(srproot)
995         @echo sslroot=$(sslroot)
996         @echo manroot=$(manroot)
997         @echo K4LIB=$(K4LIB)
998         @echo K4INC=$(K4INC)
999         @echo K5LIB=$(K5LIB)
1000         @echo K5INC=$(K5INC)
1001         @echo SRPLIB=$(SRPLIB)
1002         @echo SRPINC=$(SRPINC)
1003         @echo SSLLIB=$(SSLLIB)
1004         @echo SSLINC=$(SSLINC)
1005         @exit
1006
1007 # Install C-Kermit after building -- IMPORTANT: Read the instructions above
1008 # (SAMPLE INSTALLATION SCRIPT).  For SSL/TLS versions, ca_certs.pem file
1009 # should be installed in the appropriate place for your OpenSSL library, e.g.:
1010 #
1011 #   cp ca_certs.pem /usr/local/ssl/
1012 #   cp ca_certs.pem /usr/share/ssl/
1013 #
1014 # To make sure 'man' notices the new source file and doesn't keep
1015 # showing the old formatted version, remove the old formatted version,
1016 # something like this:
1017 #               rm -f $(MANDIR)/../cat$(MANEXT)/kermit.$(MANEXT)
1018 # or this (which requires CATDIR to be defined):
1019 #               rm -f $(CATDIR)/kermit.$(MANEXT)
1020 #
1021 # As of C-Kermit 8.0.205 this target also builds an UNINSTALL script, and
1022 # so it might be too long for some old Bourne shells, in which case you can
1023 # use a different shell:
1024 #
1025 #   make SHELL=ksh install
1026 #   make SHELL=/bin/posix/sh install
1027 #
1028 install:
1029         @echo Installing C-Kermit version $(CKVER)...;\
1030         rm -f UNINSTALL;\
1031         exec 3>./UNINSTALL;\
1032         echo "# C-Kermit UNINSTALL script" >&3;\
1033         echo "# `date`\n" >&3;\
1034         echo "CKVER=$(CKVER)" >&3;\
1035         echo "PrN Uninstalling C-Kermit version $(CKVER)..." >&3;\
1036         echo DESTDIR=$(DESTDIR);\
1037         if test -n "$(DESTDIR)"; then\
1038                 if test -d $(DESTDIR); then\
1039                         echo  "$(DESTDIR) exists...\n";\
1040                 else\
1041                         echo "Creating $(DESTDIR)...";\
1042                         DESTDIR=`echo $(DESTDIR) | sed 's!/*$$!!'`;\
1043                         mkdir $$DESTDIR  || exit 1;\
1044                 fi;\
1045                 chmod 755 $(DESTDIR) || exit 1;\
1046         fi;\
1047         echo BINARY=$(BINARY);\
1048         if test -f $(BINARY); then\
1049                 ls -l $(BINARY);\
1050         else\
1051                 echo "?$(BINARY) not found";\
1052                 exit 1;\
1053         fi;\
1054         if test -z "$(DESTDIR)$(BINDIR)"; then\
1055                 echo "Binary directory not specified";\
1056                 exit 1;\
1057         fi;\
1058         if test -d $(DESTDIR)$(BINDIR); then\
1059                 echo  "$(DESTDIR)$(BINDIR) exists...";\
1060         else\
1061                 echo "Creating $(DESTDIR)$(BINDIR)/...";\
1062                 mkdir     $(DESTDIR)$(BINDIR) || exit 1;\
1063                 chmod 755 $(DESTDIR)$(BINDIR);\
1064         fi;\
1065         rm -f $(DESTDIR)$(BINDIR)/kermit;\
1066         cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1067         chmod 755    $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1068         rm -f        $(DESTDIR)$(BINDIR)/kermit-sshsub;\
1069         ln -s        $(DESTDIR)$(BINDIR)/kermit\
1070                      $(DESTDIR)$(BINDIR)/kermit-sshsub || exit 1;\
1071         echo 'set flag=f\nPrC Removing binaries' >&3;\
1072         echo "RmF $(DESTDIR)$(BINDIR)/kermit-sshsub" >&3;\
1073         echo "RmF $(DESTDIR)$(BINDIR)/kermit" >&3;\
1074         if test -f ckermit.ini; then\
1075                 echo "#!$(BINDIR)/kermit" >\
1076                         $(DESTDIR)$(BINDIR)/_tmp.ini;\
1077                 cat ckermit.ini >> $(DESTDIR)$(BINDIR)/_tmp.ini;\
1078                 mv $(DESTDIR)$(BINDIR)/_tmp.ini\
1079                    $(DESTDIR)$(BINDIR)/ckermit.ini;\
1080                 chmod 755 $(DESTDIR)$(BINDIR)/ckermit.ini;\
1081                 echo "RmF $(DESTDIR)$(BINDIR)/ckermit.ini" >&3;\
1082         fi;\
1083         echo;\
1084         echo 'EfM' >&3;\
1085         echo "Kermit binary installed:";\
1086         ls -l $(DESTDIR)$(BINDIR)/kermit\
1087               $(DESTDIR)$(BINDIR)/kermit-sshsub\
1088               $(DESTDIR)$(BINDIR)/ckermit.ini;\
1089         echo;\
1090         echo " WARNING: If C-Kermit is to be used for dialing out,";\
1091         echo " you must change its owner and group and permissions";\
1092         echo " to match the 'cu' program.  See the ckuins.txt file";\
1093         echo " for details.";\
1094         echo;\
1095         echo MANDIR=$(MANDIR);\
1096         if test -n "$(DESTDIR)$(MANDIR)"; then\
1097                 if test -d $(DESTDIR)$(MANDIR); then\
1098                         echo  "$(DESTDIR)$(MANDIR) exists...";\
1099                 else\
1100                         echo "Creating $(MANDIR)...";\
1101                         mkdir $(MANDIR) || exit 1;\
1102                         chmod 755 $(MANDIR) || exit 1;\
1103                 fi;\
1104                 rm -f $(DESTDIR)$(MANDIR)/kermit.$(MANEXT);\
1105                 cp ckuker.nr $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1106                 chmod 644 $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1107                 echo 'set flag=f\nPrC Removing man pages' >&3;\
1108                 echo "RmF $(DESTDIR)$(MANDIR)/kermit.$(MANEXT)" >&3;\
1109                 echo 'EfM' >&3;\
1110                 echo;\
1111         else\
1112                 echo "Not installing man page!\n";\
1113         fi;\
1114         echo CERTDIR=$(CERTDIR);\
1115         if test -n "$(CERTDIR)"; then\
1116                 if test -f ca_certs.pem; then\
1117                         if test -d $(CERTDIR); then\
1118                                 echo  "$(CERTDIR) exists...";\
1119                         else\
1120                                 echo "Creating $(CERTDIR)...";\
1121                                 mkdir $(CERTDIR) || exit 1;\
1122                                 chmod 755 $(CERTDIR) || exit 1;\
1123                         fi;\
1124                         echo "Installing certificates file...";\
1125                         cp ca_certs.pem $(CERTDIR) || exit 1;\
1126                         echo 'set flag=f' >&3;\
1127                         echo 'PrC Removing certificates file' >&3;\
1128                         echo "RmF $(CERTDIR)/ca_certs.pem" >&3;\
1129                         echo 'EfM' >&3;\
1130                         echo;\
1131                 fi;\
1132         else\
1133                 echo "Not installing certificates file!\n";\
1134         fi;\
1135         echo SRCDIR=$(DESTDIR)$(SRCDIR);\
1136         if test -n "$(SRCDIR)"; then\
1137                 echo "Installing source files...";\
1138                 if test -d $(DESTDIR)$(SRCDIR); then\
1139                         echo  "$(DESTDIR)$(SRCDIR) exists...";\
1140                 else\
1141                         echo "Creating $(DESTDIR)$(SRCDIR)/...";\
1142                         mkdir     $(DESTDIR)$(SRCDIR) || exit 1;\
1143                         chmod 755 $(DESTDIR)$(SRCDIR);\
1144                 fi;\
1145                 echo "Copying source files to $(DESTDIR)$(SRCDIR)...";\
1146                 echo 'set flag=f\nPrC Removing source files' >&3;\
1147                 for TextFile in COPYING.TXT ck[cuw_]*.[cwh] makefile; do\
1148                         cp $$TextFile $(DESTDIR)$(SRCDIR)/ && echo ".\c";\
1149                         echo "RmF $(DESTDIR)$(SRCDIR)/$$TextFile" >&3;\
1150                 done; echo;\
1151                 echo 'EfM' >&3;\
1152                 ( cd $(DESTDIR)$(SRCDIR)/ &&\
1153                 ls -l COPYING.TXT ck[cuw_]*.[cwh] makefile );echo;\
1154         else\
1155                 echo "Not installing source code!\n";\
1156         fi;\
1157         echo INFODIR=$(DESTDIR)$(INFODIR);\
1158         if test -n "$(INFODIR)"; then\
1159                 echo "Installing info files...";\
1160                 if test -d $(DESTDIR)$(INFODIR); then\
1161                         echo  "$(DESTDIR)$(INFODIR) exists...";\
1162                 else\
1163                         echo "Creating $(DESTDIR)$(INFODIR)/...";\
1164                         mkdir     $(DESTDIR)$(INFODIR) || exit 1;\
1165                         chmod 755 $(DESTDIR)$(INFODIR);\
1166                 fi;\
1167                 echo "Copying text files to $(DESTDIR)$(INFODIR)...";\
1168                 echo 'set flag=f\nPrC Removing text files' >&3;\
1169                 FileCopyList='';\
1170                 for TextFile in $(TEXTFILES); do\
1171                         test -f $$TextFile || continue;\
1172                         cp $$TextFile $(DESTDIR)$(INFODIR) && echo ".\c" &&\
1173                         FileCopyList="$$FileCopyList $$TextFile";\
1174                         echo "RmF $(DESTDIR)$(INFODIR)/$$TextFile" >&3;\
1175                 done; echo;\
1176                 echo 'EfM' >&3;\
1177                 ( cd $(DESTDIR)$(INFODIR)/ && chmod  644   $$FileCopyList );\
1178                 ( cd $(DESTDIR)$(INFODIR)/ && pwd && ls -l $$FileCopyList );\
1179         else\
1180                 echo "Not installing text files!\n";\
1181         fi;\
1182         echo "set flag=d\nPrN Removing empty dirs..." >&3;\
1183         echo "RmD $(DESTDIR)$(BINDIR)" >&3;\
1184         echo "RmD $(DESTDIR)$(SRCDIR)" >&3;\
1185         echo "RmD $(DESTDIR)$(INFODIR)" >&3;\
1186         echo "RmD $(CERTDIR)" >&3;\
1187         echo "RmD $(MANDIR)" >&3;\
1188         echo "RmD $(DESTDIR)" >&3;\
1189         echo "EfM" >&3;\
1190         echo "PrN C-Kermit version $(CKVER) is uninstalled!" >&3;\
1191         echo C-Kermit version $(CKVER) installed!
1192
1193 # UN-Install C-Kermit after building
1194 # Please to not remove the extra blanks before and after '{}' within the
1195 # functions. You would get syntax errors for some older Bourne shells! Best is 
1196 # you don't change or remove anything.
1197 #
1198 uninstall:
1199         @if test ! -f UNINSTALL; then\
1200                 echo "?C-Kermit UNINSTALL data file not found!";\
1201                 exit 1;\
1202         fi; \
1203         X=`grep '^CKVER='$(CKVER)'$$' ./UNINSTALL || :`;\
1204         if test -z "$$X"; then\
1205                 echo "?UNINSTALL file is not for C-Kermit version $(CKVER)";\
1206                 exit 2;\
1207         fi;\
1208         PrN () { echo "$$*"; };\
1209         PrC () { echo "$$* \c"; };\
1210         RmF () { test -f "$$1" && rm -f "$$1" && echo ".\c" && flag=F ; };\
1211         RmD () { \
1212         dir=$$1;\
1213         while test -d "$$dir"; do\
1214                 rmdir "$$dir" 2>&- || return && echo "$$dir" && flag=D;\
1215                 dir=`echo "$$dir" | sed 's!/[^/]*/*$$!!'`;\
1216         done; \
1217         };\
1218         EfM () { \
1219         case "$$flag" in\
1220                 f) echo "- Nothing to remove!";;\
1221                 d) echo "Nothing to remove!";;\
1222                 F) echo " done";;\
1223                 D) echo "done";;\
1224         esac; \
1225         };\
1226         while read Act Args; do\
1227                 case $$Act in\
1228                         EfM) EfM;;\
1229                         RmD) RmD $$Args;;\
1230                         RmF) RmF $$Args;;\
1231                         PrN) PrN $$Args;;\
1232                         PrC) PrC $$Args;;\
1233                         set) eval $$Args;;\
1234                 esac;\
1235         done < ./UNINSTALL
1236
1237 makewhat:
1238         @echo 'make what?  You must tell which platform to make C-Kermit for.'
1239         @echo Examples: make linux, make aix, make solaris10, make hpux1100.
1240         @echo Please read the comments at the beginning of the makefile.
1241
1242 ###########################################################################
1243 #
1244 # Dependencies Section:
1245
1246 wermit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1247                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1248                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1249                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1250                 ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1251                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1252                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1253         $(CC2) $(LNKFLAGS) -o wermit \
1254                 ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1255                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1256                 ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1257                 ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1258                 ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucon.$(EXT) \
1259                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1260                 ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1261                 $(LIBS)
1262
1263 # Preferred configuration with select()-based CONNECT
1264
1265 xermit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1266                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1267                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1268                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1269                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1270                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1271                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) ckuath.$(EXT) \
1272                 ck_crp.$(EXT) ck_ssl.$(EXT)
1273         $(CC2) $(LNKFLAGS) -o wermit \
1274                 ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1275                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1276                 ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1277                 ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1278                 ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) \
1279                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckusig.$(EXT) \
1280                 ckctel.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1281                 ckuath.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1282
1283 # Malloc Debugging version
1284
1285 mermit: ckcmdb.$(EXT) ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1286                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1287                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1288                 ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1289                 ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1290                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1291                 ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1292         $(CC2) $(LNKFLAGS) -o mermit ckcmdb.$(EXT) ckclib.$(EXT) ckcmai.$(EXT)\
1293                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1294                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1295                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1296                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1297                 ckuusr.$(EXT) ckucon.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1298                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckcuni.$(EXT) \
1299                 ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1300
1301 # Kerberized Version - Subject to USA export restrictions.
1302
1303 # NOTE: We don't use this any more -- As of 15 Feb 2003, the "xermit"
1304 # target is used for both secure and regular version.
1305
1306 krbmit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1307                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1308                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1309                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1310                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1311                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1312                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1313                 ckcftp.$(EXT) ck_ssl.$(EXT)
1314         $(CC2) $(LNKFLAGS) -o krbmit ckcmai.$(EXT) ckclib.$(EXT) \
1315                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1316                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1317                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1318                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1319                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1320                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1321                 ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1322                 ck_ssl.$(EXT) $(LIBS)
1323
1324 krbmit-debug:   ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1325                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1326                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1327                 ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1328                 ckuxla.$(EXT) ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1329                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1330                 ckusig.$(EXT) ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) \
1331                 ckupty.$(EXT) ck_ssl.$(EXT) ckcmdb.$(EXT) ckcftp.$(EXT)
1332         $(CC2) $(LNKFLAGS) -o krbmit ckcmdb.$(EXT) ckcmai.$(EXT) \
1333                 ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) \
1334                 ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) \
1335                 ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
1336                 ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) \
1337                 ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) \
1338                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1339                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1340                 ckcftp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1341
1342 # SRP(TM) Version - Subject to USA export restrictions.
1343
1344 srpmit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1345                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1346                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1347                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1348                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1349                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1350                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1351                 ckcftp.$(EXT) ck_ssl.$(EXT)
1352         $(CC2) $(LNKFLAGS) -o srpmit ckcmai.$(EXT) ckclib.$(EXT) \
1353                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1354                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1355                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1356                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1357                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1358                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1359                 ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ck_ssl.$(EXT) \
1360                 ckcftp.$(EXT) $(LIBS)
1361
1362 # Kerberized Version - Not subject to USA export restrictions.
1363
1364 krbmit-export:  ckcmai.$(EXT) \
1365                 ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1366                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1367                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1368                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1369                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1370                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1371                 ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1372         $(CC2) $(LNKFLAGS) -o krbmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1373                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1374                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1375                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1376                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1377                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1378                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1379                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1380
1381 # SRP(TM) Version - Not subject to USA export restrictions.
1382
1383 srpmit-export:  ckcmai.$(EXT) \
1384                 ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1385                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1386                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1387                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1388                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1389                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1390                 ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1391         $(CC2) $(LNKFLAGS) -o srpmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1392                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1393                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1394                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1395                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1396                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1397                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1398                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1399
1400 ###########################################################################
1401 # man page...
1402 #
1403 ckuker.nr:
1404         @echo This target is obsolete.
1405         @echo The ckuker.nr file no longer needs any preprocessing.
1406
1407 ###########################################################################
1408 # Dependencies for each module...
1409 #
1410 ckcmai.$(EXT): ckcmai.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h ckcsig.h \
1411                 ckuusr.h ckctel.h ckclib.h
1412
1413 ckclib.$(EXT): ckclib.c ckclib.h ckcdeb.h ckcasc.h ckcsym.h
1414
1415 ckcpro.$(EXT): ckcpro.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckclib.h
1416
1417 ckcpro.c: ckcpro.w wart ckcdeb.h ckcsym.h ckcasc.h ckcker.h ckcnet.h ckctel.h \
1418          ckclib.h
1419         ./wart ckcpro.w ckcpro.c
1420
1421 ckcfns.$(EXT): ckcfns.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckcuni.h \
1422                 ckuxla.h ckclib.h ckcnet.h
1423
1424 ckcfn2.$(EXT): ckcfn2.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1425                 ckuxla.h ckctel.h ckclib.h ckcnet.h ckcuni.h
1426
1427 ckcfn3.$(EXT): ckcfn3.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1428                 ckuxla.h ckclib.h ckcuni.h
1429
1430 ckuxla.$(EXT): ckuxla.c ckcker.h ckcsym.h ckcdeb.h ckcxla.h ckuxla.h ckclib.h \
1431                  ckcuni.h
1432
1433 ckcuni.$(EXT): ckcuni.c ckcdeb.h ckcker.h ckucmd.h ckcuni.h ckcxla.h ckuxla.h
1434
1435 ckuusr.$(EXT): ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcsym.h ckcdeb.h ckcxla.h \
1436                 ckuxla.h ckcasc.h ckcnet.h ckctel.h ckclib.h ckcuni.h
1437
1438 ckuus2.$(EXT): ckuus2.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1439                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1440
1441 ckuus3.$(EXT): ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1442                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1443
1444 ckuus4.$(EXT): ckuus4.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1445                 ckcasc.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1446
1447 ckuus5.$(EXT): ckuus5.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1448                  ckcsym.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1449
1450 ckuus6.$(EXT): ckuus6.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1451                  ckcsym.h ckctel.h ckclib.h
1452
1453 ckuus7.$(EXT): ckuus7.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1454                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1455
1456 ckuusx.$(EXT): ckuusx.c ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcsym.h \
1457                 ckcsig.h ckcnet.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1458
1459 ckuusy.$(EXT): ckuusy.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1460                  ckclib.h
1461
1462 ckucmd.$(EXT): ckucmd.c ckcasc.h ckucmd.h ckcdeb.h ckcsym.h ckctel.h ckclib.h
1463
1464 ckufio.$(EXT): ckufio.c ckcdeb.h ckuver.h ckcsym.h ckclib.h \
1465                 ckcxla.h ckuxla.h ckcuni.h
1466
1467 ckutio.$(EXT): ckutio.c ckcdeb.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h
1468
1469 ckucon.$(EXT): ckucon.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1470                  ckclib.h
1471
1472 ckucns.$(EXT): ckucns.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1473                  ckclib.h ckcxla.h ckuxla.h ckcuni.h
1474
1475 ckcnet.$(EXT): ckcnet.c ckcdeb.h ckcker.h ckcnet.h ckcsym.h ckcsig.h ckctel.h \
1476                  ckclib.h
1477
1478 ckctel.$(EXT): ckcsym.h ckcdeb.h ckcker.h ckcnet.h ckctel.h ckclib.h
1479
1480 # ck_off_t: ck_off_t.$(EXT)
1481 #       $(CC) -o ck_off_t ck_off_t.$(EXT)
1482
1483 wart: ckwart.$(EXT)
1484         $(CC) $(LNKFLAGS) -o wart ckwart.$(EXT) $(LIBS)
1485
1486 ckcmdb.$(EXT): ckcmdb.c ckcdeb.h ckcsym.h ckclib.h
1487
1488 ckwart.$(EXT): ckwart.c
1489
1490 ckudia.$(EXT): ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckcsym.h ckcsig.h \
1491                 ckcnet.h ckctel.h ckclib.h
1492
1493 ckuscr.$(EXT): ckuscr.c ckcker.h ckcdeb.h ckcasc.h ckcsym.h ckcsig.h \
1494                 ckcnet.h ckctel.h ckclib.h
1495
1496 ckusig.$(EXT): ckusig.c ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h \
1497                 ckcsig.h ckctel.h ckclib.h
1498
1499 ckcftp.$(EXT): ckcftp.c ckcdeb.h ckcasc.h ckcker.h ckucmd.h ckuusr.h \
1500                 ckcnet.h ckctel.h ckcxla.h ckuxla.h ckcuni.h
1501
1502 ckupty.$(EXT): ckupty.c ckupty.h ckcdeb.h
1503
1504 ckuath.$(EXT): ckuath.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1505                  ckclib.h ckcnet.h
1506
1507 ck_crp.$(EXT): ck_crp.c ckcdeb.h ckcnet.h ckuath.h ckclib.h
1508
1509 ck_ssl.$(EXT): ck_ssl.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1510                  ckclib.h ck_ssl.h
1511
1512 ###########################################################################
1513 #
1514 # Entries to make C-Kermit for specific systems.
1515 #
1516 # Put the ones that need short makefiles first.
1517
1518 #Apollo Aegis 9.x.  Includes TCP/IP support.
1519 #You can also add processor-dependent optimization switches like -M570.
1520 aegis:
1521         @echo Making C-Kermit $(CKVER) for Apollo Aegis 9.x...
1522         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1523         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOCSETS -DCK_CURSES -O $(KFLAGS)" \
1524         "LIBS = -lcurses -ltermcap"
1525
1526 #Apple Mac II, A/UX pre-3.0
1527 #Warning, if "send *" doesn't work, try the auxufs makefile entry below.
1528 aux:
1529         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1530         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1531         "CFLAGS = -DAUX -DTCPSOCKET $(KFLAGS) -i -O" "LNKFLAGS = -i"
1532
1533 #Apple Mac II, A/UX pre-3.0, compiled with gcc
1534 auxgcc:
1535         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1536         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1537         "CFLAGS = -DAUX -DTCPSOCKET -traditional $(KFLAGS) -i -O" \
1538         "LNKFLAGS = " "CC = gcc" "CC2 = gcc"
1539
1540 #Apple Mac II, A/UX, pre-3.0, but with ufs file volumes, uses <dirent.h>.
1541 auxufs:
1542         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1543         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1544         "CFLAGS = -DAUX -DTCPSOCKET -DDIRENT $(KFLAGS) -i -O" "LNKFLAGS = -i"
1545
1546 #Apple Mac II, A/UX 3.0, compiled with gcc
1547 aux3gcc:
1548         @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1549         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1550         "CFLAGS = -DAUX -DHDBUUCP -DLFDEVNO -DTCPSOCKET -DDIRENT $(KFLAGS)" \
1551         "LNKFLAGS = -s" "LIBS = $(LIBS)" \
1552         "CC=gcc -pipe -traditional" "CC2=gcc -pipe -traditional"
1553
1554 #Apple Mac II, A/UX 3.0, compiled with gcc, uses curses
1555 aux3cgcc:
1556         @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1557         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) aux3gcc \
1558         KTARGET=$${KTARGET:-$(@)} \
1559         "KFLAGS=$(KFLAGS) -DCK_CURSES" "LIBS = -lcurses $(LIBS)"
1560
1561 # Tenon MachTen, tested on Apple Powerbook with MachTen 2.1.1.D.
1562 # NOTE: This doesn't do anything about UUCP.  It only works if /usr/spool/uucp
1563 # has permission of 777, and dialout device is world read/writeable.
1564 machten:
1565         @echo Making C-Kermit $(CKVER) for MachTen...
1566         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
1567         "CFLAGS= -DBSD43 -DTCPSOCKET -DSIG_V -DNDGPWNAM -DCK_CURSES -O \
1568         $(KFLAGS)"  "LIBS=-lcurses -ltermcap"
1569
1570 #Bell Labs Research UNIX V10
1571 #Can't add TCP/IP because there is no sockets library.  It would have to
1572 #be done using streams, but there is no code in C-Kermit for that.
1573 #Remove -DNOJC if desired (if your system has csh, ksh, or bash).
1574 bellv10:
1575         @echo Making C-Kermit $(CKVER) for Bell Labs Research UNIX V10...
1576         $(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1577         "CFLAGS= -DBELLV10 -DBSD4 -DNDIR -DNOJC -DNOSYSIOCTLH -DNOSETREU \
1578         -DNOCSETS -MINIDIAL $(KFLAGS)"
1579
1580 # WARNING: The early BSD entries do not build in version 7.0 with the stock
1581 # BSD compiler: "Too many defines".  Unless you can rebuild cpp to have more
1582 # space for defines, these builds must be accomplished by:
1583 # copying the /usr/include tree to someplace else, preprocessing there with cc
1584 # -E -I./include or whatever (plus all the same -D's, adding any necessary
1585 # -U/-D to override the architecture)), renaming the the resulting files back
1586 # to their original names, bringing them back to the original BSD system, and
1587 # running the make target there.  This technique was used for 4.2 and 4.3 BSD
1588 # on a VAX in C-Kermit 7.0 (later, cpp on that machine was rebuilt to allow
1589 # more symbols, so the C-Kermit 8.0 build proceeds normally).
1590
1591 #Berkeley Unix 4.1
1592 bsd41:
1593         @echo Making C-Kermit $(CKVER) for 4.1BSD...
1594         $(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1595         "CFLAGS= -DBSD41" "LIBS = -ljobs"
1596
1597 #Berkeley 4.2, 4.3, also Ultrix-32 1.x, 2.x, 3.x, many others
1598 # Add -O, -s, etc, if they work.
1599 # If you have a version of BSD but signal() is void rather than int,
1600 # "make bsd KFLAGS=-DSIG_V".
1601 bsd42:
1602         @echo Making C-Kermit $(CKVER) for 4.2BSD...
1603         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1604         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1605         -DCK_CURSES -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK -DBSD42HACK \
1606         $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1607
1608 bsd:
1609         $(MAKE) CC=$(CC) CC2=$(CC2) bsd42 KTARGET=$${KTARGET-$(@)}
1610
1611 #Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP
1612 bsdhdb:
1613         @echo Making C-Kermit $(CKVER) for 4.2BSD with HDB UUCP...
1614         $(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1615         "KFLAGS= -DHDBUUCP $(KFLAGS)"
1616
1617 #Berkeley Unix 4.3 with acucntrl program, curses, TCP/IP included.
1618 bsd43:
1619         @echo Making C-Kermit $(CKVER) for 4.3BSD...
1620         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1621         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1622         -DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1623         -DBSD42HACK $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1624
1625 #4.3BSD, curses excluded
1626 bsd43nc:
1627         @echo Making C-Kermit $(CKVER) for 4.3BSD...
1628         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1629         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH \
1630         -DACUCNTRL -DSYSTIMEBH -DNOIKSD -DNOPUTENV -DNOANSI -DBIGBUFOK \
1631         -DBSD42HACK $(KFLAGS)" "LIBS=$(LIBS)"
1632
1633 #4.3BSD, TCP/IP excluded.
1634 bsd43nonet:
1635         @echo Making C-Kermit $(CKVER) for 4.3BSD + curses...
1636         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1637         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1638         -DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1639         -DBSD42HACK -DNONET $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1640
1641 #Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
1642 #but without acucntrl program
1643 bsdlck:
1644         @echo Making C-Kermit $(CKVER) for 4.2BSD, /usr/spool/uucp/LCK/...
1645         $(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1646         "KFLAGS= -DLCKDIR $(KFLAGS)"
1647
1648 #Berkeley UNIX 4.4-Lite, 4.4-Encumbered, Net/2, etc (Post-Reno),
1649 #with TCP/IP networking.  This was the basis for FreeBSD, NetBSD, OpenBSD,
1650 #BSDI, BSD/OS, and Mac OS X (each of which has its own set of targets that
1651 #are newer than this one).
1652 #
1653 #NOTE: This is not a pure POSIX configuration.  Using -DPOSIX instead of
1654 # -DBSD44 prevents any kind of directory-reading (for wildcard expansion),
1655 #and disallows use of ENOTCONN symbol for detecting broken network
1656 #connections, and disallows RTS/CTS flow control, and would also require
1657 #definition of the appropriate UUCP lockfile convention.
1658 #Do not add -DCK_POSIX_SIG without reading <signal.h> first!  For example,
1659 #sigsetjmp(), etc, tend to be defined but not implemented.
1660 #
1661 #NOTE: originally crypt was in libc - later it was unbundled.
1662 #Remove the LIBS clause to build on an early 4.4BSD platform.
1663 #
1664 bsd44:
1665         @echo Making C-Kermit $(CKVER) for 4.4BSD...
1666         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1667         "CFLAGS= -DBSD44 -DTCPSOCKET $(KFLAGS) -O" "LIBS=-lcrypt"
1668
1669 #Berkeley UNIX 4.4, as above, but with curses for fullscreen display
1670 #Please read notes for bsd44 entry just above.
1671 # NOTE: This one dumped core on the real 4.4BSD development system at
1672 # UC Berkeley (an HP-9000/300), so the no-curses version was used
1673 # for that one, which was unplugged years ago.
1674 bsd44c:
1675         @echo Making C-Kermit $(CKVER) for 4.4BSD with curses...
1676         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1677         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O" \
1678         "LIBS= -lcurses -ltermcap -lcrypt $(LIBS)"
1679
1680 #For FreeBSD 1.x.
1681 freebsd1:
1682         @echo 'Making C-Kermit $(CKVER) for FreeBSD...'
1683         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1684         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1685         -DFNFLOAT -DNOHTERMCAP -DNOREALPATH -DNOSYSCONF $(KFLAGS) -O -pipe" \
1686         "LIBS= -lcurses -ltermcap -lm $(LIBS)"
1687
1688 #FreeBSD 2.x with ncurses
1689 freebsd2:
1690         @echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with ncurses...'
1691         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1692         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1693         -DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -funsigned-char \
1694         -DFNFLOAT $(KFLAGS) -O -pipe" \
1695         "LIBS= -lncurses -ltermlib -lcrypt -lm $(LIBS)"
1696
1697 #For FreeBSD 2.x -- Uses curses rather than ncurses
1698 freebsd2c:
1699         @echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with curses...'
1700         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1701         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1702         -DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -DFNFLOAT \
1703         -funsigned-char $(KFLAGS) -O -pipe" \
1704         "LIBS= -lcurses -ltermlib -lcrypt -lm $(LIBS)"
1705
1706 #FreeBSD 3.x with ncurses and uu_lock()
1707 #(Note: uu_lock() goes back to 2.2.2, but not necessarily 2.0)
1708 freebsd3:
1709         @echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with ncurses...'
1710         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1711         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1712         -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 -DUSE_UU_LOCK -DFNFLOAT \
1713         $(KFLAGS) -O -pipe" \
1714         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1715
1716 #As above but with curses rather than ncurses.
1717 freebsd3c:
1718         @echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with curses...'
1719         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1720         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_UU_LOCK \
1721         -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 $(KFLAGS) -DFNFLOAT \
1722         -funsigned-char -pipe -O" \
1723         "LIBS= -lcurses -lcrypt -lutil -lm $(LIBS)"
1724
1725 #FreeBSD 4.0 with ncurses and uu_lock().  Note - there is no curses in 4.0.
1726 #ncurses 5.0 is broken requiring us to work around with setbuf().
1727 freebsd40:
1728         @echo 'Making C-Kermit $(CKVER) for FreeBSD 4.x with ncurses...'
1729         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1730         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DFNFLOAT \
1731         -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD4 \
1732         -DNONOSETBUF -DUSE_UU_LOCK $(KFLAGS) -O -pipe" \
1733         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1734
1735 #FreeBSD 4.1 and above
1736 #Like FreeBSD 4.0 but without the NONOSETBUF hack and with CK_NEWTERM.
1737 #OK 2011/06/15 FreeBSD 3.3, 4,4, 4.7, and 8.2
1738 freebsd freebsd41 freebsd72:
1739         @echo 'Making C-Kermit $(CKVER) for FreeBSD 4.1 or later...'
1740         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1741         "CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \
1742         -DFREEBSD4 -DUSE_UU_LOCK -DFNFLOAT \
1743         -DHERALD=\"\\\" `uname` `uname -r`\\\"\" \
1744         -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR $(KFLAGS) -O -pipe" \
1745         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1746
1747 #FreeBSD 5.0 or later with OpenSSL 0.9.7 or later.
1748 #OK 2011/06/15 FreeBSD 4.7 and 8.2
1749 freebsd+ssl freebsd+openssl freebsd50+openssl:
1750         @echo 'Making C-Kermit $(CKVER) for FreeBSD 5.0, ncurses, openssl'
1751         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1752         "CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \
1753         -DCK_AUTHENTICATION -DCK_SSL $(SSLINC) -DZLIB \
1754         -DFREEBSD4 -DUSE_UU_LOCK -DFNFLOAT -funsigned-char -DTPUTSARGTYPE=int \
1755         -DFREEBSD41 -DFREEBSD42 -DFREEBSD43 -DFREEBSD44 -DFREEBSD45 \
1756         -DFREEBSD46 -DFREEBSD50 -DUSE_STRERROR $(KFLAGS) -O -pipe" \
1757         "LIBS= -lncurses -lcrypt -lssl -lcrypto -lutil -lm $(SSLLIB) $(LIBS)"
1758
1759 #NetBSD 1.4.1 or later with vanity banner automated with uname
1760 #and automatic inclusion of large file support if it is available.
1761 #This target tested successfully on NetBSD 1.4.1, 1.5.2, and 2.0.3 (Jan 2006).
1762 #Fails on NetBSD 2.0 on Sun/3 mc68030 with gcc 3.3.3 unless optimization is
1763 #disabled on ckcfn2.c ("KFLAGS=-O0") (Letter O Digit Zero).
1764 #(This could be automated by testing `uname -m` for "sun3".)
1765 #OK: 2011/06/15 on NetBSD 1.5.2 and 5.1.
1766 netbsd netbsd2 netbsd15 netbsd16 old-netbsd:
1767         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1768         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1769         "CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1770         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1771         -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DHAVE_OPENPTY \
1772         -funsigned-char -DHERALD=\"\\\" NetBSD `uname -r`\\\"\" \
1773         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1774         "LIBS= -lcurses -lcrypt -lm -lutil $(LIBS)"
1775
1776 #NetBSD 1.4.1 or later with OpenSSL
1777 #OK: 2011/06/15 on NetBSD 5.1 (but not 1.5.2 with OpenSSL 0.9.5a)
1778 netbsd+ssl netbsd+openssl:
1779         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL SSLLIB=$(SSLLIB)'
1780         @case `openssl version` in \
1781           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1782           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1783           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1784           *) OPENSSLOPTION="" ;; \
1785         esac; \
1786         HAVE_DES=''; \
1787         DES_LIB=''; \
1788         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1789            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1790               DES_LIB='-ldes'; \
1791               HAVE_DES='-DCK_DES -DLIBDES'; \
1792               echo "HAVE DES"; \
1793            else echo "NO DES"; \
1794         fi; \
1795         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
1796         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1797         -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1798         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1799         "LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB -lcurses \
1800         -lcrypto -lcrypt -lz -lm -lpam -lutil $(LIBS)"
1801
1802 #NetBSD with MIT Kerberos 5:
1803 # OK 2011/06/15 (once K5INC and K5LIB were set right).
1804 # NOT OK for Heimdal - Heimdal Kerberos support in C-Kermit needs work.
1805 netbsd+krb5:
1806         @echo 'Making C-Kermit $(CKVER) for NetBSD with Kerberos 5...'
1807         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...'
1808         @case `openssl version` in \
1809           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1810           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1811           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1812           *) OPENSSLOPTION="" ;; \
1813         esac; \
1814         HAVE_DES=''; \
1815         DES_LIB=''; \
1816         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1817            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1818               DES_LIB='-ldes'; \
1819               HAVE_DES='-DCK_DES -DLIBDES'; \
1820               echo "HAVE DES"; \
1821            else echo "NO DES"; \
1822         fi; \
1823         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
1824         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_KERBEROS -DKRB5 \
1825         -DCK_CAST $$HAVE_DES -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1826         $(KFLAGS)" \
1827         "LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lcurses $$DES_LIB \
1828         -lcrypto -lgssapi -lkrb5 -lm -lutil $(LIBS)"
1829
1830 # NetBSD - With Kerberos 5 and SSL and Zlib.
1831 # OK 2011/06/15
1832 netbsd+krb5+ssl netbsd+krb5+openssl+zlib:
1833         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...'
1834         @case `openssl version` in \
1835           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1836           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1837           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1838           *) OPENSSLOPTION="" ;; \
1839         esac; \
1840         HAVE_DES=''; \
1841         DES_LIB=''; \
1842         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1843            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1844               DES_LIB='-ldes'; \
1845               HAVE_DES='-DCK_DES -DLIBDES'; \
1846               echo "HAVE DES"; \
1847            else echo "NO DES"; \
1848         fi; \
1849         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
1850         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1851         -DCK_KERBEROS -DKRB5 -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1852         -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1853         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1854         "LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB \
1855         -lcrypto -lcrypt -lgssapi -lkrb5 -lz -lm -lpam -lutil -lcurses $(LIBS)"
1856
1857 #Special Security Enhanced NetBSD target with SRP, SSL, and zlib support.
1858 #To build this, you need to BUILD the pkgsrc srp_client package.  After
1859 #you build it, you must go into work/srp-x.y.z/libkrypto and "bmake install"
1860 #then go to work/srp-x.y.z/libsrp and "bmake install".  As of 2005Q3, the
1861 #pkgsrc install only installed the statically linked client applications.  You
1862 #need to manually install the libraries to build your own applications.
1863 #NOT TESTED RECENTLY - probably needs work.
1864 netbsd+ssl+srp+zlib:
1865         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1866         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1867         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DNETBSD15 \
1868         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DHAVE_OPENPTY \
1869         -I/usr/include/openssl -I/usr/pkg/include \
1870         -DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 -DCK_ENCRYPTION \
1871         -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DZLIB -DFNFLOAT $(KFLAGS) -O" \
1872         "LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lcurses -lsrp -lgmp -ldes \
1873         -lssl -lkrypto -lcrypto -lcrypt -lz -lm -lutil $(LIBS)"
1874
1875 #NetBSD with curses left out (e.g. for use as IKSD).
1876 netbsdnc:
1877         @echo Making C-Kermit $(CKVER) for NetBSD with no curses...
1878         $(MAKE) CC=$(CC) CC2=$(CC2) netbsd KTARGET=$${KTARGET:-$(@)} \
1879         "KFLAGS=-DNOCURSES"
1880
1881 #NetBSD with ncurses requested explicitly rather than curses-which-is-ncurses
1882 netbsdn:
1883         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1884         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1885         "CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1886         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1887         -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DHAVE_OPENPTY \
1888         -DHERALD=\"\\\" NetBSD `uname -r`\\\"\" \
1889         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1890         "LIBS= -L/usr/pkg/lib -lncurses -lcrypt -lm -lutil $(LIBS)"
1891
1892 #OpenBSD before 2.3.
1893 #Uses ncurses as its curses so use -ltermlib, not -ltermcap
1894 #But it doesn't use uu_lock() which was introduced in OpenBSD 2.3.
1895 #For that use the next entry.
1896 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1897 openbsdold:
1898         @echo Making C-Kermit $(CKVER) for OpenBSD...
1899         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1900         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1901         -DFNFLOAT -DNDSYSERRLIST $(KFLAGS) -O" "LIBS= -lcurses -ltermlib -lm"
1902
1903 #OpenBSD 2.3 or later
1904 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1905 #For C-Kermit 8.0 (Christian Weisgerber):
1906 # -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1907 # -DUSE_UU_LOCK and -lutil added for uu_lock()
1908 # -DNDSYSERRLIST changed to -DUSE_STRERROR
1909 #If this gives you trouble use the previous entry.
1910 openbsd:
1911         @echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later...
1912         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1913         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1914         -DHERALD=\"\\\" OpenBSD `uname -r`\\\"\" \
1915         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1916         "LIBS= -lcurses -lutil -lm"
1917
1918 #Better to chain to the openbsd target but...
1919 mirbsd:
1920         @echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later...
1921         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1922         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1923         -DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
1924         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1925         "LIBS= -lcurses -lutil -lm"
1926
1927 #OpenBSD 3.0 or later includes OpenSSL
1928 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1929 #For C-Kermit 8.0 (Christian Weisgerber):
1930 # -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1931 # -DUSE_UU_LOCK and -lutil added for uu_lock()
1932 # -DNDSYSERRLIST changed to -DUSE_STRERROR
1933 #If this gives you trouble use the previous entry.
1934 openbsd+ssl:
1935         @echo Making C-Kermit $(CKVER) for OpenBSD 3.0 or later...
1936         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1937         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1938         -DHERALD=\"\\\" OpenBSD `uname -r`\\\"\" \
1939         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
1940         -DCK_SSL $(KFLAGS) -O" \
1941         "LIBS= -lcurses -lutil -lm -lssl -lcrypto"
1942
1943 mirbsd+ssl:
1944         @echo Making C-Kermit $(CKVER) for OpenBSD 3.0 or later...
1945         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1946         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1947         -DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
1948         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
1949         -DCK_SSL -DNO_DCL_INET_ATON $(KFLAGS) -O" \
1950         "LIBS= -lcurses -lutil -lm -lssl -lcrypto"
1951
1952 # make 386bsd 0.0new, posix
1953 # for  386bsd 0.1.24, change /usr/include/termios.h to #define NCCS if
1954 #  _POSIX_SOURCE is #defined. (source: lewine, posix prgmrs guide, o`reilly)
1955 #NOTE: Lock directory is /var/spool/lock.  Formerly, it was /var/spool/uucp,
1956 #but reportedly <wjones@halcyon.com> that was due to a typo in 'man tip'.
1957 386bsd:
1958         @echo 'Making C-Kermit $(CKVER) for jolix 386BSD 0.0new and 0.1.24...'
1959         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1960         "CFLAGS= -DPOSIX -DSETREUID -DPIDSTRING -DUSLEEP \
1961         -D_386BSD -DCK_CURSES -DTCPSOCKET \
1962         -DLOCK_DIR=\\\"/var/spool/lock\\\" \
1963         $(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
1964
1965 # Mac OS X 10 early versions.
1966 # For 10.3.9 and later, use the macosx target below.
1967
1968 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP but no curses.
1969 oldmacosx10:
1970         @echo Making C-Kermit $(CKVER) for `uname -s`...
1971         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1972         "CFLAGS= -DMACOSX10 -DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
1973
1974 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and curses.
1975 #Note: curses must be obtained separately.  See next entry for ncurses.
1976 #Add "LIBS = -lcurses -ltermcap" if necessary (but reportedly it is not).
1977 oldmacosx10c:
1978         @echo Making C-Kermit $(CKVER) for `uname -s` + curses...
1979         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1980         "CFLAGS= -DMACOSX10 -DCK_CURSES -DTPUTSFNTYPE=void -DTPUTSISVOID \
1981         -DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
1982
1983 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and ncurses.
1984 #Note: ncurses must be obtained separately.
1985 #In the event of trouble with this one try the next one.
1986 oldmacosx10nc:
1987         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
1988         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1989         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
1990         $(KFLAGS)" "LIBS= -lncurses $(LIBS)"
1991
1992 #Mac OS X 10.2 (Jaguar) ncurses.
1993 oldmacosx102nc:
1994         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
1995         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1996         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
1997         $(KFLAGS) " "LIBS= -lncurses $(LIBS)"
1998
1999 #The problem here is that if curses.h also exists, it conflicts with
2000 #ncurses.h and and we have fatal errors.  If this happens to you, then
2001 #try this target.
2002 oldmacosx10ncx:
2003         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2004         @rm -f ./curses.h; touch ./curses.h
2005         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2006         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR \
2007         -I. -O $(KFLAGS) " \
2008         "LIBS= -lncurses $(LIBS)"
2009         @rm -f ./curses.h
2010
2011 #Mac OS X 10.3 (Panther) - Assumes ncurses is installed.
2012 oldmacosx103: 
2013         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2014         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2015         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2016         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -O \
2017         $(KFLAGS) " "LIBS= -lncurses -lresolv $(LIBS)"
2018
2019 #Mac OS X 10.3 (Panther) with Kerberos 5 and SSL, assumes ncurses is installed.
2020 oldmacosx103+secure:
2021         @echo Making Secure C-Kermit $(CKVER) for `uname -s` + ncurses...
2022         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2023         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET \
2024         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -O -DCK_PAM \
2025         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2026         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
2027         $(KFLAGS) " "LIBS= -lssl -lcrypto -lkrb5 -lcom_err \
2028         -lk5crypto -lgssapi_krb5 -lpam -lncurses -lresolv $(LIBS)"
2029
2030 # THIS IS THE MAIN MAC OS X TARGET (the next one is for Kerberos/SSL builds).
2031 # Use this target for 10.3.9 (or maybe earlier) through 10.6 (maybe later)
2032 # on both Power and Intel architectures.  This one uses utmp.h on 10.4 and
2033 # earlier and utmpx.h on 10.5 onwards.
2034 # Note: Mac OS X 10.5 and earlier are 32-bit; 10.6 and later 64-bit.
2035 # Note 2: As of C-Kermit 9.0 -NOUUCP is included by default because
2036 # Mac OS X doesn't support UUCP.  To undo this, use KFLAGS=-UNOUUCP.
2037 #OK: 2011/06/14 (for 10.4.11, 10.5.8, 10.6.7)
2038 macosx macosx10 macosx10.3.9 macosx10.4 macosx10.5 macosx10.6:
2039         @MACOSNAME=`/usr/bin/sw_vers -productName`; \
2040         MACOSV=`/usr/bin/sw_vers -productVersion`; \
2041         echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2042         MACCPU=$$HOSTTYPE; \
2043         if test `uname -r | cut -d . -f 1` -gt 8; \
2044         then if test -f /usr/include/utmpx.h ; \
2045         then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2046         else HAVE_UTMPX='' ; fi ; fi; \
2047         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2048         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2049         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2050         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2051         -funsigned-char -DNODCLINITGROUPS \
2052         -DNOUUCP -O -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2053         -DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2054         $(KFLAGS)" "LIBS= -lncurses -lresolv $(LIBS)"
2055
2056 # Mac OS X 10.3.9 or later with Kerberos 5 and OpenSSL...
2057 # NOTE: Apple has removed all support for DES in OpenSSL and Kerberos
2058 #   in Mac OS X 10.6 and later.  The DES flags are included or left out
2059 #   automatically based on the Mac OS X version number.
2060 # See note about UUCP in previous target.
2061 #OK: 2009/11/16 (for 10.3.9, 10.4.11, 10.5.8, 10.6.1)
2062 #OK: 2011/06/14 (for 10.4.11, 10.5.8, 10.6.7)
2063 macosx+krb5+ssl macosx10.5+krb5+ssl macosx10.6+krb5+ssl \
2064 macosx+krb5+openssl macosx10.5+krb5+openssl macosx10.6+krb5+openssl:
2065         @MACOSNAME=`/usr/bin/sw_vers -productName`; \
2066         MACOSV=`/usr/bin/sw_vers -productVersion`; \
2067         echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2068         MACCPU=$$HOSTTYPE; \
2069         if test `uname -r | cut -d . -f 1` -gt 8; \
2070         then if test -f /usr/include/utmpx.h ; \
2071         then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2072         else HAVE_UTMPX='' ; fi ; fi; \
2073         if test `uname -r | cut -d . -f 1` -eq 7; \
2074         then IS_MACOSX103='-DMACOSX103' ; \
2075         else IS_MACOSX103='' ; fi; \
2076         case $$MACOSV in \
2077           10.[012345].*) HAVE_DES='-DCK_DES -DLIBDES' ;; \
2078           *.*) HAVE_DES='' ;; \
2079         esac ; \
2080         if test -x /usr/bin/krb5-config ; \
2081         then HAVE_KRB5CONFIG=`/usr/bin/krb5-config --libs krb5 gssapi` ; \
2082         else HAVE_KRB5CONFIG='-lgssapi_krb5 -lkrb5 -lk5crypto \
2083         -lcom_err -lresolv' ; fi; \
2084         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2085         "CFLAGS= -DMACOSX10 $$IS_MACOSX103 -DCK_NCURSES -DTCPSOCKET \
2086         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2087         -DCKHTTP -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2088         -DNODCLINITGROUPS -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2089         -DCK_ENCRYPTION -DCK_CAST -DCK_SSL -DOPENSSL_098 $$HAVE_DES \
2090         -DNOUUCP -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2091         -DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2092         -funsigned-char -O $(KFLAGS)" \
2093         "LIBS= $$HAVE_KRB5CONFIG -lssl -lcrypto -lpam -lncurses $(LIBS)"
2094
2095 # End of Mac OS X Section
2096
2097 #Acorn RISCiX, based on ...
2098 #Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
2099 #but without acucntrl program
2100 riscix:
2101         @echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2102         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2103                 "CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2104                 -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2105                 -DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2106                 -DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2107                 -DNOANSI -w -O2 -fomit-frame-pointer" \
2108                 "LIBS= -lcurses -ltermcap " \
2109                 "CC= /usr/ucb/cc" \
2110                 "CC2= /usr/ucb/cc"
2111
2112 #Acorn RISCiX, as above, but using gcc
2113 riscix-gcc:
2114         @echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2115         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2116                 "CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2117                 -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2118                 -DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2119                 -DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2120                 -DNOANSI -w -O2 -fomit-frame-pointer" \
2121                 "LIBS= -lcurses -ltermcap " \
2122                 "CC= gcc -mbsd" \
2123                 "CC2= gcc -mbsd"
2124
2125 #Convergent CTIX 6.4.1
2126 ctix:
2127         @echo 'Making C-Kermit $(CKVER) for Convergent CTIX 6.4.1'
2128         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2129         "CFLAGS= -DSVR3 -DDIRENT -DTCPSOCKET -DHDBUUCP -DCK_CURSES \
2130         -DNONAWS -DNOLEARN -DNOLONGLONG $(KFLAGS) -XO" \
2131         "LNKFLAGS=-s" "LIBS=-lsocket -lcurses -lc_s"
2132         mcs -d wermit
2133
2134 # The following makefile entry should work for any Harris Night Hawk system
2135 # (either 88k or 68k based) running release 6.1 or later of the CX/UX
2136 # operating system. This is a POSIX and ANSI-C compliant system which also
2137 # supports BSD networking. (Earlier CX/UX releases will probably work with
2138 # sys5r3, but this has not been verified).
2139 #
2140 cx_ux:
2141         @echo Making C-Kermit $(CKVER) for Harris Night Hawk CX/UX 6.1 or later
2142         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2143         "CFLAGS=-DPOSIX -DTCPSOCKET -DHDBUUCP -DPID_T=pid_t -DWAIT_T=int \
2144         -Dd_ino=d_fileno -DUID_T=uid_t -DGID_T=gid_t -DNOLONGLONG \
2145         $(KFLAGS) -Xa -O3 -g" "LNKFLAGS=-O3"
2146
2147 #Intergraph Clipper, CLIX, job control, HDB UUCP.
2148 clix:
2149         @echo 'Making C-Kermit $(CKVER) for Intergraph CLIX...'
2150         $(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2151         "CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2152         -DNOGETUSERSHELL -DNOREALPATH -DNOLEARN $(KFLAGS) -O" \
2153         "LNKFLAGS=" "LIBS= -lbsd"
2154
2155 #As above + TCP/IP...
2156 clixnet:
2157         @echo 'Making networked C-Kermit $(CKVER) for Intergraph CLIX...'
2158         $(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2159         "CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2160         -DTCPSOCKET -DNOGETUSERSHELL -DNOLEARN -DNOREALPATH $(KFLAGS) -O" \
2161         "LNKFLAGS=" "LIBS= -lbsd"
2162
2163 #Mark Williams Coherent 286 or 386 on IBM PC family.
2164 #There is a 64K limit on program size, so this is a command-line only version.
2165 coherent:
2166         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOICP -DNOSETKEY -DNOLEARN \
2167         -DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG -DNOXMIT \
2168         -DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DSELECT_H $(KFLAGS) -VSUVAR" \
2169         -DNOFLOAT KTARGET=$${KTARGET:-$(@)} wermit
2170
2171 #Mark Williams Coherent 386 on IBM PC family.
2172 #This will make a "minimum interactive" version - no scripts,
2173 #no character sets, no help, no dial, no debug/transaction logging, no
2174 #transmit, msend, mail, type, etc.
2175 coherentmi:
2176         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOSETKEY -DNOLEARN \
2177         -DNOSHOW -DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG \
2178         -DNOXMIT -DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DNOSERVER -DNOUUCP \
2179         -DNOSPL -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ -DNOFLOAT \
2180         -DNOCMDL $(KFLAGS) -VSUVAR -DSELECT_H" KTARGET=$${KTARGET:-$(@)} \
2181         wermit
2182
2183 #Mark Williams Coherent 386 on IBM PC/AT family.
2184 coherentmax:
2185         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DSELECT_H -DNOLEARN \
2186         -DNOFLOAT -DNOSYSIOCTLH $(KFLAGS) -VSUVAR" "LNKFLAGS = -O -s" \
2187         KTARGET=$${KTARGET:-$(@)} wermit
2188
2189 #Mark Williams Coherent 386 4.2.  Includes curses but not TCP/IP.
2190 #Requires updates to the 4.2.10 compiler; the regular compiler fails to
2191 #to handle "complex expressions".  NOFLOAT is so it can work on old PCs
2192 #without floating-point hardware.
2193 coherent42:
2194         $(MAKE) "CFLAGS = -T500000 -DNOFLOAT -DCOHERENT -DNOANSI -DSELECT \
2195         -DNOSYSLOG -DDIRENT -DCK_CURSES -DCK_NEWTERM -DCK_WREFRESH -VSUVAR \
2196         -DDCLGETCWD -DNOSYSIOCTLH -DNOINITGROUPS -DNOSYMLINK -DSELECT_H \
2197         -DDCLGETCWD -O $(KFLAGS)" \
2198         "LNKFLAGS = -O -s" KTARGET=$${KTARGET:-$(@)} \
2199         "LIBS  = -lsocket -lcurses" wermit
2200
2201 #DEC Ultrix 2.x
2202 # Add -O, -DDYNAMIC, -s, etc, if they work.
2203 ultrix2x:
2204         @echo Making C-Kermit $(CKVER) for Ultrix 2.x ...
2205         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2206         "CFLAGS= -DBSD4 -DTCPSOCKET -DDU2 -DNOGETUSERSHELL $(KFLAGS)"
2207
2208 du2:
2209         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix2x
2210
2211 #DEC Ultrix 3.0 and 3.1
2212 ultrix30:
2213         @echo Making C-Kermit $(CKVER) for Ultrix 3.0...
2214         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2215         "CFLAGS= -DBSD4 -DTCPSOCKET -DDIRENT -DSIG_V -DNOGETUSERSHELL \
2216         -DULTRIX3 -DCK_CURSES $(KFLAGS) -O" "LIBS= -lcurses -ltermcap"
2217
2218 du3:
2219         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2220
2221 ultrix3x:
2222         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2223
2224 #DEC Ultrix 4.0 or 4.1 on DECstation, VAXstation, VAX, etc.
2225 ultrix40:
2226         @echo Making C-Kermit $(CKVER) for Ultrix 4.0 or 4.1...
2227         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2228         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DDU4 -DNOGETUSERSHELL \
2229         $(KFLAGS) -Olimit 1450" "LNKFLAGS = -s"
2230
2231 #DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2232 #Like ultrix40, except now C compiler supports -O2 optimization.
2233 ultrix42:
2234         @echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2235         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2236         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL $(KFLAGS) \
2237         -O2 -Olimit 1750" "LNKFLAGS = -s"
2238
2239 du42:
2240         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix42
2241
2242 #DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2243 #Like du42, but with curses support added and a couple features.
2244 ultrix42c:
2245         @echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2246         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2247         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2248         -DCK_CURSES -DNOIKSD $(KFLAGS)-G6 -O2 -Olimit 3000 " \
2249         "LNKFLAGS = -s" "LIBS= -lcurses -ltermcap"
2250
2251 ultrix43:
2252         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2253         "KFLAGS=-DULTRIX43 $(KFLAGS)" KTARGET=$${KTARGET-$(@)} ultrix42c
2254
2255 ultrix43notcp:
2256         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2257         "KFLAGS=-DULTRIX43 -DNONET $(KFLAGS)" \
2258         KTARGET=$${KTARGET-$(@)} ultrix42c
2259
2260 # NOTE: need -DNODEBUG on MIPS to avoid relocation errors at link time.
2261 # Actually now (8.0) that we have discovered the -G option maybe debugging
2262 # can be put back.
2263 ultrix44:
2264         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2265         "KFLAGS=-DULTRIX44 -G7 -DNODEBUG -DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2266         KTARGET=$${KTARGET-$(@)} ultrix42c
2267
2268 ultrix45:
2269         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2270         "KFLAGS=-DULTRIX45 $(KFLAGS)-DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2271         KTARGET=$${KTARGET-$(@)} ultrix42c
2272
2273 du42c:
2274         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2275         KTARGET=$${KTARGET-$(@)} ultrix42c
2276
2277 #DEC Ultrix 4.3A or later on DECsystem and DECstation 5000/50, /150 or /260
2278 #with MIPS R4x00 processor.  The "-mips3" switch generates R4000-specific
2279 #code, which is faster and more compact, but *won't* run on earlier
2280 #DECsystems and DECstations.
2281 ultrix43-mips3:
2282         @echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2283         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2284         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2285         $(KFLAGS) -O2 -Olimit 1750 -mips3" "LNKFLAGS = -s -mips3"
2286
2287 du43-mips3:
2288         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) ultrix43-mips3
2289
2290 #DEC Ultrix 4.3A or later on MIPS R4x000 based systems.
2291 #Like ultrix43-mips3 but with curses support added
2292 ultrix43c-mips3:
2293         @echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2294         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2295         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL -DCK_CURSES \
2296         $(KFLAGS) -O2 -Olimit 3000 -mips3" "LNKFLAGS = -s -mips3" \
2297         "LIBS= -lcurses -ltermcap"
2298
2299 du43c-mips3:
2300         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2301         KTARGET=$${KTARGET-$(@)} ultrix43c-mips3
2302
2303 #DEC Ultrix 4.4 on DECstation 5000/50 or /150 with R4000 MIPS processor,
2304 #or 5000/260 with R4400.  The "-mips3" switch generates R4000-specific code,
2305 #which is faster and more compact but *won't* run on earlier DECstations.
2306 ultrix44-mips3:
2307         @echo Making C-Kermit $(CKVER) for Ultrix 4.4, R4000 cpu ...
2308         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2309         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2310         $(KFLAGS) -O2 -Olimit 1450 -mips3" "LNKFLAGS = -s -mips3"
2311
2312 du44-mips3:
2313         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2314         KTARGET=$${KTARGET-$(@)} ultrix44c-mips3
2315
2316 #DEC Ultrix 4.2 on DECstation, VAXstation, VAX, etc, System V R4 environment
2317 ultrix42s5r4:
2318         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4 on Ultrix...'
2319         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2320         "CFLAGS = -O2 -Olimit 1500 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
2321         -DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
2322
2323 #OSF/1
2324 osf osf1:
2325         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2326         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2327         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT $(KFLAGS)" \
2328         "LNKFLAGS = -s" "LIBS = $(LIBS) -lbsd -lcurses -ltermcap -lm"
2329
2330 #DEC OSF/1 V1.0-1.3 on DECstation, VAX, Alpha, or PC.
2331 dec-osf dec-osf1:
2332         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2333         "CFLAGS= -DBSD4 -DOSF -DOSF13 -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2334         -DNOREALPATH -DNOIKSD -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DNODEBUG \
2335         -DNOUNICODE $(KFLAGS)" \
2336         "LNKFLAGS = -non_shared" "LIBS = -lbsd -lcurses -ltermcap -lm"
2337
2338 # This one causes "relocation out-of-range" errors in the linker.
2339 old-dec-osf:
2340         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V1.x...
2341         @echo If you are building for DEC OSF/1 2.0, please use dec-osf20.
2342         @echo Remove or adjust -O2 and/or -Olimit if they cause trouble.
2343         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2344         "KFLAGS= -O2 -Olimit 2400 $(KFLAGS)"
2345
2346 #DEC OSF/1 2.0 on Alpha and probably nowhere else.
2347 #The only difference from OSF/1 is that optimization is omitted.
2348 #The optimized version gets strange runtime errors, like the PAUSE command
2349 #not working.  Add "-unsigned" to make all chars unsigned.
2350 dec-osf20:
2351         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V2.0...
2352         @echo Optimization omitted because it causes runtime errors.
2353         @echo See comments in makefile.
2354         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2355         "KFLAGS= -DOSF20 $(KFLAGS)"
2356
2357 dec-osf30:
2358         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V3.0...
2359         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2360         "KFLAGS= -DOSF30 -O2 -Olimit 2400 $(KFLAGS)"
2361
2362 #Digital UNIX 3.2
2363 # Must compile ckuus[6x].c separately without optimization otherwise
2364 # the optimizer dumps core - keep CFLAGS here in sync with those from osf.
2365 du32:
2366         @echo Making C-Kermit $(CKVER) for Digital UNIX 3.2...
2367         $(MAKE) CC=$(CC) CC2=$(CC2) ckuus6.$(EXT) \
2368         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2369         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2370         $(MAKE) CC=$(CC) CC2=$(CC2) ckuusx.$(EXT) \
2371         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2372         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2373         $(MAKE) CC=$(CC) CC2=$(CC2) osf \
2374         "KFLAGS= -DOSF32 -DHDBUUCP -O2 -Olimit 3200 $(KFLAGS)"
2375
2376 dec-osf32:
2377         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) du32 \
2378         KTARGET=$${KTARGET:-$(@)}
2379
2380 #Digital UNIX 4.0 through 4.0D (use tru64 targets for 4.0E and above)...
2381 du40:
2382         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0...
2383         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2384         "KFLAGS= -DOSF40 -DHDBUUCP -DFNFLOAT \
2385         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2386
2387 du40gcc:
2388         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0 with gcc ...
2389         $(MAKE) osf CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
2390         "KFLAGS= -DOSF40 -DHDBUUCP $(KFLAGS)"
2391
2392 #Tru64 Unix 4.0E
2393 tru64-40e:
2394         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0E...
2395         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2396         "KFLAGS= -DOSF40 -DOSF40E -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2397         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2398
2399 tru64-40f:
2400         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0F...
2401         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2402         "KFLAGS= -DOSF40 -DOSF40F -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2403         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2404
2405 tru64-40g:
2406         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0G...
2407         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2408         "KFLAGS= -DOSF40 -DOSF40G -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2409         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2410
2411 tru64-50a:
2412         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.0A...
2413         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2414         "KFLAGS= -DTRU64 -DOSF50 -DHDBUUCP \
2415         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2416
2417 tru64-51a:
2418         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1A...
2419         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2420         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DHDBUUCP \
2421         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2422
2423 tru64-51b:
2424         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1B...
2425         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2426         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2427         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2428
2429 # Added 5.1b version with OpenSSL - CDW 6-13-2005...
2430 tru64-51b+openssl:
2431         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1b
2432         @echo  including OpenSSL...
2433         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2434         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2435         -unsigned -std1 -O3 -Olimit 2400 \
2436         -DCK_AUTHENTICATION -DCK_SSL $(SSLINC) $(KFLAGS)" \
2437         "LIBS= $(SSLLIB) -rpath $(sslroot)/ssl/lib -lssl -lcrypto"
2438
2439 du50:
2440         $(MAKE) CC=$(CC) CC2=$(CC2) tru64-50a KTARGET=$${KTARGET:-$(@)}
2441
2442 du40-ridiculous-checking:
2443         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0.
2444         @echo Checking everything - assumes DECC...
2445         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2446         "KFLAGS= -DOSF40 -DHDBUUCP -w0 -warnprotos -check -portable \
2447         -unsigned -std1 -O3 -Olimit 1760 $(KFLAGS)"
2448
2449 #Sequent DYNIX/ptx 1.2.1
2450 dynixptx12:
2451         @echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.2.1...
2452         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2453         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DPTX -DNOGETUSERSHELL -DNOLEARN \
2454         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t $(KFLAGS) -i -O" \
2455         "LNKFLAGS = -i"
2456
2457 #Sequent DYNIX/ptx 1.3 or 1.4
2458 dynixptx13:
2459         @echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.3 TCP/IP...
2460         $(MAKE) xermit "CFLAGS= -O KTARGET=$${KTARGET:-$(@)} \
2461         -DSVR3 -DDIRENT -DHDBUUCP -DPTX -DCK_POLL -DNOGETUSERSHELL \
2462         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DTCPSOCKET $(KFLAGS) -i" \
2463         "LNKFLAGS = -i" "LIBS = -lsocket -linet -lnsl"
2464
2465 #Sequent DYNIX/ptx 2.0, ANSI C compilation
2466 #Should work on any hardware platform when DYNIX/ptx runs, including
2467 #386, 486, Pentium.
2468 dynixptx20:
2469         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2470         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2471         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2472         -DWAIT_T=int -DPTX -DNOGETUSERSHELL $(KFLAGS) -O" \
2473         "LIBS = -lsocket -linet -lnsl"
2474
2475 #Sequent DYNIX/ptx 2.0, ANSI C compilation, with curses
2476 dynixptx20c:
2477         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2478         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2479         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int -DPTX -DCK_CURSES \
2480         -DCK_NEWTERM -DNOGETUSERSHELL $(KFLAGS) -O" \
2481         "LIBS = -lsocket -linet -lnsl -lcurses -ltermcap"
2482
2483 #Sequent DYNIX/ptx 2.1.6, 80486, ANSI C compilation, with curses:
2484 # -Xa -- use ANSI compiler.
2485 # -Wc,-pw -- suppress portability warnings.
2486 # -Wc,-i386 -- 80386 cpu.
2487 # -Wc,-i486 -- 80486 cpu.
2488 # -Wc,-P5 -- Pentium (default).
2489 # -Wc,-O3 -- highest optimization.
2490 # -Wa,-N17061 -- increase symbol table from default of 15013 for ckcuni.c.
2491 # Early versions of DYNIX/ptx 2.1.x may need -DCK_POLL instead of -DSELECT.
2492 # Add "$&" after the colon in the "xermit" target for parallel makes.
2493 dynixptx216c:
2494         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6'
2495         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2496         "CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2497         -DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2498         -DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2499         -DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2500         $(KFLAGS) -Xa -Wc,-pw -Wc,-i486 -Wc,-O3 -Wa,-N17061" \
2501         "LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2502         "LNKFLAGS = -s"
2503
2504 #Sequent DYNIX/ptx 2.1.6, gcc 2.7.2.2, with curses:
2505 dynixptx216cgcc:
2506         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6 gcc'
2507         $(MAKE) xermit "CC = gcc" "CC2 = gcc" KTARGET=$${KTARGET:-$(@)} \
2508         "CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2509         -DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2510         -DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2511         -DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2512         $(KFLAGS) -O3 -pipe -funsigned-char" \
2513         "LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2514         "LNKFLAGS = -s"
2515
2516 #Sequent DYNIX/ptx 4.0, ANSI C compilation, with curses
2517 dynixptx41c:
2518         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.0...'
2519         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2520         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2521         -DWAIT_T=int -DPTX -DPTX4 -DCK_CURSES -DCK_NEWTERM \
2522         -DNOGETUSERSHELL $(KFLAGS) -O" \
2523         "LIBS = -lsocket -lnsl -lcurses -ltermcap"
2524
2525 #Sequent DYNIX/ptx 4.4, ANSI C compilation, with curses
2526 dynixptx44:
2527         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.4...'
2528         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2529         "CFLAGS= -DPTX -DPTX4 -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int \
2530         -DCK_CURSES -DCK_NEWTERM -DBIGBUFOK -DSELECT -DNOGETUSERSHELL \
2531         $(KFLAGS) -O" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
2532
2533 #Sequent DYNIX 3.0.x
2534 dynix3:
2535         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2536         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2537         "CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O \
2538         -DPWUID_T=int -DGID_T=int $(KFLAGS)"
2539
2540 #Sequent DYNIX 3.0.x, no ACUCNTRL
2541 dynix3noacu:
2542         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2543         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2544         "CFLAGS= -DBSD43 -DLCKDIR -DTCPSOCKET -O \
2545         -DUID_T=int -DGID_T=int $(KFLAGS)"
2546
2547 #Sequent DYNIX 3.1.x
2548 dynix31:
2549         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.x...
2550         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2551         "CFLAGS= -O -DDCLPOPEN -DLCKDIR -DBSD4 -DTCPSOCKET $(KFLAGS)"
2552
2553 #Sequent DYNIX 3.1.2, as above but with curses, to be compiled by gcc 2.3.3.
2554 dynix31c:
2555         @echo 'Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.2, curses...'
2556         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2557         "CFLAGS= -O2 -DDCLPOPEN -DACUCNTRL \
2558         -DBSD43 -DTCPSOCKET -DCK_CURSES -DUID_T=int \
2559         $(KFLAGS)" "LIBS= -lcurses -ltermcap"
2560
2561 #Convex C1 with Berkeley Unix
2562 convex:
2563         @echo Making C-Kermit $(CKVER) for Convex C1 / BSD...
2564         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2565         "CFLAGS= -DBSD4 -DNOLEARN $(KFLAGS) -Dmsleep=mnap"
2566
2567 #Convex C210 with Convex/OS 8
2568 convex8:
2569         @echo Making C-Kermit $(CKVER) for Convex C210 with OS 8
2570         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2571         "CFLAGS= -DBSD4 -DTCPSOCKET -DNODEBUG -DDIRENT -DNOFILEH \
2572         $(KFLAGS) -DSIG_V -Dmsleep=mnap"
2573
2574 #Convex C2 with Convex OS 9.1 (should also work with 8.1 or later)
2575 #with ANSI C compiler, uses BSD 4.3 uucp lockfile convention.
2576 convex9:
2577         @echo Making C-Kermit $(CKVER) for Convex C210 with OS 9.1
2578         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2579         "CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2580         -D__STDC__ -DLCKDIR -Dmsleep=mnap -O -ext -tm c1 $(KFLAGS)" \
2581         "LNKFLAGS = -ext"
2582
2583 #Convex C2 with Convex OS 10.1 or later
2584 #with gcc 2.x C compiler
2585 convex10gcc:
2586         @echo Making C-Kermit $(CKVER) for Convex C2 with OS 10.1 using gcc
2587         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2588         "CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2589         -D__STDC__  -Dmsleep=mnap -O2 $(KFLAGS)" CC=gcc CC2=gcc
2590
2591 #Cray X-MP or Y-MP UNICOS 6.x or 7.x.
2592 #NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2593 #processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2594 cray:
2595         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 6.x or 7.0...
2596         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2597         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2598
2599 #Cray X-MP or Y-MP UNICOS 8.0 Alpha.
2600 cray8:
2601         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 8.0 Alpha...
2602         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2603         "CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2604
2605 #Cray X-MP or Y-MP UNICOS 9.0.
2606 #This one was executed successfully for C-Kermit 8.0.209.
2607 #Earlier versions of Unicos will probably need the same flags.
2608 cray9:
2609         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 9.0...
2610         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2611         "CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DNOLFDEVNO \
2612         -DTCPSOCKET $(KFLAGS) -O1"
2613
2614 #Cray-2 or Cray 3-CSOS
2615 #NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2616 #processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2617 craycsos:
2618         @echo 'Making C-Kermit $(CKVER) for Cray-2/3 CSOS
2619         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2620         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET \
2621         $(KFLAGS) -DCK_ANSIC -DCK_CURSES" "LIBS=-lnet"
2622
2623 #NeXTSTEP 1.0 through 3.2.
2624 #Includes fullscreen file transfer display (curses) and TCP/IP support.
2625 #Uses shared library to make executable program about 80K smaller.
2626 #Remove "LIBS = -lsys_s" if this causes trouble.
2627 next:
2628         @echo Making C-Kermit $(CKVER) for NeXTSTEP...
2629         @echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2630         @echo 'add KFGLAGS=-DNOREDIRECT to your make command.'
2631         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2632         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2633         -pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2634
2635 nextc:
2636         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2637         KTARGET=$${KTARGET:-$(@)}
2638
2639 nextg:
2640         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2641         KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2642
2643 nextgc:
2644         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2645         KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2646
2647 #NeXTSTEP 3.3.
2648 #Includes fullscreen file transfer display and TCP/IP.
2649 # You might have to add 1 line to 1 NeXT header file <ip.h>
2650 # to declare n_long as u_long by adding #include <bsd/netinet/in_systm.h>
2651
2652 next33:
2653         @echo Making C-Kermit $(CKVER) for NeXTSTEP 3.3...
2654         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2655         "CFLAGS= -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2656         -pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2657
2658 #OPENSTEP 4.2 for Sparc, m680x0, HP PA-RISC, and Intel.
2659 #Includes fullscreen file transfer display and TCP/IP.
2660 #ckcpro.c compiled without optimization because it crashes the compiler.
2661 openstep42:
2662         @echo Making C-Kermit $(CKVER) for OPENSTEP 4.2...
2663         $(MAKE) ckcpro.$(EXT) \
2664         "CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2665         -DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -w"
2666         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2667         "CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2668         -DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -O -w" \
2669         "LIBS = -lsys_s -lcurses -ltermcap"
2670
2671 #NeXT with malloc debugger
2672 nextmd:
2673         @echo Making C-Kermit $(CKVER) for NeXT with malloc debugging...
2674         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
2675         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2676         -DCK_CURSES $(KFLAGS) -O -w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
2677         "LIBS = -lsys_s -lcurses -ltermcap"
2678
2679 #Build for NeXTSTEP with "fat" binaries (MABs) that run on both Motorola
2680 #and Intel platforms.
2681 nextfat:
2682         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2683         next KTARGET=$${KTARGET:-$(@)} \
2684         "KFLAGS=-Wall -arch m68k -arch i386" "LNKFLAGS = -arch m68k -arch i386"
2685
2686 #NeXTSTEP on Intel Platforms.
2687 next486:
2688         @echo Making C-Kermit $(CKVER) for NeXTSTEP on Intel Platforms...
2689         @echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2690         @echo 'add KFGLAGS=D-DNOREDIRECT to your make command.'
2691         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2692         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2693         -DNODEBUG -O3 -fno-omit-frame-pointer -fschedule-insns2 -pipe \
2694         -DCK_CURSES $(KFLAGS) -w" "LIBS = -lsys_s -lcurses -ltermcap"
2695
2696 #Single binary that runs on NeXT 68030 and 68040, Intel, HP, and Sparc,
2697 #as well as on OpenStep/Mach.
2698 nextquadfat:
2699         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2700         KTARGET=$${KTARGET:-$(@)} \
2701         "KFLAGS=-Wall -arch m68k -arch i386 -arch hppa -arch sparc" \
2702         "LNKFLAGS = -arch m68k -arch i386 -arch hppa -arch sparc"
2703
2704 #BeBox
2705 beboxdr7:
2706         @echo 'Making C-Kermit $(CKVER) for the BeBox...'
2707         @echo 'Link step will fail with default Metroworks linker 64K limit.'
2708         @echo 'Code Warrior Gold required to link big programs.'
2709         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2710         "CC=/boot/develop/tools/mwcc" "CC2=/boot/develop/tools/mwld" \
2711         "CFLAGS= -DBEBOX -DBE_DR_7 -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2712
2713 #BeBox BeOS DR7 only
2714 bebox:
2715         @echo 'Making C-Kermit $(CKVER) for BeBox...'
2716         @echo 'Link step will fail with default Metroworks linker 64K limit.'
2717         @echo 'Code Warrior Pro 3.0 for BeBox required to link big programs.'
2718         $(MAKE) wermit "CC=mwcc" "CC2=mwld" KTARGET=$${KTARGET:-$(@)} \
2719         "CFLAGS= -DBEBOX -DPOSIX -DNOLEARN -DNOUUCP $(KFLAGS) -O"
2720
2721 #BeOS 4.5
2722 #We have to use the wermit target because 'fd_set' is unknown.
2723 beos45:
2724         $(MAKE) wermit "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
2725         "CFLAGS= -DBEOS -DBEOS45 -DPOSIX -DNOIKSD -DNOREALPATH -DSYSTIMEH \
2726         -DNOCOTFMC -DNOUUCP -DNOLEARN $(KFLAGS) -O" \
2727         "LIBS = $(LIBS)"
2728
2729 #BeOS 4.5
2730 beos45net:
2731         $(MAKE) CC=$(CC) CC2=$(CC2) beos45 \
2732         "KFLAGS=-DTCPSOCKET -DNO_DNS_SRV $(KFLAGS)" "LIBS=-lnet -lnetapi"
2733
2734 #Plan 9 from Bell Labs
2735 plan9:
2736         @echo 'C-Kermit for Plan 9 from Bell Labs - calling ckpker.mk...'
2737         make -f ckpker.mk
2738
2739 #POSIX
2740 posix:
2741         @echo 'Making C-Kermit $(CKVER) for pure POSIX...'
2742         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2743         "CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2744
2745 # PowerMAX OS (SVR4) from Concurrent (tested on PowerMAX 5.1)
2746 powermax:
2747         @echo 'Making C-Kermit $(CKVER) for Concurrent PowerMAX OS...'
2748         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2749         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DPOWERMAX \
2750         -DNETPTY -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
2751         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
2752         -DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
2753         "LIBS= -lsocket -lnsl -lresolv -lcurses -lgen -lc -lucbc"
2754
2755 #Berkeley Software Design Inc. BSDI
2756 # Substitute "LIBS= -lnewcurses -ltermcap" if desired.
2757 bsdi:
2758         @echo 'Making C-Kermit $(CKVER) for BSDI ...'
2759         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2760         "CFLAGS= -DBSD44 -DSETREUID -DSW_ACC_ID -DBIGBUFOK -DFIXCRTSCTS \
2761         -DTCPSOCKET -DCK_CURSES -DFNFLOAT $(KFLAGS) -O" \
2762         "LIBS= -lcurses -ltermcap -lm"
2763
2764 #Berkeley Software Design Inc. BSDI - has higher serial speeds than 1.x.
2765 bsdi2:
2766         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2767         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 $(KFLAGS)"
2768
2769 bsdi3:
2770         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2771         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 -DBSDI3 $(KFLAGS)"
2772
2773 bsdi4:
2774         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2775         KTARGET=$${KTARGET:-$(@)} \
2776         "KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2777         -DCKHTTP -m486 $(KFLAGS)"
2778
2779 # (old name for the above)
2780 bsdiposix:
2781         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi
2782
2783
2784 #Build a BSDI 4.x binary that also runs under FreeBSD (Terry Kennedy).
2785 #But watch out for details like serial-port locking.
2786 bsdix:
2787         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2788         KTARGET=$${KTARGET:-$(@)} \
2789         "KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2790         -m486 $(KFLAGS)" "LNKFLAGS=-static -Wl,-m,i386bsdi -Wl,-e,_start"
2791
2792 #Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1
2793 pyramid:
2794         @echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2795         ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2796         "CFLAGS= -DBSD43 -DTCPSOCKET -DPYRAMID -O $(KFLAGS)" "LNKFLAGS = -s"
2797
2798 #Pyramid Dual Port OSx using HoneyDanBer UUCP, curses and TCP
2799 pyramid-hdb:
2800         @echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2801         ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2802         "CFLAGS= -DBSD43 -DTCPSOCKET -DHBDUUCP -DCK_CURSES -O $(KFLAGS)" \
2803         "LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
2804
2805 #Pyramid DC/OSx (UNIX System V R4).
2806 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
2807 #are not misplaced in sys (rather than netinet and arpa, respectively).
2808 #Uses ANSI C.
2809 #NOTE: Remove -O and Olimit:2500 from CFLAGS if TELNET connections do not work.
2810 pyrdcosx:
2811         @echo 'Making C-Kermit $(CKVER) for Pyramid DC/OSx...'
2812         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2813         "CFLAGS = -Xa -O -DSVR4 -DDIRENT -DHDBUUCP -DSELECT -DNOGETUSERSHELL \
2814         -DCK_CURSES -DSTERMIOX -DTCPSOCKET -DPYRAMID -K Olimit:3100 \
2815         -DNO_DNS_SRV $(KFLAGS)" "LIBS= -lcurses -lsocket -lnsl" "LNKFLAGS = -s"
2816
2817 #IBM's AIX 3.0 on IBM 370 mainframe, tested on AIX F44 thru F50.
2818 aix370:
2819         @echo Making C-Kermit $(CKVER) for IBM System/370 AIX 3.0...
2820         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2821         "CFLAGS= -DAIX370 -DTCPSOCKET -DLCKDIR -DDIRENT $(KFLAGS)" \
2822         "LIBS = -lbsd"
2823
2824 #IBM's AIX/ESA 2.1 (OSF/1) on IBM mainframe
2825 aixesa:
2826         @echo Making C-Kermit $(CKVER) for IBM AIX/ESA...
2827         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2828         "CFLAGS= -DAIXESA -DTCPSOCKET $(KFLAGS) -O"
2829
2830 #IBM PS/2 with AIX 1.0 thru 1.3.
2831 #  Reports indicate that -O switch must be omitted.
2832 #  It is also possible that "make bsd" will work (reports welcome).
2833 #  One report said "make LIBS=-lbsd bsd" did the trick.
2834 #  NOTLOG is to get around a 'tlog' symbol defined in one of the headers.
2835 ps2aix:
2836         @echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2837         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2838         "CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DSIG_V \
2839         -DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2840         "LNKFLAGS = -i"
2841
2842 ps2aixnetc:
2843         @echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2844         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2845         "CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DTCPSOCKET -DCK_CURSES \
2846         -DSIG_V -DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2847         "LIBS = -lcurses" "LNKFLAGS = -i"
2848
2849 ps2aix3:
2850         $(MAKE) ps2aix KTARGET=$${KTARGET:-$(@)}
2851
2852 #IBM RT PC with AIX 2.2.1, valid as of C-Kermit 8.0.
2853 #NOTLOG because of a conflict in <sys/termio.h>.
2854 #This one has unique and strange lockfiles.
2855 #  -O removed on purpose (8.0).
2856 #  In case of "compiler error: symbol table full", increase the -Nn number.
2857 #  In case of "compiler error: Constant pool too big", boost the -Np number.
2858 #  Add -DNOPUTENV if putenv() causes trouble.
2859 #  Put -DNOIKSD back if IKSD-related problems occur.
2860 rtaix:
2861         @echo 'Making C-Kermit $(CKVER) for IBM RT PC, AIX 2.2.1...'
2862         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2863         "CFLAGS = -DATTSV -DRTAIX -DHDBUUCP -DDIRENT -DNOTLOG -DTCPSOCKET \
2864         -DNOGETUSERSHELL -DCLSOPN -DNOREALPATH -DNOUNICODE -DBSD_INCLUDES \
2865         -DUSE_LSTAT -DFNFLOAT -Nn2500 -Np1000 -Wq,-SJ2 -a -w $(KFLAGS)" \
2866         "LIBS = -lm $(LIBS)" "LNKFLAGS = -s"
2867
2868 #### IBM RT PC - these targets were last verified in C-Kermit 8.0.211.
2869
2870 #IBM RT PC with AIX 2.2.1 + curses
2871 rtaixc:
2872         $(MAKE) rtaix CC=$(CC) CC2=$(CC2) "KFLAGS=-DCK_CURSES" "LIBS=-lcurses"
2873
2874 #IBM RT PC with AIX (ACIS) 2.2.1 (BSD 4.3)
2875 # Add -O, -DDYNAMIC, -s, etc, if they work.
2876 rtacis:
2877         @echo Making C-Kermit $(CKVER) for RT PC with ACIS 2.2.1 = BSD 4.3...
2878         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2879         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOIKSD -DNOPUTENV \
2880         $(KFLAGS) -U__STDC__" "LNKFLAGS = -s"
2881
2882 #### IBM AIX.  The first two targets should work for any version of AIX
2883 #### from 4.2 onwards.  The ones after that are for older versions or
2884 #### specific configurations, and/or with gcc.
2885
2886 # This one should work for any AIX 4.2 or later: "make aix".
2887 # Other tags are for compatibility with old makefile targets.
2888 #OK: 2011/06/11
2889 aix aix42 aix43 aix44 aix45 aix50 aix51 aix52 aix53 aix54 aix61:
2890         @echo Making C-Kermit $(CKVER) for IBM AIX...
2891         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2892         "CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2893         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2894         -DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
2895         -DCKCPU=\\\"`uname -p`\\\" \
2896         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2897         -D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
2898
2899 # Same but using gcc instead of cc
2900 # This works but we get "gcc: unrecognized option '-qmaxmem-..'" each module.
2901 aixg:
2902         @echo "Using gcc..."
2903         $(MAKE) aix KTARGET=$${KTARGET:-$(@)} \
2904         CC=gcc CC2=gcc "KFLAGS=-pipe -funsigned-char"
2905
2906 # AIX 4.2 or later with OpenSSL 0.9.7 or later: "make aix+ssl"
2907 # For earlier OpenSSL remove -DOPENSSL_097 or add "KFLAGS=-UOPENSSL_097".
2908 # Synonym target names added to cover old redundant targets that were removed.
2909 # If SSL is not installed in the /usr/local tree (see SSLINC and SSLLIB
2910 # definitions near the top), you can specify the locations in your make
2911 # command as in this example:
2912 #
2913 #  SSLINC=-I/opt/ssl/include SSLLIB=-L/opt/ssl/lib make -e aix+ssl
2914 #
2915 # To build with gcc use "make aix CC=gcc CC2=gcc", or "make aixg"
2916 #
2917 #OK: 2011/06/15
2918 aix+ssl aix51+openssl aix52+openssl aix53+openssl:
2919         @echo "Making C-Kermit $(CKVER) for IBM AIX with OpenSSL..."
2920         @echo "SSLINC=$(SSLINC) SSLLIB=$(SSLLIB)"
2921         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2922         CC=$(CC) CC2=$(CC2) \
2923         "CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2924         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2925         -D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2926         -DCKCPU=\\\"`uname -p`\\\" \
2927         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2928         -DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $(SSLINC) $(KFLAGS)" \
2929         "LNKFLAGS=-s" "LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
2930
2931 # AIX 5.3 or 6.1 or later with IBM OpenSSL, which is always in the directories
2932 # shown below so you don't have to set SSLINC and SSLLIB.  If for some reason
2933 # the SSL include files and libraries are not in the places assumed, then use
2934 # "make aix+ssl" (just above) and set SSLINC and SSLLIB to indicate where the
2935 # SSL files are.  To build with gcc use "make aix+ibmssl CC=gcc CC2=gcc".
2936 aix+ibmssl:
2937         @echo "Making C-Kermit $(CKVER) for IBM AIX 6.1 with OpenSSL..."
2938         @echo "If this fails use 'make aix+ss' and specify SSLINC and SSLLIB"
2939         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2940         CC=$(CC) CC2=$(CC2) \
2941         "CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2942         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2943         -D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2944         -DCKCPU=\\\"`uname -p`\\\" \
2945         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2946         -DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_098 \
2947         -I/usr/include/openssl $(KFLAGS)" \
2948         "LNKFLAGS=-s" \
2949         "LIBS=-L/usr/lib/openssl -lssl -lcrypto -lcurses -lm -lcrypt"
2950
2951 # Old AIX versions...
2952
2953 #IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000.
2954 rs6000:
2955         @echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
2956         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2957         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
2958         -DCK_POLL -DCLSOPN -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
2959         "LNKFLAGS = -s"
2960
2961 #IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000, with curses.
2962 rs6000c:
2963         @echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
2964         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2965         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
2966         -DCK_POLL -DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -DNOREALPATH \
2967         -O $(KFLAGS)" "LIBS= -lcurses -ltermcap" "LNKFLAGS = -s"
2968
2969 aix30:
2970         $(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
2971
2972 aix31:
2973         $(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
2974
2975 #IBM AIX 3.2 for RISC System/6000.
2976 #In case of "subprogram too complex" warnings, add "-qmaxmem=16000" to CFLAGS.
2977 rs6aix32:
2978         @echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000...
2979         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2980         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
2981         -DSELECT_H -DCLSOPN -DNOTTYLOCK -O $(KFLAGS)" "LNKFLAGS = -s"
2982
2983 #IBM AIX 3.2 for RISC System/6000.
2984 rs6aix32c:
2985         @echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000, TCP+curses...
2986         @echo In case of Subprogram Too Complex warnings,
2987         @echo add -qmaxmem=16000 to CFLAGS.
2988         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2989         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
2990         -DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
2991         "LNKFLAGS = -s" "LIBS=-lcurses"
2992
2993 aix32:
2994         $(MAKE) rs6aix32c KTARGET=$${KTARGET:-$(@)}
2995
2996 #IBM AIX 4.1, 4.1.x on RISC System/6000 or Power Series.
2997 #Generates common binary for all platforms if using xlc (IBM C compiler).
2998 #When using gcc, add -mcpu=common to generate common binary.
2999 #Note that this one needs CK_NEWTERM.
3000 # Add -bbigtoc in case ld fails with TOC overflow.
3001 aix41:
3002         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3003         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3004         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3005         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3006         -DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
3007         "LNKFLAGS = -s" "LIBS=-lcurses"
3008
3009 #Ditto but with gcc.
3010 #Remove "CC=gcc CC2=gcc" if you have gcc installed as cc.
3011 aix41g:
3012         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3013         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
3014         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3015         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3016         -DNOGETUSERSHELL -O $(KFLAGS)" \
3017         "LNKFLAGS = -s -Xlinker -bbigtoc" "LIBS=-lcurses"
3018
3019 # Add -bbigtoc in case ld fails with TOC overflow.
3020 aix41+krb5+krb4:
3021         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3022         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3023         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3024         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3025         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3026         -DCK_ENCRYPTION -DCK_DES $(K5INC) $(K5INC)/krb5  \
3027         -DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
3028         "LNKFLAGS = -s" \
3029         "LIBS = $(K5LIB) -lcurses -lkrb4 -ldes425 -lkrb5 \
3030         -lcom_err -lk5crypto -lgssapi_krb5"
3031
3032 #Old name for "aix41".
3033 rs6aix41c:
3034         $(MAKE) aix41 KTARGET=$${KTARGET:-$(@)}
3035
3036 #IBM AIX 4.1, 4.1.x, or 4.2 on RISC System/6000 or Power Series,
3037 # with X.25 support
3038 #Generates common binary for all platforms if using xlc (IBM C compiler).
3039 #When using gcc, add -mcpu=common to generate common binary.
3040 # Add -bbigtoc in case ld fails with TOC overflow.
3041 aix41x25:
3042         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3043         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3044         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3045         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3046         -DIBMX25 -DDEBUG -DNOGETUSERSHELL -qmaxmem=16000 -g $(KFLAGS)" \
3047         "LNKFLAGS = -g -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3048         -@echo "\e]0;kermit done\a\c"
3049
3050 #As above but without -g in LNKFLAGS.
3051 # Add -bbigtoc in case ld fails with TOC overflow.
3052 aix41x25o:
3053         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3054         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3055         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3056         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3057         -DIBMX25 -DNODEBUG -DNOGETUSERSHELL -qmaxmem=16000 $(KFLAGS)" \
3058         "LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3059         -@echo "\e]0;kermit done\a\c"
3060
3061 #AIX 4.2 -- Use this target if the regular "make aix" doesn't work.
3062 # Must have CK_NEWTERM or echoing is lost after curses.
3063 # Add -bbigtoc in case ld fails with TOC overflow.  As of C-Kermit 8.0.212,
3064 # all AIX builds 4.2 and later include large file support.
3065 oldaix42:
3066         @echo Making C-Kermit $(CKVER) for IBM AIX 4.2 or higher...
3067         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3068         "CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3069         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
3070         -DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
3071         -DCKCPU=\\\"`uname -p`\\\" \
3072         -DHERALD=\\\"\ IBM\ AIX\ `uname -v`.`uname -r`\\\" \
3073         -D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
3074
3075 #AIX 4.3 - Use this target if the regular "make aix" doesn't work.
3076 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3077 # -bbigtoc needed on some systems but not others to avoid TOC overflow.
3078 # "man ld" says -bbigtoc makes program run slower.
3079 oldaix43:
3080         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher...
3081         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3082         "CFLAGS= -DAIXRS -DAIX41 -DAIX43 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3083         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3084         -DFNFLOAT -DNOGETUSERSHELL -qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3085         "LNKFLAGS = -s" "LIBS=-lcurses -lm"
3086
3087 #AIX 4.3 with IBM X.25.
3088 aix43x25:
3089         @echo "Making C-Kermit $(CKVER) for IBM AIX 4.3 with X.25..."
3090         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3091         "CFLAGS= -DAIXRS -DAIX41 -DAIX43 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3092         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3093         -DFNFLOAT -DNOGETUSERSHELL -DIBMX25 \
3094         -qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3095         "LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg -lm"
3096
3097 #AIX 4.3 -- Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3098 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3099 # "man ld" says -bbigtoc makes program run slower.
3100 aix43g:
3101         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3102         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3103         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3104         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3105         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3106         "LIBS=-lcurses -lm"
3107
3108 aix43gcc:
3109         $(MAKE) aix43g
3110
3111 # None of the following aix43gcc attempts work on a gcc-only AIX 4.3.3 box.
3112 # It just plain can't find the math routines (fmod, pow, exp, sqrt, log10,...)
3113 # Which is odd because nm /usr/lib/libC.a finds them...
3114
3115 #in case aix43gcc can't find its math library...
3116 aix43gccx:
3117         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3118         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3119         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3120         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3121         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3122         "LIBS= -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.1.0/2.95.2 \
3123         -lcurses -bloadmap -bnoquiet"
3124
3125 #in case aix43gccx can't find its math library...
3126 aix43gccy:
3127         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3128         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3129         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3130         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3131         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3132         "LIBS= -lcurses -bloadmap -bnoquiet"
3133
3134 #in case aix43gccx can't find its math library...
3135 aix43gccz:
3136         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3137         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3138         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3139         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3140         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3141         "LIBS= -L. -lcurses -bloadmap -bnoquiet"
3142
3143 #AIX 4.3 with MIT Kerberos 5 and Kerberos 4 compatibility mode
3144 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3145 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3146 # "man ld" says -bbigtoc makes program run slower.
3147 aix43gcc+krb5+krb4:
3148         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3149         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3150         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3151         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3152         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3153         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3154         -DCK_ENCRYPTION -DCK_DES -funsigned-char $(K5INC) $(K5INC)/krb5 \
3155         $(KFLAGS)" \
3156         "LIBS=$(K5LIB) -lcurses -lm -lkrb4 -ldes425 -lkrb5 \
3157         -lcom_err -lk5crypto -lcrypt -lgssapi_krb5"
3158
3159 #AIX 4.3 with MIT Kerberos 5, Kerberos 4 compatibility mode and OpenSSL
3160 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3161 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3162 # "man ld" says -bbigtoc makes program run slower.
3163 aix43gcc+krb5+krb4+openssl:
3164         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3165         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3166         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3167         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3168         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3169         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3170         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DLIBDES -DCK_SSL \
3171         -funsigned-char $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3172         "LIBS=$(K5LIB) $(SSLLIB) -lssl -lcrypto \
3173         -lcurses -lm -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt \
3174         -lgssapi_krb5"
3175
3176 aix43gcc+openssl:
3177         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/OpenSSL...
3178         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3179         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3180         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3181         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3182         -DCK_AUTHENTICATION -DCK_SSL -funsigned-char $(SSLINC) $(KFLAGS)" \
3183         "LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
3184
3185 aix44gcc:
3186         $(MAKE) aix43g "KFLAGS=-DAIX44 $(KFLAGS)" \
3187         KTARGET=$${KTARGET:-$(@)}
3188
3189 aix45gcc:
3190         $(MAKE) aix43g "KFLAGS=-DAIX45 $(KFLAGS)" \
3191         KTARGET=$${KTARGET:-$(@)}
3192
3193 aix50gcc:
3194         $(MAKE) aix43g "KFLAGS=-DAIX50 $(KFLAGS)" \
3195         KTARGET=$${KTARGET:-$(@)}
3196
3197 aix51gcc:
3198         $(MAKE) aix43g "KFLAGS=-DAIX51 $(KFLAGS)" \
3199         KTARGET=$${KTARGET:-$(@)}
3200
3201 aix52gcc:
3202         $(MAKE) aix43g "KFLAGS=-DAIX52 $(KFLAGS)" \
3203         KTARGET=$${KTARGET:-$(@)}
3204
3205 aix53gcc:
3206         $(MAKE) aix43g "KFLAGS=-DAIX53 $(KFLAGS)" \
3207         KTARGET=$${KTARGET:-$(@)}
3208
3209 #Bull DPX/2 with BOS/X, like AIX/RS6000
3210 bulldpx2:
3211         @echo Making C-Kermit $(CKVER) for Bull DPX/2 with BOS/X...
3212         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3213         "CFLAGS= -DSVR3 -DDIRENT -DCK_ANSIC -DCKTYP_H=<sys/types.h> \
3214         -DCK_POLL -DNOGETUSERSHELL -DCLSOPN -DNOLEARN -O $(KFLAGS)" \
3215         "LNKFLAGS = -s"
3216
3217 #Sun UNIX 3.5 with gcc 2.3.3.
3218 sunos3gcc:
3219         @echo Making C-Kermit $(CKVER) for Sun UNIX 3.5 and gcc...
3220         $(MAKE) xermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3221         CFLAGS="-g -O -DBSD4 -DTCPSOCKET $(KFLAGS)"
3222
3223 #SunOS version 4.0, BSD environment, has saved original euid feature.
3224 # Add "CC=/usr/ucb/cc CC2=/usr/ucb/cc" if necessary.
3225 # Note: Including Unicode crashes the assembler in ckcuni.c.
3226 sunos4:
3227         @echo Making C-Kermit $(CKVER) for SunOS 4.0, BSD environment...
3228         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3229         "CFLAGS= -O -DSUNOS4 -DFNFLOAT -DNOUNICODE $(KFLAGS)" \
3230         "LIBS=-lm"
3231
3232 #As above, but with SunLink X.25 support
3233 sunos4x25:
3234         @echo SunLink X.25 support
3235         $(MAKE) "MAKE=$(MAKE)" sunos4 KTARGET=$${KTARGET:-$(@)} \
3236         "KFLAGS=$(KFLAGS) -DFNFLOAT -DSUNX25" \
3237         "LIBS=-lm"
3238
3239 #SUN OS version 4.1 - 4.1.3, BSD environment, has saved original euid feature.
3240 #Uses Honey DanBer UUCP.  Requires presence of /usr/spool/locks directory.
3241 # /var/spool/ should be a symbolic link to  /usr/spool/.
3242 # ... or 'make xermit "CC= /usr/ucb/cc " \'
3243 # Note: "xermit" means use the select() version of the CONNECT module.
3244 # Note for C-Kermit 9.0: Reportedly 'you need to modify the sys/ioctl.h
3245 # include file, i.e. comment out the "struct winsize" and "struct
3246 # ttysize". Otherwise there will be a conflict with sys/ttycom.h (included by
3247 # termios.h) which also declares these structs. But you need both includes.'
3248 sunos41:
3249         @echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD...
3250         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3251         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE $(KFLAGS)" \
3252         "LIBS= $(LIBS) -lresolv -lm"
3253
3254 #As above, but compiled with gcc.  Gives 24-32K size reduction
3255 #with gcc 2.1 or 2.2.2.  CAUTION: make sure "fixincludes" has been run on
3256 #the include files, so gcc's are in sync with the regular Sun ones.
3257 #This includes the curses library for fullscreen file transfer display.
3258 #NDGPWNAM needed for GCC 2.5.6, not needed for 2.4.0, but it's uncertain
3259 #whether it will do any harm for 2.4.0 compilation -- if so, remove it.
3260 sunos41gcc:
3261         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3262         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3263         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3264         -funsigned-char $(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3265
3266 # As above, but without -funsigned-char so I can see the warnings that
3267 # everybody else will get when they use ANSI compilers that don't have this
3268 # option (gsc = gcc signed char).
3269 sunos41gsc:
3270         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3271         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3272         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3273         $(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3274
3275 #As above but with ckucon.c rather than ckucns.c (for testing only)
3276 sunos41gccfork:
3277         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3278         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3279         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3280         -DNOLEARN -funsigned-char $(KFLAGS)" \
3281         "LIBS= -lcurses -ltermcap -lresolv -lm"
3282
3283 #as above but configured for Kerberos IV
3284 sunos41gcc+krb4:
3285         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3286         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3287         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3288         -DTCPSOCKET -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3289         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK -funsigned-char \
3290         $(K4INC) $(KFLAGS)" \
3291         "LIBS= $(K4LIB) -lcurses -ltermcap -lresolv -lm -lkrb -ldes"
3292
3293 #as above but configured for SSL/TLS
3294 sunos41gcc+openssl:
3295         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, ssl...
3296         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3297         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3298         -DCK_AUTHENTICATION -funsigned-char \
3299         -DCK_SSL -DTCPSOCKET -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3300         "LIBS= $(SSLLIB) -lcurses -ltermcap -lresolv -lm -lssl -lcrypto"
3301
3302 #as above but configured for Kerberos IV and SSL/TLS
3303 sunos41gcc+krb4+openssl:
3304         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3305         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3306         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3307         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3308         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3309         $(K4INC) $(SSLINC) $(KFLAGS)" \
3310         "LIBS= $(K4LIB) $(SSLLIB) \
3311         -lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto"
3312
3313 #as above but configured for Kerberos IV and ZLIB enabled SSL/TLS
3314 sunos41gcc+krb4+openssl+zlib:
3315         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3316         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3317         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3318         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3319         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3320         -DZLIB $(K4INC) $(SSLINC) \
3321         $(KFLAGS)" \
3322         "LIBS= $(K4LIB) $(SSLLIB) \
3323         -lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto -lz"
3324
3325 #as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3326 sunos41gcc+krb4+srp+openssl+zlib:
3327         @echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,krb4,srp,ssl,zlib..."
3328         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3329         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3330         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3331         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3332         -DZLIB -DCK_SRP $(K4INC) $(SRPINC) $(SSLINC) $(KFLAGS)" \
3333         "LIBS= $(K4LIB) $(SRPLIB) $(SSLLIB) \
3334         -lcurses -ltermcap -lresolv -lm -lkrb -lkrypto \
3335         -lsrp -lssl -lcrypto -lz"
3336
3337 #as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3338 sunos41gcc+srp+openssl+zlib:
3339         @echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,srp,ssl,zlib..."
3340         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3341         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3342         -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES \
3343         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3344         -DZLIB -DCK_SRP $(SRPINC) $(SSLINC) \
3345         $(KFLAGS)" \
3346         "LIBS= $(SRPLIB) $(SSLLIB) \
3347         -lcurses -ltermcap -lresolv -lm -lkrypto -lsrp -lssl -lcrypto -lz "
3348
3349 #SUNOS 4.1 as sunos41 above, but also with curses support
3350 sunos41c:
3351         @echo Curses support
3352         $(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
3353         "KFLAGS=$(KFLAGS) -DCK_CURSES -DFNFLOAT " \
3354         "LIBS= -lcurses -ltermcap"
3355
3356 #As SunOS 4.1.x, gcc, configured as Internet Kermit Server.
3357 # . NOLOCAL removes capability to make connections
3358 # . TNCODE allows server-side Telnet negotiation.
3359 # . used to include -lpwent, why?
3360 # . used to include -L/usr/local/lib -lm, why?
3361 sunos41giks:
3362         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc for IKS...
3363         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3364         "CFLAGS= -O -DSUNOS41 -DNDGPWNAM -DFNFLOAT \
3365         -DNOLOCAL -DTCPSOCKET -DTNCODE -DNOPUSH $(KFLAGS)" \
3366         "LIBS= -lm -lresolv"
3367
3368 #SUNOS 4.1 with SunLink X.25 support
3369 sunos41x25:
3370         @echo SunLink X.25 support
3371         $(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3372         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3373         -DNOLEARN $(KFLAGS)" "LIBS= $(LIBS) -lresolv -lm"
3374
3375 #SUNOS 4.1 with SunLink X.25 support and curses
3376 sunos41x25c:
3377         @echo SunLink X.25 support + curses
3378         $(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3379         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3380         -DCK_CURSES -DNOLEARN $(KFLAGS)" \
3381         "LIBS= $(LIBS) -lcurses -ltermcap -lresolv -lm"
3382
3383 #SUN with Solaris 2.0 = SunOS 5.0.
3384 #Mostly the same as System V R4.  Don't use this with later Solaris versions.
3385 solaris20:
3386         @echo 'Making C-Kermit $(CKVER) for Sun with Solaris 2.0 and curses...'
3387         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3388         "CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3389         -DTCPSOCKET -DCK_CURSES -DFNFLOAT -DCK_POLL $(KFLAGS)" \
3390         "LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s"
3391
3392 #SUN with Solaris 2.0.
3393 #As above, but built with the gcc compiler from the Cygnus CD-ROM.
3394 solaris20g:
3395         @echo 'Making C-Kermit $(CKVER) for Sun Solaris 2.0, gcc, and curses..'
3396         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3397         "CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3398         -DTCPSOCKET -DCK_CURSES -DCK_POLL -DFNFLOAT $(KFLAGS)" \
3399         "LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s" \
3400         CC=/opt/cygnus-sol2-1.1/bin/gcc CC2=/opt/cygnus-sol2-1.1/bin/gcc
3401
3402 #SunOS 5.1 = Solaris 2.1.
3403 #NOTE: A C compiler is no longer bundled with SunOS 5.1, so to compile C
3404 #programs, you might have to change your PATH to include the directory
3405 #/usr/ccs/bin AFTER the directory containing the compiler.  SunPRO C is
3406 #installed by default in /opt/SUNWspro/bin.  So a sample PATH might be:
3407 #
3408 # /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3409 # /usr/ucb:/usr/sbin:/sbin:.
3410 #
3411 # or:
3412 #
3413 # /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3414 #
3415 #NOTE 2: Compilation with the Apogee C compiler (apcc) might not work,
3416 #because it refuses to allow "-Usun".  Reportedly, newer releases of apcc
3417 #(such as 1.2.17) work OK, use: "make -e sunos51 CC=apcc CC2=apcc".
3418 solaris21:
3419         @echo 'Making C-Kermit $(CKVER) for SunOS 5.x....'
3420         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3421         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DFNFLOAT \
3422         -DSELECT -DNODEBUG -DSTERMIOX $(KFLAGS)" "LIBS = -lm" "LNKFLAGS = -s"
3423
3424 #Solaris 2.0 - 2.4, SunPro compiler, includes curses and TCP/IP.
3425 #When using SUNWspro CC 2.0.1 under Solaris 2.3, be sure all cc patches
3426 #are applied, otherwise corrupt or truncated object files can result.
3427 #To build, set your PATH as follows:
3428 #  /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3429 #  /usr/ucb:/usr/sbin:/sbin:.
3430 # or (depending on where the compiler has been installed):
3431 #  /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3432 #For additional optimization try using "-fast -xO4 -xdepend".
3433 solaris2x:
3434         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3435         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3436         "CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3437         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
3438         "LNKFLAGS = -s" "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv"
3439
3440 #as above but configured for Kerberos IV
3441 solaris2x+krb4:
3442         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x, SunPro cc, krb4...'
3443         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3444         "CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3445         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET  \
3446         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3447         -DCK_ENCRYPTION -DCK_DES -DCK_CAST $(K4INC) $(KFLAGS)" \
3448         "LNKFLAGS = -s" \
3449         "LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes"
3450
3451 #C-Kermit for Solaris 2.0-2.4 compiled with gcc, includes curses and TCP/IP.
3452 #Change -O2 to -O if -O2 gives trouble.
3453 #Remove -Usun if it causes trouble.
3454 #Your PATH should start with something like:
3455 #  /usr/local/gnu/bin:/usr/ccs/bin:
3456 #Produces a huge executable -- strip with /usr/ccs/bin/strip (not Gnu strip).
3457 #Also don't add "LNKFLAGS = -s" -- strip manually instead.
3458 #Also note: this can NOT be linked statically - Sun makes it impossible.
3459 #And for Solaris 2.4, you might have to replace:
3460 # /usr/local/lib/gcc-lib/i486-sun-solaris2/2.4.5/include/sys/stat.h
3461 #with /usr/include/sys/stat.h.
3462 solaris2xg:
3463         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc...'
3464         @echo 'Please read the comments that accompany the solaris2xg target.'
3465         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3466         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3467         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3468         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3469
3470 #ditto but no curses.
3471 solaris2xgnc:
3472         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc...'
3473         @echo 'Please read the comments that accompany the solaris2xg target.'
3474         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3475         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3476         -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3477         "LIBS= -lsocket -lnsl -lm -lresolv $(LIBS)"
3478
3479 #and with Kerberos IV
3480 solaris2xg+krb4:
3481         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc, krb4...'
3482         @echo 'Please read the comments that accompany the solaris2xg target.'
3483         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3484         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3485         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3486         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 -DCK_ENCRYPTION \
3487         -DCK_DES -DCK_CAST -DBIGBUFOK $(K4INC) $(KFLAGS)" \
3488         "LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes \
3489         $(LIBS)"
3490
3491 #and with OpenSSL,ZLIB,PAM,SHADOW
3492 solaris2xg+openssl+zlib+pam+shadow:
3493         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3494         @echo 'Please read the comments that accompany the solaris2xg target.'
3495         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3496         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3497         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3498         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW  -DZLIB \
3499         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3500         "LIBS= $(SSLLIB) -ltermlib \
3501         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz"
3502
3503 #Ditto but with GCC 3.1 in which you have to specify 32-bit with -m32.
3504 #In Solaris 9 (and maybe 8) you'll also need specifiy the Library path.
3505 #Reportedly this can be done here, but only with:
3506 # crle -l /usr/lib:/usr/local/ssl/lib
3507 #prior to building.  Note: 64-bit not tested with SSL.
3508 #For no-crypto 64-bit builds see the solaris9g64 target.
3509 solaris2xg32+openssl+zlib+pam+shadow:
3510         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3511         @echo 'Please read the comments that accompany the solaris2xg target.'
3512         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC="gcc -m32" CC2="gcc -m32" \
3513         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3514         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3515         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW  -DZLIB \
3516         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3517         "LIBS= $(SSLLIB) -ltermlib \
3518         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz"
3519
3520 #and with Krb5,Krb4,OpenSSL,SHADOW
3521 solaris2xg+krb5+krb4+openssl+shadow:
3522         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc,k5,k4,ssl...'
3523         @echo 'Please read the comments that accompany the solaris2xg target.'
3524         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3525         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3526         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3527         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3528         -DCK_ENCRYPTION -DCK_SSL -DCK_DES -DCK_CAST -DBIGBUFOK \
3529         $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3530         "LIBS= $(K5LIB) $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3531         -lkrb4 -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3532         -ldes $(LIBS)"
3533
3534 #and with OpenSSL
3535 solaris2xg+openssl+pam+shadow:
3536         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3537         @echo 'Please read the comments that accompany the solaris2xg target.'
3538         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3539         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3540         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3541         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW \
3542         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3543         "LIBS= $(SSLLIB) -ltermlib \
3544         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam"
3545
3546 solaris2xg+openssl+zlib+srp+pam+shadow: 
3547         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3548         @echo 'Please read the comments that accompany the solaris2xg target.'
3549         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3550         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3551         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DBIGBUFOK \
3552         -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES -DLIBDES -DCK_CAST \
3553         -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DCK_SRP $(SSLINC) $(KFLAGS)" \
3554         "LIBS= $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv -lsrp -lssl \
3555         -ldes -lkrypto -lcrypto -lpam -lz"
3556
3557 solaris22g:
3558         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3559         KTARGET=$${KTARGET:-$(@)}
3560
3561 solaris23g:
3562         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3563         KTARGET=$${KTARGET:-$(@)}
3564
3565 #Solaris 2.4 built with gcc
3566 solaris24g:
3567         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} \
3568         solaris2xg "KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3569
3570 #Solaris 2.0-2.3, SunPro compiler, with SunLink X.25 support.
3571 #This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3572 #exists and can be dynamically linked.
3573 #NOTE: Do not change target to xermit -- it doesn't support X.25.
3574 solaris2x25:
3575         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x+X.25 with SunPro cc...'
3576         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3577         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DDIRENT \
3578         -DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DNOLEARN \
3579         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3580         "LNKFLAGS = -s" \
3581         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3582         -lsockx25 -lsocket -lnsl -lm -lresolv"
3583
3584 #Solaris 2.0-2.4, gcc, SunLink X.25 added.
3585 #NOTE: Can't use xermit target with X.25.
3586 solaris2xgx25:
3587         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x + X.25 with GNU cc...'
3588         @echo 'Please read the comments that accompany the solaris2xg entry.'
3589         $(MAKE) wermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3590         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DSUNX25 \
3591         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DFNFLOAT \
3592         -DNOLEARN $(KFLAGS)" \
3593         "LIBS= -ltermlib -lm -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3594         -lsockx25 -lsocket -lnsl"
3595
3596 #Solaris 2.4, SunPro compiler, with SunLink X.25 support.
3597 #This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3598 #exists and can be dynamically linked.
3599 solaris24x25:
3600         @echo 'Making C-Kermit $(CKVER) for Solaris 2.4+X.25 with SunPro cc...'
3601         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3602         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DSOLARIS24 -DDIRENT -DNOLEARN \
3603         -DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DPOSIX_CRTSCTS \
3604         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3605         "LNKFLAGS = -s" \
3606         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3607         -lsockx25 -lsocket -lnsl -lm -lresolv"
3608
3609 #Solaris 2.5, SunPro compiler, with SunLink X.25 support.
3610 solaris25x25:
3611         @echo 'Making C-Kermit $(CKVER) for Solaris 2.5+X.25 with SunPro cc...'
3612         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3613         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS25 -DDIRENT -DSUNX25 \
3614         -DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES \
3615         -DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3616         -I/opt/SUNWconn/include $(KFLAGS)" \
3617         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3618         -lsockx25 -lsocket -lnsl -lm -lresolv"
3619
3620 solaris23:
3621         $(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3622         "KFLAGS=$(KFLAGS)"
3623
3624 solaris24:
3625         $(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3626         "KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3627
3628 # template for Solaris 2.5 and above.
3629 solaris25x:
3630         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3631         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3632         "CFLAGS = -DFNFLOAT -O -Usun -i $(KFLAGS)" \
3633         "LNKFLAGS = -s" \
3634         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3635
3636 #Solaris 2.5, SunPro compiler, curses, TCP/IP
3637 solaris25:
3638         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3639         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3640
3641 #Solaris 2.5, SunPro compiler, curses, TCP/IP, Kerberos IV
3642 solaris25+krb4:
3643         $(MAKE) "MAKE=$(MAKE)" solaris25x+krb4 KTARGET=$${KTARGET:-$(@)} \
3644         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3645
3646 #Solaris 2.5 built with gcc
3647 solaris25g:
3648         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3649         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3650
3651 #Solaris 2.5 built with gcc and Kerberos IV
3652 solaris25g+krb4:
3653         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3654         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3655
3656 #Solaris 2.5 built with gcc and Kerberos V/IV, SSL, ...
3657 solaris25g+krb5+krb4+openssl+shadow:
3658         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3659         KTARGET=$${KTARGET:-$(@)} \
3660         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3661
3662 #Solaris 2.5, gcc, SunLink X.25 added.
3663 solaris25gx25:
3664         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3665         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3666
3667 #Solaris 2.6, gcc, SunLink X.25 added.
3668 solaris26gx25:
3669         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3670         "KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3671         "LIBS= -lpam"
3672
3673 #Solaris 2.6, SunPro compiler, curses, TCP/IP
3674 solaris26:
3675         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3676         "KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3677         "LIBS= -lpam"
3678
3679 #Solaris 2.6 with gcc
3680 solaris26g:
3681         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xg \
3682         "KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3683         "LIBS = -lpam"
3684
3685 #Solaris 2.6 with gcc and SSL
3686 solaris26g+openssl:
3687         $(MAKE) "MAKE=$(MAKE)"  solaris2xg+openssl+pam+shadow \
3688         KTARGET=$${KTARGET:-$(@)} "KFLAGS= -DSOLARIS26 $(KFLAGS)"
3689
3690 #Solaris 2.6 with gcc, no curses (e.g. because libtermlib is missing).
3691 solaris26gnc:
3692         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgnc \
3693         "KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3694         "LIBS= -lpam"
3695
3696 #Solaris 2.6, SunPro compiler, with SunLink X.25 support.
3697 solaris26x25:
3698         @echo 'Making C-Kermit $(CKVER) for Solaris 2.6+X.25 with SunPro cc...'
3699         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3700         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS26 -DDIRENT -DSUNX25 \
3701         -DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES -DCK_PAM -DCK_SHADOW \
3702         -DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3703         -I/opt/SUNWconn/include $(KFLAGS)" \
3704         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3705         -lsockx25 -lsocket -lnsl -lm -lresolv -lpam"
3706
3707 #Solaris 7 (2.7) with Sun CC
3708 solaris7:
3709         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3710         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3711         "LIBS= -lpam"
3712
3713 #Solaris 7 with gcc (32-bit)
3714 solaris7g:
3715         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3716         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3717         "LIBS= -lpam"
3718
3719 #Solaris 7 with gcc + Kerberos IV (32-bit)
3720 solaris7g+krb4:
3721         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3722         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3723         "LIBS= -lpam"
3724
3725 solaris7g+openssl+zlib+pam+shadow:
3726         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3727         KTARGET=$${KTARGET:-$(@)} \
3728         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3729
3730 #Solaris 7 with gcc + OpenSSL (32-bit)
3731 solaris7g+openssl+zlib+srp+pam+shadow:
3732         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+srp+pam+shadow \
3733         KTARGET=$${KTARGET:-$(@)} \
3734         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3735
3736 #Solaris 8
3737 solaris8:
3738         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3739         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3740         "LIBS= -lpam"
3741
3742 #Solaris 8 with gcc (32-bit)
3743 solaris8g:
3744         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3745         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3746         "LIBS= -lpam"
3747
3748 # In OpenSSL builds add -ldl if you get unresolved references for
3749 # dlclose, dlsym, dlopen, dlerror.
3750
3751 #Solaris 8 with gcc + OpenSSL (32-bit)
3752 solaris8g+openssl+zlib+pam+shadow:
3753         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3754         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DSOLARIS8 $(KFLAGS)"
3755
3756 #Solaris 8 with gcc + Kerberos IV (32-bit)
3757 solaris8g+krb4:
3758         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3759         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3760         "LIBS= -lpam"
3761
3762 solaris9nolfs:
3763         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3764         "KFLAGS=-DSOLARIS9 -DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3765         "LIBS= -lpam"
3766
3767 #Solaris 9 with malloc debugging
3768 solaris9md:
3769         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
3770         "CFLAGS = -DFNFLOAT -O -Usun -i -D_FILE_OFFSET_BITS=64 \
3771         -DSOLARIS9 -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG \
3772         -DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3773         "LIBS= -lpam -ltermlib -lsocket -lnsl -lm -lresolv"
3774
3775 #Solaris 9 with gcc + OpenSSL + Shadow (32-bit)
3776 #Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3777 solaris9g+openssl+shadow+pam+zlib:
3778         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3779         KTARGET=$${KTARGET:-$(@)} \
3780         "KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
3781         -DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
3782         "LIBS= -lpam -ldes425 -lz $(LIBS)"
3783
3784 #Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow (32-bit)
3785 #Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3786 solaris9g+krb5+krb4+openssl+shadow+pam+zlib:
3787         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3788         KTARGET=$${KTARGET:-$(@)} \
3789         "KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
3790         -DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
3791         "LIBS= -lpam -ldes -lz $(LIBS)"
3792
3793 #Solaris 9 with gcc + Kerberos 4 and 5:
3794 solaris9g+krb5+krb4:
3795         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3796         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3797         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3798         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3799         -D_FILE_OFFSET_BITS=64 \
3800         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK \
3801         $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3802         "LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3803         -lkrb4 -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3804         -ldes $(LIBS)"
3805
3806 #Solaris 9 with gcc + Kerberos 5.
3807 #Columbia Only - libdes has a version number in its name.
3808 #In the general case, change -ldes425 to -des.
3809 #If you have Kerberos 1.4 or later and and krb5_init_ets can't be found
3810 #at link time, add -DNO_KRB5_INIT_ETS.
3811 cu-solaris9g+krb5:
3812         @case `openssl version` in \
3813           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3814           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3815           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3816           *) OPENSSLOPTION="" ;; \
3817         esac ; \
3818         HAVE_DES=''; \
3819         DES_LIB=''; \
3820         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3821               DES_LIB='-ldes425'; \
3822               HAVE_DES='-DCK_DES -DLIBDES'; \
3823               echo "HAVE DES"; \
3824            else echo "NO DES"; \
3825         fi; \
3826         GSSAPILIB=''; \
3827         K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
3828         echo K5DIR=$$K5DIR; \
3829         if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
3830               GSSAPILIB='-lgssapi_krb5'; \
3831           else GSSAPILIB='-lgssapi'; \
3832         fi; \
3833         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3834         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3835         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET  -DBIGBUFOK \
3836         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DCK_ENCRYPTION -DCK_CAST \
3837         $$OPENSSLOPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3838         "LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lcrypto \
3839         $$GSSAPILIB -lkrb5 -lcom_err -lk5crypto $$DES_LIB $(LIBS)"
3840
3841 #Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow + Long files
3842 #Columbia Only, mainly because of the -R clause.
3843 # (I tried adding -DCK_SRP and -lsrp but got a lot of symbol referencing
3844 #  errors at link time.)
3845 cu-solaris9g+krb5+krb4+openssl+shadow+pam+zlib:
3846         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3847         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3848         -DSOLARIS9 -D_FILE_OFFSET_BITS=64 -DBIGBUFOK \
3849         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3850         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3851         -DCK_ENCRYPTION -DCK_SSL -DCK_DES -DCK_CAST -DNO_KRB5_INIT_ETS \
3852         -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES -DOPENSSL_097 -DCK_FORWARD_X \
3853         $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3854         "LIBS= $(K5LIB) $(SSLLIB) -R/opt/local/lib -ltermlib -lsocket -lnsl \
3855         -lm -lresolv -lkrb4 -lssl -lcrypto -lgssapi_krb5 -lkrb5 \
3856         -lcom_err -lk5crypto -lpam -ldes425 -lz $(LIBS)"
3857
3858 #Solaris 9, 10, or 11 with gcc...  
3859 #Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3860 #This target is chained to be the secure solaris9g+xxx targets below.
3861 solaris9g solaris10g solaris11g:
3862         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with gcc'
3863         @case `uname -r` in \
3864           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3865           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3866           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3867           *) SOLARISVERSION="-DSOLARIS" ;; \
3868         esac ; \
3869         $(MAKE) "MAKE=$(MAKE)" CC="gcc -m32" CC2="gcc -m32" xermit \
3870         KTARGET=$${KTARGET:-$(@)} \
3871         "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3872         -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW -funsigned-char \
3873         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3874         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3875         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3876         -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3877         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3878
3879 #Solaris 9, 10, or 11 with gcc, 64 bit build.
3880 #Peeking inside FILE struct not allowed in 64-bit world.
3881 #DON'T USE THIS ONE ON PC ARCHITECTURE - It compiles and links but won't run.
3882 #OK: 2009/09/25 (but not tested on Solaris 11)
3883 solaris9g64 solaris10g64 solaris11g64:
3884         @echo 'Making C-Kermit $(CKVER) for Solaris 9++ with gcc 64-bit'
3885         @case `uname -r` in \
3886           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3887           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3888           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3889           *) SOLARISVERSION="-DSOLARIS" ;; \
3890         esac ; \
3891         $(MAKE) "MAKE=$(MAKE)" CC="gcc -m64" CC2="gcc -m64" xermit \
3892         KTARGET=$${KTARGET:-$(@)} \
3893         "CFLAGS = -g -O -Usun -funsigned-char \
3894         -DSVR4 $$SOLARISVERSION -DNOARROWKEYS \
3895         -DSTERMIOX -DSELECT -DFNFLOAT -DUSE_STRERROR -DCK_PAM -DCK_SHADOW \
3896         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3897         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3898         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3899         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3900
3901 #Solaris 9, 10, or 11 with SunPro CC
3902 #Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3903 #This target is chained to by the secure targets below.
3904 #OK: 2011/06/15
3905 solaris9 solaris10 solaris11:
3906         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with Sun CC'
3907         @case `uname -r` in \
3908           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3909           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3910           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3911           *) SOLARISVERSION="-DSOLARIS" ;; \
3912         esac ; \
3913         $(MAKE) "MAKE=$(MAKE)" xermit KTARGET=$${KTARGET:-$(@)} \
3914         "CFLAGS = -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3915         -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW \
3916         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3917         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3918         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3919         -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3920         "LIBS= $(LIBS) -ltermlib -lsocket -lnsl -lm -lresolv -lpam"
3921
3922 # Solaris 9, 10, or 11 with OpenSSL built with Sun CC.
3923 # Here's an example of how to invoke this target in case your OpenSSL
3924 # headers and libraries are not in /usr/local:
3925 #
3926 # make solaris9+openssl "SSLINC=" "SSLLIB=" \
3927 #  "KFLAGS= -I/opt/openssl-0.9.8k/include -L/opt/openssl-0.9.8k/lib"
3928 #
3929 # Don't use 'make -e' because that inhibits passing of KFLAGS to
3930 # the base (solaris9) target.
3931 #
3932 #OK: 2011/06/14
3933 solaris9+ssl solaris10+ssl solaris11+ssl \
3934 solaris9+openssl solaris10+openssl solaris11+openssl:
3935         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: cc'
3936         @case `openssl version` in \
3937           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3938           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3939           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3940           *) OPENSSLOPTION="" ;; \
3941         esac ; \
3942         HAVE_DES=''; \
3943         DES_LIB=''; \
3944         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3945               DES_LIB='-ldes425'; \
3946               HAVE_DES='-DCK_DES -DLIBDES'; \
3947               echo "HAVE DES"; \
3948            else echo "NO DES"; \
3949         fi; \
3950         $(MAKE) "MAKE=$(MAKE)" solaris9 KTARGET=$${KTARGET:-$(@)} \
3951         "KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
3952         -DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
3953         "LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto  $(LIBS)"
3954
3955 # Solaris 9 or later with OpenSSL, built with gcc.
3956 # Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.  This target nicely
3957 # chains to the solaris{9,10,11}g target but for some reason it doesn't work if
3958 # you add the -DFORWARD_X option, thus the solaris9g+openssl+forward_x target.
3959 #
3960 #OK: 2020/06/15
3961 solaris9g+ssl solaris10g+ssl solaris11g+ssl \
3962 solaris9g+openssl solaris10g+openssl solaris11g+openssl:
3963         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: gcc'
3964         @case `openssl version` in \
3965           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3966           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3967           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3968           *) OPENSSLOPTION="" ;; \
3969         esac ; \
3970         HAVE_DES=''; \
3971         DES_LIB=''; \
3972         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3973               DES_LIB='-ldes425'; \
3974               HAVE_DES='-DCK_DES -DLIBDES'; \
3975               echo "HAVE DES"; \
3976            else echo "NO DES"; \
3977         fi; \
3978         $(MAKE) "MAKE=$(MAKE)" solaris9g KTARGET=$${KTARGET:-$(@)} \
3979         "KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
3980         -DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
3981         "LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto  $(LIBS)"
3982
3983 # Solaris 9 or later with gcc + OpenSSL + Shadow (32-bit).
3984 # Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.
3985 # Includes long file support - not sure if this was available before Solaris 9.
3986 # Detects Solaris version automatically.
3987 #
3988 solaris9g+openssl+forward_x:
3989         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with OpenSSL...'
3990         @case `openssl version` in \
3991           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3992           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3993           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3994           *) OPENSSLOPTION="" ;; \
3995         esac ; case `uname -r` in \
3996           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3997           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3998           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3999           *) SOLARISVERSION="-DSOLARIS" ;; \
4000         esac ; \
4001         $(MAKE) xermit  KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
4002         "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION \
4003         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
4004         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
4005         -DSTERMIOX -DSELECT -DFNFLOAT -DBIGBUFOK -D_FILE_OFFSET_BITS=64 \
4006         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DLIBDES \
4007         -DFORWARD_X $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
4008         "LIBS= $(SSLLIB) -lpam -ldes425 -lz -ltermlib \
4009         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz $(LIBS)"
4010
4011 # These two should be folded in with the ones just above.
4012
4013 #Solaris 9 with gcc 3.1 + OpenSSL (32-bit)
4014 solaris9g+openssl+zlib+pam+shadow:
4015         $(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4016         KTARGET=$${KTARGET:-$(@)} \
4017         "KFLAGS=-DSOLARIS9 -DUSE_STRERROR $(KFLAGS)"
4018
4019 #Solaris 10 with gcc 3.1 + OpenSSL (32-bit)
4020 solaris10g+openssl+zlib+pam+shadow:
4021         $(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4022         KTARGET=$${KTARGET:-$(@)} \
4023         "KFLAGS=-DSOLARIS10 -DUSE_STRERROR $(KFLAGS)"
4024
4025 #The following (old, old) sunosxxx entries are for debugging and testing only.
4026
4027 sunos41x:
4028         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4029         "CFLAGS= -O -DSUNOS41 -DDIRENT -DNOTLOG -DNOMSEND \
4030         -DNOUUCP -DNOSIGWINCH -DNOREDIRECT -DNOPUSH -DNOCCTRAP \
4031         -DNOICP -DNOLOCAL $(KFLAGS)"
4032
4033 #SunOS 4.1.x, debugging with Pure Software, Inc., Purify 2 (commercial runtime
4034 #error-detection software for catching wild array references, etc).
4035 #Before running the resulting wermit, you'll also need to define and export
4036 #the following environment variables (as in this example):
4037 #PURIFYHOME=/usr/local/purify ; export PURIFYHOME
4038 #PURIFYCACHEDIR=/tmp ; export PURIFYCACHEDIR
4039 sunos41cp:
4040         @echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD / Curses / Purify...
4041         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4042         "CC2= purify -cache_dir=/usr/tmp cc" \
4043         "CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4044         -DSAVEDUID -DCK_CURSES $(KFLAGS)" \
4045         "LIBS= -lcurses -ltermcap"
4046
4047 #SunOS 4.1 with malloc debugger
4048 sunos41md:
4049         @echo Making C-Kermit $(CKVER) for SunOS 4.1 malloc debug...
4050         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
4051         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4052         -DSAVEDUID $(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG"
4053
4054 sunos41gmd:
4055         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
4056         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4057         "CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4058         -DNDGPWNAM -DSAVEDUID -DCK_CURSES -DRLOGCODE \
4059         $(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
4060         "LIBS= -lcurses -ltermcap"
4061
4062 #SunOS version 4.1, gcc, profiling with gprof, no debugging.
4063 #To get profile, "make sunos41p" (on Sun), then "./wermit".  After running
4064 #wermit, "gprof ./wermit | lpr" (or whatever) to get execution profile.
4065 sunos41p:
4066         @echo Making C-Kermit $(CKVER) for SunOS 4.x with profiling...
4067         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4068         "CFLAGS= -DSUNOS41 -DNODEBUG -DSAVEDUID -DDIRENT -DTCPSOCKET \
4069         -DNDGPWNAM $(KFLAGS) -pg" "LNKFLAGS = -pg"
4070
4071 #SunOS version 4.1 or later, BSD environment, minimum features.
4072 sunos41min:
4073         @echo Minimum interactive
4074         $(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
4075         "KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNORETRY \
4076         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS \
4077         -DNOSHOW -DNOSETKEY -DNOUUCP -DNORECALL -DNOREDIRECT \
4078         -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ \
4079         -DNONET -DCK_SMALL -DNOCKSPEED -DNOCKTIMERS -DNOLOGIN \
4080         -DNOCKXYZ -DNOKERBEROS -DNOMKDIR -DNOPATTERNS -DNOPERMS -DNOPIPESEND \
4081         -DNORECURSIVE -DNORENAME -DNORESEND -DNOSETKEY \
4082         -DNOTRIGGER -DNOTUNING $(KFLAGS)" "LNKFLAGS = -s"
4083
4084 #SunOS version 4.1, BSD environment, min size, command-line only...
4085 sunos41m:
4086         @echo Minimum size
4087         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4088         "KFLAGS=-DNOICP $(KFLAGS)"
4089
4090 #SunOS version 4.1, BSD environment, min size, cmd-line only, remote only...
4091 #
4092 sunos41mr:
4093         @echo Minimum size
4094         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4095         "KFLAGS=-DNOICP -DNOLOCAL $(KFLAGS)"
4096
4097 #SunOS version 4.1, BSD environment, min size, interactive...
4098 sunos41mi:
4099         @echo Minimum size
4100         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4101         "KFLAGS=-DNOCMDL $(KFLAGS)"
4102
4103 #SunOS version 4.1, BSD environment, min size, interactive, remote only...
4104 sunos41mir:
4105         @echo Minimum size
4106         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4107         "KFLAGS=-DNOCMDL -DNOLOCAL $(KFLAGS)"
4108
4109 #SunOS 4.1, System V R3 environment (-i option omitted).
4110 sunos41s5:
4111         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4112         @echo For testing purposes only - NOT for production use.
4113         @echo For a useable version, make sunos41 instead.
4114         $(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4115         KTARGET=$${KTARGET:-$(@)} \
4116         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN -DCK_POLL $(KFLAGS) -O"
4117
4118 #As above, but with curses support
4119 sunos41s5c:
4120         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4121         @echo Curses included.
4122         @echo For testing purposes only - NOT for production use.
4123         @echo For a useable version, make sunos41 instead.
4124         $(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4125         KTARGET=$${KTARGET:-$(@)} \
4126         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN \
4127         -DCK_POLL -DCK_CURSES -DCK_NEWTERM $(KFLAGS) -O" "LIBS= -lcurses"
4128
4129 #As above, but with curses support AND net support
4130 sunos41s5tcpc:
4131         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4132         @echo TCP/IP and curses included.  No debug log.
4133         @echo For testing purposes only - NOT for production use.
4134         @echo For a useable version, make sunos41 instead.
4135         $(MAKE) xermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4136         KTARGET=$${KTARGET:-$(@)} \
4137         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DCK_POLL \
4138         -DNODEBUG -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET $(KFLAGS) -O" \
4139         "LIBS= -lcurses -lresolv"
4140
4141 # (End of SunOS test entries...)
4142
4143 #Apollo with Domain SR10.0 or later, BSD environment
4144 #Reportedly, it might also help to add '-A,systype=bsd4.3' to CFLAGS.
4145 #Reportedly, there is also a problem with getc & putc macros that can
4146 #be handled by using '#ifdef apollo' somewhere to redefine them???
4147 #On the other hand, other reports indicate that it works fine as-is.
4148 #NOTE: This entry was previously like this:
4149 #       $(MAKE) wermit "CFLAGS= -DNOFILEH -DBSD4 $(KFLAGS) -Uaegis \
4150 #       -DTCPSOCKET -U__STDC__"
4151 #Reports (Dec 91) indicate SR10 has an ANSI-compliant C compiler,
4152 #in addition to an older one that claimed to be ANSI-compliant but wasn't.
4153 #The following make entry (plus checks that are made in ckcdeb.h) detect
4154 #which compiler is used and define the CK_ANSIC or NOANSI flags accordingly.
4155 sr10-bsd:
4156         @echo Making C-Kermit $(CKVER) for Apollo SR10.0 / BSD ...
4157         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4158         "CFLAGS= -O -DAPOLLOSR10 -DBSD43 -DTCPSOCKET -DCK_CURSES -DNOLEARN \
4159         -Uaegis $(KFLAGS)" "LIBS= -lcurses -ltermcap"
4160
4161 #Apollo with Domain SR10.0 or later, System V R3 environment.
4162 #Don't use the optimizer (-O), it causes problems at runtime.
4163 sr10-s5r3:
4164         @echo Making C-Kermit $(CKVER) for Apollo SR10.0 / Sys V R3 ...
4165         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4166         "CFLAGS= -DNOFILEH -DSVR3 -DAPOLLOSR10 -DNOLEARN $(KFLAGS) \
4167         -Uaegis -U__STDC__"
4168
4169 #Apollo Domain/IX (untested, try this if sr10-bsd doesn't work)
4170 # -DTCPSOCKET can probably be added here.
4171 apollobsd:
4172         @echo Making C-Kermit $(CKVER) for Apollo Domain/IX...
4173         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4174         "CC= /bin/cc " "CC2= /bin/cc " \
4175         "CFLAGS= -DNOFILEH -DBSD4 -DAPOLLOBSD -DNOLEARN $(KFLAGS) -Uaegis"
4176
4177 #Version 7 Unix (see comments near top of makefile)
4178 v7:
4179         @echo Making C-Kermit $(CKVER) for UNIX Version 7.
4180         @echo Read the makefile if you have trouble with this...
4181         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4182         "CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
4183         -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
4184         -DNPTYPE=$(NPTYPE) $(DIRECT) -DO_RDWR=2 -DO_NDELAY=0 -DO_SCCS_ID \
4185         -DNOLEARN $(KFLAGS)"
4186
4187 #AT&T UNIX System V R3, signal() is void rather than int.
4188 #Uses dirent.h and Honey DanBer UUCP.
4189 #Add the -i link option if necessary.
4190 #If you get errors like "ws_row undefined" in ckutio.c, add -DNONAWS.
4191 sys5r3:
4192         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4193         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4194         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4195         "LNKFLAGS="
4196
4197 #As above, plus curses.
4198 sys5r3c:
4199         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3 + curses...'
4200         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4201         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES -DNONAWS -DNOLEARN \
4202         $(KFLAGS) -O" "LNKFLAGS=" "LIBS = -ltermlib"
4203
4204 #System V R3.2 for PCs built on Interactive UNIX SV/386 R4.x
4205 #but with all calls to dup2() disabled because generic SVR3 does not have dup2.
4206 # (The -linet library might not need to be in this one.)
4207 sys5r32is:
4208         @echo 'Making C-Kermit $(CKVER) for System V/386 R32
4209         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
4210         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
4211         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES -DNONAWS \
4212         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD -DNOFDZERO -DNOREDIRECT \
4213         -DNOZEXEC -DNOLEARN $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
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 #With TCP/IP added.
4218 sys5r32isnet:
4219         @echo 'Making C-Kermit $(CKVER) for System V/386 R32 + TCP/IP
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         -DNOLEARN -DNOZEXEC -DTCPSOCKET $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
4225
4226 iclsys5r3:
4227         make sys5r3 KTARGET=$${KTARGET:-$(@)} KFLAGS=-DICLSVR3
4228
4229 #AT&T UNIX System V R3.  As above, but no ANSI prototyping.
4230 sys5r3na:
4231         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4232         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4233         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOANSI -DNOLEARN $(KFLAGS) -O" \
4234         "LNKFLAGS="
4235
4236 #AT&T UNIX System V R3, for 3B computers with Wollongong TCP/IP.
4237 sys5r3net3b:
4238         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX SVR3/3B/Wollongong...'
4239         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4240         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DWOLLONGONG -DNOLEARN $(KFLAGS) \
4241         -O" "LIBS= -lnet -lnsl_s" "LNKFLAGS ="
4242
4243 #AT&T UNIX System V R3, signal() is void rather than int.
4244 #Uses dirent.h and Honey DanBer uucp, has <termiox.h>.
4245 #Has <termiox.h> for RTS/CTS flow control.
4246 sys5r3tx:
4247         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4248         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4249         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN \
4250         $(KFLAGS) -i -O" "LNKFLAGS ="
4251
4252 #AT&T UNIX System V R3, signal() is void rather than int.
4253 #Uses dirent.h and Honey DanBer uucp, has <termiox.h>.
4254 #Has <sys/termiox.h> for RTS/CTS flow control.
4255 sys5r3sx:
4256         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4257         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4258         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4259         $(KFLAGS) -i -O" "LNKFLAGS ="
4260
4261 #AT&T UNIX System V R4.
4262 #Has <termiox.h>.
4263 sys5r4:
4264         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4265         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4266         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN $(KFLAGS)" \
4267         "LNKFLAGS = -s"
4268
4269 #AT&T UNIX System V R4 with Wollongong TCP/IP.
4270 #Has <termiox.h>.
4271 sys5r4net:
4272         @echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4273         @echo ' If sockets-library routines are missing at link time, then'
4274         @echo ' try the sys5r4net2 entry.'
4275         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4276         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4277         -DTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4278
4279 #As above, but needs libs included.
4280 sys5r4net2:
4281         @echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4282         @echo ' (Search for WOLLONGONG...)'
4283         $(MAKE) sys5r4net KTARGET=$${KTARGET:-$(@)} "LIBS= -lsocket -lnsl"
4284
4285 #As above plus curses.
4286 sys5r4net2c:
4287         echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4288         @echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4289         @echo ' (Search for WOLLONGONG...)'
4290         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4291         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4292         -DTERMIOX -DWOLLONGONG -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4293         "LIBS= -lsocket -lnsl -lcurses"
4294
4295 #DELL UNIX System V R4.
4296 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4297 #are not misplaced in sys (rather than netinet and arpa, respectively).
4298 #Uses ANSI C constructs, advisory file locking on devices, etc.
4299 #Warning: -DSTERMIOX enables hardware flow control (RTS/CTS), but reportedly
4300 #this does not work with the normal drivers.  However, it might still work
4301 #on non-Dell systems, or even Dell systems with different drivers installed.
4302 dellsys5r4:
4303         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4304         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4305         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4306         -DTCPSOCKET -DSTERMIOX -DCK_POLL $(KFLAGS)" \
4307         "LIBS= -lsocket -lnsl" "LNKFLAGS = -s"
4308
4309 #As above, curses support added...
4310 dellsys5r4c:
4311         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4312         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4313         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4314         -DTCPSOCKET -DSTERMIOX -DCK_CURSES -DCK_POLL \
4315         $(KFLAGS)" "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4316
4317 #Minimum interactive: As above, but with every conceivable option removed.
4318 dellsys5r4mi:
4319         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4320         @echo 'Minimum-size interactive'
4321         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4322         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4323         -UTCPSOCKET -DNOCMDL -DNOSPL -DNOXMIT -DCK_POLL \
4324         -DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4325         -DNOSCRIPT -DNOCSETS -DNOSHOW -DNOSETKEY -DNOSERVER -DNOUUCP \
4326         -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ  \
4327         $(KFLAGS)" "LNKFLAGS = -s"
4328
4329 #Command-line only version.
4330 dellsys5r4m:
4331         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4332         @echo 'Command-line only'
4333         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4334         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4335         -UTCPSOCKET -DNOICP -DNOFRILLS -DNODIAL -DNODEBUG -DNOTLOG -DNOCSETS \
4336         -DNOSETKEY -DNOESCSEQ -DNOJC -DNOFDZERO -DCK_POLL \
4337         $(KFLAGS)" "LNKFLAGS = -s"
4338
4339 #AT&T UNIX System V R4.
4340 #Has <sys/termiox.h>.
4341 sys5r4sx:
4342         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4343         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4344         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4345         $(KFLAGS)" "LNKFLAGS = -s" "LIBS=$(LIBS)"
4346
4347 #AT&T UNIX System V R4.
4348 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4349 #are not misplaced in sys (rather than netinet and arpa, respectively).
4350 #Uses ANSI C constructs, <sys/termiox.h>, etc etc.
4351 sys5r4sxtcp:
4352         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4353         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4354         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4355         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4356         "LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4357
4358 #AT&T UNIX System V R4.
4359 #As above + curses.
4360 sys5r4sxtcpc:
4361         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4362         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4363         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4364         -DSTERMIOX  -DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4365         "LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)" "LNKFLAGS = -s"
4366
4367 #AT&T UNIX System V R4.  CONSENSYS SVR4.2-1.
4368 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4369 #are not misplaced in sys (rather than netinet and arpa, respectively).
4370 #Uses ANSI C constructs, <sys/termiox.h>, etc.
4371 # Fullscreen -DCK_CURSES added (with curses & termcap libs)
4372 # Submission by Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu
4373 sys5r4sxtcpf:
4374         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4375         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4376         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4377         -DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
4378         "LIBS= -lsocket -lnsl -L/usr/ccs/lib -lcurses -ltermcap" \
4379         "LIBS=$(LIBS)" "LNKFLAGS = -s"
4380
4381 #Smallest possible version for System V R4
4382 s5r4m:
4383         @echo Minimum size
4384         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4385         "KFLAGS=$(KFLAGS) -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4386         -DNOSCRIPT -DNOCSETS -DNOICP -DNOMSEND -UTCPSOCKET" "LNKFLAGS = -s"
4387
4388 #Smallest possible interactive version of above
4389 s5r4mi:
4390         @echo Minimum interactive
4391         $(MAKE) "MAKE=$(MAKE)" sys5r4sx \
4392         "KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNOSHOW \
4393         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOSETKEY \
4394         -UTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
4395
4396 #AT&T UNIX System V R4, has <sys/termiox.h>
4397 #ANSI C function prototyping disabled.
4398 sys5r4sxna:
4399         @echo No ANSI C prototyping...
4400         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4401         "KFLAGS=$(KFLAGS) -DNOANSI"
4402
4403 #Stratus FTX.
4404 ftx:
4405         @echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4406         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4407         "CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DSTERMIOX \
4408         -DNOGETUSERSHELL -DNOLEARN +DA1.1 $(KFLAGS)" \
4409         "LNKFLAGS = -s" "LIBS=$(LIBS)"
4410
4411 #Stratus FTX + TCP/IP.
4412 ftxtcp:
4413         @echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4414         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4415         "CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4416         -DSTERMIOX -DTCPSOCKET -DNO_DNS_SRV +DA1.1 $(KFLAGS)" \
4417         "LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4418
4419 #NCR MP-RAS 2.03 or 3.02
4420 mpras:
4421         @echo 'Making C-Kermit $(CKVER) for NCR MP-RAS...'
4422         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4423         "CFLAGS = -O -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX \
4424         -DNOGETUSERSHELL -DUSE_FILE__CNT -DNOLEARN -DNO_DNS_SRV $(KFLAGS)" \
4425         "LNKFLAGS = -s" "LIBS=$(LIBS)"
4426
4427 #NCR MP-RAS 2.03 or 3.02 with TCP/IP and curses
4428 mprastcpc:
4429         @echo 'Making C-Kermit $(CKVER) for NCR MP-RAS + TCP/IP + curses...'
4430         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CFLAGS=-DTCPSOCKET \
4431         -DCK_CURSES -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4432         -DNOGETUSERSHELL -DNO_DNS_SRV DUSE_FILE__CNT -O $(KFLAGS)" \
4433         "LNKFLAGS = -s" "LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)"
4434
4435 #SINIX-L V5.41 - includes curses, tcp/ip - Use this one for i386.
4436 #This version of SINIX doesn't like fdopen() or popen().
4437 sinix541:
4438         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX V5.41/i386'
4439         $(MAKE) ckcpro.$(EXT) "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP \
4440         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV \
4441         -DSNI541 -DNOGETUSERSHELL -DNONETCMD -DNOPOPEN -kansi -W0 $(KFLAGS)"
4442         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4443         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DNOPOPEN \
4444         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4445         -DSNI541 -DNOGETUSERSHELL -DNONETCMD -kansi -W0 -O $(KFLAGS)" \
4446         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4447
4448 sinix541i:
4449         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sinix541
4450
4451 #SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for MIPS.
4452 # As of C-Kermit 7.1, optimization removed -- takes (literally) forever.
4453 sinix542:
4454         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4455         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4456         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4457         -DSNI542 -DNOGETUSERSHELL -kansi -W0 $(KFLAGS)" \
4458         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4459
4460 #SINIX V5.42 gcc - includes curses, tcp/ip, everything.
4461 #This one was used to build the Pyramid-architecture RM600 version
4462 #on SINIX-P 5.42 A10 with gcc but should work for SINIX 5.42 on any other
4463 #architecture with gcc.
4464 sinix542g:
4465         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4466         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4467         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4468         -DSNI542 -DNOGETUSERSHELL $(KFLAGS)" \
4469         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4470         "LNKFLAGS = -s"
4471
4472 #SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for Intel.
4473 # (Note: SNI discontinued Intel support after 5.42.)
4474 sinix542i:
4475         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX-Z V5.42...'
4476         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4477         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DFNFLOAT -DSTERMIOX \
4478         -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV -kansi \
4479         -DSNI542 $(KFLAGS)" \
4480         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4481         "LNKFLAGS = -s"
4482
4483 #Siemens Nixdorf Reliant UNIX V5.43 - includes curses, tcp/ip, everything:
4484 # . gettimeofday() suddenly has only one arg instead of two (GTODONEARG).
4485 # . The syntax of the Olimit specifier changed.
4486 # . The name was changed from SINIX to Reliant UNIX in version 5.43C.
4487 sni543:
4488         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.43'
4489         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4490         "CFLAGS = -DSINIX -DSNI543 -DSVR4 -DDIRENT -DHDBUUCP \
4491         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4492         -DNO_DNS_SRV -kansi -W0 -O -F Olimit,3100 $(KFLAGS)" \
4493         "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4494
4495 #Siemens Nixdorf Reliant UNIX V5.44 - Like 5.43 but with different banner.
4496 sni544:
4497         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.44'
4498         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4499         "CFLAGS = -DSINIX -DSNI544 -DSVR4 -DDIRENT -DHDBUUCP \
4500         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4501         -DNO_DNS_SRV -kansi -W0 -O -K Olimit,3100 $(KFLAGS)" \
4502         "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4503
4504 #Commodore Amiga with AT&T UNIX System V R4 and TCP/IP support.
4505 #Has <sys/termiox.h>.
4506 svr4amiganet:
4507         @echo 'Making C-Kermit $(CKVER) for Amiga SVR4 + TCP/IP...'
4508         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4509         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX \
4510         -DTCPSOCKET -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4511         "LIBS = -lsocket -lnsl -ltermlib"
4512
4513 #SCO (Novell (Univel)) UnixWare 1.x or 2.0, no TCP/IP.
4514 #This assumes the Novell SDK 1.0, which has <sys/termiox.h>.
4515 #UnixWare users with the "Prime Time Freeware" CD-ROM SDK will probably have
4516 #to use the sys5r4 entry (no termiox.h file, so no hardware flow control).
4517 #Change -DSELECT to -DCK_POLL if -DSELECT causes problems.
4518 # NOTE: Unixware 1.x builds have not been tried in C-Kermit 7.0.
4519 unixware:
4520         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4521         "KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4522         -DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt"
4523
4524 #UnixWare 1.x or 2.0 with TCP/IP and curses.
4525 #fork()-based CONNECT - no high serial speeds.
4526 unixwarenetc:
4527         $(MAKE) "MAKE=$(MAKE)" sys5r4sxtcpc KTARGET=$${KTARGET:-$(@)} \
4528         "KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4529         -DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt -lresolv"
4530
4531 uw10:
4532         $(MAKE) unixwarenetc KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4533
4534 #This is for Unixware 2.0.x only - use unixware21 for UW 2.1.x.
4535 #Has special library search and enables special kludge around library
4536 #foulup regarding vfork() (which Kermit doesn't use).  Forces POSIX-style
4537 #hangup.
4538 unixware20:
4539         @echo 'Making C-Kermit $(CKVER) for UnixWare 2.0.x...'
4540         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4541         "CFLAGS = -O -DOLD_UNIXWARE -DUNIXWARE2 -DSELECT -DSVR4 -DDIRENT \
4542         -DHDBUUCP -DBIGBUFOK -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES \
4543         -DTCPSOCKET -DUW200 -DFNFLOAT -DCK_NEWTERM -DNOSYSLOG $(KFLAGS)" \
4544         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lgen -lm -lresolv" \
4545         "LNKFLAGS = -s"
4546
4547 uw20:
4548         $(MAKE) unixware20 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4549
4550 #Adds big buffers ("large memory model") - otherwise the same as UnixWare 1.x.
4551 unixware21:
4552         @echo 'Making C-Kermit $(CKVER) for UnixWare 2.1.x...'
4553         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4554         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4555         -DNOSYSLOG -DSTERMIOX  -DCK_CURSES -DTCPSOCKET \
4556         -DCK_NEWTERM -DFNFLOAT -DUNIXWARE2 $(KFLAGS)" \
4557         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4558         $(LIBS)" "LNKFLAGS = -s"
4559
4560 #Unixware 2.1.0
4561 uw21:
4562         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4563
4564 #Unixware 2.1.3
4565 uw213:
4566         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4567         "KFLAGS=-DUSE_FILE__CNT $(KFLAGS)"
4568
4569 #Unixware 2.1 with IKSD support
4570 uw21iksd:
4571         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4572         "KFLAGS=-DCK_SHADOW $(KFLAGS)" "LIBS= -lgen"
4573
4574 #UnixWare 7 with tc[gs]etspeed() high serial speeds & select()-based CONNECT
4575 #and as of C-Kermit 8.0.212, large file support (LFS).
4576 #NOTE: This is the one we use.
4577 unixware7t:
4578         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4579         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4580         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4581         -DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4582         -DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4583         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNEEDMDMDEFS $(KFLAGS)" \
4584         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4585         "LNKFLAGS = -s"
4586
4587 #UnixWare 7 - select()-based CONNECT - no POSIX i/o - no high serial speeds.
4588 #In other words, just like the UnixWare 1 and 2 builds.
4589 unixware7x:
4590         @echo 'Making C-Kermit $(CKVER) for UnixWare 7...'
4591         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4592         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4593         -DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4594         -DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4595         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4596         "LNKFLAGS = -s"
4597
4598 #UnixWare 7 with POSIX cfset[oi]speed() to allow high serial speeds.
4599 #(but the high speeds don't work)
4600 unixware7p:
4601         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4602         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4603         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4604         -DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4605         -DFNFLOAT -DCK_NEWTERM -DNOLSTAT $(KFLAGS)" \
4606         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4607         "LNKFLAGS = -s"
4608
4609 # UnixWare 7 built with gcc - This does not work at all...
4610 # Reportedly gcc 2.8.1 is broken on Unixware 7.  Try egcs?
4611 unixware7g:
4612         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with gcc...'
4613         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4614         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
4615         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4616         -DUW7 -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4617         -DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4618         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4619         "LNKFLAGS = -s"
4620
4621 unixware7:
4622         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4623         KTARGET=$${KTARGET:-$(@)}
4624
4625 uw7:
4626         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4627         KTARGET=$${KTARGET:-$(@)}
4628
4629 #SCO OpenUNIX 8.0
4630 ou8:
4631         @echo 'Making C-Kermit $(CKVER) for Open UNIX 8...'
4632         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DOU8 $(KFLAGS)" unixware7t \
4633         KTARGET=$${KTARGET:-$(@)}
4634
4635 #UnixWare 7 with OpenSSL
4636 uw7ssl uw7+ssl:
4637         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 and OpenSSL...'
4638         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4639         "CFLAGS = -O -DCK_AUTHENTICATION -DCK_SSL -DCK_SHADOW \
4640         -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4641         -DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4642         -DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4643         $(SSLINC) $(KFLAGS)" \
4644         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4645         -lgen -lcudk70 $(SSLLIB) -lssl -lcrypto $(LIBS)" \
4646         "LNKFLAGS = -s"
4647
4648 #As above but includes Shadow password support needed for IKSD.
4649 uw7iksd:
4650         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4651         KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen" unixware7t
4652
4653 #As above but links with static API for realpath() so a binary built
4654 #with this target on UW7.1 will also work on 7.0.  Requires SCO UDK
4655 #rather than the stock compiler.
4656 uw7iksdudk:
4657         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4658         KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen -lcudk70" unixware7t
4659
4660 #ESIX SVR4.0.3 or 4.04 with TCP/IP support.
4661 #Has <sys/termiox.h>, ANSI C function prototyping disabled.
4662 #Add -m486 to CFLAGS if desired.
4663 esixr4:
4664         @echo 'Making C-Kermit $(CKVER) for ESIX SVR4 + TCP/IP...'
4665         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4666         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOANSI \
4667         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s" \
4668         "LIBS = -lsocket -lnsl"
4669
4670 #AT&T UNIX System V R4.
4671 #Has <sys/termiox.h>, Wollongong WIN/TCP TCP/IP.
4672 sys5r4sxnet:
4673         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4674         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4675         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4676         -DSTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4677
4678 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>.
4679 sys5r4nx:
4680         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4681         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4682         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS)" \
4683         "LNKFLAGS = -s"
4684
4685 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, curses, TCP/IP.
4686 sys5r4nxnetc:
4687         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4688         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4689         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4690         -DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4691         "LIBS = -lcurses -lsocket -lnsl -ltcpip" \
4692         "LNKFLAGS = -s"
4693
4694 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, Wollongong TCP/IP.
4695 sys5r4nxtwg:
4696         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4697         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4698         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DWOLLONGONG $(KFLAGS)"
4699         "LNKFLAGS = -s"
4700
4701 #ICL UNIX System V R4.(DRS N/X) version :-
4702 #UNIX System V Release 4.0 ICL DRS 6000 (SPARC)
4703 #DRS/NX 6000 SVR4 Version 5  Level 1  Increment 4
4704 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4705 #are not misplaced in sys (rather than netinet and arpa, respectively).
4706 #Uses ANSI C constructs, advisory file locking on devices, etc.
4707 #Remove -lnsl if it causes trouble.
4708 iclsys5r4:
4709         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 (DRS N/X)'
4710         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4711         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4712         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4713         "LIBS= -lsocket -lnsl -lresolv " "LNKFLAGS = -s"
4714
4715 #As above but for DRS/NX 4.2MP 7MPlus.
4716 iclsys5r4m+:
4717         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4718         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4719         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOIKSD \
4720         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4721         "LIBS= -lsocket -lnsl -lm -lc -g -lgen " "LNKFLAGS = -s"
4722
4723 #As above but for DRS/NX 4.2MP 7MPlus with IKSD support.
4724 iclsys5r4m+iksd:
4725         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4726         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4727         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4728         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4729         "LIBS= -lsocket -lnsl -lm -lc -g -lgen -lresolv " "LNKFLAGS = -s"
4730
4731 iclsys5r4_486:
4732         $(MAKE) "MAKE=$(MAKE)" iclsys5r4 KTARGET=$${KTARGET:-$(@)}
4733
4734 #Data General DG/UX 4.30 (System V R3) for DG AViiON, with TCP/IP support.
4735 dgux430:
4736         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4737         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4738         "CFLAGS = -O -DDGUX430 -DSVR3 -DDIRENT -DTCPSOCKET \
4739         -DNOINADDRX -DNOGETUSERSHELL $(KFLAGS)"
4740
4741 #Data General DG/UX 4.30 for DG AViiON, with TCP/IP support with BSDisms.
4742 dgux430bsd:
4743         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4744         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4745         "CFLAGS = -O -DDGUX430 -D_BSD_SOURCE -DBSD4 \
4746         -DNOINADDRX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)"
4747
4748 #Data General DG/UX 5.4 (System V R4) for DG AViiON, with TCP/IP support.
4749 #Add -lsocket -lnsl if inet_addr comes up missing...
4750 #Hmmm - I really think CK_POLL can be removed from this one in which case
4751 #there is no difference between dgux540 and dgux540i.
4752 dgux540:
4753         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4754         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4755         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4756         -DSTERMIOX -DTCPSOCKET -DCK_POLL -DNOGETUSERSHELL $(KFLAGS)"
4757
4758 #Data General DG/UX 5.40 (System V R4) for Intel AViiON, with TCP/IP support.
4759 dgux540i:
4760         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4761         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4762         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4763         -DSTERMIOX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)" \
4764         "LIBS = -lsocket -lnsl"
4765
4766 dgux54:
4767         make dgux540 KTARGET=$${KTARGET:-$(@)}
4768
4769 #Data General DG/UX 5.4 (= System V R4) for DG AViiON, with TCP/IP support.
4770 # And curses.
4771 dgux540c:
4772         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4...'
4773         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4774         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4775         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4776         $(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4777
4778 #As above but for Intel - only difference is name library names.
4779 dgux540ic:
4780         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4781         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4782         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4783         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4784         $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4785
4786 dgux54c:
4787         make dgux540c KTARGET=$${KTARGET:-$(@)}
4788
4789 #DG/UX 5.4R3.10
4790 dgux54310:
4791         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4R3...'
4792         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4793         "CFLAGS = -DDGUX540 -DDGUX54310 -DDIRENT -DHDBUUCP -DSELECT \
4794         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4795         -DNOINADDRX $(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4796
4797 #DG/UX 5.4R4.10 - Includes everything.
4798 dgux54410:
4799         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.10...'
4800         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4801         "CFLAGS = -O -DDGUX540 -DDGUX54410 -DDIRENT -DHDBUUCP -DSELECT \
4802         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4803         -DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4804
4805 #DG/UX 5.4R4.11 - Includes everything.
4806 dgux54411:
4807         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.11...'
4808         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4809         "CFLAGS = -O -DDGUX540 -DDGUX54411 -DDIRENT -DHDBUUCP -DSELECT \
4810         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4811         -DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4812
4813 #DG/UX 5.4R4.20 - Includes everything.
4814 dgux54420:
4815         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.20...'
4816         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4817         "CFLAGS = -O -DDGUX540 -DDGUX54420 -DDIRENT -DHDBUUCP -DSELECT \
4818         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4819         -DNOINADDRX $(KFLAGS)" \
4820         "LIBS = -lsocket -lresolv -lnsl -lcurses -ltermcap"
4821
4822 #Silicon Graphics System V R3 with BSD file system (IRIS)
4823 iris:
4824         @echo Making C-Kermit $(CKVER) for Silicon Graphics IRIX pre-3.3...
4825         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4826         "CFLAGS = -O -DSVR3 -DLONGFN -DNOLEARN $(KFLAGS) -I/usr/include/bsd" \
4827         "LIBS = -lbsd"
4828
4829 #Silicon Graphics IRIS System V R3
4830 irix33:
4831         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 3.3...'
4832         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4833         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4834         "LNKFLAGS = -s"
4835
4836 #Silicon Graphics Iris Indigo with IRIX 4.0.0 or 5.0...
4837 #Strict ANSI C compilation, TCP/IP support included
4838 irix40:
4839         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4840         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4841         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4842         -DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O -Olimit 1600 -I/usr/include/bsd" \
4843         "LNKFLAGS = -s"
4844
4845 #As above, but with fullscreen display (curses) and Sun Yellow Pages support.
4846 #NOTE: IRIX versions prior to 5 run COFF binaries.
4847 irix40ypc:
4848         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0.'
4849         @echo 'Includes fullscreen file display and Sun Yellow Pages...'
4850         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4851         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES \
4852         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET $(KFLAGS) \
4853         -O -Olimit 1600 -I/usr/include/bsd" \
4854         "LIBS = -lcurses -lsun" "LNKFLAGS = -s"
4855
4856 # Silicon Graphics Iris Series 4D/*, IRIX 4.0.x, -O4 ucode optimized.
4857 # Huge temporary file space needed for ucode optimizer.  If you get an error
4858 # like "ugen: internal error writing to /tmp/ctmca08777: Error 0", define the
4859 # the TMPDIR environment variable to point to a file system that has more
4860 # space available, e.g. "setenv TMPDIR /usr/tmp".
4861 irix40u:
4862         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4863         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4864         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4865         -DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4866         "LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u"
4867
4868 # As above, with Curses Support added
4869 irix40uc:
4870         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4871         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4872         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4873         -DCK_ANSIC -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4874         "LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u" "LIBS= -lcurses -ltermcap"
4875
4876 #Silicon Graphics IRIX 5.x.
4877 #Yellow Pages and Curses support included.
4878 #IRIX version 5.x can run COFF or ELF binaries.
4879 irix51:
4880         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 5.x'
4881         @echo 'Includes fullscreen file display and Yellow Pages...'
4882         @echo 'Add -mips<n> to CFLAGS specify a particular hardware target.'
4883         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4884         "CFLAGS = -DIRIX51 -DSVR4 -DDIRENT -DHDBUUCP -DCK_CURSES -DCK_NEWTERM \
4885         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET -DSELECT -DNOGETUSERSHELL \
4886         -DSYSTIMEH -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) -ansi -O -Olimit 3000" \
4887         "LIBS = -lcurses" "LNKFLAGS = -s"
4888
4889 #Use this one if irix51 blows up due to lack of swap space or whatever.
4890 irix51x:
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)" \
4898         "LIBS = -lcurses" "LNKFLAGS = -s"
4899
4900 irix51ypc:
4901         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4902         "KFLAGS= $(KFLAGS)"
4903
4904 #IRIX 5.2 adds RTS/CTS
4905 irix52:
4906         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4907         "KFLAGS=-DIRIX52 -DCK_RTSCTS $(KFLAGS)"
4908
4909 irix53:
4910         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4911         "KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4912
4913 irix53x:
4914         $(MAKE) "MAKE=$(MAKE)" irix51x KTARGET=$${KTARGET:-$(@)} \
4915         "KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4916
4917 #Silicon Graphics IRIX 6.[024] common stuff.
4918 #Yellow Pages and Curses support included.
4919 #IRIX version 6.0 and later runs only ELF binaries.
4920 #Depends on code changes in ckcdeb.h that make -DIRIX6x define all
4921 #lower IRIX6x values and IRIX51.
4922 irix6x:
4923         @echo 'Includes fullscreen file display and Yellow Pages...'
4924         @echo 'Add -mips<n> to specify a particular hardware target.'
4925         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4926         "CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4927         -DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET \
4928         -DSELECT -DCK_RTSCTS -O $(KFLAGS)" \
4929         "LIBS = -lcurses" "LNKFLAGS = -s $(LNKFLAGS)"
4930
4931 #Silicon Graphics IRIX 6.0.
4932 irix60:
4933         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.0'
4934         @$(MAKE) "MAKE=$(MAKE)" \
4935         "KFLAGS=-DIRIX60 -Olimit 2138 $(KFLAGS)" \
4936         irix6x KTARGET=$${KTARGET:-$(@)}
4937
4938 #Silicon Graphics IRIX 6.2.
4939 #Serial speeds > 38400 are available in IRIX 6.2 on O-class machines only.
4940 #Note: Olimit must be a number > 0.
4941 irix62:
4942         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.2'
4943         @$(MAKE) "MAKE=$(MAKE)" \
4944         LNKFLAGS="-Wl,-woff,84" \
4945         "KFLAGS=-DIRIX62 -Olimit 4700 $(KFLAGS)" \
4946         irix6x KTARGET=$${KTARGET:-$(@)}
4947
4948 #Silicon Graphics IRIX 6.3.
4949 irix63:
4950         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.3'
4951         @$(MAKE) "MAKE=$(MAKE)" irix62 KTARGET=$${KTARGET:-$(@)} \
4952         "KFLAGS=-DIRIX63"
4953
4954 #Silicon Graphics IRIX 6.4.
4955 # -woff,84 to linker stops complaints about no symbols loaded from
4956 # curses, and -woff 1110 stops complaints about unreachable "break;"
4957 # statements in ckcpro.c among others.
4958 # tested on SGI Octane, running IRIX 6.4 up to 115200 bps.
4959 # -Olimit 0 means infinite.
4960 irix64:
4961         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4'
4962         @$(MAKE) "MAKE=$(MAKE)" \
4963         LNKFLAGS="-Wl,-woff,84" \
4964         "KFLAGS=-DIRIX64 -DCK_RTSCTS -Olimit 3000 -woff 1110 $(KFLAGS)" \
4965         irix6x KTARGET=$${KTARGET:-$(@)}
4966
4967 irix64gcc:
4968         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4 gcc'
4969         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
4970         "CFLAGS= -DSVR4 -DIRIX64 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4971         -DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
4972         -DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
4973         $(KFLAGS) -O" "LIBS= -lcurses -ltermcap -lcrypt"
4974
4975 #Note the new Optimization option syntax for MIPSpro CC 7.2.1.2m.
4976 #See note on irix65gcc target about Large File Support (LFS).
4977 irix65:
4978         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
4979         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
4980         "KFLAGS=-DIRIX65 -D_LARGEFILE_SOURCE -DCK_RTSCTS -OPT:Olimit=0 \
4981         -woff 1110,1552,1174 $(KFLAGS)" \
4982         irix6x KTARGET=$${KTARGET:-$(@)}
4983
4984 #Build for those that have GCC instead of MIPSpro.
4985 #
4986 # Large File Support note: use the define _LARGEFILE_SOURCE to enable support
4987 # for files larger than 2GB.  This may work on releases of Irix prior to
4988 # 6.5.xx.  To verify, check the man page for fstat and verify that off_t is a
4989 # 64 bit value for an -n32 build.  Also check the manpage for fseek and ftell
4990 # to verify that the fseek64 and ftell64 functions are provided.  If so, then
4991 # LFS support should work and you can try adding -D_LARGEFILE_SOURCE to CFLAGS
4992 # for your selected Irix target.
4993 #
4994 irix65gcc:
4995         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 with gcc'
4996         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4997         "CC = gcc" "CC2 = gcc" \
4998         "CFLAGS= -DSVR4 -DIRIX65 -D_LARGEFILE_SOURCE -DDIRENT -DHDBUUCP \
4999         -DNOGETUSERSHELL -DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
5000         -DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
5001         $(KFLAGS) -O" "LIBS= -lcurses"
5002
5003 # The 64-bit IRIX target works but presumably is no longer needed given the
5004 # large file support in the more portable and compact 32-bit version.
5005 irix65_64:
5006         @echo 'Making C-Kermit $(CKVER) 64-bit for SGI IRIX 6.5'
5007         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
5008         "KFLAGS=-DIRIX65 -64 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5009         -DCK_64BIT $(KFLAGS)" \
5010         irix6x KTARGET=$${KTARGET:-$(@)}
5011
5012 #Dumb down to MIPS-2 if building on R5000 or higher...
5013 irix65mips2:
5014         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 MIPS-2'
5015         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-o32 -mips2 -Wl,-woff,84" \
5016         "KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -o32 -mips2 \
5017         -woff 1110,1552,1174 $(KFLAGS)" \
5018         irix6x KTARGET=$${KTARGET:-$(@)}
5019
5020 #Special target that adds srp, ssl, and zlib support.  This requires
5021 #that you have pkgsrc installed instead of Irix Freeware.  See
5022 #NetBSD.org for pkgsrc for Irix.  You will need to BUILD the srp_client
5023 #package yourself.  Install it manually using the directions found
5024 #in the netbsds+ssl+srp+zlib target comments.
5025 irix65+ssl+srp+zlib:
5026         @echo 'Making C-Kermit $(CKVER) for IRIX 6.5 with gcc and SSL SRP ZLIB'
5027         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5028         "CC = gcc" "CC2 = gcc" \
5029         "CFLAGS= -DIRIX65 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL -DSELECT \
5030         -DTCPSOCKET -DNOCOTFMC -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC \
5031         -I/usr/pkg/include -DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 \
5032         -DCK_RTSCTS -DCK_NCURSES -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DCK_SSL \
5033         -DLIBDES -DZLIB -DFNFLOAT -I/usr/pkg/include/openssl $(KFLAGS) -O" \
5034         "LIBS= -L/usr/pkg/lib -rpath /usr/pkg/lib -lncurses -lsrp -lgmp -ldes \
5035         -lssl -lkrypto -lcrypto -lcrypt -lz -lm"
5036
5037 irix6x+krb5:
5038         @echo 'Includes fullscreen file display and Yellow Pages...'
5039         @echo 'Add -mips<n> to specify a particular hardware target.'
5040         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5041         "CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
5042         -DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET\
5043         -DSELECT -DCK_RTSCTS -O \
5044         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DCK_ENCRYPTION -DCK_DES \
5045         $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
5046         "LIBS = -lcurses $(K5LIB) -ldes425 -lkrb5 \
5047         -lcom_err -lcrypto -lcrypt -lgssapi_krb5" \
5048         "LNKFLAGS = -s $(LNKFLAGS)"
5049
5050 irix65+krb5:
5051         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
5052         @$(MAKE) "MAKE=$(MAKE)" \
5053         LNKFLAGS="-Wl,-woff,84" \
5054         "KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5055         $(KFLAGS)" \
5056         irix6x+krb5 KTARGET=$${KTARGET:-$(@)}
5057
5058 #In case they type "make sys5"...
5059 sys5:
5060         $(MAKE) "MAKE=$(MAKE)" sys3 KTARGET=$${KTARGET:-$(@)}
5061
5062 #Generic ATT System III or System V (with I&D space)
5063 sys3:
5064         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5065         @echo 'or System V R2 or earlier...'
5066         @echo 'add -DNOMKDIR if mkdir is an undefined symbol.'
5067         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5068         "CFLAGS = -DATTSV -DNOUNICODE -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL \
5069         -DNOINITGROUPS -DNOFTRUNCATE -DNOREALPATH -DNOLEARN $(KFLAGS) -i -O" \
5070         "LNKFLAGS = -i"
5071
5072 #Generic ATT System III or System V (no I&D space)
5073 sys3nid:
5074         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5075         @echo 'or System V R2 or earlier, no I&D space...'
5076         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5077         "CFLAGS = -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOSYMLINK \
5078         -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE -DNOLEARN $(KFLAGS) -O" \
5079         "LNKFLAGS ="
5080
5081 #Generic ATT System III or System V R2 or earlier, "no void":
5082 #special entry to remove "Illegal pointer combination" warnings.
5083 sys3nv:
5084         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5085         @echo 'or System V R2 or earlier...'
5086         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5087         "CFLAGS= -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOGETUSERSHELL \
5088         -DNOSYMLINK -DNOFTRUNCATE -DNOINITGROUPS -DNOLEARN \
5089         -Dvoid=int $(KFLAGS) -i -O" \
5090         "LNKFLAGS = -i"
5091
5092 # AT&T 7300 UNIX PC.  As of C-Kermit 6.1, many of these entries don't work
5093 # any more due to "Out of memory" or "Too many defines" errors during
5094 # compilation, at least not on systems without lots of memory.  The sys3upcgc
5095 # entry works (using gcc) with optimization removed, and might also work
5096 # with optimization enabled on machines with larger memories.
5097
5098 #AT&T 7300/UNIX PC (3B1) systems, sys3 but special handling for internal modem.
5099 #Link with the shared library -- the conflict with openi in shared library
5100 #is solved with -Dopeni=xopeni.  Note that the xermit target can't be used
5101 #for the Unix PC; there is no select().
5102 sys3upc:
5103         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5104         @echo 'If shared lib causes trouble, use make sys3upcold.'
5105         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5106         "CFLAGS = -O -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOREALPATH -DNOLEARN \
5107         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5108         -DNOREDIRECT -DNOGFTIMER -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5109         "CC2 = ld /lib/crt0s.o /lib/shlib.ifile" "LNKFLAGS = -s"
5110
5111 #AT&T 7300/Unix PC systems, minimum kermit for those with smaller amounts
5112 #of memory.
5113 sys3upcm:
5114         @echo Minimum interactive
5115         $(MAKE) "MAKE=$(MAKE)" sys3upc KTARGET=$${KTARGET:-$(@)} \
5116         "KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5117         -DNOSYSLOG -DNOSETKEY -DNOREALPATH"
5118
5119 #AT&T 7300/UNIX PC (3B1) systems, with curses support.
5120 #Curses and the shared library don't get along, so we don't use the
5121 #shared library.  We need to include CK_NEWTERM to avoid a conflict
5122 #with curses and buffering on stdout.  Merged with submission by
5123 #Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu.
5124 #We don't need -Dopeni=xopeni since we're not using the shared library,
5125 #but we keep it to be consistent with the other entries.
5126 sys3upcc:
5127         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5128         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5129         "CFLAGS = -O -DATT7300 -DNOREALPATH \
5130         -DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DNOLEARN \
5131         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5132         -DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5133         "LIBS = -lcurses" "LNKFLAGS = -s"
5134
5135 #Like sys3upcc but for AT&T UNIX 3.51m (released as a patch on Fix Disk 2),
5136 #adds hardware flow control.
5137 att351m:
5138         $(MAKE) "MAKE=$(MAKE)" sys3upcc KTARGET=$${KTARGET:-$(@)} \
5139         "KFLAGS=-DCK_RTSCTS -DUNIX351M"
5140
5141 #As above but with gcc.
5142 att351gm:
5143         $(MAKE) "MAKE=$(MAKE)" sys3upcgc KTARGET=$${KTARGET:-$(@)} \
5144         "KFLAGS=-DCK_RTSCTS -DUNIX351M"
5145
5146 #AT&T 7300 UNIX PC (3B1), as above, but no newterm().
5147 sys3upcx:
5148         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5149         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5150         "CFLAGS = -O -DATT7300 -DNOREALPATH -DNOUNICODE -DNOLEARN \
5151         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5152         -DCK_CURSES -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DUSE_MEMCPY $(KFLAGS) \
5153         -Dopeni=xopeni" "LIBS = -lcurses -ltermcap" "LNKFLAGS = -s"
5154
5155 #AT&T 7300/UNIX PC (3B1) systems, with curses and shared library support.
5156 sys3upcshcc:
5157         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5158         @echo 'With curses.  Requires shcc.'
5159         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5160         "CFLAGS = -O -DATT7300 -DNOMKDIR -DNOREALPATH -DNOLEARN \
5161         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5162         -DCK_NEWTERM -DCK_CURSES  -DNOREDIRECT -DNOGFTIMER \
5163         -DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5164         "LNKFLAGS = -i -s" "CC = shcc" "CC2 = shcc" "LIBS = -lcurses"
5165
5166 #AT&T 7300/UNIX PC (3B1) systems, as above, no curses, but use gcc.
5167 sys3upcg:
5168         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5169         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5170         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5171         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5172         -DNOGFTIMER -DNOMKDIR -DNOREALPATH $(KFLAGS) -Dopeni=xopeni" \
5173         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
5174
5175 #AT&T 7300/UNIX PC (3B1) systems, curses and gcc.
5176 #Optimization omitted -- add it back in if your machine has lots of memory.
5177 sys3upcgc:
5178         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5179         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5180         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOGFTIMER -DNOUNICODE \
5181         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5182         -DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREALPATH -DNOLEARN $(KFLAGS)" \
5183         "CC = gcc" "CC2 = gcc" "LIBS = -lcurses" "LNKFLAGS = -s"
5184
5185 #AT&T 7300/UNIX PC (3B1) systems, special handling for internal modem.
5186 #No FULLSCREEN file transfer display (curses).
5187 sys3upcold:
5188         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5189         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5190         "CFLAGS = -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5191         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5192         -DNOGFTIMER -DNOREDIRECT -DNOREALPATH $(KFLAGS) -O" "LNKFLAGS = -i"
5193
5194 #As above, but with gcc. mininum features - fits on a 400K UNIX PC floppy
5195 #after compression with room to spare; add -DNOSHOW or other -DNOxxxx items
5196 #to reduce size even further.
5197 sys3upcgm:
5198         @echo Minimum interactive
5199         $(MAKE) "MAKE=$(MAKE)" sys3upcg KTARGET=$${KTARGET:-$(@)} \
5200         "KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5201         -DNOSETKEY $(KFLAGS)"
5202
5203 #This target is designed to create a version with the most features possible
5204 #that, after compression, still fits on a 400K UNIX PC floppy.
5205 sys3upcgfd:
5206         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC floppy...'
5207         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5208         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOSPL -DNOLEARN \
5209         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5210         -DNOGFTIMER -DNOREALPATH -Dopeni=xopeni \
5211         -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5212         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5213
5214 #AT&T 6300 PLUS (warning, -O might make it run out of space).
5215 #NOTE: Remove -DHDBUUCP if not using Honey DanBer UUCP.
5216 att6300:
5217         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5218         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5219         "CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOREALPATH -DNOLEARN \
5220         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5221         -DNOUNICODE $(KFLAGS) -O -Ml -i" "LNKFLAGS = -i -Ml"
5222
5223 #As above, but with curses support.  Debugging disabled to prevent thrashing.
5224 att6300c:
5225         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5226         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5227         "CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOCSETS -DNOREALPATH \
5228         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5229         -DCK_CURSES -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) -O -Ml -i" \
5230         "LNKFLAGS = -i -Ml" "LIBS = -lcurses"
5231
5232 #AT&T 6300 PLUS with no curses, no debugging (about 34K smaller)
5233 # -Optimization saves about 20K too.
5234 att6300nd:
5235         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS, no debugging...'
5236         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5237         "CFLAGS = -DATT6300 -DHDBUUCP -DNODEBUG -DNOFILEH -DNOREALPATH \
5238         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5239         -DNOUNICODE -DNOLEARN $(KFLAGS) -O -i -Ml" "LNKFLAGS = -i -Ml"
5240
5241 #AT&T 3B2 and maybe 3B20-series computers running AT&T UNIX System V R3.
5242 #This one was actually used to build C-Kermit 7.0 successfully on a 3B2/300.
5243 att3b2:
5244         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2'
5245         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5246         "CFLAGS = -DATTSV -DNOREDIRECT -DUSE_MEMCPY \
5247         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5248         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5249         -DNOGFTIMER -DNOREALPATH -Dopeni=xopeni -DNOFRILLS -DNOLEARN \
5250         -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5251         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5252
5253 # The next two are likely not to work as-is.
5254
5255 #AT&T 3B2, 3B20-series computers running AT&T UNIX System V.
5256 #This is just generic System V with Honey DanBer UUCP, so refer to sys3hdb.
5257 #Remove -DNONAWS if you can get away with it.
5258 att3bx:
5259         $(MAKE) "MAKE=$(MAKE)" sys3hdb KTARGET=$${KTARGET:-$(@)} \
5260         "KFLAGS=$(KFLAGS) -DNONAWS -DNOTIMEVAL"
5261
5262 # 3Bx with charsets (except Unicode) but no curses.
5263 att3bx1:
5264         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5265         @echo 'with Honey DanBer UUCP  no curses...'
5266         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5267         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5268         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5269         -DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5270         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5271         -DNOREALPATH -DNOUNICODE -i" \
5272         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s"
5273
5274 #AT&T 3B2, 3B20-series computers running AT&T UNIX System V,
5275 #with fullscreen file transfer display.
5276 att3bxc:
5277         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5278         @echo 'with Honey DanBer UUCP and curses...'
5279         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5280         "CFLAGS = -DATTSV -DHDBUUCP -DNONAWS -DNOTIMEVAL $(KFLAGS) \
5281         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5282         -DNOREALPATH -DCK_CURSES -DCK_NEWTERM -DNOUNICODE -DNOLEARN -i -O" \
5283         "LNKFLAGS = -i" "LIBS=-lcurses"
5284
5285 #3bx with curses but no charsets
5286 att3bxc3:
5287         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5288         @echo 'with Honey DanBer UUCP with curses...  no CSETS'
5289         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5290         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5291         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5292         -DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5293         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5294         -DNOREALPATH -DNOCSETS -DCK_CURSES -DCK_NEWTERM -i" \
5295         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s" "LIBS = -lcurses"
5296
5297 #Any System V R2 or earlier with Honey DanBer UUCP (same as above)
5298 sys3hdb:
5299         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5300         @echo 'or System V R2 or earlier with Honey DanBer UUCP...'
5301         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5302         "CFLAGS = -DATTSV -DHDBUUCP -DNOREALPATH -DNOUNICODE -DNOLEARN \
5303         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5304         $(KFLAGS) -i -O" "LNKFLAGS = -i"
5305
5306 #Sperry/UNISYS 5000 UTS V 5.2 (System V R2), Honey DanBer UUCP
5307 unisys5r2:
5308         @echo 'Making C-Kermit $(CKVER) for Sperry/UNISYS 5000 UTS V 5.2...'
5309         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5310         "CFLAGS = -DATTSV -DUNISYS52 -DHDBUUCP -DNOREALPATH -DNOUNICODE \
5311         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5312         -DNOLEARN $(KFLAGS) -i -O" "LNKFLAGS = -i"
5313
5314 #In case they say "make sys5hdb" instead of "make sys3hdb"...
5315 sys5hdb:
5316         $(MAKE) "MAKE=$(MAKE)" sys3hdb
5317
5318 #Create the common header line for all hpux[5-11]* entries and above. This 
5319 #extra entry is here because our header message length may differ for each 
5320 #C-Kermit version. Don't use 'fold -s' for HP-UX 5.x - 7.x! This option is 
5321 #available only for HP-UX 8.0 and above!
5322 hpux-header:
5323         @HPUX=`uname -r | sed -e 's/^[^1-9]*//' -e 's/\.00$$/.0/'` ; \
5324         [ "$(MESSAGE0)" ] && MESSAGE1="$(MESSAGE0)" ; \
5325         Message0='Making C-Kermit $(CKVER) for HP9000 HP-UX' ; \
5326         Message1=$${MESSAGE1:='without any extra compiler optimization'} ; \
5327         MessageH="$$Message0 $$HPUX" ; \
5328         case $$HPUX in \
5329           [567].*) echo "$$MessageH\n$$Message1" ;; \
5330               *.*) echo "$$MessageH $${Message1}$(MESSAGE1A)" | fold -s ;; \
5331         esac | sed -e 's/^ //' -e 's/ *$$//'
5332
5333 # Peter E's updated HP-UX 5.xx entries Oct 2001.
5334
5335 #HP-9000 500 HP-UX 5.xx, no TCP/IP.
5336 # Last known successful build: C-Kermit 8.0.206 2002/20/27.
5337 hpux0500:
5338         @MESSAGE0="no TCP/IP and no compiler optimization";\
5339         MESSAGE0=$${MESSAGE1:-$$MESSAGE0} \
5340         $(MAKE) hpux-header
5341         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5342         "CFLAGS = -DHPUX -DHPUX5 -DHPUXPRE65 -DNOREDIRECT -DDCLGETCWD \
5343         -DNOGETUSERSHELL -DNOGFTIMER -DNOSYSLOG -DNOTOMACROS -DNOLSTAT \
5344         -DNOSYMLINK -DNOINITGROUPS -DNOUNICODE -DNOLEARN -DNOLONGLONG \
5345         $(KFLAGS)" "LIBS = $(LIBS)" "LNKFLAGS = "
5346
5347 #HP-9000 500 HP-UX 5.21 with Wollongong WIN/TCP 1.2 TCP/IP.
5348 #Requires /usr/wins/usr/include and /usr/lib/libnet.a from Wollongong.
5349 #Optimization skipped - takes forever.  Really.
5350 # WARNING: this doesn't work if a file called "hpux0500" is on the disk.
5351 # Last known successful build: C-Kermit 8.0.206 2002/20/27.
5352 hpux0500wintcp:
5353         @MESSAGE1="with WIN/TCP but without any extra compiler optimization" \
5354         $(MAKE) hpux0500 KTARGET=$${KTARGET:-$(@)} \
5355         "KFLAGS = -DTCPSOCKET -DHPUX5WINTCP -DINADDRX -DNO_DNS_SRV -DNOMHHOST \
5356         -DNOHADDRLIST -DNOLONGLONG -I/usr/wins/usr/include $(KFLAGS)" \
5357         "LIBS = /usr/lib/libnet.a"
5358
5359 #HP-UX 6.5, short filenames, no network and no curses support.
5360 #ckcpro, ckuusr, ckuus3 and others are broken out because they make the
5361 #optimizer run away.  Note that the XERMIT target does not work with HP-UX 6.5!
5362 #
5363 #If you get compiler warnings like:
5364 #'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5365 #other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5366 #switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5367 #needs 257 table entries (C-Kermit Version "9.0.299").
5368 #OK: 2010/03/26
5369 hpux0650:
5370         @$(MAKE) hpux-header
5371         @MESSAGE2=$${MESSAGE2:-'and NO network'}; \
5372         echo "supporting: NO long filenames $$MESSAGE2."
5373
5374         $(MAKE) KTARGET=$${KTARGET:-$(@)} \
5375                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
5376                 ckuusr.$(EXT) ckuxla.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5377         "CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5378         -DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5379         $(KFLAGS)"
5380
5381         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5382         "CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5383         -DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5384         $(KFLAGS) -Wc,-Nw260 $(OFLAGS)" "LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5385
5386 #Exactly as above, plus curses:
5387 #OK: 2009/10/06
5388 hpux0650c:
5389         @MESSAGE2="and NO network but with curses" \
5390         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5391         "KFLAGS = -DCK_CURSES $(KFLAGS)" \
5392         "LIBS = -lcurses"
5393
5394 #Exactly as above, plus curses + network:
5395 #OK: 2009/10/02
5396 hpux0650tcpc:
5397         @MESSAGE2="but with curses and with TCP/IP" \
5398         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5399         "KFLAGS=-DCK_CURSES -DTCPSOCKET -DNOHADDRLIST \
5400         -DINTSELECT -DNOCKGETFQHOST $(KFLAGS)" \
5401         "LIBS=-lcurses"
5402
5403 #Exactly as hpux0650 but with compiler optimization:
5404 #OK: 2009/10/06
5405 hpux0650o:
5406         @MESSAGE1="with compiler optimization" \
5407         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5408         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5409
5410 #Exactly as hpux0650c but with compiler optimization:
5411 #OK: 2009/10/06
5412 hpux0650oc:
5413         @MESSAGE1="with compiler optimization" \
5414         $(MAKE) hpux0650c KTARGET=$${KTARGET:-$(@)} \
5415         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5416
5417 #Exactly as hpux0650tcpc but with compiler optimization:
5418 #OK: 2009/10/06
5419 hpux0650otcpc:
5420         @MESSAGE1="with compiler optimization" \
5421         $(MAKE) hpux0650tcpc KTARGET=$${KTARGET:-$(@)} \
5422         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5423
5424 #Take this as startup entry for all 'non-optimized' files under HP-UX 7.x!
5425 #Make sure we don't call it with the '-O' option because this will blow up
5426 #the compiler!
5427 #OK: 2009/09/30
5428 hpux0700noopt:
5429         @case "$(CFLAGS)" in \
5430         *-O*) echo "Don't use CFLAGS= -O here!" ;; \
5431            *) $(MAKE) KTARGET=$${KTARGET:-$(@)} \
5432               ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
5433               ckuus6.$(EXT) ckuus7.$(EXT) ckuxla.$(EXT) \
5434               ckcuni.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5435               ;; \
5436         esac
5437
5438 #HP-UX 7.0, no long filenames, no network support, no curses.
5439 #If you get compiler warnings like:
5440 #'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5441 #other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5442 #switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5443 #needs 257 table entries (C-Kermit Version "9.0.299").
5444 #OK: 2010/10/26
5445 hpux0700sf:
5446         @$(MAKE) hpux-header
5447         @echo 'supporting: NO long filenames, NO network, NO curses.'
5448         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5449         "CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5450         -DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260"
5451
5452         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5453         "CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5454         -DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260 $(OFLAGS)" \
5455         "LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5456
5457 #Exactly as hpux0700sf but with compiler optimization:
5458 #OK: 2009/09/30
5459 hpux0700osf:
5460         @MESSAGE1="with compiler optimization" \
5461         $(MAKE) hpux0700sf KTARGET=$${KTARGET:-$(@)} \
5462         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5463
5464 #HP-UX 7.0, short filenames, but with tcp/ip and curses.
5465 #To use this, you must have bought the ARPA Services Product from HP, and you
5466 #must have /usr/lib/libBSD.a.
5467 #
5468 #If you get compiler warnings like:
5469 #'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5470 #other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5471 #symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5472 #needs 2031 table entries (C-Kermit Version "9.0.299").
5473 #OK: 2010/03/24
5474 hpux0700sftcpc:
5475         @$(MAKE) hpux-header
5476         @echo 'supporting: NO long filenames, \c'
5477         @echo 'but with networking, curses, HDB uucp...'
5478         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5479         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5480         -DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5481         -DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5482         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5483
5484         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5485         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5486         -DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5487         -DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5488         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5489         "LNKFLAGS = -s" "LIBS = -lm -lBSD -lcurses"
5490
5491 #Exactly as above but with compiler optimization:
5492 #OK: 2009/09/30
5493 hpux0700osftcpc:
5494         @MESSAGE1="with compiler optimization" \
5495         $(MAKE) hpux0700sftcpc KTARGET=$${KTARGET:-$(@)} \
5496         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5497
5498 #HP 9000 series 300/800 HP-UX 7.0, long filenames, network support, HDB uucp,
5499 #but NO curses. See comments in hpux0700sftcpc about TCP/IP support.
5500 #
5501 #If you get compiler warnings like:
5502 #'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5503 #other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5504 #symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5505 #needs 2031 table entries (C-Kermit Version "9.0.299").
5506 #OK: 2010/03/24
5507 hpux0700lfn:
5508         @$(MAKE) hpux-header
5509         @echo 'supporting: long filenames, networking, HDB uucp$(MESSAGE2)...'
5510         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5511         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5512         -DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5513         -DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5514         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5515
5516         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5517         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5518         -DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5519         -DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5520         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5521         "LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5522
5523 #Exactly as above + curses.
5524 #OK: 2009/09/30
5525 hpux0700lfnc:
5526         @MESSAGE2=', curses' \
5527         $(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5528         "KFLAGS = -DCK_CURSES $(KFLAGS)" \
5529         "LIBS = -lcurses"
5530
5531 #Exactly as above hpux0700lfn but with compiler optimization:
5532 #OK: 2009/09/30
5533 hpux0700olfn:
5534         @MESSAGE1="with compiler optimization" \
5535         $(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5536         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5537
5538 #Exactly as above hpux0700lfnc but with compiler optimization:
5539 #OK: 2009/09/30
5540 hpux0700olfnc:
5541         @MESSAGE1="with compiler optimization" \
5542         $(MAKE) hpux0700lfnc KTARGET=$${KTARGET:-$(@)} \
5543         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5544
5545 #HP 9000 Series 300 or 400, HP-UX 8.0, long filenames and TCP/IP support.
5546 #This one should also work on 700/800, but without PA-specific optimization.
5547 #In case -DCK_RTSCTS and -DCK_REDIR make trouble, remove them.
5548 #NOTE: ckcpro.c, ckuusr.c and ckuus3.c blow up the optimizer, so don't optimize
5549 #them.
5550 #For HP-UX 8.0 on Motorola CPUs, you might have to reinstall your kernel with
5551 #maxdsiz >= 0x03000000.  But if physical memory is small, that still will not
5552 #help much.
5553 #OK: 2009/10/01
5554 hpux0800:
5555         @$(MAKE) hpux-header
5556         @MESSAGE3=$${MESSAGE3:='TCP/IP'}; \
5557         echo "supporting: long filenames, $$MESSAGE3, HDB UUCP$(MESSAGE2)..."
5558         $(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
5559         ckcpro.$(EXT) ckuusr.$(EXT) ckuus3.$(EXT) \
5560         "CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5561         -DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5562         -DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5563         -DNOLONGLONG $(KFLAGS)"
5564
5565         $(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" xermit KTARGET=$${KTARGET:-$(@)} \
5566         "CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5567         -DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5568         -DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5569         -DNOLONGLONG -DNODCLENDUSERSHELL $(KFLAGS) $(OFLAGS)" \
5570         "LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5571
5572 #Exactly as above hpux0800 + curses.
5573 #OK: 2009/10/01
5574 hpux0800c:
5575         @MESSAGE2=', curses' \
5576         $(MAKE) hpux0800  KTARGET=$${KTARGET:-$(@)} \
5577         "KFLAGS = $(KFLAGS) -DCK_CURSES" "LIBS = -lcurses"
5578
5579 #HP 9000 HP-UX 8.0, no TCP/IP because /usr/lib/libBSD.a can't be found,
5580 #or TCP/IP header files missing.
5581 #OK: 2009/10/01
5582 hpux0800notcp:
5583         @MESSAGE3='NO network, NO curses' \
5584         $(MAKE) "MAKE=$(MAKE)" hpux0800 KTARGET=$${KTARGET:-$(@)} \
5585         "KFLAGS = $(KFLAGS) -UTCPSOCKET"
5586
5587 #Now the same as above hpux0800 but with compiler optimization
5588 #OK: 2009/10/01
5589 hpux0800o:
5590         @MESSAGE1="with compiler optimization" \
5591         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5592         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5593
5594 #Exactly as above hpux0800 + curses and with compiler optimization.
5595 #OK: 2009/10/01
5596 hpux0800oc:
5597         @MESSAGE1="with compiler optimization" \
5598         $(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5599         "KFLAGS = $(KFLAGS)" "OFLAGS = -O" "LIBS = -lcurses"
5600
5601 #Exactly as above hpux0800notcp but with compiler optimization
5602 #OK: 2009/10/01
5603 hpux0800onotcp:
5604         @MESSAGE1="with compiler optimization" \
5605         $(MAKE) "MAKE=$(MAKE)" hpux0800notcp KTARGET=$${KTARGET:-$(@)} \
5606         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5607
5608 #HP 9000 Series 700 or 800, HP-UX 8.0, long filenames and TCP/IP support.
5609 # Like the previous entries, but with PA-RISC-specific optimization.
5610 #OK: 2009/10/01
5611 hpux0800pa:
5612         @MESSAGE1="with PA-RISC-specific optimization" \
5613         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5614         "KFLAGS = $(KFLAGS) +Obb1100"
5615
5616 #As above, but with curses.
5617 #OK: 2009/10/01
5618 hpux0800pac:
5619         @MESSAGE1="with PA-RISC-specific optimization" \
5620         $(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5621         "KFLAGS = $(KFLAGS) +Obb1100"
5622
5623 #As above, but compiled with GCC 2.3.3.
5624 #OK: 2009/10/01
5625 hpux0800pagcc:
5626         @MESSAGE1='using the gcc compiler' \
5627         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5628         "CC=gcc" "CC2=gcc" "KFLAGS = -funsigned-char $(KFLAGS)"
5629
5630 #HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5631 #configured.  Use this entry with the restricted compiler: no optimization, no
5632 #ANSI support.  If you get unresolved sockets library references at link time,
5633 #then try adding -lBSD to LIBS, or else remove -DTCPSOCKET to build a version
5634 #without TCP/IP support.
5635 #
5636 #Please note that we have to add the compiler option +DA1.0/+DA1.1 to avoid
5637 #core-dumps for large arguments in IF MATCH. The man page says these options
5638 #are default but C-Kermit dumps core without them! Therefore keep them
5639 #untouched. If you want to overwrite or disable the +DA1.0/+DA1.1 option use
5640 #'make hpux0900 OFLAGS=...'. An other possibility would be to create a new
5641 #kernel with maxssiz >= 0x01185000 (default maxssiz=0x00800000).
5642 #OK: 2009/09/24
5643 hpux0900:
5644         @MESSAGE1A='. Read hpux0900 entry comments if you have trouble.' \
5645         $(MAKE) hpux-header
5646         @case `uname -m` in \
5647           */[34]*) KFLAGS='-DNOLONGLONG $(KFLAGS)' ;; \
5648           */7*)    AFLAGS='+DA1.1' ;; \
5649           */8*)    AFLAGS='+DA1.0' ;; \
5650         esac ; \
5651         OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5652         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5653         "CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT -DUTIMEH \
5654         -DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME -DCK_REDIR -DLONGFN \
5655         -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5656         -DNODCLENDUSERSHELL $$KFLAGS $$OFLAGS" \
5657         "LNKFLAGS = -s" "LIBS = -lm -lcurses" "CC=$(CC)" "CC2=$(CC2)"
5658
5659 #Like hpux0900, but for the "value-added" compiler on all HP 9000 models.
5660 #Adds optimization and ANSI compilation:
5661 # +O2 makes smaller executable (= -O = Level-1 and global optimization)
5662 # +O3 adds interprocedural global optimization, makes bigger executable.
5663 # Please note: To support long-long we would need compiler switch '-Ae' but
5664 # this one works only on Risc systems. But the equivalant compiler flags
5665 # '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5666 # If optimization fails on some modules, you can add:
5667 #  +Obb<n>, +Olimit <n>, or +Onolimit, depending on your cc version,
5668 # where <n> is a number, e.g. +Obb1200.  In other words, if you get optimizer
5669 # warnings, add (for example) +Obb1200; if you still get optimizer warnings,
5670 # increase the number.  Repeat until warnings go away.  If your compiler
5671 # permits it, use +Onolimit. If optimizer blows up on ckcpro.c, see next entry.
5672 # Reportedly, on some configurations, such as HP9000/425e or /340, perhaps
5673 # depending on the amount of main memory, this entry might fail no matter what
5674 # you do ("Out of Memory", "cc: Fatal error in /lib/c.c1", etc).  In that case
5675 # use "make hpux0900" (no "o").
5676 #OK: 2009/09/24
5677 hpux0900o:
5678         @MESSAGE1=$${MESSAGE1:-"with compiler optimization"} \
5679         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5680         "KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5681
5682 # For HP-UX 9.0 on Motorola CPUs, optimization of ckcpro.c tends to blow up
5683 # the compiler.  You might have to reinstall your kernel with maxdsiz >=
5684 # 0x03000000.  But if physical memory is small, that still will not help much.
5685 # In that case, use this entry to skip optimization of ckcpro.c.  But for
5686 # C-Kermit 8.0.208 you need a kernel with maxdsiz >= 0x02000000 to compile an
5687 # optimized ckcftp.c.
5688 # Please note: To support long-long we would need compiler switch '-Ae' but
5689 # this one works only on Risc systems. But the equivalant compiler flags
5690 # '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5691 hpux0900m68ko:
5692         @MESSAGE1='without compiler optimization for ckcpro.$(EXT) ...' \
5693         $(MAKE) hpux-header
5694         $(MAKE) ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
5695         ckcftp.$(EXT) ckcpro.$(EXT) \
5696         "CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT \
5697         -DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME  -DCK_REDIR -DLONGFN \
5698         -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT $(KFLAGS)"
5699         @echo
5700         @MESSAGE1="with compiler optimization for the rest" \
5701         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5702         "KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5703
5704 # Old name for hpux0900m68ko.
5705 hpux0900mot:
5706         $(MAKE) hpux0900m68ko KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS)"
5707
5708 #Like hpux0900o but with additional model-700/800-specific optimizations.
5709 # +ESlit = consolidate strings in read-only memory.
5710 # +ESfsc = inline millicode calls when comparing pointers.
5711 hpux0900o700:
5712         @echo 'If you get optimizer warnings \c'
5713         @echo 'try "make hpux0900o700 KFLAGS=+Obb1200"'
5714         @MESSAGE1="with PA-RISC-specific optimizations" \
5715         $(MAKE) hpux0900o KTARGET=$${KTARGET:-$(@)} \
5716         "KFLAGS = $(KFLAGS) +ESlit +ESsfc"
5717
5718 #HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5719 #configured, built with gcc, all models except 800 series.
5720 #You might need to add the include path for gcc headers, for example:
5721 # 'KFLAGS=-I/usr/gnu/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5/include/'
5722 hpux0900gcc:
5723         @MESSAGE1='using the gcc compiler' \
5724         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5725         "KFLAGS = -DCK_ANSIC $(KFLAGS)" \
5726         "OFLAGS = -funsigned-char -O2 $(OFLAGS)"
5727
5728 #HP-9000 HP-UX 10.0 + TCP/IP + curses, fully configured.
5729 #Use with restricted (bundled) compiler: no optimization, no ANSI support.
5730 #libcurses needed for fullscreen file xfer display in HP-UX 10.00 and 10.01.
5731 #libHcurses (NOT libcurses!) for fullscreen display, to work around fatal bugs
5732 #in HP-UX 10.10 and 10.20 curses. Maybe we could use lcurses for 10.30, since
5733 #the 10.10 curses problem is supposedly fixed in 10.30.
5734 # +DA1.0 = Generate PA-RISC 1.0 code that runs on both 700 and 800 models.
5735 # +DA1.1 = Generate PA-RISC 1.1 code that runs on both 700 and 800 models.
5736 # Note that HP-UX 10.20 and upwards do not support PA-RISC 1.0 systems.
5737 # And that as of Dec 2001, 11.00 and 11.11 are PA-only and 11.20 is IA64-only.
5738 # Later 11.2x releases are expected to be for both.  Architecture can be
5739 # determined with the model command, at least in 10.20 and later...
5740 #For future releases, we need to include +DA1.1 for PA builds, so that a
5741 #binary built on PA 2.0 will still work on PA 1.1 machines, whereas +DA1.1
5742 #must NOT be included for IA64 builds.
5743 #4 Jan 2006 - Added Large File Support (LFS).  Large files (>2GB) are
5744 #possible in HP-UX 10.20 and later.  The only change is to add:
5745 # -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
5746 #to KFLAGS.  These should be harmless in 10.00 and 10.10, if any of examples
5747 #of those still exist, but I have no way to test this hypothesis.
5748 #OK: 2009/11/16
5749 hpux1000:
5750         @$(MAKE) hpux-header
5751         @LIBS='-lHcurses' ; \
5752         AFLAGS='+DA1.1' ; \
5753         case `uname -r` in \
5754            [AB].10.0*)  KFLAGS='-DHPUX1000 $(KFLAGS)' ; \
5755                         AFLAGS='+DA1.0' ; LIBS='-lcurses'  ;; \
5756            [AB].10.1*)  KFLAGS='-DHPUX1010 -D__HP_CURSES $(KFLAGS)' ; \
5757                         ;; \
5758            [AB].10.2*)  KFLAGS='-DHPUX1020 -D__HP_CURSES $(KFLAGS)' ; \
5759                         ;; \
5760            [AB].10.3*)  KFLAGS='-DHPUX1030 -D__HP_CURSES $(KFLAGS)' ; \
5761                         ;; \
5762            [AB].10.?*)  KFLAGS='-DHPUX10XX -D__HP_CURSES $(KFLAGS)' ; \
5763                         ;; \
5764            [AB].11.0*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5765                         ;; \
5766            [AB].11.1*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5767                         ;; \
5768            [AB].11.?*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5769                         AFLAGS='' ; LIBS='-lcurses' ;; \
5770         esac ; \
5771         OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5772         $(MAKE) "SHELL=/usr/bin/sh" xermit KTARGET=$${KTARGET:-$(@)} \
5773         "CC=$(CC)" "CC2=$(CC2)" \
5774         "CFLAGS = -DHPUX10 -DDIRENT -DSTERMIOX -DCK_DSYSINI -DHDBUUCP \
5775         -DCK_CURSES -DCK_WREFRESH -DTCPSOCKET -DCK_REDIR -DRENAME -DFNFLOAT \
5776         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
5777         $$KFLAGS $$OFLAGS" \
5778         "LNKFLAGS=-s $(LNKFLAGS)" "LIBS = -lm $$LIBS $(KLIBS)"
5779
5780 # This is a kludge, copying hpux0900gcc and adapting hpux1000
5781 # (add CC and CC2, drop the A1.[0||1])
5782 # Builds w/ no compiler warnings but minimally tested.
5783 #
5784 #OK: 2009/09/21
5785 hpux1000gcc:
5786         @MESSAGE1="using the gcc compiler $(MESSAGE1)" \
5787         $(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5788         "KFLAGS = $(KFLAGS)" "OFLAGS = -DCK_ANSIC -funsigned-char -O2"
5789
5790 # Trusted HP-UX 10
5791 # echo KFLAGS=$(KFLAGS) YTARGET YTARGET=$(YTARGET) $(XTARGET) ;
5792 hpux1000t:
5793         @case "$(KTARGET)" in \
5794            *+openssl | *+ssl) \
5795                 KENTRY=hpux1000o+openssl ;; \
5796            *gcc) \
5797                 KENTRY=hpux1000gcc ;; \
5798            *o+) KENTRY=hpux1000o+ ;; \
5799            *o)  KENTRY=hpux1000o ;; \
5800            *)   KENTRY=hpux1000 ;; \
5801         esac ; \
5802         MESSAGE1="and support for 'Trusted HP-UX'" \
5803         $(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5804         "KFLAGS = $(KFLAGS) -DHPUX10_TRUSTED" "KLIBS=-lsec"
5805
5806 hpux1000to:
5807         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5808
5809 hpux1000to+:
5810         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5811
5812 hpux1000tgcc:
5813         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5814
5815 hpux1000to+ssl hpux1000to+openssl:
5816         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5817
5818 hpux1000tgcc+ssl hpux1000tgcc+openssl:
5819         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5820
5821 #HP-9000 HP-UX 10.00 and higher with ANSI prototyping and optimization.
5822 #PA-RISC only, no Motorola or other hardware is support in HP-UX 10.00++.
5823 #The unbundled optional compiler is required.
5824 #Your path should start with /opt/ansic/bin.
5825 # -Wl,-Fw = Remove stack unwind table (info used by debuggers).
5826 # +O2 makes a smaller executable (= -O = Level-1 and global optimization).
5827 # +O3 adds interprocedural global optimization, makes a bigger executable.
5828 # +Onolimit allows all modules to be optimized, no matter how complex.  But:
5829 #  (a) +Onolimit does not seem to always be there in HP-UX 10.00, and:
5830 #  (b) some modules might take hours on low-memory and/or slow systems.
5831 # The following are PA-RISC-specific optimizations:
5832 # +ESlit = Consolidate strings in read-only memory.
5833 # +ESfsc = Inline millicode calls when comparing pointers.
5834 # You might need to configure your kernel for a maxdsiz of 0x0B000000 (176MB)
5835 # or greater to prevent the optimizer from running out of space.
5836 # December 2001: +ESlit +ESsfc removed because not supported on IA64.
5837 # Somebody who cares can use 'model' to see whether it's PA-RISC or IA64
5838 # and include the architecture-specific optimization flags.  Also note:
5839 # +DA1.1 is PA-only.  If this is included in in HP-UX 11.00 or later,
5840 # then +DS2.0 should be included too (but don't use +DS2.0 without +DA1.1,
5841 # or else the binary won't run on older PA hardware).
5842 #OK: 2009/09/21
5843 hpux1000o:
5844         @case `uname -m` in \
5845           ia64) ;; \
5846           *) MFLAGS='+ESlit +ESsfc' ;; \
5847         esac ; \
5848         MESSAGE1="with PA-RISC-specific optimizations $(MESSAGE1)" \
5849         $(MAKE) "SHELL=/usr/bin/sh" "PATH=/opt/ansic/bin:$$PATH" hpux1000 \
5850         KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS) \
5851         -Ae -D_HPUX_SOURCE -DCK_ANSIC -DUTIMEH \
5852         +O2 -Wl,-Fw $$MFLAGS"
5853
5854 #Like hpux1000o but with "+Onolimit".
5855 #On 700 series set kernel parameter maxdsiz >= 0x0D000000 (=208MB).
5856 #Takes a long time.
5857 hpux1000o+:
5858         @MESSAGE1="and +Onolimit $(MESSAGE1)" KTARGET=$${KTARGET:-$(@)} \
5859         $(MAKE) hpux1000o \
5860         "KFLAGS = $(KFLAGS) +Onolimit"
5861
5862 #HP-UX 10.xx + 11.xx with optimizing ANSI compiler and OpenSSL.
5863 #Define SSLLIB and SSLINC appropriately for your OpenSSL installation.
5864 #To overwrite the default SSLLIB and SSLINC settings you can also use the
5865 #command-line variable KSSLLIB and KSSLINC like:
5866 #make hpux1000o+openssl KSSLLIB=-L/opt/openssl/lib KSSLINC=-I/...
5867 #Ditto for the Zlib location.
5868 #This entry works for C-Kermit 8.0.206 on HP-UX 10.20 + 11.11
5869 #with OpenSSL 0.9.6 + 0.9.7
5870 #NOTE: an ANSI C compiler is required for the SSL interface.  If you don't
5871 #have the HP Optimizing ANSI compiler, see the hpux1000gcc+openssl target
5872 #below.
5873 hpux1000o+ssl hpux1000o+openssl:
5874         @case "$(KTARGET)" in \
5875            *gcc+*) \
5876                 KENTRY=hpux1000gcc ;; \
5877            *)   KENTRY=hpux1000o ;; \
5878         esac ; \
5879         case "$(KTARGET)" in \
5880            *-zlib*) \
5881                 DZLIB= LZLIB= ;; \
5882            *)   DZLIB=-DZLIB LZLIB='-L/opt/zlib/lib -lz' ;; \
5883         esac ; \
5884         SSLINC=$${KSSLINC:-$(SSLINC)}; \
5885         SSLLIB=$${KSSLLIB:-$(SSLLIB)}; \
5886         MESSAGE1="and with OpenSSL $(MESSAGE1)" \
5887         $(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5888         KFLAGS="-DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $$DZLIB \
5889         $$SSLINC $(KFLAGS)" \
5890         KLIBS="$(KLIBS) \
5891         $$SSLLIB -lssl -lcrypto \
5892         $$LZLIB \
5893         "
5894
5895 # Ditto but without Zlib:
5896 hpux1000o+ssl-zlib hpux1000o+openssl-zlib:
5897         @MESSAGE1="but without Zlib $(MESSAGE1)" \
5898         $(MAKE) hpux1000o+ssl KTARGET=$${KTARGET:-$(@)}
5899
5900 #HP-UX 10.00 or higher with OpenSSL 0.9.7.  Compiled with gcc.
5901 #From Chris Chaney, NEC America Inc.  His instructions:
5902 # (1) Install gcc version 3.2.3 & binutils version 2.13.2
5903 #     (used binary depot from http://hpux.cs.utah.edu/)
5904 # (2) Install gcc make version 3.80 from http://hpux.cs.utah.edu/
5905 #
5906 # or: gcc 2.9.2000-12-1 from "Linux to hp-ux 11.0/11i porting kit version 1.0
5907 #     (2CD)" free from:  http://www.software.hp.com
5908 #
5909 # (3) Install openSSL version 0.9.7b from http://www.software.hp.com
5910 # (4) Install flex version 2.5.4 from http://hpux.cs.utah.edu/
5911 # (5) Install gmp version 3.1.1 from http://hpux.cs.utah.edu/
5912 #
5913 #Note from Peter Eichhorn, assyst Munich. It works also without gcc make!
5914 hpux1000gcc+ssl hpux1000gcc+openssl:
5915         $(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5916
5917 # Ditto but without Zlib:
5918 hpux1000gcc+ssl-zlib hpux1000gcc+openssl-zlib:
5919         $(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5920
5921 # Same for HP-UX 11
5922 hpux1100o+ssl hpux1100o+openssl:
5923         $(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5924
5925 #OK: 2009/09/26
5926 hpux1100gcc+ssl hpux1100gcc+openssl:
5927         $(MAKE) hpux1000gcc+openssl KTARGET=$${KTARGET:-$(@)}
5928
5929 hpux1100o+ssl-zlib hpux1100o+openssl-zlib:
5930         $(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5931
5932 hpux1100gcc+ssl-zlib hpux1100gcc+openssl-zlib:
5933         $(MAKE) hpux1000gcc+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5934
5935 # HP-UX 11
5936 # Note: these are 32-bit builds even on IA64.
5937 # Adding +DD64 to CFLAGS produces 64-bit object files,
5938 # but the linker fails to find the needed 64-bit libs.
5939 #OK: 2009/09/26
5940 hpux1100:
5941         $(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)}
5942
5943 #OK: 2009/09/26
5944 hpux1100o:
5945         $(MAKE) hpux1000o KTARGET=$${KTARGET:-$(@)}
5946
5947 hpux1100o+:
5948         $(MAKE) hpux1000o+ KTARGET=$${KTARGET:-$(@)}
5949
5950 #OK: 2009/09/26
5951 hpux1100gcc:
5952         $(MAKE) hpux1000gcc KTARGET=$${KTARGET:-$(@)}
5953
5954 # Trusted HP-UX 11
5955 hpux1100t:
5956         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5957
5958 hpux1100to:
5959         $(MAKE) hpux1000to KTARGET=$${KTARGET:-$(@)}
5960
5961 hpux1100to+:
5962         $(MAKE) hpux1000to+ KTARGET=$${KTARGET:-$(@)}
5963
5964 hpux1100tgcc:
5965         $(MAKE) hpux1000tgcc KTARGET=$${KTARGET:-$(@)}
5966
5967 hpux1100to+ssl hpux1100to+openssl:
5968         $(MAKE) hpux1000to+openssl KTARGET=$${KTARGET:-$(@)}
5969
5970 hpux1100tgcc+ssl hpux1100tgcc+openssl:
5971         $(MAKE) hpux1000tgcc+openssl KTARGET=$${KTARGET:-$(@)}
5972
5973 #Regulus on CIE Systems 680/20
5974 cie:
5975         @echo 'Making C-Kermit $(CKVER) for CIE Systems 680/20 Regulus...'
5976         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5977         "CFLAGS = -DATTSV -DNOFILEH -DCIE -DNOLEARN $(KFLAGS) -O" "LNKFLAGS ="
5978
5979 # Linux 1.2 or later with gcc, dynamic libraries, ncurses, TCP/IP.
5980 #
5981 # If your Linux system has curses rather than ncurses, use the linuxc
5982 # entry, or if that doesn't work, linuxnc.
5983 #
5984 # The Kermit "large memory model" is used by default to configure big packet
5985 # and script buffers, etc.  For small-memory or limited-resource systems,
5986 # "make linux KFLAGS=-DNOBIGBUF".
5987 #
5988 # -DLINUXFSSTND (Linux File System Standard 1.2) gives UUCP lockfile /var/lock
5989 # with string pid.  Remove this to get /usr/spool/uucp with int pid, used in
5990 # very early Linux versions.  FSSTND 1.2 also says that the PID string in the
5991 # UUCP lock file has leading spaces.  This is a change from FSSTND 1.0, which
5992 # used leading zeros.  Add -DFSSTND10 to support FSSTND 1.0 instead of 1.2.
5993 # I hope subsequent editions of the file-system standard did not change these
5994 # again.
5995 #
5996 # Add -DOLINUXHISPEED (Old Linux High Speed support) to turn on an ugly kludge
5997 # in Linux 1.0 and earlier to support speeds of 57600 and 115200.  Extremely
5998 # old Linux systems (pre-0.99pl15) will not support this.  If OLINUXHISPEED is
5999 # not defined, then only the standard POSIX termios methods of setting the port
6000 # speed will be used, and in this case speeds can be as high as 460800 in most
6001 # modern Linux versions.
6002 #
6003 # -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
6004 # least 0.99.14; if it causes trouble for you, remove it from the CFLAGS.
6005 #
6006 # -pipe removes the need for temp files - remove it if it causes trouble.
6007 #
6008 # -funsigned-char makes all characters unsigned, as they should have been
6009 #  in the first place.
6010 #
6011 # Add -DCK_DSYSINI if you want a shared system-wide init file.
6012 #
6013 # See http://www.columbia.edu/kermit/ckubwr.html about -DNOCOTFMC.
6014 # Better still, should read the entire Linux section of that document.
6015 #
6016 # The "linuxa" entry can be referenced directly on LIBC systems, but not
6017 # GLIBC, where -lcrypt is required.  The "make linux" entry should normally
6018 # be used for all builds on all Linux distributions unless you have special
6019 # requirements, in which case keep reading.  CK_NEWTERM added after 7.0b04
6020 # due to new complaints about ncurses changing buffering of tty.
6021
6022 linuxa:
6023         @echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later...'
6024         @echo 'IMPORTANT: Read the comments in the linux section of the'
6025         @echo 'makefile if you have trouble.'
6026         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6027         "CFLAGS = -O -DLINUX -pipe -funsigned-char -DFNFLOAT -DCK_POSIX_SIG \
6028         -DCK_NEWTERM -DTCPSOCKET -DLINUXFSSTND -DNOCOTFMC -DPOSIX \
6029         -DUSE_STRERROR $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6030         "LIBS = $(LIBS) -lm"
6031
6032 # As above but with profiling
6033 linuxp:
6034         $(MAKE) linuxa KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS) -pg" \
6035         "LIBS=-pg -lcrypt -lresolv"
6036
6037 #Linux.  This entry should work for any Linux distribution on any platform,
6038 #32-bit or 64-bit, except for extremely ancient ones.  Automatically detects:
6039 # . curses, ncurses, or no curses
6040 # . Old versus new pty handling (new == glibc 2.1++)
6041 # . Presence or absence of libcrypt.a and <crypt.h>
6042 # . Presence or absence of libresolv.a
6043 # . Transitional Long File API for 32-bit platforms (SUS V2 UNIX 98 LFS).
6044 #Note: The HAVE_PTMX test was previously "if test -c /dev/ptmx" but this was
6045 #not sufficient for Debian 2.1, because although it had /dev/ptmx, it did not
6046 #have grantpt(), unlockpt(), or ptsname(), so has been changed to look for a
6047 #grantpt() prototype in the header files.  Modified in 8.0.206 to allow for
6048 #libraries that contain .so's but no .a's, e.g. Mandrake 9.0.
6049 #HAVE_BAUDBOY added in 8.0.210 for Red Hat -- it's like AIX ttylock().
6050 #Modified 17 Aug 2005 to use openpty() if available because the other stuff
6051 #dumps core in 64-bit ia64 and x86_64 builds.
6052 #Long file support for 32-bit builds added in 8.0.212 - if features.h contains
6053 #__USE_LARGEFILE64 then we set the flags that must be set before reading any
6054 #header files; on 32-bit platforms such as i386, this produces a 32-bit build
6055 #capable of accessing, sending, receiving, and managing long (> 2GB) files.
6056 #On 64-bit platforms, it does no harm.
6057 #As of 3 March 2009 we detect automatically if we have curses, ncurses,
6058 #or no curses at all.
6059 #Added HAVE_LOCKDEV as openSuSE >= 11.3 uses ttylock directly instead of
6060 #baudboy 2010/08/23
6061 #OK: 2011/06/18
6062 linux:
6063         @if test \
6064         `grep grantpt /usr/include/*.h /usr/include/sys/*.h | wc -l` -gt 0; \
6065         then if test -c /dev/ptmx; then HAVE_PTMX='-DHAVE_PTMX'; \
6066         else HAVE_PTMX=''; fi; fi ; \
6067         if test `grep openpty /usr/include/pty.h | wc -l` -gt 0; \
6068         then HAVE_OPENPTY='-DHAVE_OPENPTY'; \
6069         else HAVE_OPENPTY=''; fi ; \
6070         HAVE_LIBCURSES=''; \
6071         if test -f /usr/lib64/libncurses.so || \
6072            test -f /usr/lib/libncurses.a  || \
6073            test -f /usr/lib/libncurses.so; then \
6074           HAVE_LIBCURSES='-lncurses'; \
6075         else if test -f /usr/lib64/libcurses.so || \
6076            test -f /usr/lib/libcurses.a || \
6077            test -f /usr/lib/libcurses.so; then \
6078              HAVE_LIBCURSES='-lcurses'; fi; fi; \
6079         HAVE_CURSES=''; \
6080         if test -n '$$HAVE_LIBCURSES'; then \
6081           if test -f /usr/include/ncurses.h; then \
6082             HAVE_CURSES='-DCK_NCURSES  -I/usr/include/ncurses'; \
6083           else if test -f /usr/include/curses.h; then \
6084             HAVE_CURSES='-DCK_CURSES'; \
6085         fi; fi; fi; \
6086         if test -f /usr/include/baudboy.h || test -f /usr/include/ttylock.h; \
6087         then HAVE_LOCKDEV='-DHAVE_LOCKDEV' ; \
6088         else HAVE_LOCKDEV='' ; fi ; \
6089         if test -f /usr/include/baudboy.h ; \
6090         then HAVE_BAUDBOY='-DHAVE_BAUDBOY' ; \
6091         else HAVE_BAUDBOY='' ; fi ; \
6092         $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6093         "KFLAGS=$$HAVE_CURSES $$HAVE_PTMX $$HAVE_LOCKDEV \
6094         $$HAVE_BAUDBOY $$HAVE_OPENPTY \
6095         `grep __USE_LARGEFILE64 /usr/include/features.h > /dev/null && \
6096         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
6097         `if test -f /usr/include/crypt.h; then echo -DHAVE_CRYPT_H; fi` \
6098         $(KFLAGS)" \
6099         "LIBS=$(LIBS) $$HAVE_LIBCURSES \
6100         `if test -n '$$HAVE_OPENPTY'; then echo -lutil; fi` \
6101         `if test -f /usr/lib64/libresolv.a || test -f /usr/lib64/libresolv.so \
6102         || test -f /usr/lib/libresolv.a || test -f /usr/lib/libresolv.so \
6103         || test -f /usr/lib/i386-linux-gnu/libresolv.a \
6104         || test -f /usr/lib/i386-linux-gnu/libresolv.so \
6105         || ls /lib/x86_64-linux-gnu/libresolv.* > /dev/null 2> /dev/null; \
6106         then echo -lresolv; fi` \
6107         `if test -f /usr/lib64/libcrypt.a || test -f /usr/lib64/libcrypt.so \
6108         || test -f /usr/lib/libcrypt.a || test -f /usr/lib/libcrypt.so \
6109         || ls /lib/x86_64-linux-gnu/libcrypt.* > /dev/null 2> /dev/null; \
6110         then echo -lcrypt; fi` \
6111         `if test -f /usr/lib64/liblockdev.a || \
6112         test -f /usr/lib64/liblockdev.so || \
6113         test -f /usr/lib/liblockdev.a || \
6114         test -f /usr/lib/liblockdev.so; \
6115         then echo -llockdev; fi`" \
6116         linuxa
6117
6118 # Linux + Shadow passwords + PAM
6119 # OK 2011/06/18
6120 linux+shadow+pam:
6121         @echo 'Making C-Kermit $(CKVER) for Linux+Shadow+PAM...'
6122         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} \
6123         KFLAGS="-DCK_SHADOW -DCK_PAM $(KFLAGS)" \
6124         "LNKFLAGS = $(LNKFLAGS)" \
6125         "LIBS = -lpam"
6126
6127 # Linux systems that have no <sys/select.h>.
6128 # (not tested in recent years, perhaps no longer needed)
6129 linuxns:
6130         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} KFLAGS=-DNO_SYS_SELECT_H
6131
6132 # Linux-script-only:
6133 # A minimum-size version for Linux that does only scripting and
6134 # serial communication -- no networks, no file transfer, no security.
6135 # OK 2011/06/18
6136 linuxso:
6137         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6138         "CFLAGS = -O -DLINUX -pipe -funsigned-char -DPOSIX -DCK_POSIX_SIG \
6139         -DLINUXFSSTND -DNOCOTFMC -DNOXFER -DNODEBUG -DNOCSETS -DNOHELP \
6140         -DNONET -DMINIDIAL -DNOSCRIPT -DNOIKSD -DNOPUSH $(KFLAGS)" \
6141         "LNKFLAGS = $(LNKFLAGS)" "LIBS = "
6142
6143 # Secure targets for Linux.  These work on RHAS4, RHEL4, and RHEL5,
6144 # unlike some of the older targets that follow.  They hook into the main Linux
6145 # target so we pick up all the other new stuff - large files, baudboy.h, the
6146 # appropriate pty interface, etc.
6147
6148 # Linux with Kerberos 5.
6149 # Use "make linux+krb5 KFLAGS=-DNO_KRB5_INIT_ETS" if necessary.
6150 #OK 2011/06/16 on Fedora 14 with:
6151 # make linux+krb5 "LIBS=$LIBS /lib/libk5crypto.so.3 /lib/libcom_err.so.2"
6152 # On RHEL5: make linux+krb5 -UCK_DES
6153 linux+krb5:
6154         @echo 'Making C-Kermit $(CKVER) for Linux with Kerberos 5...'
6155         @case `openssl version` in \
6156           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6157           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6158           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6159           *) OPENSSLOPTION="" ;; \
6160         esac; \
6161         HAVE_DES=''; \
6162         DES_LIB=''; \
6163         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6164            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6165               DES_LIB='-ldes425'; \
6166               HAVE_DES='-DCK_DES -DLIBDES'; \
6167               echo "HAVE DES"; \
6168            else echo "NO DES"; \
6169         fi; \
6170         K5CRYPTO=''; \
6171         if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6172                 K5CRYPTO='-lk5crypto'; \
6173         else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
6174                 K5CRYPTO='-lk5crypto'; \
6175         fi; fi; \
6176         COM_ERR=''; \
6177         if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6178                 COM_ERR='-lcom_err'; \
6179         fi; \
6180         GSSAPILIB='-lgssapi'; \
6181         if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6182                 GSSAPILIB='-lgssapi_krb5'; \
6183         else if ls /usr/lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6184                 GSSAPILIB='-lgssapi_krb5'; \
6185         else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6186                 if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6187                         GSSAPILIB='-lgssapi_krb5'; \
6188         fi; fi; fi; \
6189         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6190         "KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 $$OPENSSLOPTION \
6191         -DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6192         -I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6193         "LIBS = $(K5LIB) $$DES_LIB -lcrypto $$GSSAPILIB -lkrb5 \
6194         $$K5CRYPTO $$COM_ERR $(LIBS)" ; \
6195         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
6196                 echo ""; \
6197                 echo "If build failed try:"; \
6198                 echo ""; \
6199                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
6200                 echo ""; \
6201         fi
6202
6203 # Linux with Kerberos 5 and Kerberos 4.
6204 # Use "make linux+krb5 KFLAGS=-DNO_KRB5_INIT_ETS" if necessary.
6205 # Add "KFLAGS=-UCK_DES" if failure messages look DES-related.
6206 # UNTESTED (because I can't find a box with Krb4 and Krb5 installed)
6207 linux+krb5+krb4:
6208         @echo 'Making C-Kermit for Linux with Kerberos 4 and Kerberos 5'
6209         $(MAKE) linux+krb5 KTARGET=$${KTARGET:-$(@)} \
6210         "KFLAGS=-DKRB4 -DKRB524 $(KFLAGS)" "LIBS=$(LIBS) -lkrb4"
6211
6212 # Linux with OpenSSL 
6213 # In Linux, SSL libs are often in /lib or /usr/lib and so found by default.
6214 # This targets takes into account the DES library might or might not
6215 # exist.  If it does exist, however, the target will require some editing
6216 # if its basename is not libdes425.  - fdc Tue Sep 21 14:28:00 2010
6217 # IMPORTANT: Some Linux platforms have DES libraries but they are missing
6218 # functions used by Kermit.  In that case you will get fatal errors at
6219 # link time involving routines such as des_ecb3_encrypt, des_random_seed,
6220 # and des_set_odd_parity.  In that case, "make linux KFLAGS=-UCK_DES"
6221 # There's a new warning at the end that should come out if this happens,
6222 # and that should not come out if it didn't.
6223 #
6224 linux+ssl linux+openssl linux+openssl+zlib+shadow+pam linux+openssl+shadow:
6225         @echo 'Making C-Kermit $(CKVER) for Linux+OpenSSL SSLLIB=$(SSLLIB)'
6226         @case `openssl version` in \
6227           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6228           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6229           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6230           *) OPENSSLOPTION="" ;; \
6231         esac; \
6232         HAVE_DES=''; \
6233         DES_LIB=''; \
6234         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6235            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6236               DES_LIB='-ldes425'; \
6237               HAVE_DES='-DCK_DES -DLIBDES'; \
6238               echo "HAVE DES"; \
6239            else echo "NO DES"; \
6240         fi; \
6241         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6242         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
6243         -DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6244         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6245         "LIBS = $(SSLLIB) -lssl $$DES_LIB -lcrypto -lpam -ldl -lz $(LIBS)" ; \
6246         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
6247                 echo ""; \
6248                 echo "If build failed try:"; \
6249                 echo ""; \
6250                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
6251                 echo ""; \
6252         fi
6253
6254 # Linux with Kerberos 5 and OpenSSL
6255 # OK 2011/05/16
6256 # Add -UCK_DES if functions like des_ecb3_encrypt, es_random_seed,
6257 # come up missing at link time.
6258 linux+krb5+ssl linux+krb5+openssl:
6259         @echo 'Making C-Kermit $(CKVER) for Linux with Krb5 and OpenSSL...'
6260         @case `openssl version` in \
6261           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6262           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6263           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6264           *) OPENSSLOPTION="" ;; \
6265         esac; \
6266         HAVE_DES=''; \
6267         DES_LIB=''; \
6268         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6269            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6270               DES_LIB='-ldes425'; \
6271               HAVE_DES='-DCK_DES -DLIBDES'; \
6272               echo "HAVE DES"; \
6273            else echo "NO DES"; \
6274         fi; \
6275         K5CRYPTO=''; \
6276         if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6277                 K5CRYPTO='-lk5crypto'; \
6278         else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
6279                 K5CRYPTO='-lk5crypto'; \
6280         fi; fi; \
6281         COM_ERR=''; \
6282         if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6283                 COM_ERR='-lcom_err'; \
6284         fi; \
6285         GSSAPILIB='-lgssapi'; \
6286         if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6287                 GSSAPILIB='-lgssapi_krb5'; \
6288         else if ls /usr/lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6289                 GSSAPILIB='-lgssapi_krb5'; \
6290         else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6291                 if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6292                         GSSAPILIB='-lgssapi_krb5'; \
6293         fi; fi; fi; \
6294         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6295         "KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6296         -DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6297         -DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6298         -I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6299         "LIBS = $(K5LIB) $(SSLLIB) -lssl $$DES_LIB -lpam -lz \
6300         -lcrypto $$GSSAPILIB -lkrb5 $$K5CRYPTO $$COM_ERR $(LIBS)" ; \
6301         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
6302                 echo ""; \
6303                 echo "If build failed try:"; \
6304                 echo ""; \
6305                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
6306                 echo ""; \
6307         fi
6308
6309 # ::BEGIN_OLD_LINUX_TARGETS::
6310
6311 # The remaining Linux entries are for special or customized builds.  They have
6312 # not been generalized ("subroutinized") like the ones above.  Ideally, we
6313 # should allow for every combination of libc vs glibc, gcc vs egcs, curses vs
6314 # ncurses, Kerberos IV vs Kerberos V vs SRP (in any combination), and so on.
6315 # The best way to do this is to set KFLAGS and LIBS values and then chain to
6316 # the main "linux" target, as in the examples just above.  To skip past all of
6317 # these old targets (and there are many) search for ::END_OLD_LINUX_TARGETS::
6318 # (after this line).
6319
6320 #Sharp Zaurus SL-5500 - Linux based
6321 zsl5500:
6322         @echo 'Making C-Kermit $(CKVER) for Sharp Zaurus SL-5500...'
6323         @touch ckcpro.c
6324         @touch wart
6325         $(MAKE) linuxnc KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DZSL5500" \
6326         "CC = gcc" "CC2 = gcc"
6327
6328 #Mklinux DR3 has horrible bug in <utmpbits.h> - see ckufio.c.
6329 mklinux:
6330         $(MAKE) KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DUTMPBUG" \
6331         "LIBS=-lcrypt -lresolv" linuxa
6332
6333 #LinuxPPC 1999
6334 linuxppc:
6335         @echo 'Making C-Kermit $(CKVER) for LinuxPPC 1999...'
6336         @if test -f /usr/lib/libcrypt.a; then \
6337             if test -f /usr/lib/libresolv.a; then \
6338                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6339                 "KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6340                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6341                 "LIBS=-lncurses -lresolv -lcrypt" linuxa ; \
6342             else \
6343                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6344                 "KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6345                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6346                 "LIBS=-lncurses -lcrypt" linuxa ; \
6347             fi \
6348         else \
6349             if test -f /usr/lib/libresolv.a; then \
6350                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6351                 "KFLAGS=$(NCURSES_CPP) \
6352                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6353                 "LIBS=-lncurses -lresolv" linuxa ; \
6354             else \
6355                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6356                 "KFLAGS=$(NCURSES_CPP) \
6357                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6358                 "LIBS=-lncurses" linuxa ; \
6359             fi \
6360         fi
6361
6362
6363 # Like "make linux" but built with egcs rather than gcc.
6364 # If you get "Internal compiler error xxx, output pipe has been closed",
6365 # try removing -pipe.
6366 linuxegcs:
6367         @echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later with egcs...'
6368         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = egcs" "CC2 = egcs" \
6369         "CFLAGS = -O -DLINUX -pipe -funsigned-char \
6370         -DPOSIX -DCK_POSIX_SIG -DCK_NCURSES -DNOCOTFMC \
6371         -DTCPSOCKET -DLINUXFSSTND $(KFLAGS)" \
6372         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lncurses -lcrypt -lresolv"
6373
6374 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1 (no K4 compatibility).
6375 linux+krb5-old:
6376         @echo 'Making C-Kermit $(CKVER) for Linux on Intel with Kerberos...'
6377         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6378         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6379         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6380         -DCK_ENCRYPTION -DCK_DES -DCK_CURSES -DCK_POSIX_SIG \
6381         -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H $(K5INC) $(K5INC)/krb5 \
6382         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6383         "LIBS = $(K5LIB) -lncurses -ltermcap -ldes425 -lkrb5 \
6384         -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6385
6386 # Linux on Intel PC with SRP 1.7.4 using GNU MP, Krypto, and Eric Young's
6387 # DES library.  Remove the -DCK_DES, -DLIBDES and -ldes if you do not have
6388 # Eric Young's# libdes.a installed.
6389 #
6390 linux+srp+gmp:
6391         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6392         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6393         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6394         -DCK_AUTHENTICATION -DCK_SRP \
6395         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6396         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6397         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6398         "LIBS = $(SRPLIB) \
6399         -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto -lcrypt -lresolv"
6400
6401 linux+srp+gmp+no-des:
6402         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP ...'
6403         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6404         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6405         -DCK_AUTHENTICATION -DCK_SRP \
6406         -DCK_ENCRYPTION -DCK_CAST \
6407         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6408         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6409         "LIBS = $(SRPLIB) \
6410         -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lresolv"
6411
6412 linux+srp+gmp-export:
6413         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6414         $(MAKE) srpmit-export KTARGET=$${KTARGET:-$(@)} \
6415         "CC = gcc" "CC2 = gcc" \
6416         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6417         -DCK_AUTHENTICATION -DCK_SRP -DFNFLOAT \
6418         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6419         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6420         "LIBS = $(SRPLIB) \
6421         -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lm -lresolv"
6422
6423 linux+srp+gmp+pam:
6424         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6425         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6426         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6427         -DCK_AUTHENTICATION -DCK_SRP \
6428         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6429         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6430         -DCK_PAM -DFNFLOAT $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6431         "LIBS = $(SRPLIB) -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto \
6432         -lcrypt -lpam -ldl -lm -lresolv"
6433
6434 #Linux on Intel PC with SRP 1.7.4 built with OpenSSL for Big Number Math
6435 #and Cryptographic functionality.
6436 #
6437 linux+srp:
6438         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6439         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6440         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6441         -DCK_AUTHENTICATION -DCK_SRP \
6442         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6443         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6444         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6445         "LIBS = $(SRPLIB) $(SSLLIB) \
6446         -lncurses -ltermcap -lsrp -lkrypto -lcrypto -lcrypt -lresolv"
6447
6448 linux+srp+pam:
6449         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6450         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6451         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6452         -DCK_AUTHENTICATION -DCK_SRP \
6453         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6454         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6455         -DCK_PAM -DFNFLOAT $(SRPINC) $(SSLINC) $(KFLAGS)" \
6456         "LNKFLAGS = $(LNKFLAGS)" \
6457         "LIBS = $(SRPLIB) $(SSLLIB) -lncurses -ltermcap -lsrp -lkrypto \
6458         -lcrypto -lcrypt -lpam -ldl -lm -lresolv"
6459
6460 #Linux on Intel PC with SRP and SSL/TLS.
6461 #
6462 # libsrp.a should be build with OpenSSL
6463 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6464 #Remove -ltermcap if it causes trouble e.g. in Debian 2.2.
6465 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6466 linux+srp+openssl:
6467         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6468         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6469         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6470         -DCK_AUTHENTICATION -DCK_SRP \
6471         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6472         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6473         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6474         "LIBS = $(SRPLIB) $(SSLLIB) \
6475         -lncurses -ltermcap -lsrp -lssl -lkrypto -lcrypto \
6476         -lcrypt -lresolv"
6477
6478 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2 and SRP.
6479 #
6480 # libsrp.a should be build with GNU MP (libgmp.a)
6481 # instead of AT&T CryptoLib (libcrypt.a) due to naming conflicts with
6482 # standard distribution Linux libraries.
6483 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6484 linux+krb5+krb4+srp:
6485         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB54+SRP...'
6486         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6487         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6488         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6489         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6490         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6491         $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6492         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6493         "LIBS = $(K5LIB) $(SRPLIB) \
6494         -lncurses -ltermcap -lsrp -lgmp -lgssapi_krb5 -lkrypto \
6495         -ldes -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv"
6496
6497 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6498 #
6499 # libsrp.a should be build with OpenSSL
6500 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6501 # Requires OpenSSL 0.9.6a or higher
6502 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6503 linux+krb5+krb4+srp+openssl:
6504         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6505         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6506         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6507         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6508         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6509         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6510         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6511         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6512         "LIBS = $(K5LIB) $(SRPLIB) $(SSLLIB) \
6513         -lncurses -ltermcap -lsrp \
6514         -lkrb4 -lssl -lkrypto -lcrypto \
6515         -lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6516
6517 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SSL/TLS.
6518 #
6519 # libsrp.a should be build with OpenSSL
6520 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6521 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6522 linux+krb5+krb4+openssl:
6523         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6524         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6525         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6526         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6527         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6528         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6529         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6530         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6531         "LIBS = $(K5LIB) $(SSLLIB) \
6532         -lncurses -ltermcap \
6533         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6534         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6535
6536 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SSL/TLS.
6537 #
6538 # libsrp.a should be build with OpenSSL
6539 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6540 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6541 linux+krb5+krb4+openssl+shadow:
6542         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6543         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6544         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6545         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6546         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6547         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6548         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6549         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6550         "LIBS = $(K5LIB) $(SSLLIB)  \
6551         -lncurses -ltermcap \
6552         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6553         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6554
6555 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2, SSL/TLS.
6556 #
6557 # libsrp.a should be build with OpenSSL
6558 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6559 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6560 linux+krb5+krb4+openssl+zlib+shadow:
6561         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6562         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6563         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6564         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 -DZLIB \
6565         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6566         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6567         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6568         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6569         "LIBS = $(K5LIB) $(SSLLIB) \
6570         -lncurses -ltermcap \
6571         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6572         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lz"
6573
6574 linux+krb5+krb4+srp-export:
6575         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6576         $(MAKE) xermit-export KTARGET=$${KTARGET:-$(@)} \
6577         "CC = gcc" "CC2 = gcc" \
6578         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6579         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6580         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6581         $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6582         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6583         "LIBS = $(SRPLIB) $(K5LIB) \
6584         -lncurses -ltermcap -lsrp -lgmp -lkrb4 -ldes425 -lkrb5 -lgssapi_krb5 \
6585         -lcom_err -lk5crypto -lkrypto -lcrypt -lresolv"
6586
6587 linux+krb5+krb4+srp+pam:
6588         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6589         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6590         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6591         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6592         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6593         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6594         -DCK_PAM $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6595         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6596         "LIBS = $(SRPLIB) $(K5LIB) \
6597         -lncurses -ltermcap -lsrp -lgmp -ldes -lkrb4 -ldes425 -lkrb5 \
6598         -lcom_err -lk5crypto -lgssapi_krb5 -lkrypto -lcrypt -lpam -ldl \
6599         -lresolv"
6600
6601 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6602 # and PAM.
6603 #
6604 # libsrp.a should be build with OpenSSL
6605 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6606 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6607 linux+krb5+krb4+srp+openssl+pam-debug:
6608         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6609         $(MAKE) xermit-debug KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6610         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6611         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6612         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6613         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6614         -w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG $(K5INC) $(K5INC)/krb5 \
6615         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6616         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6617         -lncurses -ltermcap -lsrp -lkrb4 -lssl -lkrypto -lcrypto \
6618         -lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lpam -ldl"
6619
6620 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SRP and SSL/TLS.
6621 # and PAM.
6622 #
6623 # libsrp.a should be build with OpenSSL
6624 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6625 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6626 linux+krb5+krb4+srp+openssl+pam:
6627         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6628         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6629         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6630         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6631         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6632         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6633         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6634         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6635         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB)  \
6636         -lm -lncurses -ltermcap -lsrp \
6637         -lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6638         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6639
6640 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6641 # with ZLIB and PAM
6642 #
6643 # libsrp.a should be build with OpenSSL
6644 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6645 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6646 linux+krb5+krb4+srp+openssl+zlib+pam:
6647         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6648         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6649         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6650         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6651         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6652         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6653         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6654         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6655         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6656         -lm -lncurses -ltermcap -lsrp \
6657         -lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6658         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6659
6660 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6661 # with ZLIB, Shadow Passwords, and PAM
6662 #
6663 # libsrp.a should be build with OpenSSL
6664 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6665 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6666 linux+krb5+krb4+srp+openssl+zlib+shadow+pam:
6667         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6668         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6669         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6670         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6671         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6672         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6673         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6674         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6675         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6676         -lm -lncurses -ltermcap -lsrp -lkrypto \
6677         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6678         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6679
6680 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6681 # with Shadow Passwords, PAM
6682 #
6683 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6684 linux+krb5+krb4+openssl+shadow+pam:
6685         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL,...'
6686         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6687         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6688         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6689         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6690         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6691         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6692         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6693         "LIBS = $(K5LIB) $(SSLLIB) \
6694         -lm -lncurses -ltermcap \
6695         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6696         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6697
6698 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6699 # with ZLIB, Shadow Passwords, PAM
6700 #
6701 # libsrp.a should be build with OpenSSL
6702 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6703 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6704 linux+krb5+krb4+openssl+zlib+shadow+pam:
6705         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6706         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6707         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6708         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6709         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6710         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6711         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6712         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6713         "LIBS = $(K5LIB) $(SSLLIB) \
6714         -lm -lncurses -ltermcap \
6715         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6716         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6717
6718 #Red Hat 9 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6719 #Also works around bug in curses in which terminal goes dead after
6720 #returning from file-transfer display.  Assumes OpenSSL 0.9.7 or later.
6721 redhat9:
6722         @echo "Building SECURE Kermit for Red Hat 9.0..."
6723         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6724         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6725
6726 #Ditto plus SRP (which is not normally included with RH Linux).
6727 redhat9+srp:
6728         @echo "Building SECURE Kermit for Red Hat 9.0..."
6729         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6730         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6731
6732 #For Red Hat AS 2.1 with OpenSSL
6733 redhat21+ssl:
6734         @echo "Building SECURE Kermit for Red Hat 2.1..."
6735         $(MAKE) linux+openssl+zlib+shadow+pam \
6736         KTARGET=$${KTARGET:-$(@)} "KFLAGS =  $(KFLAGS)"
6737
6738 #Red Hat Linux 8.0 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6739 #Also works around bug in curses in which terminal goes dead after
6740 #returning from file-transfer display.
6741 redhat80:
6742         @echo "Building SECURE Kermit for Red Hat 8.0..."
6743         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6744         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6745
6746 redhat80+srp:
6747         @echo "Building SECURE Kermit for Red Hat 8.0..."
6748         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6749         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6750
6751 #Red Hat Linux 7.3 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6752 #Also works around bug in curses in which terminal goes dead after
6753 #returning from file-transfer display.
6754 redhat73:
6755         @echo "Building SECURE Kermit for Red Hat 7.3..."
6756         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6757         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6758
6759 redhat73+srp:
6760         @echo "Building SECURE Kermit for Red Hat 7.3..."
6761         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6762         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6763
6764 #Red Hat Linux 7.2 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6765 #Also works around bug in curses in which terminal goes dead after
6766 #returning from file-transfer display.
6767 redhat72:
6768         @echo "Building SECURE Kermit for Red Hat 7.2..."
6769         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6770         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6771
6772 redhat72+srp:
6773         @echo "Building SECURE Kermit for Red Hat 7.2..."
6774         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6775         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6776
6777 #Red Hat Linux 7.1 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6778 #Also works around bug in curses in which terminal goes dead after
6779 #returning from file-transfer display.
6780 redhat71:
6781         @echo "Building SECURE Kermit for Red Hat 7.1..."
6782         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6783         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6784
6785 redhat71+srp:
6786         @echo "Building SECURE Kermit for Red Hat 7.1..."
6787         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6788         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6789
6790 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6791 # with ZLIB and PAM and Shadow passwords
6792 linux+krb5+openssl+zlib+shadow+pam:
6793         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB5,SSL...'
6794         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6795         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6796         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DCK_SHADOW -DHAVE_PTMX \
6797         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6798         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6799         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6800         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6801         "LIBS = $(K5LIB) $(SSLLIB) \
6802         -lm -lncurses -ltermcap -lssl -lcrypto -lgssapi_krb5 \
6803         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6804
6805 linuxnotcp:
6806         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DNONET $(KFLAGS)"
6807
6808 # "make linuxnotcp" with lcc (see http://www.cs.princeton.edu/software/lcc)
6809 # lcc does not understand various gcc extensions:
6810 #  "__inline__" -- can be eliminated by adding "-D__inline__="
6811 #  "__asm__ and "long long" -- in header files, should be surrounded by
6812 #                              "#ifndef(__STRICT_ANSI__)"/"#endif"
6813 #  however, TCP requires some __asm__ functions, so cannot be compiled
6814 linuxnotcp-lcc:
6815         @echo 'Making C-Kermit $(CKVER) for Linux with lcc ...'
6816         @echo 'Read comments in makefile for additional information.'
6817         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = lcc" "CC2 = lcc" \
6818         "CFLAGS = -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG \
6819         -UTCPSOCKET -DLINUXFSSTND -DNOLEARN $(KFLAGS)" \
6820         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6821
6822 # Linux 0.99.14 thru 1.0 with gcc, dynamic libraries, curses, TCP/IP.
6823 # For Linux 1.2 or later, use "make linux" (above).
6824 #
6825 # -DLINUXFSSTND (Linux File System Standard) gives UUCP lockfile /var/lock with
6826 # string pid.  Remove this and get /usr/spool/uucp with int pid, which was used
6827 # in early Linux versions.
6828 #
6829 # If you get compiler errors regarding <linux/serial.h>, add -DNOHISPEED.
6830 #
6831 # -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
6832 # least 0.99.14; if it causes trouble for you, just remove it.
6833 #
6834 # -DCK_CURSES: Here we link with the regular curses library.  But you should
6835 # be using ncurses.  Internally, the ckuusx.c module includes <curses.h>, but
6836 # this really should be <ncurses.h>.  Thus if you have the new curses
6837 # material, you should either install it with the standard names, or else
6838 # create symbolic links from the standard names to the new ones.  If you get
6839 # compile-time errors complaining about data definitions in termcap.h, it
6840 # means you have new kernel material mixed with older libc header files.  To
6841 # fix, add "#include <termios.h>" to the <termcap.h> file.  Or if all this is
6842 # too confusing, create a new makefile entry based on this one, but with
6843 # -DCK_CURSES removed from CFLAGS and the entire LIBS= clause removed.
6844 #
6845 # But wait, there's more.  On most Linux systems, -ltermcap must be included
6846 # in LIBS.  But on others, the linker complains that libtermcap can't be
6847 # found.  In that case, try removing -ltermcap from LIBS=.
6848 #
6849 # But wait, there's more.  The format of the PID string in the UUCP lockfile
6850 # changed between Linux FSSTND 1.0 and 1.2.  In the earlier standard, it had
6851 # leading zeros; in the second, it has leading spaces.  By default this entry
6852 # uses the newer standard.  To force the older one, add -DFSSTND10.
6853 #
6854 # "The nice thing about the Linux standard is there are so many to choose from"
6855 #
6856 # NOTE: Remove -DBIGBUFOK for small-memory or limited-resource systems.
6857 linux10:
6858         @echo 'Making C-Kermit $(CKVER) for Linux 1.0 or earlier...'
6859         @echo 'IMPORTANT: Read the comments in the linux section of the'
6860         @echo 'makefile if you get compilation or link errors.'
6861         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6862         "CFLAGS = -O -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DLINUX \
6863         -DTCPSOCKET -DLINUXFSSTND -DOLINUXHISPEED -DNOLEARN $(KFLAGS)" \
6864         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6865
6866 #This version was used for Linux prior to C-Kermit 6.0.192.
6867 #Now the "Linux File System Standard" is considered standard, ditto TCP/IP.
6868 linuxold:
6869         @echo 'Making C-Kermit $(CKVER) for Linux...'
6870         @echo 'For FSSTND-recommended UUCP lockfiles, use:'
6871         @echo '  make linux "KFLAGS=-DLINUXFSSTND".'
6872         @echo 'Read comments in makefile for additional options.'
6873         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6874         "CFLAGS = -O -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DNOLEARN \
6875         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6876
6877 # ::END_OLD_LINUX_TARGETS::
6878
6879 # LynxOS 2.2 with GCC compiler, TCP/IP and fullscreen display.
6880 # Probably also works with Lynx 2.1, and maybe even Lynx 2.0.
6881 # -X means use termios serial drivers rather than BSD4.3-style sgtty drivers.
6882 # If you have trouble with this, try "make bsd KFLAGS=-DNOFDZERO".
6883 lynx:
6884         @echo 'Making C-Kermit $(CKVER) for LynxOS 2.2 with TCP/IP'
6885         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6886         "CFLAGS= -O -DPOSIX -DDIRENT -DSETREUID -DCK_CURSES -DTCPSOCKET \
6887         -DCK_ANSIC -DLYNXOS -DNOLEARN" "LNKFLAGS = -X" "LIBS = -lcurses -lbsd"
6888
6889 lynx22:
6890         $(MAKE) lynx KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
6891
6892 # LynxOS 2.1 with GCC compiler 1.40 and TCP/IP.
6893 lynx21:
6894         @echo 'Making C-Kermit $(CKVER) for LynxOS 2.1 with TCP/IP'
6895         $(MAKE) kermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6896         "CFLAGS= -O -DSETREUID -DTCPSOCKET -DCK_ANSIC -DBSD4 -DLYNXOS" \
6897         "LIBS = -lbsd"
6898
6899 #SCO Xenix 2.2.1 for IBM PC, XT, PS2/30, or other 8088 or 8086 machine
6900 #Should this not work, try some of the tricks from sco286.
6901 #NOTE: -DRENAME is omitted for early SCO Xenix releases because it didn't
6902 #exist, or its semantics were different from the later POSIX-compliant
6903 #version of rename().
6904 sco86:
6905         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/86...'
6906         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6907         "CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOUNICODE -DNOLEARN \
6908         $(KFLAGS) -Dunix -F 3000 -i -M0me" \
6909         "LNKFLAGS = -F 3000 -i -s -M0me" "LIBS = -lx"
6910
6911 #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
6912 #Reportedly, this "make" can fail simply because of the size of this
6913 #makefile.  If that happens, use "makeL", or edit out some of the
6914 #other entries.  No debugging or character-set translation.
6915 sco286:
6916         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/286...'
6917         @echo 'If make fails, try using makeL.'
6918         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6919         "CFLAGS= -xenix -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
6920         -DNOIKSD -DNODEBUG -DNOTLOG -DNOCSETS -DNOLEARN \
6921         $(KFLAGS) -F 3000 -i -M2let16" \
6922         "LIBS = -lx" "LNKFLAGS = -xenix -s -O -LARGE -F 3000 -i -M2let16"
6923
6924 #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
6925 #As above, but with HDBUUCP (This one might need fixing -- see sco286).
6926 sco286hdb:
6927         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/286 with HDB UUCP...'
6928         @echo 'If make fails, try using makeL.'
6929         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6930         "CFLAGS= -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
6931         -DHDBUUCP -DNOIKSD -DNOUNICODE -DNOLEARN \
6932         $(KFLAGS) -F 3000 -i -M2let32" \
6933         "LIBS = -lx" "LNKFLAGS = -s -O -LARGE -F 3000 -i -M2let32"
6934
6935 #SCO Xenix/386 2.2.2 and 2.2.3
6936 sco386:
6937         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.2...'
6938         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6939         "CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOREDIRECT -DNOLEARN \
6940         -Dunix -DRDCHK -DNAP -DNOUNICODE $(KFLAGS) -Otcl -M3e" \
6941         "LNKFLAGS = -s" "LIBS = -lx"
6942
6943 #SCO XENIX/386 2.2.3 with Excelan TCP/IP + curses.
6944 # NOTE: This one might need some work in C-Kermit 6.0.
6945 # You might need to include /usr/include/sys/types.h
6946 # containing "typedef char *caddr_t;".  Then at least it compiles.
6947 sco386netc:
6948         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.3 + Excelan TCP'
6949         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6950         "CFLAGS= -I/usr/include/exos -DXENIX -DCK_CURSES -DNOUNICODE \
6951         -Dunix -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC -DNOMKDIR -DNOFILEH \
6952         -DNOLEARN -DNOREDIRECT -DNOIKSD -DNO_DNS_SRV $(KFLAGS) -Otcl -M3e" \
6953         "LNKFLAGS = -s" "LIBS = -lc -lx -lsocket -lcurses -ltermcap"
6954
6955 #SCO XENIX/386 2.3.3 with gcc 1.37 or later...
6956 sco386gcc:
6957         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
6958         @echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
6959         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6960         "CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
6961         -DNOJC -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) \
6962         -traditional -fpcc-struct-return -fstrength-reduce \
6963         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
6964         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
6965         -DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD -DNOREDIRECT \
6966         -DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx"
6967
6968 #As above, but with curses...
6969 sco386gccc:
6970         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
6971         @echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
6972         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6973         "CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
6974         -DNOJC -DNODEBUG -DCK_CURSES -DNOUNICODE -DNOLEARN $(KFLAGS) \
6975         -traditional -fpcc-struct-return -fstrength-reduce \
6976         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DNOREDIRECT \
6977         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
6978         -DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD \
6979         -DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx -lcurses -ltermlib"
6980
6981 #SCO UNIX (and ODT) entries...
6982 #
6983 #NOTE: All SCO UNIX entry LIBS should have "-lc_s -lc -lx" IN THAT ORDER (if
6984 #shared C library is desired), or else "-lc -lx" IN THAT ORDER.  Use shared C
6985 #libraries to save memory, but then don't expect to run the resulting binary
6986 #on a different machine.  When using -lc_s, you must also use -lc, because the
6987 #shared C library does not contain all of libc.a.  And in all cases, -lc must
6988 #ALWAYS precede -lx.
6989 #
6990 #ANOTHER NOTE: -DRENAME is included in all SCO UNIX entries.  Remove it if it
6991 #causes trouble.  No harm is done by removing it (see ckuins.txt).
6992 #
6993 #AND ANOTHER: In theory, it should be possible to run SCO UNIX binaries on
6994 #SCO Xenix 2.3 and later.  In practice, this might not work because of the
6995 #libraries, etc.  Also, don't add the -link -z switch (which is supposed to
6996 #root out references to null pointers) because it makes UNIX binaries core
6997 #dump when they are run under Xenix.
6998
6999 #NOTE: -Otcl removed and replaced by -O, since -Otcl produced incorrect code.
7000 #SCO UNIX/386 3.2.0, 3.2.1, and SCO Xenix 2.3.x
7001 sco3r2:
7002         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.0 or 3.2.1 ...'
7003         @echo 'Warning: If make blows up, edit the makefile to join'
7004         @echo 'the following three continued lines into one line.'
7005         @echo 'Also, remove -DRENAME if _rename unresolved at link time.'
7006         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7007         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7008         -DRENAME -DNOIKSD -DNOJC $(KFLAGS) -O" \
7009         "LNKFLAGS = -s" "LIBS = -lc -lx"
7010
7011 #SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7012 #In case of compilation or runtime problems, try adding
7013 #"-DUID_T=int -DGID_T=int" to the CFLAGS.  If that doesn't work, try
7014 #"-DUID_T=uid_t -DGID_T=gid_t".
7015 sco3r2net:
7016         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan...'
7017         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7018         "CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7019         -DHDBUUCP -DRDCHK -DNAP -DRENAME -DTCPSOCKET -DEXCELAN -DNOJC \
7020         -DNOIKSD -DNOREDIRECT $(KFLAGS) -O" \
7021         "LNKFLAGS = -s" "LIBS = -lc -lx -lsocket"
7022
7023 #SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7024 #As above, with curses added.
7025 sco3r2netc:
7026         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan / curses...'
7027         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7028         "CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7029         -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC $(KFLAGS) \
7030         -DRENAME -DCK_CURSES -DNOREDIRECT -DNOIKSD -O" "LNKFLAGS = -s" \
7031         "LIBS = -lc -lx -lsocket -lcurses -ltermcap"
7032
7033 #SCO UNIX 3.2.x or SCO Xenix 2.3.x with Racal InterLan TCP/IP support
7034 # Extra compile flags for other version of Racal InterLan TCP/IP:
7035 # Xenix286/NP621-286, use -Ml -DPARAMH -DINTERLAN -Di286 -DSYSV
7036 # Xenix386/NP621-386, use -DPARAMH -DINTERLAN -Di386 -DSYSV
7037 # ISC386ix/NP622I, use -DSYSV -Di386
7038 # SCO Unix3.2/NP622S, use -DSYSV -Di386 -DSCO_UNIX
7039 # AT&T SVR3.2/NP622A, use -DSYSV -Di386 -DATT
7040 sco3r2netri:
7041         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Racal InterLan...'
7042         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7043         "CFLAGS= -I/usr/include/interlan -DXENIX -DNOFILEH -DHDBUUCP \
7044         -DSVR3 -DRDCHK -DNAP -DTCPSOCKET -DPARAMH -DINTERLAN -Di386 -DSYSV \
7045         -DRENAME -DNOREDIRECT -DNOIKSD -DNOJC -DNOLEARN $(KFLAGS) -Otcl -M3e" \
7046         "LNKFLAGS = -s" "LIBS = -lc -lx -ltcp"
7047
7048 # SCO XENIX/386 2.3.3 SysV with SCO TCP/IP
7049 # System V STREAMS TCP developed by Lachman Associates Inc and
7050 # Convergent Technologies.
7051 # -DRENAME removed since some reports indicate it is not supported
7052 # (whereas others say it is.)
7053 sco3r2lai:
7054         @echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7055         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7056         "CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7057         -DNAP -DTCPSOCKET -DPWID_T=int -DNOREDIRECT -DNOIKSD -DNOLEARN \
7058         $(KFLAGS) -Otcl -i -M3e" \
7059         "LNKFLAGS = -i -s" "LIBS = -lc -lx -lsocket"
7060
7061 sco3r2laic:
7062         @echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7063         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7064         "CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7065         -DNAP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES -DM_TERMINFO -DNOLEARN \
7066         -DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) -Otcl -i -M3e" \
7067         "LNKFLAGS = -i -s" "LIBS = -ltinfo -lc -lx -lsocket"
7068
7069 #SCO UNIX/386 3.2v2 (POSIX job control), shared libraries.
7070 sco3r22:
7071         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7072         make wermit KTARGET=$${KTARGET:-$(@)} \
7073         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7074         -DNAP -DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOIKSD \
7075         -DNOREDIRECT $(KFLAGS) -O" \
7076         "LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7077
7078 #SCO UNIX/386 3.2v2, POSIX job control, fullscreen file transfer display,
7079 #dynamic memory allocation, shared C library
7080 sco3r22c:
7081         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7082         @echo 'Warning: If make blows up, edit the makefile to join'
7083         @echo 'the following four continued lines into one line.'
7084         make wermit KTARGET=$${KTARGET:-$(@)} \
7085         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7086         -DCK_CURSES -DDIRENT -DRENAME -DNOREDIRECT -DNOIKSD \
7087         -DPID_T=pid_t -DPWID_T=int $(KFLAGS) -O" \
7088         "LNKFLAGS = -s" "LIBS = -lcurses -lc_s -lc -lx"
7089
7090 #SCO UNIX/386 3.2v2 with gcc 1.40 or later (POSIX job control)
7091 sco3r22gcc:
7092         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2, gcc'
7093         @echo 'Warning: If make blows up, edit the makefile to join'
7094         @echo 'the following seven continued lines into one line.'
7095         make wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" \
7096         "CFLAGS= -O -DPOSIX -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
7097         -DNOLEARN -DRENAME -traditional -fpcc-struct-return -fstrength-reduce \
7098         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
7099         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7100         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7101         -DPID_T=pid_t -DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) " \
7102         "LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7103
7104 #SCO UNIX/386 3.2v2 (ODT 1.1) (POSIX job control) with SCO TCP/IP, shared libs
7105 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7106 sco3r22net:
7107         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.2 + TCP/IP...'
7108         @echo 'Warning: If make blows up, edit the makefile to join'
7109         @echo 'the following three continued lines into one line.'
7110         make xermit KTARGET=$${KTARGET:-$(@)} \
7111         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET \
7112         -DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOREDIRECT -DNOIKSD \
7113         $(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lsocket -lc_s -lc -lx"
7114
7115 #As above, but with curses for fullscreen file transfer display.
7116 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7117 sco3r22netc:
7118         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 + TCP/IP...'
7119         @echo 'Warning: If make blows up, edit the makefile to join'
7120         @echo 'the following three continued lines into one line.'
7121         make xermit KTARGET=$${KTARGET:-$(@)} "CFLAGS= \
7122         -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DRENAME \
7123         -DCK_CURSES -DDIRENT -DNOIKSD -DNOREDIRECT \
7124         -DPID_T=pid_t -DPWID_T=int -O $(KFLAGS)" \
7125         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7126
7127 #SCO XENIX 2.3.4, no curses, no TCP/IP, no IKSD.
7128 #This one built and tested in C-Kermit 7.0.
7129 #lcfp is C library floating-point support.
7130 #Use -M3 to generate 32-bit i386 code instead of 16-bit segmented i286 code.
7131 #Use -Me to enable MS nonstandard keywords in system headers.
7132 #Use -W2 or W3 to increase the warning level.
7133 #OK: 2011/06/15
7134 sco234:
7135         @echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4...'
7136         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7137         "CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7138         -DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7139         -DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DSCO234 -DDCLGETCWD $(KFLAGS) \
7140         -Otcl" "LNKFLAGS = -s" "LIBS = -lcfp -lc -lx"
7141
7142 #SCO XENIX 2.3.4, no TCP/IP, no IKSD, but with curses.
7143 # Built and tested in C-Kermit 7.0.
7144 # Note: XENIX 2.3.4 does not have newterm() so no point in adding -DCK_NEWTERM.
7145 sco234c:
7146         @echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4 + curses...'
7147         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7148         "CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7149         -DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7150         -DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DCK_CURSES -DSCO234 \
7151         -DDCLGETCWD $(KFLAGS) -Otcl" \
7152         "LNKFLAGS = -s" "LIBS = -lcfp -lc -ltinfo -lx"
7153
7154 #SCO XENIX 2.3.4 with SCO TCP/IP and curses, no IKSD.
7155 # Built and tested in C-Kermit 7.0.  TCP/IP works and curses works.
7156 # Previous versions of this target included -lmalloc, but this caused "error:
7157 # " _calloc : symbol defined more than once" at link time so I removed it.
7158 # Results are likely to vary depending on exactly which version of the SDK
7159 # and TCP/IP SDK you have.
7160 sco234netc:
7161         @echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4 + TCP + curses...'
7162         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7163         "CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7164         -DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7165         -DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DCK_CURSES -DSCO234 \
7166         -DDCLGETCWD -DTCPSOCKET -DNO_DNS_SRV $(KFLAGS) -Otcl" \
7167         "LNKFLAGS = -s" "LIBS = -ltinfo -lsocket -lcfp -lc -lx"
7168
7169 # SCO 3.2v4.x targets...
7170
7171 #  NOTE: Add -DDCLPOPEN and/or -DDCLFDOPEN to anySCO 3.2v4.x non-gcc entries
7172 #  that complain about fdopen() or popen() at compile time.  They compile OK
7173 #  without these flags as of July 1999.  However, the gcc entries seem to
7174 #  need them, at least for gcc 2.7.2.2.
7175
7176 #  NOTE 2: To enable IKSD support, add:
7177 #  -DCK_LOGIN -DNOGETUSERSHELL -DNOINITGROUPS
7178 #  to CFLAGS (not tested).
7179
7180 #SCO UNIX/386 3.2v4 (POSIX job control), curses, ANSI C compilation,
7181 #<dirent.h> (EAFS) file system.  Remove -lmalloc if it causes trouble.  It was
7182 #put there to avoid core dumps caused by regular libc.a malloc.  Add -J to make
7183 #all chars unsigned.  This version uses select() for CONNECT and also has
7184 #high-precision timers and so might not work on non-TCP systems, in which case
7185 #sco32v4ns should be used instead.
7186 # If you get _ftime redefinition_ complaint, try adding -DODT30 to CFLAGS.
7187 sco32v4:
7188         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7189         make xermit KTARGET=$${KTARGET:-$(@)} \
7190         "CFLAGS= -DCK_SCO32V4 -DNOFILEH -DHDBUUCP -DCK_CURSES -DM_TERMINFO \
7191         -DNOANSI -DSELECT -DNOIKSD -DDCLGETCWD -NOLSTAT \
7192         -DNOLINKBITS -DDCLGETCWD $(KFLAGS) -O" \
7193         "LNKFLAGS = -s" "LIBS = -lcurses -lmalloc -lsocket -lc_s -lc -lx"
7194
7195 # As above, but with no dependence on sockets library or select().
7196 sco32v4ns:
7197         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7198         @echo 'No select() and no sockets library.'
7199         make wermit KTARGET=$${KTARGET:-$(@)} \
7200         "CFLAGS= -DCK_SCO32V4 -DNOFILEH -DHDBUUCP -DCK_CURSES -DM_TERMINFO \
7201         -DNOANSI -DNOIKSD -DNOGFTIMER -DCK_POLL -DNAP -DDCLGETCWD -DNOLSTAT \
7202         -DNOLINKBITS -DDCLGETCWD -DNOLEARN -O $(KFLAGS)" \
7203         "LNKFLAGS = -s" "LIBS = -lcurses -lmalloc -lc_s -lc -lx"
7204
7205 #SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7206 #<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7207 #Reportedly it's OK to add -DCK_REDIR and -DCK_WREFRESH, and to remove -lc_s.
7208 #Requires SCO TCP/IP development system or ODT for telnet.h, etc.
7209 #See sco32v4 above for additional comments.
7210 #NOTE: No more room for -Dxxx -- 25 seems to be the limit.  Move some to
7211 #ckcdeb.h or somewhere...
7212 sco32v4net:
7213         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7214         @echo 'If you get _ftime redefinition_ complaint,'
7215         @echo 'use make sco-odt30.'
7216         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7217         "CFLAGS= -DNOFILEH -DHDBUUCP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES \
7218         -DNAP -DCK_WREFRESH -DNOLINKBITS -D_IBCS2 -DSELECT -DNOLSTAT \
7219         -DDCLGETCWD -DCK_SCO32V4 -DNOIKSD -O \
7220         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS) -s" \
7221         "LIBS = $(LIBS) -lcurses -lsocket -lmalloc -lsocket -lc_s -lc -lx"
7222
7223 #SCO UNIX/386 3.2v4 with gcc 1.40 or later, POSIX job control.
7224 #Also see comments in sco32r4 entry.
7225 sco32v4gcc:
7226         make xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" \
7227         "CFLAGS= -O -DNOFILEH -DHDBUUCP -DNOANSI -DCK_CURSES -DM_TERMINFO \
7228         -traditional -fpcc-struct-return -fstrength-reduce -funsigned-char \
7229         -D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLINKBITS \
7230         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DSELECT -DNOLSTAT \
7231         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 -DDCLGETCWD \
7232         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7233         -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) " \
7234         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7235
7236 #SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7237 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7238 #<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7239 #gcc 1.40 or later.  Also see comments in sco32r4 entry.
7240 sco32v4netgcc:
7241         make xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2=gcc" \
7242         "CFLAGS= -O2 -DNOFILEH -DHDBUUCP -DSELECT -DNOLSTAT \
7243         -DNOANSI -DTCPSOCKET -DCK_CURSES -DM_TERMINFO \
7244         -D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLINKBITS \
7245         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DDCLGETCWD \
7246         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7247         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7248         -DDCLPOPEN -DDCLFDOPEN $(KFLAGS)" \
7249         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7250
7251 #As above but with bgcc BOUNDS CHECKING (for developers only).  -lcheck has
7252 #bounds-checking replacements for malloc, memcpy, bcopy, etc, so must come
7253 #before -lsocket and -lc.
7254 sco32v4netbgcc:
7255         make xermit KTARGET=$${KTARGET:-$(@)} \
7256         "CC = bgcc -pipe -m386" "CC2=bgcc -pipe -m386" \
7257         "CFLAGS= -O1 -g -DNOFILEH -DHDBUUCP -DSELECT \
7258         -DNOANSI -DTCPSOCKET -DCK_CURSES -DM_TERMINFO \
7259         -D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLSTAT \
7260         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DNOLINKBITS \
7261         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 -DDCLGETCWD \
7262         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7263         -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) " \
7264         "LNKFLAGS = -g" "LIBS = -lcurses -lcheck -lsocket -lx"
7265
7266 sco32v4netnd:
7267         @echo sco32v4net with no debug
7268         $(MAKE) "MAKE=$(MAKE)" sco32v4net KTARGET=$${KTARGET:-$(@)} \
7269         "KFLAGS=$(KFLAGS) -DNODEBUG -DNOTLOG" "LIBS=$(LIBS)"
7270
7271 sco3r2netnd:
7272         @echo sco32v4netnd built for SCO XENIX 2.3 under SCO UNIX...
7273         @echo   requires copying /lib/386/Slibc.a to /lib/386/Slibc_s.a and
7274         @echo   getting /lib/386/Slibsocket.a from a XENIX devkit.
7275         @echo   WARNING: poll/CK_POLL supported only on XENIX 2.3.4
7276         echo    For earlier XENIX systems, replace CK_POLL with RDCHK.
7277         $(MAKE) "MAKE=$(MAKE)" sco32v4netnd KTARGET=$${KTARGET:-$(@)} \
7278         "KFLAGS=$(KFLAGS) -x2.3 -DNORENAME -DNOSYMLINK" \
7279         "LNKFLAGS = $(LNKFLAGS) -x2.3" \
7280         "LIBS=-ldir -lcfp $(LIBS)"
7281
7282 #SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7283 #<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7284 #Reportedly it's OK to add -DCK_REDIR and -DCK_WREFRESH, and to remove -lc_s.
7285 #Requires SCO TCP/IP development system or ODT for telnet.h, etc.
7286 #See sco32v4 above for additional comments.
7287 # Note: "xermit" means use the select() version of the CONNECT module.
7288 sco32v4netx:
7289         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7290         @echo 'If you get _ftime redefinition_ complaint,'
7291         @echo 'use make sco-odt30.'
7292         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7293         "CFLAGS= -DNOFILEH -DHDBUUCP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES -DNAP \
7294         -DCK_WREFRESH -DNOLINKBITS -D_IBCS2 -DSELECT -DDCLGETCWD \
7295         -DCK_SCO32V4 -DNOIKSD -DNOLSTAT -O $(KFLAGS)" \
7296         "LNKFLAGS = $(LNKFLAGS) -s" \
7297         "LIBS = $(LIBS) -lcurses -lsocket -lmalloc -lsocket -lc_s -lc -lx"
7298
7299 sco32v4netndx:
7300         @echo sco32v4netx with no debug
7301         $(MAKE) "MAKE=$(MAKE)" sco32v4netx KTARGET=$${KTARGET:-$(@)} \
7302         "KFLAGS=$(KFLAGS) -DNODEBUG -DNOTLOG" "LIBS=$(LIBS)"
7303
7304 sco3r2netndx:
7305         @echo sco32v4netndx built for SCO XENIX 2.3 under SCO UNIX...
7306         @echo   requires copying /lib/386/Slibc.a to /lib/386/Slibc_s.a and
7307         @echo   getting /lib/386/Slibsocket.a from a XENIX devkit.
7308         @echo   WARNING: poll/CK_POLL supported only on XENIX 2.3.4
7309         echo    For earlier XENIX systems, replace CK_POLL with RDCHK.
7310         $(MAKE) "MAKE=$(MAKE)" sco32v4netndx KTARGET=$${KTARGET:-$(@)} \
7311         "KFLAGS=$(KFLAGS) -x2.3 -DNORENAME -DNOSYMLINK" \
7312         "LNKFLAGS = $(LNKFLAGS) -x2.3" \
7313         "LIBS=-ldir -lcfp $(LIBS)"
7314
7315 sco-odt30:
7316         @echo SCO ODT 3.0
7317         $(MAKE) "MAKE=$(MAKE)" sco32v4net KTARGET=$${KTARGET:-$(@)} \
7318         "KFLAGS=$(KFLAGS) -DODT30"
7319
7320 #SCO OpenServer 5.0 (SCO UNIX 3.2v5.0) with SCO development tools, no TCP/IP.
7321 #SCO OSR5 is much more like standard System V than previous SCO releases.
7322 #The SCO development tools include TCP/IP, so this target is only for creating
7323 #artificially limited versions of kermit required by site policy rather than
7324 #the operating system.  NOSYSLOG is included because syslog() requires the
7325 #sockets library.
7326 sco32v500:
7327         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5...
7328         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7329         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7330         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7331         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DNOSYSLOG \
7332         $(KFLAGS)" \
7333         "LIBS=-lcurses $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7334
7335 sco32v5:
7336         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v500
7337
7338
7339 #SCO OpenServer 5.0 with networking, SCO development tools.
7340 #Networking libraries are now provided with the OS.
7341 sco32v500net:
7342         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5...
7343         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7344         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7345         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7346         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7347         -DNO_DNS_SRV $(KFLAGS)" \
7348         "LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7349
7350 sco32v5net:
7351         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v500net
7352
7353 #SCO OpenServer 5.0 with networking and OpenSSL, SCO development tools.
7354 #Networking libraries are now provided with the OS.
7355 sco32v500net+ssl:
7356         @echo Making C-Kermit $(CKVER) for SCO OSR5 with OpenSSL...
7357         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7358         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7359         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7360         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7361         -DNO_DNS_SRV -DCK_AUTHENTICATION -DCK_SSL -DCK_TRIGGER \
7362         $(SSLINC) $(SSLLIB) $(KFLAGS)" \
7363         "LIBS=$(SSLLIB) -lcurses -lsocket -lssl -lcrypto $(LIBS)" \
7364         "LNKFLAGS=$(LNKFLAGS)"
7365
7366 #SCO OpenServer 5.0 with gcc, no networking.
7367 #Note: NOSYSLOG required for non-net entries because it requires <socket.h>
7368 sco32v500gcc:
7369         @echo Using gcc...
7370         $(MAKE) "MAKE=$(MAKE)" sco32v500CC=gcc CC2=gcc \
7371         KTARGET=$${KTARGET:-$(@)} "KFLAGS= $(KFLAGS)"
7372
7373 #SCO OpenServer 5.0 with networking, gcc.
7374 sco32v500netgcc:
7375         @echo TCP/IP networking added - using gcc...
7376         $(MAKE) "MAKE=$(MAKE)" sco32v500net CC=gcc CC2=gcc \
7377         KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
7378
7379 #SCO OpenServer 5.0 with networking, gcc, elf.
7380 sco32v500netgccelf:
7381         @echo TCP/IP networking added - using gcc, dynamic elf library
7382         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7383         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-O3 -belf" "LNKFLAGS=-belf"
7384
7385 sco32v502:
7386         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7387         "KFLAGS=-DSCO_OSR502 $(KFLAGS)"
7388
7389 #SCO OpenServer 5.0.2 with networking, SCO development tools.
7390 sco32v502net:
7391         @echo TCP/IP networking added...
7392         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7393         "KFLAGS=-b elf -DSCO_OSR502 $(KFLAGS)"
7394
7395 #SCO OpenServer 5.0.4 (SCO UNIX 3.2v5.0.4) with SCO development tools.
7396 #Like 5.0, but adds high serial speeds.  First POSIX-based SCO version.
7397 #Note: the -O flag is deliberately omitted for /bin/cc (= /usr/ccs/bin/cc).
7398 sco32v504:
7399         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5.0.4...
7400         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7401         "CFLAGS= -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7402         -DSCO_OSR504 -b elf -DPOSIX \
7403         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7404         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DNOSYSLOG $(KFLAGS)" \
7405         "LIBS=-lcurses $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7406
7407 #SCO OpenServer 5.0.4 with gcc, no networking.
7408 sco32v504gcc:
7409         @echo Using gcc...
7410         $(MAKE) "MAKE=$(MAKE)" sco32v504 "CC=gcc" "CC2=gcc" \
7411         KTARGET=$${KTARGET:-$(@)} "KFLAGS= $(KFLAGS)"
7412
7413 #SCO OpenServer 5.0.4 with networking.
7414 #SCO development tools (/bin/cc = /usr/ccs/bin/cc).
7415 #Optimization deliberately suppressed.
7416 sco32v504net:
7417         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5.0.4...
7418         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7419         "CFLAGS= -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7420         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7421         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7422         -b elf -DSCO_OSR504 -DPOSIX -DNO_DNS_SRV $(KFLAGS)" \
7423         "LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7424
7425 #SCO OpenServer 5.0.4 with networking, gcc.
7426 sco32v504netgcc:
7427         @echo TCP/IP networking added - using gcc...
7428         @echo If gcc crashes on ckwart.c then build it by hand:
7429         @echo " gcc -o wart -DCK_SCOV5 ckwart.c"
7430         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7431         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DSCO_OSR504 -DPOSIX $(KFLAGS)"
7432
7433 #SCO OpenServer 5.0.4 with networking, gcc, elf.
7434 sco32v504netgccelf:
7435         @echo TCP/IP networking added - using gcc, dynamic elf library
7436         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc"
7437         KTARGET=$${KTARGET:-$(@)} \
7438         "KFLAGS=-DSCO_OSR504 -DPOSIX -O3 -belf $(KFLAGS)" \
7439         LNKFLAGS="-belf"
7440
7441 #SCO OpenServer 5.0.5 (SCO UNIX 3.2v5.0.5) with SCO /bin/cc.
7442 #Like 5.0, but adds high serial speeds.  First POSIX-based SCO version.
7443 #You might have to add "LIBS=-ltinfo" (some do, some don't).
7444 sco32v505:
7445         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7446         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7447
7448 #SCO OpenServer 5.0.5 (SCO UNIX 3.2v5.0.5) with SCO UDK.
7449 #This one can't see the high serial speeds and anything to do with modem
7450 #signals doesn't work because UKD cc has its own alternative universe of
7451 #header files.
7452 sco32v505udk:
7453         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7454         "KFLAGS=-DSCO_OSR505 -DDCLTIMEVAL -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7455
7456 #SCO OpenServer 5.0.5 with networking, SCO /bin/cc.
7457 #See comments with sco32v505 targets.
7458 sco32v505net:
7459         @echo TCP/IP networking added...
7460         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7461         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7462
7463 #SCO OpenServer 5.0.5 with networking and OpenSSL, SCO /bin/cc.
7464 #See comments with sco32v505 targets.
7465 sco32v505net+ssl:
7466         @echo TCP/IP networking and OpenSSL added...
7467         $(MAKE) "MAKE=$(MAKE)" sco32v500net+ssl KTARGET=$${KTARGET:-$(@)} \
7468         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS) " \
7469         "LIBS=$(SSLLIB) -lcurses -lsocket -lssl -lcrypto $(LIBS)" \
7470         "LNKFLAGS=$(LNKFLAGS)"
7471
7472 #SCO OpenServer 5.0.5 with networking, SCO UDK.
7473 #See comments with above sco32v505 targets.
7474 sco32v505udknet:
7475         @echo TCP/IP networking added...
7476         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7477         "KFLAGS=-DSCO_OSR505 -DDCLTIMEVAL -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7478
7479 #SCO OpenServer 5.0.5 with gcc, no networking.
7480 sco32v505gcc:
7481         @echo Using gcc...
7482         $(MAKE) "MAKE=$(MAKE)" sco32v500 "CC=gcc" "CC2=gcc" \
7483         KTARGET=$${KTARGET:-$(@)} \
7484         "KFLAGS=-DSCO_OSR505 -DPOSIX -funsigned-char $(KFLAGS)"
7485
7486 #SCO OpenServer 5.0.5 with gcc, no networking, no shadow passwords.
7487 sco32v505xgcc:
7488         @echo Using gcc...
7489         $(MAKE) "MAKE=$(MAKE)" sco32v500 "CC=gcc" "CC2=gcc" \
7490         KTARGET=$${KTARGET:-$(@)} \
7491         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -DPOSIX -funsigned-char $(KFLAGS)"
7492
7493 #SCO OpenServer 5.0.5 with networking, gcc.
7494 sco32v505netgcc:
7495         @echo TCP/IP networking added - using gcc...
7496         @echo If gcc crashes on ckwart.c then build it by hand:
7497         @echo " gcc -o wart -DCK_SCOV5 ckwart.c"
7498         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7499         KTARGET=$${KTARGET:-$(@)} \
7500         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -DPOSIX -funsigned-char $(KFLAGS)"
7501
7502 #egcs is just like gcc but generates ELF by default.
7503 #Or you can include -melf (not -belf) to force it.
7504 sco32v505netegcs:
7505         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v505netgcc \
7506         KTARGET=$${KTARGET:-$(@)}
7507
7508 #SCO OpenServer 5.0.5 with networking, gcc, elf.
7509 sco32v505netgccelf:
7510         @echo TCP/IP networking added - using gcc, dynamic elf library
7511         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7512         "KFLAGS=-DSCO_OSR505 -DPOSIX -funsigned-char -O3 -belf $(KFLAGS)" \
7513         KTARGET=$${KTARGET:-$(@)} LNKFLAGS="-belf"
7514
7515 #SCO OpenServer 5.0.6 with SCO /bin/cc.
7516 # Add -DDCLTIMEVAL when building with UDK.
7517 #Like 5.0.5.   IMPORTANT: Use sco32v506a target for 5.0.6a.
7518 sco32v506:
7519         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7520         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -b elf -DPOSIX $(KFLAGS)"
7521
7522 #SCO OpenServer 5.0.6 with networking, SCO /bin/cc.
7523 # Add -DDCLTIMEVAL when building with UDK.
7524 # IMPORTANT: Use sco32v506a target for 5.0.6a.
7525 sco32v506net:
7526         @echo TCP/IP networking added...
7527         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7528         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -b elf -DPOSIX $(KFLAGS)"
7529
7530 #SCO OpenServer 5.0.6a, no networking, SCO development tools.
7531 #This one has patched sio drivers that, for the first time,
7532 #actually handle modem signals correctly.
7533 # Add -DDCLTIMEVAL when building with UDK.
7534 sco32v506a:
7535         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7536         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR506A -DNEEDMDMDEFS \
7537         -b elf -DPOSIX $(KFLAGS)"
7538
7539 #SCO OpenServer 5.0.6a with networking, SCO development tools.
7540 # Add -DDCLTIMEVAL when building with UDK.
7541 sco32v506anet:
7542         @echo TCP/IP networking added...
7543         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7544         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR506A -DNEEDMDMDEFS \
7545         -b elf -DPOSIX $(KFLAGS)"
7546
7547 #SCO OpenServer 5.0.7, no networking, SCO development tools.
7548 #Adds flags to make PTY and SSH commands work.  These have been tested
7549 #only in 5.0.7 but probably they can also be added to earlier OSR5 targets.
7550 sco32v507:
7551         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7552         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7553         -DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT \
7554         -b elf -DPOSIX $(KFLAGS)"
7555
7556 #SCO OpenServer 5.0.7 as above but with networking.
7557 sco32v507net:
7558         @echo TCP/IP networking added...
7559         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7560         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7561         -DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT \
7562         -b elf -DPOSIX $(KFLAGS)"
7563
7564 #SCO OpenServer 6 (new target 30 Jan 2006)
7565 sco_osr600 sco600:
7566         @echo Making C-Kermit $(CKVER) for SCO OpenServer 6.0.0...
7567         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7568         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7569         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7570         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7571         -DNO_DNS_SRV -DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7572         -DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT -DDCLTIMEVAL \
7573         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
7574         -DSOCKOPT_T=socklen_t -DGSOCKNAME_T=size_t -DGPEERNAME_T=size_t \
7575         -DHERALD=\"\\\" SCO OpenServer `uname -v`\\\"\" \
7576         -b elf -DPOSIX $(KFLAGS)" \
7577         "LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7578
7579 #Tandy 16/6000 with Xenix 3.0 (16 bits)
7580 #C-Kermit 7.0 (and later) do not build here; "too many defines".
7581 #Add more -DNOxxx options to remove features if program won't load.
7582 #Successful operation is a function of program size, physical memory,
7583 #available swap space, etc.  The following stripped-down configuration
7584 #seems to work on most Tandy 6000s.  NOTE: "-+" means allow long variable
7585 #names, needed for C-Kermit 6.0 because some identifiers are not unique
7586 #within the first six characters.
7587 trs16:
7588         @echo 'Making C-Kermit $(CKVER) for Tandy 16/6000, Xenix 3.0...'
7589         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7590         "CFLAGS = -+ -DATTSV -DTRS16 -DNOMKDIR -DDCLPOPEN -DCK_CURSES \
7591         -DNODEBUG -DNOTLOG -DNOHELP -DNOSCRIPT -DNOCSETS -DNOIKSD \
7592         -DNOREDIRECT -DNOSYSLOG -DNOPUTENV -DNOREALPATH -DNOLEARN \
7593         $(KFLAGS) -O" "LIBS= -lcurses -ltermcap" "LNKFLAGS = -+ -n -s"
7594
7595 # QNX 4.21 and above, 32-bit version, Watcom C32 10.6, fully configured,
7596 # except no job control because QNX 4.x does not support it.  New NCURSES
7597 # library used instead of CURSES.
7598 #
7599 # -Oatx optimizes to favor speed over size: loop optimization, inline fn's.
7600 # -Os favors size over speed.  Saves 30-40K out of about 1.75M.
7601 # -3r = generate 386 code with register-based arg passing.
7602 # -3s = generate 386 code with stack-based arg passing.
7603 # -ms = separate code & data 4GB segments (32-bit builds only).
7604 # -mf = flat memory model code+data in one 4GB segment (ditto).
7605 # -zc = place literal strings in code segment.
7606 # -N4M = Big stack (increase the digit upon SIGSEGVs at runtime).
7607 # chars are unsigned by default (-j makes them signed by default).
7608 # -NOUUCP is included because QNX doesn't use it.
7609 # Add these to the end if you like but they dump core on my QNX 4.25 system:
7610 #
7611 #       @wermit -h >use.qnx
7612 #       @usemsg wermit use.qnx
7613 #       @rm use.qnx
7614 #
7615 # If you get warnings about HEADER or C_IN add -DNO_DNS_SRV.
7616 # OK 2011/06/14
7617 qnx32:
7618         @echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit...'
7619         $(MAKE) xermit \
7620         "LNKFLAGS = -N4M -3r" \
7621         "CFLAGS = -ms -3r -DQNX -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7622         -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7623         -DNOINITGROUPS -DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7624         "LIBS= -lsocket -lncurses -ltermcap"
7625
7626 # As above but no networking since some QNX systems do not have TCP/IP
7627 # installed, or the TCP/IP developers kit, which includes all the needed
7628 # header files.  This entry has not been tested on a QNX system that, in
7629 # fact, does not have TCP/IP installed; some adjustments might be necessary,
7630 # in particular regarding the use of select(): is -lsocket needed, can we
7631 # get the needed definitions from non-TCP/IP header files (FD_SET, etc)?
7632 qnx32nonet:
7633         @echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit, no net...'
7634         $(MAKE) xermit \
7635         "LNKFLAGS = -N4M -3r" \
7636         "CFLAGS = -3r -ms -DQNX -DNONET -DNOIKSD -DCK_CURSES \
7637         -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7638         -DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7639         "LIBS= -lsocket -lncurses -ltermcap"
7640         @wermit -h >use.qnx
7641         @usemsg wermit use.qnx
7642         @rm use.qnx
7643
7644 # Synonym for qnx32.
7645 qnx:
7646         $(MAKE) qnx32 "KFLAGS=$(KFLAGS)"
7647
7648 # QNX 4.21 and above, 16-bit version, Watcom C 8.5 - and higher on i286 PCs
7649 # and above.
7650 #
7651 #       IMPORTANT: Do not use Watcom C 10.6!!!
7652 #       If you have it installed, add "-v9.52 to CFLAGS"
7653 #
7654 # NOTE: QNX 4.23 onward does not work on 286's anyway.
7655 # Stacksize 26000, objects larger than 100 bytes in their own segments,
7656 # string constants to the codesegment, etc.  Fully configured except job ctrl.
7657 # This entry works for building a 16-bit executable on a 32-bit system, but
7658 # has not been tested on a 16-bit system.  Uses large memory model, links
7659 # explicitly with large-model sockets library.  Correct-model curses library
7660 # is chosen automatically.  See comment in qnx32 entry about -DNOUUCP.
7661 #
7662 # WARNING:
7663 #
7664 # Watcom C prior to 10.6 never had released curses library. To link against it,
7665 # you must obtain ported free curses source from ftp://ftp.qnx.com/usr/free,
7666 # then compile and build library (cursesl.lib) and place it in /usr/lib.  You
7667 # must also copy curses.h to /usr/include.  Be aware that if you have Watcom
7668 # 10.6 installed, you should already have curses.h, which is the new ncurses
7669 # library. You must back it up and use free curses.h instead, since ncurses is
7670 # only for 32-bit applications and some definitions in these files are
7671 # different (e.g., clearok()).  For safety, curses is not defined in build.
7672 #
7673 # In 7.0 -DNOHELP added to keep ckuus2.c from blowing up; NOCSETS and NOSPL
7674 # added because ckuus4 was blowing up, and NOFLOAT just because it seemed
7675 # dangerous (remove -DNOFLOAT if you want to try it), The result works OK
7676 # except for some mysterious beeps upon termination of the top-level keyword.
7677 #
7678 # Things to try next time we get in trouble:
7679 #  . Change -zt100 to something smaller like -zt25
7680 #  . Change -Oatx to -Omilerat (enable stack checking)
7681 #  . Maybe get rid of -v9.52 -- it's only there because we were warned.
7682 #
7683 qnx16:
7684         @echo 'Making C-Kermit $(CKVER) for QNX 4.21, 16-bit...'
7685         $(MAKE) xermit \
7686         "LNKFLAGS = -2 -ml -N 26000" \
7687         "CFLAGS = -2 -Oatx -zc -zt100 -ml -DQNX -DQNX16 -DNOUUCP -DNOHELP \
7688         -DCK_REDIR -DSELECT -DSELECT_H -DNOJC -DNOGETUSERSHELL -DNOCSETS \
7689         -v9.52 -DTCPSOCKET -DCK_RTSCTS -DCK_ANSIC -DNOINITGROUPS -DNOKVERBS \
7690         -DNORANDOM -DNOCSETS -DNOSPL -DNOFLOAT -DPID_T=pid_t $(KFLAGS)"
7691
7692 # QNX 4.1, 16-bit version, with Watcom C 8.5 on i286 PCs and above.
7693 # stacksize 26000, objects larger than 100 bytes in their own segments,
7694 # string constants to the codesegment, etc.  Add -DNOUUCP if desired.
7695 qnx16_41:
7696         @echo 'Making C-Kermit $(CKVER) for QNX 4.1, 16-bit...'
7697         $(MAKE) xermit \
7698         "LNKFLAGS = -mh -N 26000" "CFLAGS = -Wc,-fpc -Wc,-j -DNOGETUSERSHELL \
7699         -Wc,-Ols -Wc,-zdf -Wc,-zc -Wc,-zt100 -mh -DPOSIX -DQNX -DDIRENT \
7700         -DNOCYRIL -DNODEBUG -DNOMSEND -DMINIDIAL -DNOXMIT -DNOSCRIPT -DNOSPL \
7701         -DNOSETKEY -DNOINITGROUPS -DQNX16 -DPID_T=pid_t $(KFLAGS)"
7702
7703 # QNX Neutrino 2 (pwaechtler@qnx.de) crosscompiled on QNX 4.25.
7704 # Gets lots of compiler warnings.
7705 qnx_nto2+:
7706         @echo 'Making C-Kermit $(CKVER) for QNX Neutrino 2+ '
7707         cc -o wart ckwart.c
7708         $(MAKE) xermit \
7709         "CC = qcc -Vgcc_ntox86" \
7710         "CC2 = qcc -Vgcc_ntox86" \
7711         "LNKFLAGS = " \
7712         "CFLAGS = -DNEUTRINO -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7713         -DNOUUCP -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS \
7714         -DNOJC -DNOINITGROUPS -DCK_ANSIC -DPID_T=pid_t -DUNIX -DDIRENT \
7715         -DMYREAD -DBSD44ORPOSIX -DSVORPOSIX -DNDGPWNAM $(KFLAGS)" \
7716         "LIBS= -lsocket -lncurses "
7717
7718 # QNX 6 (= Neutrino 2.xx) native build (kirussel@cisco.com).
7719 qnx6:
7720         @echo 'Making C-Kermit $(CKVER) for QNX6'
7721         $(MAKE) xermit KTARGET=QNX6 \
7722         "CFLAGS = -DPOSIX -DCK_POSIX_SIG -DNETPTY -DNOARROWKEYS \
7723         -DUSE_TIOCSDTR -DBIGBUFOK -DCKMAXOPEN=100 -DRLOGCODE -DNOREALPATH \
7724         -DMAXNAMLEN=48 -DQNX6 -DUSE_TERMIO -DINIT_SPTY \
7725         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DDYNAMIC \
7726         -DTCPSOCKET -DNOGETUSERSHELL -DCK_REDIR -DSELECT -DSELECT_H \
7727         -DCK_RTSCTS -DNOJC -DSVORPOSIX -DBSD44ORPOSIX -DNOUUCP -DCK_ANSIC \
7728         $(KFLAGS) -O" \
7729         "LIBS= -lsocket  -lncurses"
7730
7731 #MINIX/2.0 32 Bit version for intel 386+ running the POSIX-compliant MINIX
7732 # version 2.0 (The definition of fatal avoids a conflict with a symbol by
7733 # the same name in the curses library.) It is impossible to compile with
7734 # network support since Minix does not support Berkeley sockets.
7735 # Note: use chmem liberally on the compiler passes, make, and the final
7736 # kermit executable. (3 megabytes of memory for each is sufficient.)
7737 # From Terry McConnell, Syracuse U, and Will Rose.  Will says:
7738 # The stacks for make and some compiler passes needed to be increased
7739 # with chmem as follows:
7740 #   make 1MB
7741 #   /usr/lib/em_cemcom.ansi 3MB
7742 #   /usr/lib/em_opt 1MB
7743 #   /usr/lib/i386/cg 1MB
7744 #   /usr/lib/i386/as 1MB
7745 # The compiler temporary directory was set to /usr/tmp via the TMPDIR
7746 # environment variable; more than 1MB of temporary space was needed.
7747 # Kermit itself needs at least 1MB of stack.
7748 minix20:
7749         @echo 'Making C-Kermit $(CKVER) for MINIX 2.0/386...'
7750         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} EXT=o \
7751         "CFLAGS=  -wo -DV7 -DMINIX2 -DMINIX -DSIG_V -D_POSIX_SOURCE \
7752         -DCKCPU=\\\"i-386\\\" -DNOIKSD -Dfatal=myfatal -DCK_CURSES -DNOLEARN \
7753         -DNOSYSLOG -DUSE_MEMCPY -DNOREALPATH $(KFLAGS)" "LIBS= -lcurses"
7754
7755 #MINIX/386 (PC Minix modified by Bruce Evans in Australia for 386 addressing)
7756 # For MINIX 1.5+ (but < 2.0)
7757 minix386:
7758         @echo 'Making C-Kermit $(CKVER) for MINIX/386...'
7759         @echo 'TOTALLY UNTESTED!'
7760         $(MAKE) wermit EXT=s KTARGET=$${KTARGET:-$(@)} \
7761         "CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7762
7763 #MINIX/386 Minix modified by Bruce Evans in Australia to use 386 addressing
7764 minix386gcc:
7765         @echo 'Making C-Kermit $(CKVER) for MINIX/386 with gcc...'
7766         @echo 'TOTALLY UNTESTED!'
7767         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC=gcc -g -O" "CC2=gcc -g" \
7768         "CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7769
7770 #MINIX - 68k version with ACK compiler.
7771 # If you have trouble compiling or running wart, "touch wart".
7772 # If it still doesn't work, "touch ckcpro.c".
7773 # The version configured below has many features removed, including
7774 # the TRANSMIT, MSEND, HELP, and SCRIPT commands, international
7775 # character set support, and the entire script programming language.
7776 # But it does have an interactive command parser.
7777 # Make sure make(1) has (at least) 100000 chmemory!
7778 # If you are using the Amsterdam C compiler, you might have to add "-D__ACK__".
7779 minix68k:
7780         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with ACK...'
7781         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7782         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7783         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7784         -DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7785         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7786
7787 #MINIX - 68k version with c68 compiler.
7788 # If you have trouble compiling or running wart, "touch wart" or
7789 # "touch ckcpro.c". Compiling ckudia.c (no -DNODIAL!) might fail. :-(
7790 # Give c68 250000 bytes of stack+heap; make sure make(1) has at least
7791 # 100000 chmemory.  On a 1MB Atari ST this means that the recursive
7792 # call of make fails due to memory shortage.  Try "make -n minixc68 >makeit",
7793 # followed by ". makeit".  Otherwise, as above.
7794 minixc68:
7795         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7796         $(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7797         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7798         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7799         -DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7800         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7801
7802 #MINIX - 68k version with c68 compiler.
7803 #A variation on the above that was recently (Sep 95) reported to work.
7804 minixc68a:
7805         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7806         $(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7807         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE \
7808         -DCK_ANSIC -DNODEBUG -DNOTLOG -DMINIDIAL -DEXTEN -DMYCURSES \
7809         -DNOSCRIPT -DNOCSETS -DNOSPL -DNOJC -DDIRENT -DNOLEARN \
7810         -DNOSETKEY -DNOESCSEQ $(KFLAGS) \
7811         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7812
7813 #MIPS Computer Systems with UMIPS RISC/OS 4.52 = AT&T UNIX System V R3.0.
7814 #Remove -DNOJC if job control can be safely used.
7815 mips:
7816         @echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7817         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7818         "CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC -DNOLEARN -DPID_T=int \
7819         -DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)"
7820
7821 #As above, but with TCP/IP and fullscreen support.
7822 mipstcpc:
7823         @echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7824         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7825         "CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC \
7826         -DTCPSOCKET -DCK_CURSES -I/usr/include/bsd \
7827         -DPID_T=int -DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)" \
7828         "LIBS = -lcurses -lbsd"
7829
7830 #Motorola Delta System V/68 R3, signal() is void rather than int.
7831 #Uses dirent.h and Honey DanBer uucp.  Supports TCP/IP.
7832 #After building, use "mcs -d" to reduce size of the executable program.
7833 sv68r3:
7834         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3...'
7835         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7836         "CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DTCPSOCKET \
7837         -DNOUNICODE -DNOLEARN -DUSE_MEMCPY $(KFLAGS) -O" "LNKFLAGS ="
7838
7839 #Motorola Delta System V/68 R3V5, 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 sv68r3v5:
7843         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5'
7844         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7845         "CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DUSE_MEMCPY \
7846         -DTCPSOCKET -DINADDRX -DNOUNICODE -DFNFLOAT -DNOLEARN $(KFLAGS) -O" \
7847         "LNKFLAGS =" "LIBS = -linet -lm"
7848
7849 #Motorola MVME147 System V/68 R3 V5.1. Requires gcc 2.1 to compile.
7850 #After building, use "mcs -d" to reduce size of the executable program.
7851 sv68r3v51:
7852         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5.1'
7853         $(MAKE) wermit "CC=gcc-delta" "CC2=gcc-delta" \
7854         KTARGET=$${KTARGET:-$(@)} \
7855         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNODEBUG -DNO_DNS_SRV -DNOLEARN \
7856         -DNOUNICODE -DFNFLOAT -DSV68 -DUSE_MEMCPY $(KFLAGS) \
7857         -O2 -v -ftraditional" \
7858         "LNKFLAGS = -s -v" "LIBS = -lm881 -lm"
7859
7860 #Motorola MVME147 System V/68 R3V6. derived from Motorola Delta System R3V5.
7861 #Checked on larger Motorola System V/68 R3V6 (with NSE Network Services Ext.)
7862 #After building, use "strip" to reduce size of the executable program.
7863 # "LIBS = -lnsl" removed in C-Kermit 6.1 - put back if needed.
7864 # "LIBS = lm" added in 7.1/8.0 for floating-point math.
7865 # ckuusr.c clobbers the optimizer.
7866 sv68r3v6:
7867         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V6'
7868         $(MAKE) ckuusr.$(EXT) KTARGET=$${KTARGET:-$(@)} \
7869         "CFLAGS = -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
7870         -DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
7871         -DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)"
7872         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7873         "CFLAGS = -O -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
7874         -DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
7875         -DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)" \
7876         "LNKFLAGS =" "LIBS = -lm"
7877
7878 #Motorola Delta System V/88 R32, signal() is void rather than int.
7879 #Uses dirent.h and Honey DanBer uucp.  Needs <sys/utime.h> for setting
7880 #file dates.  Supports TCP/IP.
7881 #After building, use "mcs -d" to reduce size of the executable program.
7882 sv88r32:
7883         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R32...'
7884         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7885         "CFLAGS = -DSV88R32 -DDIRENT -DHDBUUCP -DTCPSOCKET \
7886         -DSYSUTIMEH -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG $(KFLAGS) -O" \
7887         "LIBS= -lcurses -lresolv" "LNKFLAGS = -s"
7888
7889 #Motorola Delta System V/88 R40.  Has <sys/termiox.h>, regular Berkeley
7890 #sockets library, i.e. in.h and inet.h are not misplaced in sys (rather than
7891 #netinet and arpa, respectively).  Uses ANSI C constructs, advisory file
7892 #locking on devices, etc.  curses support added.  Reportedly, the
7893 #/usr/include/sys/vnode.h file has a bug which must be fixed before this
7894 #makefile entry can work correctly.  The "if DEBUG" directive at about line
7895 #320 must be changed to "ifdef DEBUG" (Reportedly, this was fixed in
7896 #in System V/88 R4.3).
7897 #After building, use "mcs -d" to reduce size of the executable program.
7898 sv88r40:
7899         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R40...'
7900         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7901         "CFLAGS = -O -DSVR4 -DMOTSV88R4 -DDIRENT -DHDBUUCP -DSTERMIOX \
7902         -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG -DFNFLOAT \
7903         $(KFLAGS)" \
7904         "LIBS= -lsocket -lnsl -lcurses -lresolv -lm" "LNKFLAGS = -s"
7905
7906 #As above but without the floating-point math library.
7907 sv88r40nm:
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 $(KFLAGS)" \
7912         "LIBS= -lsocket -lnsl -lcurses -lresolv" "LNKFLAGS = -s"
7913
7914 #As above but with floating-point math library support \ffp...() functions
7915 #and S-Expressions.
7916
7917 #Olivetti X/OS R2.3, 3.x.
7918 #NOTES:
7919 # . If you build the executable on 2.x X/OS, it will also run on 3.x.
7920 # . If you build it on 3.x X/OS, it will NOT run on 2.x.
7921 # . Kermit can run with no privileges unless the uucp lines are protected,
7922 #   in which case kermit must be owned by uucp with suid bit set:
7923 #   chown uucp kermit ; chmod 4111 kermit.
7924 xos23:
7925         @echo 'Making C-Kermit $(CKVER) for Olivetti X/OS...'
7926         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7927         'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP $(KFLAGS)' \
7928         "LIBS=" "LNKFLAGS="
7929
7930 #As above, but with curses.
7931 xos23c:
7932         @echo 'Making C-Kermit $(CKVER) for Olivetti X/OS with curses...'
7933         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7934         'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP -DCK_CURSES $(KFLAGS)' \
7935         "LIBS=-lcurses" "LNKFLAGS="
7936
7937 ckuuid:
7938         @echo 'building C-Kermit $(CKVER) set-UID/set-GID test programs'
7939         $(CC) -DANYBSD -DSAVEDUID -o ckuuid1 ckuuid.c
7940         $(CC) -DANYBSD -o ckuuid2 ckuuid.c
7941         $(CC) -DANYBSD -DNOSETREU -o ckuuid3 ckuuid.c
7942         $(CC) -DANYBSD -DSETEUID -DNOSETREU -o ckuuid4 ckuuid.c
7943         $(CC) -o ckuuid5 ckuuid.c
7944         @echo 'Read the top of ckuuid.c for directions...for testing'
7945         @echo 'you must make these programs setuid and setgid'
7946
7947 ############################################################################
7948 # A N T I Q U I T I E S
7949 #
7950 # The following are antique targets from C-Kermit 5A or earlier.  They have
7951 # not been updated or tested in years.  Most of them will need recent features
7952 # disabled, usually with some combination of -DNOUNICODE, -DNOIKSD, -DNOANSI,
7953 # -DNOCKGHNLHOST, -DNO_DNS_SRV, -DNOREDIRECT, -DNOREALPATH, -DNOCURSES, etc.
7954 # They are also missing the KTARGET=$${KTARGET:-$(@)} business.
7955 # For details see ckuins.txt and ckccfg.txt.
7956 #
7957 ############################################################################
7958
7959 #Berkeley Unix 2.8, 2.9 for PDP-11s with I&D space, maybe also Ultrix-11???
7960 #C-Kermit(5A) is simply too large (even turning off almost every feature
7961 #available) to run without both I&D space plus overlays.  The old comment
7962 #suggested running 'pcc' but that won't help.  Changing 'cc' to 'ckustr.sed'
7963 #will cause a string extraction to be done, saving D space by moving strings
7964 #to a file.
7965 bsd29:
7966         @echo Making C-Kermit $(CKVER) for 2.8 or 2.9BSD.
7967         @echo Read the makefile if you have trouble with this...
7968         $(MAKE) ovwermit \
7969         "CFLAGS= -DBSD29 -DNODEBUG -DNOTLOG -DNOCSETS -DNOHELP \
7970         -DNOSCRIPT -DNOSPL -DNOXMIT -DNODIAL $(KFLAGS)" \
7971         "LNKFLAGS= -i -lndir" "CC= cc " "CC2= cc"
7972
7973 bsd210:
7974         @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.10BSD.
7975
7976 bsd211:
7977         @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.11BSD.
7978
7979 #Charles River Data Systems Universe with UNOS Version 9.2
7980 crds:
7981         @echo 'Making C-Kermit $(CKVER) for Charles River Data Systems...'
7982         make xermit \
7983         "CFLAGS = -DATTSV -DNOANSI -DDIRENT -DLONGFN -DTCPSOCKET \
7984         -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DNOSETREU \
7985         -Dsuspend=ksuspend $(KFLAGS) -O" "LNKFLAGS ="
7986
7987 #Microport SV/AT for IBM PC/AT 286 and clones, System V R2.
7988 #The -O flag may fail on some modules (like ckuus2.c), in which case you
7989 #should compile them by hand, omitting the -O.  If you get "hash table
7990 #overflow", try adding -DNODEBUG.
7991 #Also, reportedly this compiles better with gcc than with cc.
7992 mpsysv:
7993         @echo 'Making C-Kermit $(CKVER) for Microport SV/AT 286...'
7994         $(MAKE) wermit \
7995         "CFLAGS= -DATTSV -DNOLEARN $(KFLAGS) -O -Ml" "LNKFLAGS = -Ml"
7996
7997 #Microsoft "Xenix/286" e.g. for IBM PC/AT
7998 xenix:
7999         @echo 'Making C-Kermit $(CKVER) for Xenix/286'
8000         $(MAKE) wermit \
8001         "CFLAGS= -DXENIX -DNOFILEH -DNOLEARN $(KFLAGS) -Dunix -F 3000 -i" \
8002         "LNKFLAGS = -F 3000 -i"
8003
8004 #PC/IX, Interactive Corp System III for IBM PC/XT
8005 pcix:
8006         @echo 'Making C-Kermit $(CKVER) for PC/IX...'
8007         $(MAKE) wermit \
8008         "CFLAGS= -DPCIX -DISIII -DNOLEARN $(KFLAGS) \
8009         -Dsdata=sdatax -O -i" "LNKFLAGS = -i"
8010
8011 #Integrated Solutions Inc V8S VME 68020
8012 isi:
8013         @echo Making C-Kermit $(CKVER) for 4.2BSD on ISI...
8014         $(MAKE) wermit "CC = cc" \
8015         "CFLAGS= -DBSD4 -DTCPSOCKET -DINADDRX -DDCLPOPEN -DDEBUG -DNOSETREU \
8016         -DCK_CURSES -DNOLEARN $(KFLAGS)" "LIBS = -lcurses -ltermcap"
8017
8018 #Interactive Corp version of AT&T System III
8019 #is3: (very old, probably not sufficient for 5A or later)
8020 #       @echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8021 #       make wermit "CFLAGS = -DISIII -Ddata=datax -O -i" "LNKFLAGS = -i"
8022 #The following should work, use it if you don't have gcc.
8023 #Use is3gcc if you have gcc.
8024 is3:
8025         @echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8026         $(MAKE) wermit \
8027         "CFLAGS= -DISIII $(KFLAGS) -Ddata=datax -DNAP -DHDBUUCP
8028         -DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O -i" "LNKFLAGS = -i"
8029
8030 #Interactive UNIX System V R3, no network support.  Uses <dirent.h> and Honey
8031 #DanBer UUCP.  If this entry does not compile correctly, try any or all of the
8032 #following.  These suggestions also apply more or less to the other is5r3xxx
8033 #entries that follow this one.
8034 # . Remove the UID_T and GID_T definitions, or change them as required.
8035 # . Change -DDIRENT to -DSDIRENT.
8036 # . Add -DSIGTYP=void.
8037 # . Remove -g from LNKFLAGS.
8038 # . Add -DNOANSI to remove compiler complaints about ANSI C constructions
8039 # . Add other -DNOxxx's to save space (e.g. -DNOCSETS)
8040 # See the next few makefile entries for related examples.
8041 # Also see sys5r32is for making a portable i386 SVR3 binary.
8042 is5r3:
8043         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8044         @echo 'If this does not work please read the makefile entry.'
8045         $(MAKE) wermit \
8046         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8047         -DUID_T=ushort -DGID_T=ushort -DI386IX $(KFLAGS)" \
8048         "LNKFLAGS = -g"
8049
8050 #Interactive Corp System System V R3 with gcc
8051 is3gcc:
8052         @echo 'Making C-Kermit $(CKVER) for Interactive System V R3 / gcc...'
8053         $(MAKE) wermit CC=gcc CC2=gcc \
8054         'CFLAGS = -D_SYSV3 -DISIII -Ddata=datax -DNAP -DHDBUUCP -DNOREALPATH \
8055         -DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O' "LNKFLAGS ="
8056
8057 #Interactive UNIX System V R3, POSIX variant.  Untested.
8058 #Uses dirent.h and Honey DanBer uucp.  Read comments in is5r3 entry.
8059 is5r3p:
8060         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8061         $(MAKE) wermit \
8062         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8063         -DI386IX -DPOSIX $(KFLAGS)" "LNKFLAGS=" "LIBS=-lcposix"
8064
8065 #Interactive UNIX SVR3 2.2.1, job control, curses, no net, gcc.
8066 is5r3gcc:
8067         $(MAKE) wermit CC=gcc CC2=gcc \
8068         "CFLAGS=-g -posix -DSVR3 -DDIRENT -DNOREALPATH \
8069         -DHDBUUCP -O -DNOCSETS -DI386IX -DSVR3JC -DCK_CURSES \
8070         $(KFLAGS)" LNKFLAGS="-posix" LIBS="-lcurses -lc_s"
8071
8072 #Interactive UNIX System V R3 with TCP/IP network support.
8073 #Needs -linet for net functions.  signal() is void rather than int.
8074 #Uses dirent.h and Honey DanBer uucp. Read comments in is5r3 entry.
8075 #Also see is5r3net2 if you have trouble with this entry.
8076 is5r3net:
8077         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8078         @echo 'If this does not work please read the makefile entry.'
8079         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8080         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOREALPATH \
8081         -DI386IX $(KFLAGS) -O" "LIBS = -linet"
8082
8083 is5r3netgcc:
8084         $(MAKE) is5r3net CC=gcc CC2=gcc
8085
8086 #Interactive UNIX System V R3, no job control, signal() void rather than int.
8087 #Uses dirent.h and Honey DanBer uucp.  Needs -linet for net functions.
8088 #Read comments in is5r3 entry.  Use this entry if is5r3net fails.
8089 #Saves some space by stripping (-s) and using shared library (-lc_s).
8090 is5r3net2:
8091         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8092         $(MAKE) wermit \
8093         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOJC -DNOREALPATH \
8094         -DSIGTYP=void -DNOANSI -DI386IX $(KFLAGS) -O" \
8095         "LNKFLAGS= -s" "LIBS = -linet -lc_s"
8096
8097 #Interactive UNIX System V R3 (version 2.2 or later) with job control & curses.
8098 #Uses dirent.h and Honey DanBer UUCP.
8099 is5r3jc:
8100         @echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8101         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8102         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8103         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8104         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD \
8105         $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
8106
8107 is5r3jcgcc:
8108         $(MAKE) is5r3jc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8109         KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8110
8111 #Sunsoft/Interactive UNIX System V R3 (version 2.2 or later)
8112 #with job control, curses, and TCP/IP networking.
8113 #Uses dirent.h and Honey DanBer UUCP.
8114 is5r3netjc:
8115         @echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8116         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8117         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8118         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8119         -DPOSIX_JC -DCK_REDIR -DTCPSOCKET -DSELECT \
8120         $(KFLAGS)" "LIBS=-linet -lcurses -lc_s"
8121
8122 is5r3netjcgcc:
8123         $(MAKE) is5r3netjc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8124         KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8125
8126 #Masscomp System III
8127 rtu:
8128         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU System III...'
8129         $(MAKE) wermit \
8130         "CFLAGS= -UFIONREAD -DATTSV $(KFLAGS) -O" "LNKFLAGS =" "LIBS= -ljobs"
8131
8132 #Masscomp/Concurrent RTU 4.0 or later, Berkeley environment.
8133 #Includes <ndir.h> = /usr/include/ndir.h
8134 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8135 rtubsd:
8136         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8137         ucb make wermit \
8138         "CFLAGS= -DBSD4 -DRTU -DNDIR -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
8139         "LIBS = -lndir"
8140
8141 #Masscomp/Concurrent RTU 4.0 or later, same as above,
8142 #Includes "usr/lib/ndir.h"
8143 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8144 rtubsd2:
8145         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8146         ucb make wermit \
8147         "CFLAGS= -DBSD4 -DRTU -DXNDIR -DHDBUUCP $(KFLAGS)" \
8148         "LIBS = -lndir"
8149
8150 #Masscomp/Concurrent RTU 4.0 or later, same as above,
8151 #Includes <sys/ndir.h>
8152 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8153 rtubsd3:
8154         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x BSD...'
8155         ucb make wermit "CFLAGS= -DBSD4 -DRTU -DHDBUUCP $(KFLAGS)" \
8156         "LIBS = -lndir"
8157
8158 #Masscomp/Concurrent RTU 4.0 or later, System V R2, using <dirent.h>.
8159 #In case of problems, add back the -DRTU switch.
8160 #In case -DTCPSOCKET gives trouble, remove it.
8161 rtus5:
8162         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x...'
8163         $(MAKE) wermit \
8164         "CFLAGS= -DATTSV -DHDBUUCP -DDIRENT -DTCPSOCKET $(KFLAGS)"
8165
8166 #Masscomp/Concurrent RTU 4.x, System V R3, using <dirent.h>.
8167 #Use this one if rtus5 gives warnings about pointer type mismatches.
8168 #In case of problems, add back the -DRTU switch.
8169 rtus5r3:
8170         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU Sys V R3...'
8171         $(MAKE) wermit "CFLAGS= -DSVR3 -DHDBUUCP -DDIRENT $(KFLAGS)"
8172
8173 #DEC Pro-3xx with Pro/Venix V1.0 or V1.1
8174 # Requires code-mapping on non-I&D-space 11/23 processor, plus some
8175 # fiddling to get interrupt targets into resident code section.
8176 # This almost certainly doesn't work any more.
8177 provx1:
8178         @echo 'Making C-Kermit $(CKVER) for DEC Pro-3xx, Pro/Venix 1.x...'
8179         $(MAKE) wart "CFLAGS= -DPROVX1 $(KFLAGS)" "LNKFLAGS= "
8180         $(MAKE) wermit "CFLAGS = -DPROVX1 -DNOFILEH -md780" \
8181                 "LNKFLAGS= -u _sleep -lc -md780"
8182
8183 #Nixdorf Targon/31.
8184 #AT&T UNIX System V R3, signal() is void rather than int.
8185 #Uses dirent.h without Honey DanBer uucp.
8186 t31tos40x:
8187         @echo 'Making C-Kermit $(CKVER) for Targon/31 with TOS 4.0.xx...'
8188                 $(MAKE) wermit \
8189                 "CFLAGS= -DSVR3 -DDIRENT $(KFLAGS) -O" \
8190                 "LNKFLAGS="
8191
8192 #NCR Tower 1632, OS 1.02
8193 tower1:
8194         @echo 'Making C-Kermit $(CKVER) for NCR Tower 1632, OS 1.02...'
8195         $(MAKE) wermit "CFLAGS= -DTOWER1 $(KFLAGS)"
8196
8197 #NCR Tower 32, OS Release 1.xx.xx
8198 tower32-1:
8199         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 1 System V R2...'
8200         @echo 'Add KFLAGS=-DISDIRBUG if you get errors about S_ISREG/S_ISDIR.'
8201         $(MAKE) wermit \
8202         "CFLAGS = -DATTSV $(KFLAGS) -O" "LNKFLAGS = -n"
8203
8204 #NCR Tower 32, OS Release 2.xx.xx
8205 tower32-2:
8206         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 2 System V R2...'
8207         $(MAKE) wermit \
8208         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -O2" \
8209         "LNKFLAGS = -n"
8210
8211 #NCR Tower 32, OS Releases based on System V R3
8212 #Don't add -DNAP (doesn't work right) or -DRDCHK (not available in libc).
8213 tower32:
8214         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3...'
8215         $(MAKE) wermit \
8216         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8217         -DUID_T=ushort -DGID_T=ushort -O1"
8218
8219 #NCR Tower 32, OS Releases based on System V R3
8220 tower32g:
8221         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3, gcc...'
8222         $(MAKE) wermit "CC = gcc" \
8223         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8224         DUID_T=ushort -DGID_T=ushort -O -fstrength-reduce -fomit-frame-pointer"
8225
8226 #Fortune 32:16, For:Pro 1.8 (mostly like 4.1bsd)
8227 ft18:
8228         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 1.8...'
8229         $(MAKE) wermit \
8230         "CFLAGS= -DNODEBUG -DBSD4 -DFT18 -DNOFILEH $(KFLAGS) \
8231         -DPID_T=short"
8232
8233 #Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd).
8234 #The modules that break the optimizer are compiled separately.
8235 ft21:
8236         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'
8237         $(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8238         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8239         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8240         $(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8241         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8242         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8243         $(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8244         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8245         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8246         $(MAKE) wermit \
8247         "CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \
8248         -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8249         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8250
8251 #Valid Scaldstar
8252 #Berkeleyish, but need to change some variable names.
8253 valid:
8254         @echo 'Making C-Kermit $(CKVER) for Valid Scaldstar...'
8255         $(MAKE) wermit \
8256         "CFLAGS= -DBSD4 -DNODEBUG -DNOTLOG -Dcc=ccx -DFREAD=1 $(KFLAGS)"
8257
8258 #IBM IX/370 on IBM 370 Series mainframes
8259 #Mostly like sys3, but should buffer packets.
8260 ix370:
8261         @echo 'Making C-Kermit $(CKVER) for IBM IX/370...'
8262         $(MAKE) wermit "CFLAGS = -DIX370 -DATTSV $(KFLAGS) -i -O" \
8263         "LNKFLAGS = -i"
8264
8265 #Amdahl UTS 2.4 on IBM 370 series compatible mainframes.
8266 #Mostly like V7, but can't do initrawq() buffer peeking.
8267 uts24:
8268         @echo 'Making C-Kermit $(CKVER) for Amdahl UTS 2.4...'
8269         $(MAKE) wermit "CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
8270         -DUTS24 -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
8271         -DNPTYPE=$(NPTYPE) $(DIRECT) $(KFLAGS)"
8272
8273 #Amdahl UTSV UNIX System V = System V R2 or earlier.
8274 utsv:
8275         @echo 'Making C-Kermit $(CKVER) for Amdahl UTSV...'
8276         $(MAKE) wermit \
8277         "CFLAGS = -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i"
8278
8279 #Amdahl UTSV UNIX System V = System V R2 or earlier, with TCP sockets library.
8280 utsvtcp:
8281         @echo 'Making C-Kermit $(CKVER) for Amdahl UTSV w/tcp...'
8282         $(MAKE) wermit "CFLAGS = \
8283         -DTCPSOCKET -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i" \
8284         "LIBS = -lsocket"
8285
8286 #BBN C/70 with IOS 2.0
8287 #Mostly Berkeley-like, but with some ATTisms
8288 c70:
8289         @echo 'Making C-Kermit $(CKVER) for BBN C/70 IOS 2.0...'
8290         $(MAKE) wermit "CFLAGS= -DBSD4 -DC70 $(KFLAGS)"
8291
8292 #Zilog ZEUS 3.21
8293 zilog:
8294         @echo 'Making C-Kermit $(CKVER) for Zilog Zeus 3.21...'
8295         $(MAKE) wermit \
8296         "CFLAGS = -DATTSV -DZILOG -DNODEBUG $(KFLAGS) -i -O" \
8297         "LNKFLAGS = -i -lpw"
8298
8299 #Whitechapel MG-1 Genix 1.3
8300 white:
8301         @echo 'Making C-Kermit $(CKVER) for Whitechapel MG-1 Genix 1.3...'
8302         @touch ckcpro.c
8303         $(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0  $(KFLAGS)"
8304
8305 #Pixel 1000
8306 pixel:
8307         @echo 'Making C-Kermit $(CKVER) for Pixel 1000...'
8308         $(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0 $(KFLAGS)"
8309
8310 ptx:
8311         $(MAKE) "MAKE=$(MAKE)" dynixptx12
8312
8313 #CDC VX/VE 5.2.1
8314 vxve:
8315         @echo 'Making C-Kermit $(CKVER) for CDC VX/VE 5.2.1...'
8316         $(MAKE) wermit \
8317         "CFLAGS = -DATTSV -DVXVE -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8318         "LNKFLAGS = -i"
8319
8320 #DIAB DS90 or LUXOR ABC-9000 with pre-5.2 DNIX.  Sys V with nap() and rdchk().
8321 # nd = no opendir(), readdir(), closedir(), etc.
8322 # Some of the modules fail to compile with -O.
8323 dnixnd:
8324         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with very old DNIX 5.2.'
8325         $(MAKE) wermit \
8326         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDCLPOPEN \
8327         -U__STDC__ $(KFLAGS)"
8328
8329 #DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8330 # This one has opendir(), readdir(), closedir(), etc.
8331 # Some of the modules fail to compile with -O.
8332 dnix:
8333         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8334         $(MAKE) wermit \
8335         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8336         -U__STDC__ $(KFLAGS)"
8337
8338 #DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8339 # As above, but with curses and TCP/IP.
8340 # You might get complaints about redefinition of O_RDONLY, etc, because
8341 # of bugs in the DNIX header files, which can be fixed by adding #ifndef...
8342 # around the offending definitions in the header files.
8343 dnixnetc:
8344         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8345         $(MAKE) wermit \
8346         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8347         -DTCPSOCKET -DCK_CURSES -I/usr/include/bsd -U__STDC__ $(KFLAGS)" \
8348         "LIBS = -ln -lcurses"
8349
8350 #DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk().
8351 dnix5r3:
8352         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8353         @echo 'with Honey DanBer UUCP'
8354         $(MAKE) wermit \
8355         "CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8356         -DCK_CURSES -DRENAME $(KFLAGS) -O" "LIBS= -lcurses"
8357
8358 #DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk() + TCP/IP
8359 dnix5r3net:
8360         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8361         @echo 'with Honey DanBer UUCP and TCP/IP'
8362         $(MAKE) wermit \
8363         "CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8364         -DTCPSOCKET -DCK_CURSES -DRENAME $(KFLAGS) -O \
8365         -I/usr/include/bsd" "LIBS = -ln -lcurses"
8366
8367 #DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8368 #ANSI C compilation and libraries.
8369 #Note that for DNIX 5.3 2.2 you have to correct a bug in /usr/include/stdlib.h:
8370 #change "extern void free(char *str);"
8371 #to     "extern void free(void *str);"
8372 #NOTE: This bug is reportedly fixed in DNIX 5.3 2.2.1.
8373 #Should you get fatal errors caused by harmless pointer-type mismatches,
8374 #like between signed and unsigned char, just remove -X7.
8375 dnix5r3ansi:
8376         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8377         @echo 'with ANSI C Honey DanBer UUCP'
8378         $(MAKE) wermit \
8379         "CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8380         -DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS)" \
8381         "LIBS= -lcurses"
8382
8383 #DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8384 # + TCP/IP, ANSI C compilation and libraries.
8385 #Should you get fatal errors caused by harmless pointer-type mismatches,
8386 #like between signed and unsigned char, just remove -X7.
8387 dnix5r3ansinet:
8388         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8389         @echo 'with ANSI C Honey DanBer UUCP'
8390         $(MAKE) wermit \
8391         "CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8392         -DTCPSOCKET -DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS) \
8393         -I/usr/include/bsd" "LIBS= -ln -lcurses"
8394
8395 #Ridge 32 with ROS 3.2
8396 ridge32:
8397         @echo 'Making C-Kermit $(CKVER) Ridge 32 ROS 3.2'
8398         $(MAKE) wermit \
8399         "CFLAGS = -DATTSV -DNOFILEH -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8400         "LNKFLAGS = -i"
8401
8402 #Altos 486, 586, or 986 with Xenix 3.0
8403 altos:
8404         @echo 'Making C-Kermit $(CKVER) for Altos x86 with Xenix 3.0...'
8405         $(MAKE) wermit \
8406         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8407         "LNKFLAGS= -i"
8408
8409 #Altos 986 with Xenix 3.0, as above, but command-line only, minimal size.
8410 #For systems with small memories.  It might also be necessary to chop certain
8411 #modules up into smaller pieces, e.g. ckuus3-6, because of symbol table
8412 #overflow.   If this makefile is too big or complex for the Altos, compile
8413 #and link by hand or write shell scripts.
8414 altosc:
8415         @echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, remote...'
8416         $(MAKE) wermit \
8417         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8418         -DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOICP $(KFLAGS) -Mm -O" \
8419         "LNKFLAGS= -Mm -s"
8420
8421 #Altos 986 with Xenix 3.0, as above, but interactive only, minimal size.
8422 altosi:
8423         @echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, local...'
8424         $(MAKE) wermit \
8425         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8426         -DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOCMDL -DNOFRILLS -DNOHELP \
8427         -DNOSETKEY $(KFLAGS) -Mm -O" "LNKFLAGS= -Mm -s"
8428
8429 # Altos ACS68000 68000 System, UNIX System 3 Release 2, 512k memory.
8430 # also needs getcwd() external function; see ckuins.txt file.
8431 # also, sys/types.h needed modifying:
8432 #   #ifdef __SYS_TYPES_H__, #define ..., #endif
8433 # also, ckuus2.c MUST be compiled NOOPT else symbol table is destroyed!
8434 # Submission by Robert Weiner/Programming Plus, rweiner@progplus.com.
8435 #
8436 altos3:
8437         @echo 'Making C-Kermit $(CKVER) for Altos ACS68k UNIX System III'
8438         $(MAKE) ckuus2.$(EXT) "CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8439         -DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i"
8440         $(MAKE) wermit \
8441         "CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8442         -DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i -O" \
8443         "LNKFLAGS = -i" "LIBS = getcwd.$(EXT)"
8444
8445 #MINIX - Original PC version with 64K+64K limit.
8446 # Reportedly, the linker (asld) can run out of space while linking.  The only
8447 # way around this is to make a copy of libc.a from which all modules that are
8448 # not used by Kermit are removed.  If you have trouble compiling or running
8449 # wart, "touch wart".  If that doesn't help, "touch ckcpro.c".
8450 # The version configured below has no interactive command parser.
8451 # If you can build this version successfully, maybe there will be room for
8452 # a minimal interactive command parser too; try replacing -DNOICP with
8453 # -DNOSPL, plus every other -DNOxxx flag there is, except for -DNOICP
8454 # (see ckccfg.txt).
8455 minix:
8456         @echo 'Making C-Kermit $(CKVER) for MINIX, no command parser...'
8457         @echo 'TOTALLY UNTESTED!'
8458         $(MAKE) wermit EXT=s \
8459         "CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8460         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V \
8461         -DNOXMIT -DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
8462         -DNOSCRIPT -DNOCSETS -DNOICP -DNOSETKEY $(KFLAGS)" \
8463         "LNKFLAGS= -i -T"
8464
8465 #MINIX - PC version with 64K+64K limit, new (as yet unreleased) ACK 2.0 beta C
8466 #compiler, which outputs .o object files, rather than .s.  But 'make' still
8467 #expects .s files, so must be patched to use .o.  Tested on Minix 1.5.10.
8468 minix15:
8469         @echo 'Making C-Kermit $(CKVER) for MINIX (new ACK 2.0 compiler),'
8470         @echo 'no command parser...  TOTALLY UNTESTED!'
8471         $(MAKE) wermit \
8472         "CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8473         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V -DNODIAL \
8474         -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOICP $(KFLAGS)" \
8475         "LNKFLAGS= -i -T"
8476
8477 #MINIX3 - MINIX 3.0 (no VM) - May-Aug 2005 (not sure if this ever worked...)
8478 minix3:
8479         @echo 'Making C-Kermit $(CKVER) for MINIX3...'
8480         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8481         "CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -DMINIX2 \
8482         -DMINIX3 -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8483         -DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DDNOREALPATH \
8484         -DTCPSOCKET -DNOTIMEZONE -DNOFTP -DNO_DNS_SRV -O"
8485
8486 #MINIX315 - MINIX 3 1.5 - January 2010
8487 minix315:
8488         @echo 'Making C-Kermit $(CKVER) for Minix 3 1.5...'
8489         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8490         "CFLAGS= -DMINIX315 -DPOSIX -DNOUUCP -DNOJC -DNOLEARN $(KFLAGS) \
8491         -DHAVE_OPENPTY -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8492         -DSYSTIMEH -DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DNOREALPATH \
8493         -DTCPSOCKET -DNOTIMEZONE -DNO_DNS_SRV -DNOFTP -O"
8494
8495 #PFU Compact A Series UNIX System V R3, SX/A TISP V10/L50 (Japan)
8496 #Maybe the -i link option should be removed?
8497 sxae50:
8498         @echo 'Making C-Kermit $(CKVER) for PFU SX/A V10/L50...'
8499         $(MAKE) xermit \
8500         "CFLAGS= -DSVR3 -DDIRENT -DsxaE50 -DTCPSOCKET $(KFLAGS) -i -O" \
8501         "LNKFLAGS= "
8502
8503 #Tektronix 6130, 4319, 4301, etc, with UTek OS, /usr/spool/uucp/LCK./...
8504 #The models that support hardware flow control.
8505 utek:
8506         @echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, hardware flow control'
8507         $(MAKE) wermit \
8508         "CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8509         -DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8510         -DTRMBUFL=2048 -DCK_DTRCTS $(KFLAGS)"
8511
8512 #Tektronix 4315, 4316, 4317 with UTek OS, /usr/spool/uucp/LCK./...
8513 #The models that do not fully support hardware flow control.
8514 uteknohwfc:
8515         @echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, no h/w flow control'
8516         $(MAKE) wermit \
8517         "CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8518         -DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8519         -DTRMBUFL=2048 $(KFLAGS)"
8520
8521 #Tektronix XD88 with  UTekV OS
8522 utekvr3:
8523         @echo 'Making C-Kermit $(CKVER) for Tektronix XD88 UTekV R3...'
8524         $(MAKE) wermit \
8525         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP \
8526         -DTCPSOCKET -DSYSUTIMEH -DCK_CURSES $(KFLAGS) -O" \
8527         "LIBS= -lcurses" "LNKFLAGS= -s"
8528
8529 #Perkin-Elmer 3200 Xelos R02 or earlier
8530 ccop1:
8531         @echo 'Making C-Kermit $(CKVER) for Xelos & Public Domain Dirent calls'
8532         @echo 'or System V R2 or earlier...'
8533         $(MAKE) wermit \
8534         "CFLAGS = -DATTSV -Dvoid=int -DDIRENT -DCK_CURSES \
8535         $(KFLAGS) -O" "LNKFLAGS =" "LIBS= -lcurses -ltermlib"
8536
8537 #Encore, UMAX 4.3 (BSD) but without acucntrl program.
8538 encore:
8539         $(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=$(KFLAGS)"
8540
8541 #Encore, as above, but with curses file transfer display included.
8542 encorec:
8543         $(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=-DCK_CURSES $(KFLAGS)" \
8544         "LIBS= -lcurses -ltermcap"
8545
8546 #Encore, UMAX 4.3 (BSD) but without acucntrl program.
8547 umax43:
8548         @echo Making C-Kermit $(CKVER) for Encore UMAX 4.3...
8549         $(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8550         "CFLAGS= -DBSD43 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8551
8552 #Encore, UMAX 4.2 (BSD)
8553 umax42:
8554         @echo Making C-Kermit $(CKVER) for Encore UMAX 4.2...
8555         $(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8556         "CFLAGS= -DBSD4 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8557
8558 #Encore 88K UMAX 5.3 with TCP/IP support
8559 encore88k:
8560         @echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP...'
8561         $(MAKE) xermit \
8562         "CFLAGS = -q ext=pcc -DSVR3 -DTCPSOCKET -DDIRENT \
8563         -DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8564
8565 #Encore 88K UMAX 5.3 with TCP/IP support
8566 encore88kgcc:
8567         @echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP, gcc...'
8568         $(MAKE) xermit CC=gcc CC2=gcc \
8569         "CFLAGS = -DSVR3 -DTCPSOCKET -DDIRENT \
8570         -DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8571
8572 #SONY NEWS, NEWS-OS 4.01C
8573 sonynews:
8574         @echo Making C-Kermit $(CKVER) for SONY NEWS-OS 4.01C...
8575         $(MAKE) xermit "CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O"
8576
8577 #Run Lint on this mess for selected versions.
8578 #These are pretty much obsolete since ANSI C / gcc.
8579 lintsun:
8580         @echo 'Running Lint on C-Kermit $(CKVER) sources for SunOS version...'
8581         lint -x -DSUNOS4 -DDIRENT -DTCPSOCKET -DSAVEDUID \
8582         ck[cu]*.c > ckuker.lint.sun
8583
8584 lintbsd:
8585         @echo 'Running Lint on C-Kermit $(CKVER) sources for BSD 4.2 version..'
8586         lint -x -DBSD4 -DTCPSOCKET ck[cu]*.c > ckuker.lint.bsd42
8587
8588 lints5:
8589         @echo 'Running Lint on C-Kermit $(CKVER) sources for Sys V version...'
8590         lint -x -DATTSV ck[cu]*.c > ckuker.lint.s5
8591
8592 #Who remembers TECO?
8593 love:
8594         @echo 'Not war?'