Standards-Version: 3.9.6 (no changes)
[ckermit.git] / makefile
1 # makefile / Makefile / ckuker.mak / CKUKER.MAK
2 #
3 # Sun Aug 21 10:33:08 2011
4 BUILDID=20110821
5 CKVER= "9.0.302"
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 # For new developments, also check:
26 #
27 #    http://www.columbia.edu/~fdc/kermit/
28 #
29 # Contributions from many others.  Special thanks to Jeff Altman for the
30 # secure-build targets, Peter Eichhorn, assyst GmbH, for the consolidated
31 # HP-UX targets and the "uninstall" target, to Robert Lipe for the updated
32 # and consolidated SCO UNIX / ODT / OSR5 targets, to Ric Anderson for the
33 # IRIX 6.x targets, to Seth Theriault for major improvements to the
34 # Mac OS X targets, and to Alexey Dokuchaev for FreeBSD 9.0.
35 #
36 # C-Kermit is written and produced by hand without any automated procedures
37 # such as autoconf / automake / configure, although some of the targets below
38 # (especially the linux target) inspect the environment and make some
39 # decisions in the most portable way possible. The automated tools are not
40 # used because (a) C-Kermit predates them, and (b) they are not portable to
41 # all the platforms where C-Kermit must be (or once was) built, and (c) to
42 # keep C-Kermit as independent as possible from external tools over which
43 # we have no control.
44 #
45 # Most entries use the "xermit" target, which uses the select()-based CONNECT
46 # module, ckucns.c.  The "wermit" target uses the original fork()-based CONNECT
47 # module, ckucon.c, which has some drawbacks but was portable to every Unix
48 # variant whether it had TCP/IP or not (select() is part of the TCP/IP
49 # library, which was not standard on older Unixes).  If your target still uses
50 # the "wermit" target, please try substituting the "xermit" one and if it
51 # works, let us know (mailto:kermit-support@columbia.edu).  When changing a
52 # target over from wermit to xermit, also remove -DNOLOEARN.
53 #
54 # CAREFUL: Don't put the lowercase word "if", "define", or "end" as the first
55 # word after the "#" comment introducer in the makefile, even if it is
56 # separated by whitespace.  Some versions of "make" understand these as
57 # directives.  Uppercase letters remove the danger, e.g. "# If you have..."
58
59 # WARNING: This is a huge makefile.  Although this is less likely since the
60 # turn of the century, some "make" programs might run out of memory.  If this
61 # happens to you, edit away the parts that do not apply to your platform and
62 # try again.
63 #
64 # WARNING 2: In many cases this file invokes itself recursively, sometimes
65 # several levels deep (as in the Linux targets); i.e. some targets are used
66 # as 'subroutines' of other targets, with parameters passed by setting
67 # environment variables.  For that reason, don't use 'make -e'.
68 #
69 # Certain UNIX variations have their own separate makefiles:
70 #  . For 2.10 or 2.11 BSD on the DEC PDP-11, use ckubs2.mak.
71 #  . For Plan 9, use ckpker.mk.
72 #
73 # Separate build procedures are provided non-UNIX platforms: VMS, VOS,
74 # AOS/VS, etc.  See the ckaaaa.txt file or the Kermit website for details.
75 #
76 #
77 # DIRECTIONS FOR UNIX
78 #
79 # Rename this file to "makefile" or "Makefile" if necessary.  Pick out the
80 # entry most appropriate for your UNIX version from the list below and then
81 # give the appropriate "make" command, for example "make aix", "make macosx",
82 # "make linux".  If you experience any difficulties with the build procedure,
83 # then please also read any comments that accompany the make entry itself
84 # (search for the make entry name on the left margin).
85 #
86 # Other targets:
87 #  'make install' is an installation script (read accompanying comments!).
88 #  'make uninstall' undoes 'make install' (read accompanying comments!).
89 #  'make clean' removes intermediate and object files.
90 #  'make show' tells the default include and lib paths for secure builds.
91 #
92 # IMPORTANT:
93 #   For more detailed installation instructions, read the files ckuins.txt
94 #   and ckccfg.txt, also available at the Kermit website in HTML form:
95 #   http://www.columbia.edu/kermit/ckuins.html
96 #   http://www.columbia.edu/kermit/ckccfg.html
97 #
98 #  For descriptions of known problems and limitations,
99 #   read the files ckcbwr.txt and ckubwr.txt (the "beware files") or:
100 #   http://www.columbia.edu/kermit/ckcbwr.html
101 #   http://www.columbia.edu/kermit/ckubwr.html
102 #
103 # Most targets build C-Kermit with its symbol table included.  To reduce the
104 # size of the executable program, add "LNKFLAGS=-s" to the end of your 'make'
105 # command or to the makefile entry, or 'strip' the executable after
106 # building.  To further reduce the size after building, use 'mcs -d' if your
107 # Unix version has such a command.  For further details on size reduction, read
108 # ckccfg.txt to find out how to remove features that you don't need.
109 #
110 # TCP/IP networking support: If your C-Kermit version does not include TCP/IP
111 # networking, but your UNIX system does, try adding -DTCPSOCKET to the CFLAGS
112 # of your makefile entry.  If that doesn't work, look at some of the other
113 # targets that include this flag for ideas about what libraries might need to
114 # be included (typically -lsocket and/or -lBSD and/or -lnsl and/or -linet).
115 # NOTE: In some cases (old versions of SCO or HP-UX), you might need not only
116 # a C compiler, but also a "TCP/IP developers kit" for the required object
117 # libraries and header files.
118 #
119 # Please report modifications, failures (preferably with fixes) or successes
120 # to the author, fdc@columbia.edu.
121 #
122 # TARGETS FOR DIFFERENT UNIX PLATFORMS AND VERSIONS:
123 #
124 # + Marks those that have been built successfully for C-Kermit 9.0 or later.
125 # - Those that once built OK but no longer do (e.g. too big).
126 # ? Those that worked in a previous version but have not been tested recently.
127 # --------------------------
128 # Some commonly used targets:
129 #
130 # + "make linux" should work for any version of Linux on any hardware.
131 # + "make linux+ssl" ditto, with OpenSSL security added.
132 # + "make linux+krb5" ditto, with Kerberos 5 security added.
133 # + "make linux+krb5+ssl" Linux with OpenSSL and Kerberos 5.
134 # + "make netbsd", NetBSD, any version.
135 # + "make netbsd+ssl", NetBSD with OpenSSL 0.9.7 or later.
136 # + "make netbsd+krb5", NetBSD with Kerberos 5.
137 # + "make netbsd+krb5+ssl", NetBSD with Kerberos 5 and OpenSSL 0.9.7 or later.
138 # ? "make freebsd1" for FreeBSD 1.x
139 # ? "make freebsd2" for FreeBSD 2.x
140 # + "make freebsd3" for FreeBSD 3.x
141 # ? "make freebsd4" for FreeBSD 4.0
142 # + "make freebsd", FreeBSD 4.1 or later.
143 # + "make freebsd+ssl", FreeBSD 5.0 or later with OpenSSL 0.9.7 or later.
144 # + "make openbsd", OpenBSD 2.3 or later.
145 # + "make openbsd+ssl", OpenBSD 2.3 or later with OpenSSL 0.9.7 or later.
146 # + "make mirbsd", MirBSD.
147 # + "make mirbsd+ssl", MirBSD with OpenSSL 0.9.7 or later.
148 # + "make macosx" should work for any Mac OS X version 10.3.9 or later.
149 # + "make macosx+krb5+openssl" Mac OS X 10.3.9 or later + Kerberos V + OpenSSL.
150 # + "make aix" should work for any version of AIX 4.2 or later.
151 # + "make aixg" should work for any version of AIX 4.2 or later, using gcc.
152 # + "make aix+ssl" ditto, with OpenSSL (specifying SSLLIB and SSLINC)
153 # + "make aix+ibmssl" ditto, with IBM OpenSSL
154 # + "make solaris9", "make solaris10" for Solaris 9 or 10 with Sun cc.
155 # + "make solaris9g", "make solaris10g" for Solaris 9 or 10 with gcc.
156 # + "make solaris11" for Solaris 11 with Sun CC
157 # + "make solaris11g" for Solaris 11 with gcc
158 # + "make sco_osr600" for SCO OpenServer 6.0.0.
159 #
160 # For other current OSs such as Solaris, HP-UX, and SCO there are separate
161 # targets for different combinations of OS version and compiler; see the
162 # complete list.  For older OS's see the complete list.  If an old target
163 # doesn't work in this release of C-Kermit you can get a previous release from
164 # the Kermit FTP site: ftp://kermit.columbia.edu/kermit/
165 #
166 # SECURE TARGETS (versions that support authentication and encryption)
167 #  are described after the following list.  Search for ******* below.
168 #
169 # --------------------------
170 # Complete list (alphabetical):
171 # ? for 386BSD (Jolix) 0.0, 0.1, "make 386bsd" (see comments in entry),
172 #     or (preferably, if it works) "make bsd44" or "make bsd44c".
173 # ? for Acorn RISCiX, "make riscix" or "make riscix-gcc"
174 # ? for Alliant FX/8 with Concentrix 4.1 or later, "make bsdlck"
175 # ? for Altos 486, 586, 986 with Xenix 3.0, "make altos"
176 # ? for Altos ACS68000, 8Mhz 68000, UNIX System 3 Rel 2, 512K, "make altos3"
177 # ? for Amdahl UTS 2.4 on IBM 370 series & compatible mainframes, "make uts24"
178 # ? for Amdahl UTSV IBM 370 series & compatible mainframes, "make utsv"
179 # ? for Amdahl UTSV IBM 370 series mainframes with TCP/IP, "make utsvtcp"
180 # ? for Amdahl mainframes with UNIX System V R 5.2.6b 580, "make sys3"
181 # ? for Apollo Aegis 9.x, DOMAIN/IX 9.x, "make aegis"
182 #    (Last tested in C-Kermit 5A(189))
183 # ? for Apollo DOMAIN/IX, if the above fails, try "make apollobsd"
184 # ? for Apollo with SR10.0 or later, BSD environment, "make sr10-bsd"
185 # ? for Apollo with SR10.0 or later, System V environment, "make sr10-s5r3"
186 # ? for Apple Macintosh II with A/UX pre-3.0, "make aux", "auxgcc" or "auxufs"
187 # ? for Apple Macintosh with A/UX 3.0 and gcc, "make aux3gcc" or aux3gccc
188 # ? for Apple PowerMac with MkLinux, "make mklinux" (read Linux entry first)
189 # ? for Apple PowerMac with LinuxPPC, "make linuxppc"
190 # ? for Apple Macintosh with Minix 1.5.10, "make minix68k" or "make minixc68"
191 # ? for Apple Macintosh with Mac OS X 1.0 (Rhapsody), "make macosx10"
192 #     (no curses), "make macosx10c" (curses), or "make macosx10nc" (ncurses).
193 #     Or "make macosx10ncx" (ncurses but "make macosx10nc" doesn't work).
194 # ? for Apple Macintosh with Mac OS X 10.2, "make macosx102nc" (ncurses).
195 # ? for Apple Macintosh with Mac OS X 10.3, "make macosx103"
196 # ? for Apple Macintosh with Mac OS X 10.3.9 or later, "make macosx"
197 # ? for Arix System 90 with AT&T SVR3, "make sys5r3na"
198 # - for AT&T 6300 with IN/ix, "make sys5"
199 # - for AT&T 6300 PLUS, "make att6300" or (with no debugging) "make att6300nd"
200 # ? for AT&T 6386 WGS UNIX PC, "make sys5r3"
201 # ? for AT&T 3B2, 3B20 systems, "make att3b2".
202 #   for AT&T 3B1, 7300 UNIX PC (see notes with the entries):
203 #     In C-Kermit 7.0, only the gcc entries work:
204 # ?   "make sys3upcg", "make sys3upcgc", "make att351gm"
205 #    The others fail with "too many defines" (usually in ckuusr.h):
206 # -   "make sys3upc", "make sys3upcold", "make sys3upcc", "make sys3upcx",
207 #       "make sys3upcm", "make att351m"
208 # ? for AT&T System III/System V R2 or earlier, "make sys3" or "make sys3nid"
209 # ? for AT&T System III/System V with Honey DanBer UUCP, "make sys3hdb"
210 # ? for AT&T System V on DEC VAX, "make sys3" or "make sys5r3"
211 # ? for AT&T System V R3, use "make sys5r3" or "make sys5r3c"
212 # ? for AT&T System V/386 R3.2 built on Interactive 4.1.1, "make sys5r32is".
213 # ? for AT&T System V/386 R320.0 Versyss Systems, use "make sys5r3"
214 #     or "make sys5r3c".
215 # ? for AT&T System V R4, "make sys5r4", "make sys5r4sx", or "make sys5r4nx",
216 #     or if the ANSI C function prototyping makes trouble, add -DNOANSI,
217 #     as in "sys5r4sxna" entry
218 # ? for AT&T (USL) System V R4.2 use the sys5r4* entries.
219 # ? for Atari Falcon with MiNT, "make posix"
220 # ? for Atari ST with Minix ST 1.5.10.3, "make minix68k" or "make minixc68"
221 # ? for BBN C/70 with IOS 2.0, "make c70"
222 # ? for BeBox with Be OS 1.x DR7, "make beboxdr7"
223 #     Compiles OK but doesn't link with default linker which is limited to 64K.
224 #     Links OK with "Code Warrior Gold".  Many hacks in the source code need
225 #     to be removed when DR8 and later come out.
226 #     (Last tested in C-Kermit 6.0)
227 # - for BeBox with Be OS 1.x DR8, "make bebox"
228 #     (Needed functions missing from operating system and/or not working.)
229 # - for Bell Labs UNIX Version 6 (6th Edition), there is no makefile entry.
230 # ? for Bell Labs UNIX Version 7 (7th Edition), "make v7" (but see notes below)
231 #    (last built successfully in C-Kermit 5A188)
232 # ? for Bell Labs Research UNIX Version 10, "make bellv10"
233 #    (last built successfully in C-Kermit 6.0)
234 # ? for Bell Labs / Lucent Plan 9, use separate makefile ckpker.mk:
235 #    can be built for Intel, MIPS, 680x0, and PowerPC (last built C-Kermit 7.0)
236 # ? for BSDI BSD/386 1.x, "make bsdi"
237 # ? for BSDI BSD/OS 2.x, "make bsdi2"
238 # ? for BSDI BSD/OS 3.0 or 3.1, "make bsdi3"
239 # ? for BSDI BSD/OS 4.x, "make bsdi4"
240 # ? for BSDI BSD/OS 4.x, to build a binary that also works on FreeBSD,
241 #     "make bsdix".
242 # ? for Berkeley Unix 2.4, "make v7" (but read v7 material below)
243 # ? for Berkeley Unix 2.9 (DEC PDP-11 or Pro-3xx), "make bsd29"
244 # - for Berkeley Unix 2.10, use ckubs2.mak (a separate makefile)
245 # - for Berkeley Unix 2.11, use ckubs2.mak (a separate makefile)
246 #     This makefile is too big.  Read the instructions in ckubs2.mak.
247 #     "make -f ckubs2.mak bsd210" or "make -f ckubs2.mak bsd211".
248 #     (last built successfully in C-Kermit 6.0 - later versions too big)
249 # ? for Berkeley Unix 2.11 "make -f ckubs2.mak bsd210noicp" (no command parser)
250 # ? for Berkeley Unix 4.1, "make bsd41"
251 # ? for Berkeley Unix 4.2 on VAX, "make bsd42" or "make bsd42c"
252 # ? for Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP, "make bsdhdb"
253 # ? for Berkeley Unix 4.3 on VAX, "make bsd43", "make bsd43nc".
254 # ? for Berkeley Unix 4.3 on VAX, no networking "make bsd43nonet.
255 # ? for Berkeley Unix 4.3 without acucntrl program, "make bsd42" or "bsd42c"
256 #     NOTE: all the C-Kermit 7.0 full builds for old BSDs fail with
257 #     "too many defines" in CPP, even on big architectures like VAX.  This
258 #     can be worked around with a clever ruse.  See comments at target.
259 # ? for Berkeley Unix 4.3, command-line only, "make bsdm".
260 # ? for Berkeley Unix 4.3-Tahoe, same as 4.3 BSD
261 # ? for Berkeley Unix 4.3-Reno, "make bsd43" or "make bsd44" or "make bsd44c"
262 # ? for Berkeley Unix 4.3-Carson City, "make bsd44" or "make bsd44c"
263 # ? for Berkeley Unix 4.4-Networking/2 or -Alpha, "make bsd44" or "make bsd44c"
264 # ? for Berkeley Unix 4.4, "make bsd44" or "make bsd44c"
265 # ? for Berkeley Unix 4.4-Lite, "make bsd44" or "make bsd44c"
266 # ? for Bull DPX/2 with BOS/X, "make bulldpx2"
267 # ? for Cadmus, "make sys3"
268 #   for Caldera, see SCO, Linux.
269 # ? for Callan Unistar, "make sys3"
270 # ? for CDC VX/VE 5.2.1 System V emulation, "make vxve"
271 # ? for Charles River Data Systems Universe 680x0 with UNOS 9.2, maybe
272 #     also other UNOS versions, "make crds"
273 # ? for CIE Systems 680/20 with Regulus, "make cie"
274 # ? for Commodore Amiga 3000UX Sys V R4, "make sys5r4sx"
275 # ? for Commodore Amiga 3000UX Sys V R4 and TCP/IP, "make svr4amiganet"
276 # ? for Commodore Amiga with Minix 1.5.10, "make minix68k" of "make minixc68"
277 # ? for Concurrent/Masscomp with RTU 4.0 or later, BSD environment, "make
278 #     rtubsd", "make rtubsd2", "make rtubsd3" (depending on where ndir.h
279 #     is stored, see entries below).
280 # ? for Concurrent/Masscomp with RTU 4.0 or later, System V R2, "make rtus5"
281 # ? for Concurrent (Perkin-Elmer) 3200 series, "make sys5".
282 # ? for Concurrent (Perkin-Elmer) 3200 series with <dirent.h>, "make ccop1"
283 # ? for Concurrent PowerMAX OS SVR4, "make powermax"
284 # ? for Consensys UNIX SV/386 R4V3, "make sys5r4sxtcpc" or "make sys5r4sx"
285 # ? for Convergent with CTIX Sys V R2, "make sys5"
286 # ? for Convergent with CTIX 6.4.1, "make ctix"
287 # ? for Convex C1, "make convex"
288 # ? for Convex C210 with Convex/OS 8, "make convex8"
289 # ? for Convex C2 with Convex/OS 9.1, "make convex9"
290 # ? for Convex C2 with Convex/OS 10.1 and gcc 2.x, "make convex10gcc"
291 # ? for Cray Research X/MP or YMP or C90 with UNICOS 6.x (System V R3),
292 #       "make cray"
293 # ? for Cray Research X/MP or YMP or C90 with UNICOS 7.x (System V R4),
294 #       "make cray"
295 # ? for Cray Research X/MP or YMP or C90 with UNICOS 8.0 Alpha, "make cray8"
296 # ? for Cray Research X/MP or Y-MP or C90 with UNICOS 9.0, "make cray9"
297 # ? for Cray Computer Cray-2 or Cray3 with CSOS, "make craycsos"
298 # ? for Cyber 910 (Silicon-Graphics Iris) with Irix 3.3, "irix33"
299 # ? for Data General AViiON with DG/UX 5.4 before R3.00, "make dgux540"
300 #     or "make dgux540c" (compile ckwart separately if necessary)
301 # ? for DG/UX 5.4 on AViiON Intel models, "make dgux540i" or dgux540ic.
302 # ? for DG/UX 5.4R4.11 on AViiON, all models, "make dgux54411"
303 # ? for DG/UX 5.4R4.20 on AViiON, all models, "make dgux54420"
304 # ? for Data General AViiON with DG/UX 4.3x using Sys V-isms, "make dgux430"
305 # ? for Data General AViiON with DG/UX 4.3x using BSD-isms, "make dgux430bsd"
306 # ? for Data General AViiON, earlier UNIX versions,
307 #     "make sys5r3" (maybe compile ckwart separately, or "touch ckcpro.c")
308 # ? for Data General MV systems with DG/UX, ???
309 # ? for Data General MV systems with MV/UX, use AOS/VS C-Kermit (CKDKER.MAK)
310 # ? for Data General MV systems with AOS/VS, use CKDKER.MAK (last = C-K 7.0)
311 # ? for DEC PDP-11 with Berkeley UNIX 2.x, see Berkeley UNIX 2.x.
312 # ? for DEC PDP-11 with Mini-UNIX (Bell 6th Edition for PDP-11 with no MMU),
313 #     probably no way to fit C-Kermit without I&D space.
314 # ? for DEC PDP-11 with Ultrix-11 3.x, ??? (probably needs overlays)
315 # ? for DEC VAX with Ultrix 1.x "make bsd"
316 # ? for DEC VAX with Ultrix 2.x "make ultrix2x"
317 # ? for DEC VAX or DECstation with Ultrix 3.0, 3.1, "make ultrix3x"
318 # ? for DECstation or VAX with Ultrix 4.0 or 4.1, "make ultrix40"
319 # ? for DECstation or VAX with Ultrix 4.2, "make ultrix42" or "make ultrix42c"
320 # ? for DECstation or VAX with Ultrix 4.x, POSIX world, "make posix"
321 # ? for DECstation or VAX with Ultrix 4.3, "make ultrix43".
322 # ? for DECstation or VAX with Ultrix 4.4, "make ultrix44".
323 # ? for DECstation 5000/50, /150 or /260 (R4x00 MIPS CPU), Ultrix 4.3A or later
324 #     "make ultrix43-mips3" or "make ultrix43c-mips3"
325 # ? for DECstation (MIPS) with Berkeley Sprite, "make bsd44"?
326 # ? for DECstation (MIPS) with OSF/1 V1.0 to 1.3, "make dec-osf"
327 # ? for DEC Alpha with OSF/1 1.0 to 1.3, "make dec-osf"
328 # ? for DEC PC 486 with OSF/1, "make dec-osf"
329 # ? for DEC Alpha with OSF/1 2.x, "make dec-osf20"
330 # ? for DEC Alpha with OSF/1 3.0, "make dec-osf30"
331 # ? for DEC Alpha with Digital UNIX 3.2, "make du32"
332 # ? for DEC Alpha with Digital UNIX 4.0-4.0D, "make du40" or "make du40gcc"
333 # ? for DEC Alpha with Digital UNIX 4.0E or higher, see Tru64.
334 # + for DEC Alpha with any version of DU or OSF/1, "make dec-osf1"
335 # - for DEC Pro-350 with Pro/Venix V1.x, "make provx1" (version 5A is too big)
336 # ? for DEC Pro-380 with Pro/Venix V2.0 (Sys V), "make sys3" or "make sys3nid"
337 # ? for DEC Pro-380 with 2.9, 2.10, or 2.11 BSD, "make bsd29" or "make bsd210"
338 #   for DEC PDP-11 with 2.xBSD (use separate makefile ckubs2.mak)
339 # ? for Dell UNIX Issue 2.x (= USL Sys V/386 R4.x + fixes), "make dellsys5r4"
340 #     or "make dellsys5r4c" (last tested in C-Kermit 5A).
341 # ? for DIAB DS90 with DNIX (any version) create an empty <sys/file.h> if
342 #     this file does not already exist (or add -DNOFILEH to the make entry).
343 # ? for DIAB DS90 with DNIX 5.2 (Sys V.2) or earlier, "make dnix",
344 #     "make dnixnd", or (to add curses and TCP/IP) "make dnixnetc",
345 # ? for DIAB DS90 with DNIX 5.3 (Sys V.3), "make dnix5r3"
346 # ? for DIAB DS90 with DNIX 5.3 (Sys V.3) and TCP/IP, "make dnix5r3net"
347 # ? for DIAB DS90 with DNIX 5.3 2.2 (Sys V.3), ANSI C, "make dnix5r3ansi"
348 #     or, to include TCP/IP, "make dnix5r3ansinet",
349 #     but you have to fix a bug in /usr/include/stdlib.h first:
350 #     change "extern void free(char *str);" to "extern void free(void *str);"
351 # ? for Dolphin Server Technology Triton 88/17 with SV/88 R3.2, "make sv88r32"
352 # ? for Encore Multimax 310, 510 with Umax 4.2, "make umax42"
353 # ? for Encore Multimax 310, 510 with Umax 4.3, "make umax43"
354 # ? for Encore Multimax 310, 510 with Umax V 2.2, use Berkeley cc, "make bsd"
355 # ? for Encore 88K with Umax V 5.2, "make encore88k"
356 # ? for ESIX System V R4.0.3 or 4.04 with TCP/IP support, "make esixr4"
357 #     NOTE: You can also build on Unixware 2.x with "make esixr4", and run
358 #     on ESIX, but there you must first:
359 #       ln /usr/lib/libsocket.so /usr/lib/libsocket.so.1
360 #       ln /usr/lib/libnsl.so /usr/lib/libnsl.so.1
361 #     (This worked for C-Kermit 6.0 but does not work for 7.0)
362 #     (But you can probably still build a non-networking version this way)
363 # ? for Everex STEP 386/25 Rev G with ESIX Sys V R3.2D, "make sys5r3"
364 # ? for Fortune 32:16, For:Pro 1.8, "make ft18"
365 # ? for Fortune 32:16, For:Pro 2.1, "make ft21"
366 # ? for FPS 500 with FPX 4.1, "made bsd"
367 # ? for FreeBSD 1.0, "make freebsd1"
368 # ? for FreeBSD 2.x, "make freebsd2" (ncurses) or "make freebsd2c" (curses)
369 # ? for FreeBSD 3.x, "make freebsd3" (ncurses) or "make freebsd3c" (curses)
370 # ? for FreeBSD 4.0, "make freebsd40"
371 # ? for FreeBSD 4.1 or later, "make freebsd"
372 # + NOTE: Just use "make freebsd" for any reasonably recent FreeBSD version.
373 # ? for Harris HCX-2900, "make sys5r3"
374 # ? for Harris Night Hawk 88K or 68K with CX/UX pre-6.1, "make sys5r3"
375 # ? for Harris Night Hawk 88K or 68K with CX/UX 6.1 or later, "make cx_ux"
376 # ? for Heurikon, "make sys3"
377 # ? for HP-3000, MPE/ix, "make posix"?
378 # ? for HP-9000 Series 300 with 4.4BSD, "make bsd44"
379
380 # NOTE: Most of the HP-UX targets were tested successfully in 2010.
381 # Verification needed for C-Kermit 9.0 Beta.01...
382
383 # ? for HP-9000 Series 500, HP-UX 5.21 and no networking "make hpux0500"
384 # ? for HP-9000 Series 500, HP-UX 5.21 with WIN/TCP 1.2 "make hpux0500wintcp"
385 # ? for HP-9000 Series, HP-UX 6.5, without long filenames,
386 #     "make hpux0650", "make hpux0650c" or "make hpux0650tcpc"
387 # ? for HP-9000 Series, HP-UX 7.0 or later no long filenames, "make hpux0700sf"
388 #     or (to include tcp/ip, curses, etc) "make hpux0700sftcpc"
389 # ? for HP-9000 Series with HP-UX 7.0, TCP/IP,long filenames,"make hpux0700lfn"
390 # ? for HP-9000 300/400 Series (680x0) with HP-UX 8.0, TCP/IP, "make hpux0800"
391 #      or "make hpux0800c"
392 # ? for HP-9000 700/800 Series (PA-RISC), HP-UX 8.0, TCP/IP, "make hpux0800pa"
393 #      or "make hpux0800pac"
394 # ? for HP-9000 Series with HP-UX 8.0, no TCP/IP, long filenames,
395 #      "make hpux0800notcp"
396 # ? for HP-9000 Series, HP-UX 9.0 - 9.10, TCP/IP, curses, restricted compiler
397 #     (no optimization, no ANSI), all models, "make hpux0900".  Read the
398 #     hpux0900 entry below for more info.
399 # ? for HP-9000 700 and 800 Series, HP-UX 9.x, TCP/IP, curses,
400 #     HP optimizing ANSI C compiler, "make hpux0900o700".
401 # ? for HP-9000 with Motorola CPUs, HP-UX 9.x, TCP/IP, curses,
402 #     HP optimizing ANSI C compiler, "make hpux0900mot".
403 # ? for HP-9000 on other CPUs, HP-UX 9.x, TCP/IP, curses,
404 #     HP optimizing ANSI C compiler, "make hpux0900o".
405 # ? for HP-9000 series, HP-UX 9.x, TCP/IP, curses, gcc, all models,
406 #     "make hpux0900gcc"
407 # ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
408 #     curses, restricted compiler (no optimization, no ANSI) "make hpux1000".
409 # ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
410 #     curses, HP ANSI/optimizing compiler "make hpux1000o" or "make hpux1000o+"
411 # ? for HP-9000 HP-UX 10.00 or later with gcc, "make hpux1000gcc"
412 # ? for Trusted HP-UX 10.xx "make hpux1000t", "make hpux1000to",
413 #     or make hpux1000to+"
414 # ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
415 #     (no optimization, no ANSI) "make hpux1100".
416 # ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
417 #     HP ANSI/optimizing compiler "make hpux1100o" or "make hpux1100o+"
418 # ? for Trusted HP-UX 11.xx "make hpux1100t", "make hpux1100to",
419 #     make hpux1100to+"
420 # ? for HP-9000 PA-RISC models with NeXTSTEP 3.3, "make nextquadfat".
421 # ? for HP-9000 PA-RISC models with OPENSTEP/Mach 4.1, "make nextquadfat".
422 # ? for IBM 370 Series with IX/370, "make ix370"
423 # ? for IBM 370 Series with AIX/370 1.2, "make aix370"
424 # ? for IBM 370 Series with AIX/370 3.0, "make aix370"
425 # ? for IBM 370 Series with AIX/ESA 2.1, "make aixesa"
426 # - for IBM PC/AT 286 & compatibles with Mark Williams Coherent OS,
427 #     command-line-only version, "make coherent" (version 5A & later too big)
428 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
429 #     minimum interactive version, "make coherentmi"
430 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
431 #     full interactive version, prior to v4.2, "make coherentmax"
432 # ? for IBM PC 386 & compatibles with Mark Williams Coherent OS 4.2,
433 #     "make coherent42"
434 # ? for IBM PC 386 & compatibles with LynxOS 2.0 or 2.1, "make lynx21"
435 # ? for IBM PC 386 & compatibles with LynxOS 2.2, "make lynx"
436 # - for IBM PC/AT & compatibles with original MINIX, "make minix" (too big)
437 # ? for IBM PC family, 386-based, with MINIX/386 1.5, "make minix386"
438 #     or if you have GNU CC, "make minix386gcc"
439 # ? for IBM PC family, 386-based, with MINIX 2.0, "make minix20"
440 # ? for IBM PC family, 386-based, with MINIX 3.0, "make minix3"
441 # + for IBM PC family, 386-based, with MINIX 3.0, "make minix315"
442 # ? for IBM PS/2 with PS/2 AIX 1.0, 1.1, or 1.2, "make ps2aix" or ps2aixnetc.
443 # ? for IBM PS/2 with PS/2 AIX 1.3, "make ps2aix3"
444 # ? for IBM RISC System/6000 with AIX 3.0, "make aix30"
445 # ? for IBM RISC System/6000 with AIX 3.1.x, "make aix31"
446 # ? for IBM RISC System/6000 with AIX 3.2.0 thru 3.2.5, "make aix32"
447 # ? for IBM RS/6000 or Power Series with AIX 4.1.x, "make aix41"
448 # ? for IBM RS/6000 or Power Series with AIX 4.1.x with gcc, "make aix41g"
449 # ? for IBM RS/6000 or Power Series with AIX 4.1 with X.25, "make aix41x25"
450 # ? for IBM RS/6000 or Power Series with AIX 4.2 or later: "make aix"
451 #  (the following "make aixnn" targets are no longer necessary except for gcc)
452 # ? for IBM RS/6000 or Power Series with AIX 4.2, "make aix42"
453 # ? for IBM RS/6000 or Power Series with AIX 4.3, "make aix43" (or aix43gcc)
454 # ? for IBM RS/6000 or Power Series with AIX 4.4, "make aix44" (or aix44gcc)
455 # ? for IBM RS/6000 or Power Series with AIX 4.5, "make aix45" (or aix45gcc)
456 # ? for IBM RS/6000 or Power Series with AIX 5.0, "make aix50" (or aix50gcc)
457 # ? for IBM RS/6000 or Power Series with AIX 5.1, "make aix51" (or aix51gcc)
458 # ? for IBM RS/6000 or Power Series with AIX 5.2, "make aix52" (or aix52gcc)
459 # ? for IBM RS/6000 or Power Series with AIX 5.3, "make aix53" (or aix53gcc)
460 # ? for IBM RS/6000 or Power Series with AIX 6.1, "make aix61" (or aix53gcc)
461 # ? for IBM RT PC with AIX 2.1, "make sys3"
462 # ? for IBM RT PC with AIX 2.2.1, "make rtaix" or "make rtaixc"
463 # ? for IBM RT PC with ACIS 4.2, "make bsd"
464 # ? for IBM RT PC with ACIS 4.3, "make rtacis" or "make bsd KFLAGS=-DNOANSI"
465 # ? for IBM RT PC with 4.3BSD/Reno, "make bsd44" or "make bsd44c"
466 # ? for ICL DRS400 or 400E, "make iclsys5r3"
467 # ? for ICL DRS3000 (80486) with DRS/NX, "make iclsys5r4_486"
468 # ? for ICL DRS6000 (SPARC) with DRS/NX, "make iclsys5r4"
469 # ? for ICL DRS6000 (SPARC) with DRS/NX 4.2MP 7MPlus, "make iclsys5r4m+"
470 # ?     Ditto but with IKSD support included, "make iclsys5r4m+iksd"
471 # ? for Integrated Solutions Inc V8S VME 68020, "make isi"
472 # ? for Intel 302 with Bell Tech Sys V/386 R3.2, "make sys5r3"
473 # ? for Intel Xenix/286, "make sco286"
474 # ? for Interactive System III (PC/IX), "make pcix" or "make is3"
475 # ? for Interactive System III (PC/IX) with gcc, "make is3gcc"
476 # ? for Interactive 386/ix 1.0.6 with TCP/IP networking, "make is5r3net2"
477 # ? for Interactive 386/ix 2.0.x, "make is5r3" or (POSIX) "make is5r3p"
478 # ? for Interactive 386/ix 2.0.x with TCP/IP networking, "make is5r3net"
479 #     or "make is5r3net2"
480 # ? for Interactive 386/ix 2.2.1, job control, curses, no net, gcc,
481 #     "make is5r3gcc"
482 # ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 without TCP/IP, "make is5r3jc"
483 # ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 with TCP/IP, "make is5r3netjc"
484 # ? for Intergraph Clipper, "make clix" or "make clixnet"
485 # ? for Jolix (see 386BSD)
486 # + for Linux 1.2 and later, "make linux".  Uses ncurses.  This version
487 #     handles serial speeds up to 460800 bps, Linux FSSTD 1.2, TCP/IP, and
488 #     should work on both libc and glibc systems.  For static linking, use
489 #     "make linux LNKFLAGS=-static".  Please read the comments that accompany
490 #     the linux entry.  As of 8.0.212 Dev.10, this also includes Large File
491 #     Support (LFS).
492 # + for Linux builds that fail with "sys/select.h: No such file or directory",
493 #     "make linuxns"
494 # + for Linux 1.2 and later but with curses.h and libcurses (rather than
495 #     ncurses.h and libncurses), use "make linuxc".
496 # + for Linux 1.2 and later with no curses support at all, "make linuxnc".
497 # + for Linux with no TCP/IP, "make linuxnotcp"
498 # (The following Linux targets are historic and might not work...)
499 # ? for Red Hat Linux 7.1 through RH9, fully configured (krb5, SSL, etc):
500 #     "make redhat71", "make redhat72", "make redhat73", "make redhat80"
501 #     "make redhat9"
502 #     NOTE: You must use this target for Red Hat 7.1 since it
503 #     also includes a workaround for its broken curses library.
504 #     WARNING: These targets create binaries that include code for
505 #     strong encryption and are therefore not exportable. DO NOT PUT
506 #     THESE BINARIES ON US OR CANADIAN WEB OR FTP SITES.
507 # ? for Linux on PowerMac (Mklinux DR3), "make mklinux".
508 # ? for Linux 1.2 and later, to build with egcs, "make linuxegcs".
509 # ? for Linux with lcc compiler, no TCP/IP, "make linuxnotcp-lcc"
510 # ? for Linux 1.0 or earlier, "make linux10".
511 # (End old linux targets)
512 # ? for Mach 2.6 on (anything, e.g. DECstation), "make bsd42" or "make bsd43".
513 # ? for MachTen (Tenon) 2.1.1.D on (e.g.) Apple Powerbook, "make machten".
514 # ? for Masscomp RTU AT&T System III, "make rtu"
515 #   for other Masscomp, see Concurrent.
516 # ? for Microport SV/AT (System V R2), "make mpsysv" (last edit tested: 144)
517 # ? for Microport SVR4 2.2, 3.1, or 4.1 "make sys5r4sx"
518 # ? for Microsoft,IBM Xenix (/286, PC/AT, etc), "make xenix" or "make sco286"
519 # ? for MIPS System with RISC/os (UMIPS) 4.52 = AT&T SVR3, "make mips"
520 #     or "make mipstcpc"
521 # ? for MkLinux on Power Macintosh, "make mklinux"
522 # ? for Modcomp 9730, Real/IX, "make sys5r3" (or modify to use gcc = GLS cc)
523 # ? for Modcomp Realstar 1000 with REAL/IX D.1, "make sv88r32"
524 # ? for Motorola Four Phase, "make sys3" or "make sys3nid"
525 # ? for Motorola Delta System V/68 R3, "make sv68r3"
526 # ? for Motorola Delta System V/68 R3V5, "make sv68r3v5"
527 # ? for Motorola Delta System V/68 R3V5.1, "make sv68r3v51"
528 # ? for Motorola Delta System V/68 R3V6 with NSE TCP/IP, "make sv68r3v6"
529 # ? for Motorola Delta System V/88 R32, "make sv88r32"
530 # ? for Motorola Delta System V/88 R40, "make sv88r40"
531 # ? for Mt Xinu Mach386 on 386/486-based PCs, "make bsd43"
532 # ? for NCR Tower 1632, OS 1.02, "make tower1"
533 # ? for NCR Tower 1632 or Minitower with System V R2, "make sys3"
534 #     or "make sys3nv"
535 # ? for NCR Tower 32, OS Release 1.xx.xx, "make tower32-1"
536 # ? for NCR Tower 32, OS Release 2.xx.xx, "make tower32-2"
537 # ? for NCR Tower 32, OS Releases based on Sys V R3, "make tower32"
538 # ? for NCR Tower 32, OS Releases based on Sys V R3 with gcc "make tower32g"
539 # ? for NCR System 3000, AT&T UNIX System V R4 2.0, "make sys5r4sxna"
540 # ? for NCR System 3000, AT&T UNIX System V R4 2.0 with Wollongong TCP/IP,
541 #     "make sys5r4net2" or "make sys5r4net2c".
542 #      Some header files might be misplaced; try this:
543 #       ln /usr/include/netinet/in.h /usr/include/sys/in.h
544 #       ln /usr/include/arpa/inet.h /usr/include/sys/inet.h
545 #       ln /usr/include/sys/termiox.h /usr/include/termiox.h
546 # ? for NCR System 3000, NCR UNIX 02.02.01, same as above.
547 # ? for NCR MP-RAS System V R4 V2.03 or 3.02, "make mpras" or "make mprastcpc"
548 # + for NetBSD any version on any architecture, "make netbsd"
549 # + for NetBSD with OpenSSL, "make netbsd+ssl"
550 # ? for NetBSD with ncurses specified instead of curses, "make netbsdn"
551 # ? for NetBSD with all curses support omitted, "make netbsdnc"
552 # ? for NeXT with NeXTSTEP 1.0 through 3.2, "make next" (on a NeXT)
553 # ? for NeXT with NeXTSTEP 3.3, "make next33"
554 # ? for NeXT with OPENSTEP/Mach 4.1, "make nextquadfat".
555 # ? for NeXT with OPENSTEP/Mach 4.2, "make openstep42".
556 # ? for NeXTSTEP/486, "make next" (on a PC)
557 # ? for NeXTSTEP portable binary (runs on Intel or Motorola), "make nextfat"
558 # ? for NeXTSTEP portable binary (Intel, Motorola, HP PA-RISC, or SPARC),
559 #     "make nextquadfat"
560 # ? for Nixdorf Targon/31, "make t31tos40x"
561 # ? for Norsk Data Uniline 88/17 with SV/88 R3.2, "make sv88r32"
562 #   for Novell UnixWare - see UnixWare
563 # ? for OSF/1 (vanilla, from OS/F), "make posix"
564 # ? for OkiStation 7300 Series, "make sys5r4sxtcp"
565 # ? for Olivetti LSX-3020 with X/OS R.2.3, "make xos23" or "make xos23c"
566 # + for OpenBSD, "make openbsd" (also see secure targets listed below).
567 # ? for OPENSTEP/Mach 4.1, "make nextquadfat" (NeXT, Intel, PA-RISC, SPARC)
568 # ? for OPENSTEP/Mach 4.2, "make openstep42" (tested on NeXT)
569 # ? for Perkin-Elmer (Concurrent) 3200 series, "make sys5".
570 # ? for Perkin-Elmer (Concurrent) 3200 series with <dirent.h>, "make ccop1"
571 # ? for Perkin-Elmer/Concurrent 3200 with Xelos R02, "make ccop1"
572 # ? for PFU Compact A Series SX/A TISP V10/E50 (Japan), "make sxae50"
573 # ? for Plexus, "make sys3"
574 # ? for Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1,
575 #     "ucb make pyramid" or for HDB UUCP, "ucb make pyramid-hdb" or:
576 # ? for Pyramid MIServer S or ES Series, DataCenter/OSx, "make pyrdcosx"
577 # ? for Pyramid MIS-S MIPS R3000, DataCenter OSx System V R4, "make pyrdcosx"
578 # ? for POSIX on anything, "make posix" (but adjustments might be necessary).
579 #      NOTE: this target is not very useful - many features are missing.
580 # ? for Prime 8000 MIPS, SVR3, "make mips" or "make mipstcpc"
581 # - for QNX 2.x (sorry we don't have a version of C-Kermit for QNX 2.x)
582 # ? for QNX 4.0 or 4.1, 16-bit, on 286 PC, Watcom C 8.5, "make qnx16_41"
583 # ? for QNX 4.21 - 4.22A (286+), and 4.23 (386+), or higher, 16-bit,
584 #     Watcom C 9.5x or higher, "make qnx16"
585 # + for QNX 4.21-4.25, 32-bit, 386 or above, Watcom C 10.6, "make qnx32"
586 #     NOTE: ("make qnx" == "make qnx32")
587 # ? for QNX Neutrino 2+, "make qnx_nto2+" (crosscompiled on QNX4 with Watcom C)
588 # ? for QNX 6 = Neutrino 2.xx, "make qnx6"
589 # ? for Ridge 32 (ROS3.2), "make ridge32"
590 # ? for Samsung MagicStation, "make sys5r4"
591 # ? for SCO Xenix 2.2.1 with development system 2.2 on 8086/8 "make sco86"
592 # ? for SCO Xenix/286 2.2.1 with development system 2.2 on 80286, "make sco286"
593 #     NOTE: reportedly this makefile is too long for SCO Xenix/286 make, but it
594 #     works with "makeL", or if some of the other make entries are edited out.
595 # ? for SCO Xenix/386 2.2.2, "make sco386"
596 # ? for SCO Xenix/386 2.3.x, "make sco3r2"
597 # ? for SCO Xenix/386 SCO 2.3.3 or 2.3.4 with gcc 1.37 or later,
598 #     "make sco386gcc" or (to add curses) "make sco386gccc".
599 # ? for SCO Xenix/386 or UNIX/386 with Excelan TCP/IP, "make sco3r2net"
600 #     or (to add curses support) "make sco3r2netc" or "sco386netc"
601 # + for SCO XENIX 2.3.4, "make sco234" or "make sco234c" to add curses.
602 # ? for SCO XENIX 2.3.4 with SCO TCP/IP & curses, "make sco234netc".
603 # ? for SCO Xenix 2.3.x with Racal-InterLan TCP/IP, "make sco3r2netri"
604 #   for other UNIX varieties with Racal Interlan TCP/IP, read sco3r2netri entry
605 # ? for SCO Xenix 2.3.x with SCO (Lachman) TCP/IP, "make sco3r2lai"
606 #     or (to add curses) "make sco3r2laic"
607 #   for SCO UNIX...  ALSO READ COMMENTS in the SCO UNIX entries for more info!
608 # ? for SCO UNIX/386 3.2.0 or 3.2.1, "make sco3r2" or "make sco3r2x"
609 # ? for SCO UNIX/386 3.2.2, "make sco3r22" or "make sco3r22gcc"
610 #     or "make sco3r22c"
611 # ? for SCO UNIX/386 3.2.2 with SCO TCP/IP, "make sco3r22net"
612 #     or "make sco3r22netc" (curses)
613 # ? for SCO ODT 1.1, "make sco3r22net" or "make sco3r22netc" (curses)
614 # ? for SCO UNIX/386 3.2 V4.x, no network support, "make sco32v4"
615 # ?   or "make sco32v4ns" (this one uses no select() or sockets library)
616 # ? for SCO UNIX/386 3.2 V4.x with TCP/IP, "make sco32v4net"
617 #     (also sco32v4gcc, sco32v4netgcc)
618 # ? for SCO UNIX/386 3.2 V5.0 - see SCO OpenServer.
619 # ? for SCO UNIX 3.2v4.x with TCP/IP, <dirent.h> for Extended Acer File
620 #     System (EAFS), curses, ANSI C compilation, "make sco32v4net"
621 # ?   or (to use select()-based CONNECT module) "make sco32v4netx".
622 # ? for SCO UNIX 3.2v4.2, "make sco-odt30" (includes TCP/IP).
623 # ? for SCO MPX 3.0 - The SCO UNIX binary runs on the corresponding MPX system.
624 #
625 # NOTE: Also see below for other entries that are variations on these.
626 # Also be sure to read the comments accompanying each SCO entry.
627 # Also see Unixware section.
628 #
629 # ? for SCO ODT 2.0, "make sco32v4net"
630 # ? for SCO ODT 3.0, "make sco-odt30"
631 # ? for SCO OpenServer 5.0 (OSR5), "make sco32v500"
632 # ? for SCO OpenServer 5.0 (OSR5) with networking, "make sco32v500net"
633 # ? for SCO OpenServer 5.0 (OSR5), gcc, "make sco32v500gcc"
634 # ? for SCO OpenServer 5.0 (OSR5), gcc, with networking, "make sco32v500netgcc"
635 # ? for SCO OpenServer 5.0 (OSR5), as above, ELF, "make sco32v500netgccelf"
636 # ? for SCO OpenServer 5.0.2, use "make sco32v502xxx" entries as above.
637 # ? for SCO OpenServer 5.0.4, use "make sco32v504xxx" entries as above.
638 # ? for SCO OpenServer 5.0.5, use "make sco32v505xxx" entries as above.
639 #     Use the sco32v505udkxxx entries if you have the UDK rather than /bin/cc.
640 # ? for SCO OpenServer 5.0.6, use "make sco32v506xxx" entries as above.
641 # ? for SCO OpenServer 5.0.6a,use "make sco32v506axxx" entries as above.
642 # ? for SCO OpenServer 5.0.7, use "make sco32v507", "make sco32v507net"
643 # ? for SCO (Univel) UnixWare 1.x, "make unixware" or "make unixwarenetc".
644 #     If there are problems with this in C-K 7+ see notes at unixware entry.
645 # + for SCO OpenServer 6.0.0, "make sco_osr600"
646 # ? for SCO UnixWare 2.0.x, "make uw20"
647 # ? for SCO UnixWare 2.1.0, "make uw21"
648 # ? for SCO UnixWare 2.1.3, "make uw213"
649 # + for SCO UnixWare 7, "make uw7" (includes large file support)
650 # ? for SCO UnixWare 7 with IKSD support, "make uw7iksd" or "make uw7iksdudk"
651 # ? for SCO UnixWare 7 with OpenSSL, "make uw7ssl"
652 # ? for SCO (Caldera) Open UNIX 8, "make ou8"
653 # ? for Sharp Zaurus SL5500 PDA, "make zsl5500".
654 # ? for Sequent with DYNIX/ptx 1.2.1, "make dynixptx12"
655 # ? for Sequent with DYNIX/ptx 1.3 or 1.4 with TCP/IP, "make dynixptx13"
656 # ? for Sequent with DYNIX/ptx 2.0 or 2.1 with TCP/IP, "make dynixptx20"
657 #     or "dynixptx20c"
658 # ? for Sequent with DYNIX/ptx 2.1.6 on i486, "dynixptx216c"
659 # ? for Sequent with DYNIX/ptx V4.1.3 with TCP/IP, "make dynixptx41c"
660 # ? for Sequent with DYNIX/ptx V4.4.2 with TCP/IP, "make dynixptx44"
661 # ? for Sequent Balance 8000 or B8 with DYNIX 3.0.xx, "make dynix3"
662 #    or "make dynix3noacu"
663 # ? for Sequent Symmetry S81 with DYNIX 3.0.xx, "make dynix3"
664 # ? for Sequent DYNIX 3.1.xx, "make dynix31" or "make dynix31c"
665 # ? for Siemens/Nixdorf SINIX-L Intel V5.41, "make sinix541i"
666 # + for Siemens/Nixdorf SINIX-N MIPS V5.42, "make sinix542"
667 # ? for Siemens/Nixdorf SINIX-P MIPS V5.42 with gcc, "make sinix542g"
668 # ? for Siemens/Nixdorf SINIX-Z Intel V5.42, "make sinix542i"
669 # ? for Siemens/Nixdorf Reliant UNIX V5.43, "make sni543"
670 # ? for Siemens/Nixdorf Reliant UNIX V5.44, "make sni544"
671 # ? for Silicon Graphics Iris System V IRIX 3.2 or earlier, "make iris"
672 # ? for Silicon Graphics Sys V R3 with IRIX 3.3 or later, "make sys5r3"
673 # ? for Silicon Graphics Iris Indigo with IRIX 4.0 or 5.0, "make irix40" or
674 #     (to include Yellow Pages and Curses) "make irix40ypc"
675 # ? for Silicon Graphics Iris Indigo or Elan with IRIX 4.0.x with microcode
676 #     optimization and -O4, "make irix40u" or "irix40uc" (and read notes
677 #     accompanying these entries).
678 # ? for Silicon Graphics IRIX 5.1, "make irix51" or "irix51x" (no optimize)
679 # ? for Silicon Graphics IRIX 5.2, "make irix52"
680 # ? for Silicon Graphics IRIX 5.3, "make irix53" or "irix53x" (no optimize)
681 # ? for Silicon Graphics IRIX 6.0, "make irix60".
682 # ? for Silicon Graphics IRIX 6.2, "make irix62".
683 # ? for Silicon Graphics IRIX 6.3, "make irix63".
684 # ? for Silicon Graphics IRIX 6.4, "make irix64" or "make irix64gcc".
685 # + for Silicon Graphics (SGI) IRIX 6.5, "make irix65"
686 # +   or "make irix65mips2" to force MIPS2, or "make irix65gcc" for GCC.
687 # + for Silicon Graphics (SGI) IRIX 6.5, "make irix65" or "make irix65mips2"
688 # ? for SGI IRIX 6.5 with SSL/TLS, SRP, and ZLIB "make irix65+ssl+srp+zlib"
689 # ? for Solaris 2.0-2.3 on SPARC or Intel, SunPro CC, "make solaris2x",
690 # ?   or to add SunLink X.25 8.0x support, "make solaris2x25".
691 # ? for Solaris 2.4 built with gcc, "make solaris24g".
692 # ? for Solaris 2.0-2.3 on SPARC or Intel, GNU CC, "make solaris2xg".
693 # ? for Solaris 2.4 with X.25, "make solaris24x25".
694 # ? for Solaris 2.5 on SPARC or Intel, SunPro CC, "make solaris25".
695 # ?   or to add SunLink X.25 8.0x support, "make solaris25x25".
696 # ? for Solaris 2.5 on SPARC or Intel, GNU CC, "make solaris25g".
697 # ? for Solaris 2.6 on SPARC or Intel, "make solaris26".
698 # ? for Solaris 7 on SPARC or Intel, SunPro CC, "make solaris7".
699 # ? for Solaris 7 on SPARC or Intel, GNU CC, "make solaris7g".
700 # ? for Solaris 8 on SPARC or Intel, SunPro CC, "make solaris8".
701 # ? for Solaris 8 on SPARC or Intel, GNU CC, "make solaris8g".
702 # + for Solaris 9 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris9".
703 # + for Solaris 9 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris9g".
704 # ? for Solaris 9 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris9g64".
705 # + for Solaris 10 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris10".
706 # + for Solaris 10 on SPARC 64-bit, SunPro CC, "make solaris10_64".
707 # + for Solaris 10 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris10g".
708 # ? for Solaris 10 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris10g64".
709 # ? for Solbourne 4/500 with OS/MP 4 "make sunos4"
710 # ? for Solbourne 4/500 with OS/MP 4.1 "make sunos41" or "make sunos41c"
711 # ? for SONY NEWS with NEWS-OS 4.0.1C, "make sonynews"
712 # ? for SONY NEWS with NEWS-OS 4.1.2C, "make sonynews"
713 # ? for Sperry/UNISYS 5000/20, UTS V 5.2 3R1, "make sys5"
714 # ? for Sperry/UNISYS 5000/30/35/50/55, UTS V 5.2 2.01, "make unisys5r2"
715 # ? for Sperry/UNISYS 5000/80 with System V R3, "make sys5r3"
716 # ? for Sperry/UNISYS 5000/95 with System V R3, "make sys5r3"
717 #     For UNISYS SVR3 it might be necessary to "make sys5r3 KFLAGS=-UDYNAMIC"
718 # ? for Stardent 1520, "make sys5r3"
719 # ? for Stratus FTX 2.x, try "make ftx" or else "make sys5r4" or "sys5r4sx"
720 # ? for Stratus FTX 3.x, PA-RISC 1.0 or 2.0, "make ftx" or "make ftxtcp"
721 # ? for Sun with Sun UNIX 3.5 and gcc, "make sunos3gcc"
722 # ? for Sun with pre-4.0 SunOS versions, "make bsd" (or appropriate variant)
723 # ? for Sun with SunOS 4.0, BSD environment, "make sunos4"
724 # ? for Sun with SunOS 4.0, BSD, with SunLink X.25, make sunos4x25
725 # ? for Sun with SunOS 4.1 or 4.1.1, BSD environment, "make sunos41"
726 #     or "make sunos41c" (curses) or "make sunos41gcc" (compile with gcc)
727 # ? for Sun with SunOS 4.1.x, BSD, with SunLink X.25 7.00 or earlier,
728 #     "make sunos41x25" or "make sunos41x25c" (curses)
729 # ? for Sun with SunOS 4.1, 4.1.1, AT&T Sys V R3 environment, "make sunos41s5"
730 # ? for Sun with SunOS 4.1.2, "make sunos41" or any of its variations.
731 #     NOTE:  All SunOS 4.x systems -- Shared libraries are used by default.
732 #       If this causes problems, add -Bstatic to CFLAGS.
733 #     NOTE2: When building C-Kermit under SunOS for the BSD universe,
734 #       but /usr/5bin/cc is ahead of /usr/ucb/cc in your PATH, add
735 #       "CC=/usr/ucb/cc CC2=/usr/ucb/cc" to the make entry.
736 #     NOTE3: If an executable built on one type of Sun hardware does not work
737 #       on another type, rebuild the program from source on the target machine.
738 #   for Sun with Solaris 1.x use SunOS 4.1 entries.
739 #   for Sun with Solaris 2.0 and higher use Solaris entries.
740 # + for Sun SPARC with Linux, "make linux"
741 # ? for Sun SPARC with OPENSTEP/Mach 4.1, "make nextquadfat"
742 # ? for Sun SPARC with OPENSTEP/Mach 4.2, "make openstep42"
743 # - for Tandy 16/6000 with Xenix 3.0, "make trs16" (C-Kermit 7.0 is too big)
744 # ? for Tektronix 6130/4132/43xx (e.g.4301) with UTek OS, "make utek"
745 #     or (for models without hardware flow control), "make uteknohwfc"
746 # ? for Tektronix XD88 series with UTekV OS, "make utekvr3"
747 # ? for Tri Star Flash Cache with Esix SVR3.2, "make sys5r3"
748 # NOTE: The Tru64 builds have been failing since 2010, but "make dec-osf" is OK
749 # ? for Tru64 UNIX 4.0E, "make tru64-40e"
750 # ? for Tru64 UNIX 4.0F, "make tru64-40f"
751 # ? for Tru64 UNIX 4.0G, "make tru64-40g"
752 # ? for Tru64 UNIX 5.0A, "make tru64-50a"
753 # ? for Tru64 UNIX 5.1A, "make tru64-51a"
754 # ? for Tru64 UNIX 5.1B, "make tru64-51b"
755 # ? for Unistar, "make sys5"
756 # ? for Unisys S/4040 68040 CTIX SVR3.2 6.4.1, "make ctix" or "make sys5r3"
757 # ? for Unisys U5000 UNIX SVR3 6.x, "make sys5r3" or "make sys5r3c"
758 # ? for Unisys U6000 UNIX SVR4 1.x, "make sys5r4nx" or "make sys5r4nxnetc"
759 #   for Unisys ... (also see Sperry)
760 #   for Univel - see UnixWare
761 #   for Unixware - see SCO
762 # ? for Valid Scaldstar, "make valid"
763 # ? for Whitechapel MG01 Genix 1.3, "make white"
764 # ? for Zilog ZEUS 3.21, "make zilog"
765 #
766 # The result should be a runnable program called "wermit" in the current
767 # directory.  After satisfactory testing, you can rename wermit to "kermit"
768 # and put it in some directory that's in everybody's PATH, such as
769 # /usr/local or /opt/local.
770 #
771 # To remove intermediate and object files, "make clean".
772 # If your C compiler produces files with an extension other than "o",
773 # then "make clean EXT=u", "make clean EXT=s", or whatever.
774 #
775 # To run lint on the source files, "make lintsun", "make lintbsd",
776 # "make lints5", as appropriate.
777 #
778 # ******************************
779 # SECURE TARGETS
780 #
781 # Beginning with C-Kermit 7.0, secure targets are included, as are the
782 # source modules (ckuat*.[ch], ck_*.[ch]) needed to build them.  Secure
783 # target names are like the regular names, but with security features
784 # indicated by plus (+) signs.  The features are:
785 #
786 # krb4     MIT Kerberos IV
787 # krb5     MIT Kerberos V
788 # openssl  OpenSSL (SSL/TLS)
789 # zlib     ZLIB compression for SSL/TLS
790 # srp      Stanford Secure Remote Password
791 # pam      PAM (pluggable authentication module)
792 # shadow   Shadow Password File
793 #
794 # You can build these targets if you have the Kermit source files and the
795 # required libraries (Kerberos, OpenSSL, SRP, etc) and header files.  See:
796 #   http://www.columbia.edu/kermit/security.html
797 # for specific details regarding supported versions.
798 #
799 # NOTE: OpenSSL 0.9.6 and earlier are not compatible with 0.9.7 and later.
800 # C-Kermit code was originally designed for 0.9.6.  To build with 0.9.7 you
801 # must add -DOPENSSL_097 to avoid missing symbols in the DES library and to
802 # use the entry points that were renamed to avoid conflict with Kerberos 4.
803 # If you have OpenSSL 0.9.8, add -DOPENSSL_098, which is a synonym for
804 # -DOPENSSL_097.  If you have 1.0.0 or later, add -DOPENSSL_100, which is
805 # another synonym.
806
807 # In OpenSSL builds add -ldl if you get unresolved references for
808 # dlopen, dlclose, dlsym, and/or dlerror.
809 #
810 # In order to build a secure version of Kermit, you need to know the location
811 # of the header (include) files and libraries for the desired form of
812 # security.  Unless you specify a location, this makefile looks in /usr/local
813 # and if the required files are not found, the build fails.
814 #
815 # If the secure headers and libraries are not on your computer, you have
816 # to download and install them, for example from http://www.openssl.org .
817 #
818 # The following symbols are used to specify library and header file locations:
819
820 prefix  = /usr/local
821 srproot = $(prefix)
822 sslroot = $(prefix)
823 manroot = $(prefix)
824
825 K4LIB=-L/usr/kerberos/lib
826 K4INC=-I/usr/kerberos/include
827 K5LIB=-L/usr/kerberos/lib
828 K5INC=-I/usr/kerberos/include
829 SRPLIB=-L$(srproot)/lib
830 SRPINC=-I$(srproot)/include
831 SSLLIB=-L$(sslroot)/ssl/lib
832 SSLINC=-I$(sslroot)/ssl/include
833
834 # To override these assignments; for example, if your OpenSSL files are
835 # not in /usr/local/ssl, invoke the desired target like this:
836
837 #  make solaris9+openssl "SSLINC=-I/opt/openssl-0.9.8k/include" \
838 #   "SSLLIB=-L/opt/openssl-0.9.8k/lib"
839 #
840 # (don't set the variables and then do "make -e" because that breaks 
841 # chaining of makefile targets.)
842 #
843 # Here are some up-to-date secure targets as of Sep 2009: 
844 #
845 # aix+openssl:                        IBM AIX 4.2 or later with OpenSSL
846 # freebsd44+srp+openssl               FreeBSD 4.4 with SRP and OpenSSL
847 # freebsd50+openssl                   FreeBSD 5.0 with OpenSSL
848 # hpux1100o+openssl:                  HP-UX 11.xx with OpenSSL
849 # hpux1000gcc+openssl:                HP-UX 10.xx with OpenSSL (build with gcc)
850 # hpux1100gcc+openssl:                HP-UX 11.xx with OpenSSL (build with gcc)
851 # irix6x+krb5:                        IRIX 6.x with Kerberos V
852 # irix65+krb5:                        etc etc...
853 # solaris9+openssl                    Solaris 9,10, or 11 with Openssl (Sun cc)
854 # solaris9g+openssl                   Solaris 9,10, or 11 with Openssl (gcc)
855 # linux+ssl                           OpenSSL only
856 # linux+krb5+ssl                      Linux with Kerberos 5 and OpenSSL
857 # linux+krb5:                         Kerberos 5 only
858
859 # The following secure Linux targets have not been updated or tested recently.
860 # linux+krb5+krb4:
861 # linux+srp:
862 # linux+srp+pam:
863 # linux+srp+gmp:
864 # linux+srp+gmp+no-des:
865 # linux+srp+gmp-export:
866 # linux+srp+gmp+pam:
867 # linux+shadow+pam:
868 # linux+openssl:
869 # linux+openssl+shadow:
870 # linux+openssl+zlib+shadow+pam:
871 # linux+srp+openssl:
872 # linux+krb5+krb4+srp:
873 # linux+krb5+krb4+srp+openssl:
874 # linux+krb5+krb4+openssl:
875 # linux+krb5+krb4+openssl+shadow:
876 # linux+krb5+krb4+openssl+zlib+shadow:
877 # linux+krb5+krb4+srp-export:
878 # linux+krb5+krb4+srp+pam:
879 # linux+krb5+krb4+srp+openssl+pam-debug:
880 # linux+krb5+krb4+srp+openssl+pam:
881 # linux+krb5+krb4+srp+openssl+zlib+pam:
882 # linux+krb5+krb4+openssl+shadow+pam:
883 # linux+krb5+openssl+zlib+shadow+pam:
884
885 # The following have not been tested recently either and might
886 # need adjustment.
887 #
888 # macosx+krb5+ssl:     Mac OS X 10.3.9 or later + OpenSSL and Kerberos 5
889 # macosx103+secure:    This one is probably redundant
890 # netbsd+openssl:      NetBSD with OpenSSL
891 # openbsd30+ssl:       OpenBSD 3.0 with OpenSSL
892 # redhat71,redhat72,redhat73,redhat80,redhat9 (Krb5,OpenSSL,Showdow,PAM,Zlib)
893 # sco32v500net+ssl:
894 # sco32v505net+ssl:
895 # solaris2x+krb4:
896 # solaris2xg+krb4:
897 # solaris2xg+openssl+pam+shadow:
898 # solaris2xg+openssl+zlib+pam+shadow:
899 # solaris2xg+krb5+krb4+openssl+shadow:
900 # solaris25+krb4:
901 # solaris25g+krb4:
902 # solaris26g+openssl:
903 # solaris8g+openssl+zlib+pam+shadow:
904 # solaris8g+krb4:
905 # solaris9g+openssl+zlib+pam+shadow:
906 # solaris9g+openssl+shadow+pam+zlib
907 # sunos41gcc+krb4:                    SunOS 4.1 built with gcc with Kerberos IV
908 # sunos41gcc+openssl:                 SunOS 4.1 built with gcc with OpenSSL
909 # sunos41gcc+krb4+openssl:            ...with Kerberos IV and OpenSSL
910 # sunos41gcc+krb4+openssl+zlib:       ditto, plus ZLIB compression
911 # sunos41gcc+krb4+srp+openssl+zlib:   ditto, plus SRP
912 # sunos41gcc+srp+openssl+zlib:
913 # tru64-51b-openssl:                  Tru64 (Digital) Unix 5.1B with OpenSSL
914 # uw7ssl                              Unixware 7 with SSL
915 #
916 ###########################################################################
917 #
918 #  Compile and Link variables:
919 #
920 #  EXT is the extension (file type) for object files, normally o.
921 #  See MINIX entry for what to do if another filetype must be used.
922 #
923 EXT=o
924 #LNKFLAGS=
925 SHAREDLIB=
926 CC= cc
927 CC2= cc
928 MAKE= make
929 SHELL=/bin/sh
930
931 ###########################################################################
932 # (Ancient) UNIX V7-specific variables.
933 # These are set up for Perkin-Elmer 3230 V7 Unix:
934 #
935 PROC=proc
936 DIRECT=
937 NPROC=nproc
938 NPTYPE=int
939 BOOTFILE=/edition7
940 #
941 # ( For old Tandy TRS-80 Model 16A or 6000 V7-based Xenix, use PROC=_proc,
942 #   DIRECT=-DDIRECT, NPROC=_Nproc, NPTYPE=short, BOOTFILE=/xenix )
943 #
944
945 ###########################################################################
946 # SAMPLE INSTALLATION SCRIPT
947 #
948 # Modify to suit your own computer's file organization and permissions.  If
949 # you don't have write access to the destination directories, "make install"
950 # fails.  In most cases, a real installation also requires you to chown /
951 # chgrp the Kermit binary for the UUCP lockfile and/or tty devices, and
952 # perhaps also to chmod +s the corresponding permission fields.
953 #
954 # Default binary, man, and doc directories are supplied below.  You can
955 # override them in your 'make' command.  Examples:
956 #
957 #   make install                                   # Accept defaults.
958 #   make "INFODIR=/usr/share/lib/kermit" install   # Override INFODIR default.
959 #
960 # You can also build and install in one step, e.g.:
961 #
962 #   make linux install
963 #
964 # If you use the 'install' target to install C-Kermit, it creates an
965 # UNINSTALL script that can be used to uninstall it.
966 #
967 WERMIT = makewhat
968 BINARY = wermit
969 DESTDIR =
970 BINDIR = $(prefix)/bin
971 MANDIR = $(manroot)/man/man1
972 MANEXT = 1
973 SRCDIR =
974 INFODIR =
975 CERTDIR =
976
977 TEXTFILES = COPYING.TXT ckcbwr.txt ckubwr.txt ckuins.txt ckccfg.txt \
978                 ckcplm.txt ckermit.ini ckermod.ini ckermit70.txt ckermit80.txt
979
980 ALL = $(WERMIT)
981
982 all: $(ALL)
983
984 .c.o:
985         $(CC) $(CFLAGS) -DKTARGET=\"$(KTARGET)\" -c $<
986
987 #Clean up intermediate and object files
988 clean:
989         @echo 'Removing object files...'
990         -rm -f ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
991 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckcpro.$(EXT) ckcfns.$(EXT) \
992 ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) \
993 ckufio.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) ckwart.$(EXT) ckuusx.$(EXT) \
994 ckuusy.$(EXT) ckcnet.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckusig.$(EXT) \
995 ckucns.$(EXT) ckcmdb.$(EXT) ckuath.$(EXT) ckctel.$(EXT) ckclib.$(EXT) \
996 ckcuni.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
997 ckcpro.c wart
998
999 show:
1000         @echo prefix=$(prefix)
1001         @echo srproot=$(srproot)
1002         @echo sslroot=$(sslroot)
1003         @echo manroot=$(manroot)
1004         @echo K4LIB=$(K4LIB)
1005         @echo K4INC=$(K4INC)
1006         @echo K5LIB=$(K5LIB)
1007         @echo K5INC=$(K5INC)
1008         @echo SRPLIB=$(SRPLIB)
1009         @echo SRPINC=$(SRPINC)
1010         @echo SSLLIB=$(SSLLIB)
1011         @echo SSLINC=$(SSLINC)
1012         @exit
1013
1014 # Install C-Kermit after building -- IMPORTANT: Read the instructions above
1015 # (SAMPLE INSTALLATION SCRIPT).  For SSL/TLS versions, ca_certs.pem file
1016 # should be installed in the appropriate place for your OpenSSL library, e.g.:
1017 #
1018 #   cp ca_certs.pem /usr/local/ssl/
1019 #   cp ca_certs.pem /usr/share/ssl/
1020 #
1021 # To make sure 'man' notices the new source file and doesn't keep
1022 # showing the old formatted version, remove the old formatted version,
1023 # something like this:
1024 #               rm -f $(MANDIR)/../cat$(MANEXT)/kermit.$(MANEXT)
1025 # or this (which requires CATDIR to be defined):
1026 #               rm -f $(CATDIR)/kermit.$(MANEXT)
1027 #
1028 # As of C-Kermit 8.0.205 this target also builds an UNINSTALL script, and
1029 # so it might be too long for some old Bourne shells, in which case you can
1030 # use a different shell:
1031 #
1032 #   make SHELL=ksh install
1033 #   make SHELL=/bin/posix/sh install
1034 #
1035 install:
1036         @echo Installing C-Kermit version $(CKVER)...;\
1037         rm -f UNINSTALL;\
1038         exec 3>./UNINSTALL;\
1039         echo "# C-Kermit UNINSTALL script" >&3;\
1040         echo "# `date`\n" >&3;\
1041         echo "CKVER=$(CKVER)" >&3;\
1042         echo "PrN Uninstalling C-Kermit version $(CKVER)..." >&3;\
1043         echo DESTDIR=$(DESTDIR);\
1044         if test -n "$(DESTDIR)"; then\
1045                 if test -d $(DESTDIR); then\
1046                         echo  "$(DESTDIR) exists...\n";\
1047                 else\
1048                         echo "Creating $(DESTDIR)...";\
1049                         DESTDIR=`echo $(DESTDIR) | sed 's!/*$$!!'`;\
1050                         mkdir $$DESTDIR  || exit 1;\
1051                 fi;\
1052                 chmod 755 $(DESTDIR) || exit 1;\
1053         fi;\
1054         echo BINARY=$(BINARY);\
1055         if test -f $(BINARY); then\
1056                 ls -l $(BINARY);\
1057         else\
1058                 echo "?$(BINARY) not found";\
1059                 exit 1;\
1060         fi;\
1061         if test -z "$(DESTDIR)$(BINDIR)"; then\
1062                 echo "Binary directory not specified";\
1063                 exit 1;\
1064         fi;\
1065         if test -d $(DESTDIR)$(BINDIR); then\
1066                 echo  "$(DESTDIR)$(BINDIR) exists...";\
1067         else\
1068                 echo "Creating $(DESTDIR)$(BINDIR)/...";\
1069                 mkdir     $(DESTDIR)$(BINDIR) || exit 1;\
1070                 chmod 755 $(DESTDIR)$(BINDIR);\
1071         fi;\
1072         rm -f $(DESTDIR)$(BINDIR)/kermit;\
1073         cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1074         chmod 755    $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1075         rm -f        $(DESTDIR)$(BINDIR)/kermit-sshsub;\
1076         ln -s        $(DESTDIR)$(BINDIR)/kermit\
1077                      $(DESTDIR)$(BINDIR)/kermit-sshsub || exit 1;\
1078         echo 'set flag=f\nPrC Removing binaries' >&3;\
1079         echo "RmF $(DESTDIR)$(BINDIR)/kermit-sshsub" >&3;\
1080         echo "RmF $(DESTDIR)$(BINDIR)/kermit" >&3;\
1081         if test -f ckermit.ini; then\
1082                 echo "#!$(BINDIR)/kermit" >\
1083                         $(DESTDIR)$(BINDIR)/_tmp.ini;\
1084                 cat ckermit.ini >> $(DESTDIR)$(BINDIR)/_tmp.ini;\
1085                 mv $(DESTDIR)$(BINDIR)/_tmp.ini\
1086                    $(DESTDIR)$(BINDIR)/ckermit.ini;\
1087                 chmod 755 $(DESTDIR)$(BINDIR)/ckermit.ini;\
1088                 echo "RmF $(DESTDIR)$(BINDIR)/ckermit.ini" >&3;\
1089         fi;\
1090         echo;\
1091         echo 'EfM' >&3;\
1092         echo "Kermit binary installed:";\
1093         ls -l $(DESTDIR)$(BINDIR)/kermit\
1094               $(DESTDIR)$(BINDIR)/kermit-sshsub\
1095               $(DESTDIR)$(BINDIR)/ckermit.ini;\
1096         echo;\
1097         echo " WARNING: If C-Kermit is to be used for dialing out,";\
1098         echo " you must change its owner and group and permissions";\
1099         echo " to match the 'cu' program.  See the ckuins.txt file";\
1100         echo " for details.";\
1101         echo;\
1102         echo MANDIR=$(MANDIR);\
1103         if test -n "$(DESTDIR)$(MANDIR)"; then\
1104                 if test -d $(DESTDIR)$(MANDIR); then\
1105                         echo  "$(DESTDIR)$(MANDIR) exists...";\
1106                 else\
1107                         echo "Creating $(MANDIR)...";\
1108                         mkdir $(MANDIR) || exit 1;\
1109                         chmod 755 $(MANDIR) || exit 1;\
1110                 fi;\
1111                 rm -f $(DESTDIR)$(MANDIR)/kermit.$(MANEXT);\
1112                 cp ckuker.nr $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1113                 chmod 644 $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1114                 echo 'set flag=f\nPrC Removing man pages' >&3;\
1115                 echo "RmF $(DESTDIR)$(MANDIR)/kermit.$(MANEXT)" >&3;\
1116                 echo 'EfM' >&3;\
1117                 echo;\
1118         else\
1119                 echo "Not installing man page!\n";\
1120         fi;\
1121         echo CERTDIR=$(CERTDIR);\
1122         if test -n "$(CERTDIR)"; then\
1123                 if test -f ca_certs.pem; then\
1124                         if test -d $(CERTDIR); then\
1125                                 echo  "$(CERTDIR) exists...";\
1126                         else\
1127                                 echo "Creating $(CERTDIR)...";\
1128                                 mkdir $(CERTDIR) || exit 1;\
1129                                 chmod 755 $(CERTDIR) || exit 1;\
1130                         fi;\
1131                         echo "Installing certificates file...";\
1132                         cp ca_certs.pem $(CERTDIR) || exit 1;\
1133                         echo 'set flag=f' >&3;\
1134                         echo 'PrC Removing certificates file' >&3;\
1135                         echo "RmF $(CERTDIR)/ca_certs.pem" >&3;\
1136                         echo 'EfM' >&3;\
1137                         echo;\
1138                 fi;\
1139         else\
1140                 echo "Not installing certificates file!\n";\
1141         fi;\
1142         echo SRCDIR=$(DESTDIR)$(SRCDIR);\
1143         if test -n "$(SRCDIR)"; then\
1144                 echo "Installing source files...";\
1145                 if test -d $(DESTDIR)$(SRCDIR); then\
1146                         echo  "$(DESTDIR)$(SRCDIR) exists...";\
1147                 else\
1148                         echo "Creating $(DESTDIR)$(SRCDIR)/...";\
1149                         mkdir     $(DESTDIR)$(SRCDIR) || exit 1;\
1150                         chmod 755 $(DESTDIR)$(SRCDIR);\
1151                 fi;\
1152                 echo "Copying source files to $(DESTDIR)$(SRCDIR)...";\
1153                 echo 'set flag=f\nPrC Removing source files' >&3;\
1154                 for TextFile in COPYING.TXT ck[cuw_]*.[cwh] makefile; do\
1155                         cp $$TextFile $(DESTDIR)$(SRCDIR)/ && echo ".\c";\
1156                         echo "RmF $(DESTDIR)$(SRCDIR)/$$TextFile" >&3;\
1157                 done; echo;\
1158                 echo 'EfM' >&3;\
1159                 ( cd $(DESTDIR)$(SRCDIR)/ &&\
1160                 ls -l COPYING.TXT ck[cuw_]*.[cwh] makefile );echo;\
1161         else\
1162                 echo "Not installing source code!\n";\
1163         fi;\
1164         echo INFODIR=$(DESTDIR)$(INFODIR);\
1165         if test -n "$(INFODIR)"; then\
1166                 echo "Installing info files...";\
1167                 if test -d $(DESTDIR)$(INFODIR); then\
1168                         echo  "$(DESTDIR)$(INFODIR) exists...";\
1169                 else\
1170                         echo "Creating $(DESTDIR)$(INFODIR)/...";\
1171                         mkdir     $(DESTDIR)$(INFODIR) || exit 1;\
1172                         chmod 755 $(DESTDIR)$(INFODIR);\
1173                 fi;\
1174                 echo "Copying text files to $(DESTDIR)$(INFODIR)...";\
1175                 echo 'set flag=f\nPrC Removing text files' >&3;\
1176                 FileCopyList='';\
1177                 for TextFile in $(TEXTFILES); do\
1178                         test -f $$TextFile || continue;\
1179                         cp $$TextFile $(DESTDIR)$(INFODIR) && echo ".\c" &&\
1180                         FileCopyList="$$FileCopyList $$TextFile";\
1181                         echo "RmF $(DESTDIR)$(INFODIR)/$$TextFile" >&3;\
1182                 done; echo;\
1183                 echo 'EfM' >&3;\
1184                 ( cd $(DESTDIR)$(INFODIR)/ && chmod  644   $$FileCopyList );\
1185                 ( cd $(DESTDIR)$(INFODIR)/ && pwd && ls -l $$FileCopyList );\
1186         else\
1187                 echo "Not installing text files!\n";\
1188         fi;\
1189         echo "set flag=d\nPrN Removing empty dirs..." >&3;\
1190         echo "RmD $(DESTDIR)$(BINDIR)" >&3;\
1191         echo "RmD $(DESTDIR)$(SRCDIR)" >&3;\
1192         echo "RmD $(DESTDIR)$(INFODIR)" >&3;\
1193         echo "RmD $(CERTDIR)" >&3;\
1194         echo "RmD $(MANDIR)" >&3;\
1195         echo "RmD $(DESTDIR)" >&3;\
1196         echo "EfM" >&3;\
1197         echo "PrN C-Kermit version $(CKVER) is uninstalled!" >&3;\
1198         echo C-Kermit version $(CKVER) installed!
1199
1200 # UN-Install C-Kermit after building
1201 # Please to not remove the extra blanks before and after '{}' within the
1202 # functions. You would get syntax errors for some older Bourne shells! Best is 
1203 # you don't change or remove anything.
1204 #
1205 uninstall:
1206         @if test ! -f UNINSTALL; then\
1207                 echo "?C-Kermit UNINSTALL data file not found!";\
1208                 exit 1;\
1209         fi; \
1210         X=`grep '^CKVER='$(CKVER)'$$' ./UNINSTALL || :`;\
1211         if test -z "$$X"; then\
1212                 echo "?UNINSTALL file is not for C-Kermit version $(CKVER)";\
1213                 exit 2;\
1214         fi;\
1215         PrN () { echo "$$*"; };\
1216         PrC () { echo "$$* \c"; };\
1217         RmF () { test -f "$$1" && rm -f "$$1" && echo ".\c" && flag=F ; };\
1218         RmD () { \
1219         dir=$$1;\
1220         while test -d "$$dir"; do\
1221                 rmdir "$$dir" 2>&- || return && echo "$$dir" && flag=D;\
1222                 dir=`echo "$$dir" | sed 's!/[^/]*/*$$!!'`;\
1223         done; \
1224         };\
1225         EfM () { \
1226         case "$$flag" in\
1227                 f) echo "- Nothing to remove!";;\
1228                 d) echo "Nothing to remove!";;\
1229                 F) echo " done";;\
1230                 D) echo "done";;\
1231         esac; \
1232         };\
1233         while read Act Args; do\
1234                 case $$Act in\
1235                         EfM) EfM;;\
1236                         RmD) RmD $$Args;;\
1237                         RmF) RmF $$Args;;\
1238                         PrN) PrN $$Args;;\
1239                         PrC) PrC $$Args;;\
1240                         set) eval $$Args;;\
1241                 esac;\
1242         done < ./UNINSTALL
1243
1244 makewhat:
1245         @echo 'make what?  You must tell which platform to make C-Kermit for.'
1246         @echo Examples: make linux, make aix, make solaris10, make hpux1100.
1247         @echo Please read the comments at the beginning of the makefile.
1248
1249 ###########################################################################
1250 #
1251 # Dependencies Section:
1252
1253 wermit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1254                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1255                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1256                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1257                 ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1258                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1259                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1260         $(CC2) $(LNKFLAGS) -o wermit \
1261                 ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1262                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1263                 ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1264                 ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1265                 ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucon.$(EXT) \
1266                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1267                 ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1268                 $(LIBS)
1269
1270 # Preferred configuration with select()-based CONNECT
1271
1272 xermit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1273                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1274                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1275                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1276                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1277                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1278                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) ckuath.$(EXT) \
1279                 ck_crp.$(EXT) ck_ssl.$(EXT)
1280         $(CC2) $(LNKFLAGS) -o wermit \
1281                 ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1282                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1283                 ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1284                 ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1285                 ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) \
1286                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckusig.$(EXT) \
1287                 ckctel.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1288                 ckuath.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1289
1290 # Malloc Debugging version
1291
1292 mermit: ckcmdb.$(EXT) ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1293                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1294                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1295                 ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1296                 ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1297                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1298                 ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1299         $(CC2) $(LNKFLAGS) -o mermit ckcmdb.$(EXT) ckclib.$(EXT) ckcmai.$(EXT)\
1300                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1301                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1302                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1303                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1304                 ckuusr.$(EXT) ckucon.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1305                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckcuni.$(EXT) \
1306                 ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1307
1308 # Kerberized Version - Subject to USA export restrictions.
1309
1310 # NOTE: We don't use this any more -- As of 15 Feb 2003, the "xermit"
1311 # target is used for both secure and regular version.
1312
1313 krbmit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1314                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1315                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1316                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1317                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1318                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1319                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1320                 ckcftp.$(EXT) ck_ssl.$(EXT)
1321         $(CC2) $(LNKFLAGS) -o krbmit ckcmai.$(EXT) ckclib.$(EXT) \
1322                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1323                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1324                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1325                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1326                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1327                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1328                 ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1329                 ck_ssl.$(EXT) $(LIBS)
1330
1331 krbmit-debug:   ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1332                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1333                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1334                 ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1335                 ckuxla.$(EXT) ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1336                 ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1337                 ckusig.$(EXT) ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) \
1338                 ckupty.$(EXT) ck_ssl.$(EXT) ckcmdb.$(EXT) ckcftp.$(EXT)
1339         $(CC2) $(LNKFLAGS) -o krbmit ckcmdb.$(EXT) ckcmai.$(EXT) \
1340                 ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) \
1341                 ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) \
1342                 ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
1343                 ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) \
1344                 ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) \
1345                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1346                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1347                 ckcftp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1348
1349 # SRP(TM) Version - Subject to USA export restrictions.
1350
1351 srpmit: ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1352                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1353                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1354                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1355                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1356                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1357                 ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1358                 ckcftp.$(EXT) ck_ssl.$(EXT)
1359         $(CC2) $(LNKFLAGS) -o srpmit ckcmai.$(EXT) ckclib.$(EXT) \
1360                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1361                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1362                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1363                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1364                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1365                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1366                 ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ck_ssl.$(EXT) \
1367                 ckcftp.$(EXT) $(LIBS)
1368
1369 # Kerberized Version - Not subject to USA export restrictions.
1370
1371 krbmit-export:  ckcmai.$(EXT) \
1372                 ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1373                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1374                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1375                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1376                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1377                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1378                 ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1379         $(CC2) $(LNKFLAGS) -o krbmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1380                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1381                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1382                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1383                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1384                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1385                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1386                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1387
1388 # SRP(TM) Version - Not subject to USA export restrictions.
1389
1390 srpmit-export:  ckcmai.$(EXT) \
1391                 ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1392                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1393                 ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1394                 ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1395                 ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1396                 ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1397                 ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1398         $(CC2) $(LNKFLAGS) -o srpmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1399                 ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1400                 ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1401                 ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1402                 ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1403                 ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1404                 ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1405                 ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1406
1407 ###########################################################################
1408 # man page...
1409 #
1410 ckuker.nr:
1411         @echo This target is obsolete.
1412         @echo The ckuker.nr file no longer needs any preprocessing.
1413
1414 ###########################################################################
1415 # Dependencies for each module...
1416 #
1417 ckcmai.$(EXT): ckcmai.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h ckcsig.h \
1418                 ckuusr.h ckctel.h ckclib.h
1419
1420 ckclib.$(EXT): ckclib.c ckclib.h ckcdeb.h ckcasc.h ckcsym.h
1421
1422 ckcpro.$(EXT): ckcpro.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckclib.h
1423
1424 ckcpro.c: ckcpro.w wart ckcdeb.h ckcsym.h ckcasc.h ckcker.h ckcnet.h ckctel.h \
1425          ckclib.h
1426         ./wart ckcpro.w ckcpro.c
1427
1428 ckcfns.$(EXT): ckcfns.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckcuni.h \
1429                 ckuxla.h ckclib.h ckcnet.h
1430
1431 ckcfn2.$(EXT): ckcfn2.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1432                 ckuxla.h ckctel.h ckclib.h ckcnet.h ckcuni.h
1433
1434 ckcfn3.$(EXT): ckcfn3.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1435                 ckuxla.h ckclib.h ckcuni.h
1436
1437 ckuxla.$(EXT): ckuxla.c ckcker.h ckcsym.h ckcdeb.h ckcxla.h ckuxla.h ckclib.h \
1438                  ckcuni.h
1439
1440 ckcuni.$(EXT): ckcuni.c ckcdeb.h ckcker.h ckucmd.h ckcuni.h ckcxla.h ckuxla.h
1441
1442 ckuusr.$(EXT): ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcsym.h ckcdeb.h ckcxla.h \
1443                 ckuxla.h ckcasc.h ckcnet.h ckctel.h ckclib.h ckcuni.h
1444
1445 ckuus2.$(EXT): ckuus2.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1446                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1447
1448 ckuus3.$(EXT): ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1449                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1450
1451 ckuus4.$(EXT): ckuus4.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1452                 ckcasc.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1453
1454 ckuus5.$(EXT): ckuus5.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1455                  ckcsym.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1456
1457 ckuus6.$(EXT): ckuus6.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1458                  ckcsym.h ckctel.h ckclib.h
1459
1460 ckuus7.$(EXT): ckuus7.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1461                 ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1462
1463 ckuusx.$(EXT): ckuusx.c ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcsym.h \
1464                 ckcsig.h ckcnet.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1465
1466 ckuusy.$(EXT): ckuusy.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1467                  ckclib.h
1468
1469 ckucmd.$(EXT): ckucmd.c ckcasc.h ckucmd.h ckcdeb.h ckcsym.h ckctel.h ckclib.h
1470
1471 ckufio.$(EXT): ckufio.c ckcdeb.h ckuver.h ckcsym.h ckclib.h \
1472                 ckcxla.h ckuxla.h ckcuni.h
1473
1474 ckutio.$(EXT): ckutio.c ckcdeb.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h
1475
1476 ckucon.$(EXT): ckucon.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1477                  ckclib.h
1478
1479 ckucns.$(EXT): ckucns.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1480                  ckclib.h ckcxla.h ckuxla.h ckcuni.h
1481
1482 ckcnet.$(EXT): ckcnet.c ckcdeb.h ckcker.h ckcnet.h ckcsym.h ckcsig.h ckctel.h \
1483                  ckclib.h
1484
1485 ckctel.$(EXT): ckcsym.h ckcdeb.h ckcker.h ckcnet.h ckctel.h ckclib.h
1486
1487 # ck_off_t: ck_off_t.$(EXT)
1488 #       $(CC) -o ck_off_t ck_off_t.$(EXT)
1489
1490 wart: ckwart.$(EXT)
1491         $(CC) $(LNKFLAGS) -o wart ckwart.$(EXT) $(LIBS)
1492
1493 ckcmdb.$(EXT): ckcmdb.c ckcdeb.h ckcsym.h ckclib.h
1494
1495 ckwart.$(EXT): ckwart.c
1496
1497 ckudia.$(EXT): ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckcsym.h ckcsig.h \
1498                 ckcnet.h ckctel.h ckclib.h
1499
1500 ckuscr.$(EXT): ckuscr.c ckcker.h ckcdeb.h ckcasc.h ckcsym.h ckcsig.h \
1501                 ckcnet.h ckctel.h ckclib.h
1502
1503 ckusig.$(EXT): ckusig.c ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h \
1504                 ckcsig.h ckctel.h ckclib.h
1505
1506 ckcftp.$(EXT): ckcftp.c ckcdeb.h ckcasc.h ckcker.h ckucmd.h ckuusr.h \
1507                 ckcnet.h ckctel.h ckcxla.h ckuxla.h ckcuni.h
1508
1509 ckupty.$(EXT): ckupty.c ckupty.h ckcdeb.h
1510
1511 ckuath.$(EXT): ckuath.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1512                  ckclib.h ckcnet.h
1513
1514 ck_crp.$(EXT): ck_crp.c ckcdeb.h ckcnet.h ckuath.h ckclib.h
1515
1516 ck_ssl.$(EXT): ck_ssl.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1517                  ckclib.h ck_ssl.h
1518
1519 ###########################################################################
1520 #
1521 # Entries to make C-Kermit for specific systems.
1522 #
1523 # Put the ones that need short makefiles first.
1524
1525 #Apollo Aegis 9.x.  Includes TCP/IP support.
1526 #You can also add processor-dependent optimization switches like -M570.
1527 aegis:
1528         @echo Making C-Kermit $(CKVER) for Apollo Aegis 9.x...
1529         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1530         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOCSETS -DCK_CURSES -O $(KFLAGS)" \
1531         "LIBS = -lcurses -ltermcap"
1532
1533 #Apple Mac II, A/UX pre-3.0
1534 #Warning, if "send *" doesn't work, try the auxufs makefile entry below.
1535 aux:
1536         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1537         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1538         "CFLAGS = -DAUX -DTCPSOCKET $(KFLAGS) -i -O" "LNKFLAGS = -i"
1539
1540 #Apple Mac II, A/UX pre-3.0, compiled with gcc
1541 auxgcc:
1542         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1543         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1544         "CFLAGS = -DAUX -DTCPSOCKET -traditional $(KFLAGS) -i -O" \
1545         "LNKFLAGS = " "CC = gcc" "CC2 = gcc"
1546
1547 #Apple Mac II, A/UX, pre-3.0, but with ufs file volumes, uses <dirent.h>.
1548 auxufs:
1549         @echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1550         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1551         "CFLAGS = -DAUX -DTCPSOCKET -DDIRENT $(KFLAGS) -i -O" "LNKFLAGS = -i"
1552
1553 #Apple Mac II, A/UX 3.0, compiled with gcc
1554 aux3gcc:
1555         @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1556         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1557         "CFLAGS = -DAUX -DHDBUUCP -DLFDEVNO -DTCPSOCKET -DDIRENT $(KFLAGS)" \
1558         "LNKFLAGS = -s" "LIBS = $(LIBS)" \
1559         "CC=gcc -pipe -traditional" "CC2=gcc -pipe -traditional"
1560
1561 #Apple Mac II, A/UX 3.0, compiled with gcc, uses curses
1562 aux3cgcc:
1563         @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1564         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) aux3gcc \
1565         KTARGET=$${KTARGET:-$(@)} \
1566         "KFLAGS=$(KFLAGS) -DCK_CURSES" "LIBS = -lcurses $(LIBS)"
1567
1568 # Tenon MachTen, tested on Apple Powerbook with MachTen 2.1.1.D.
1569 # NOTE: This doesn't do anything about UUCP.  It only works if /usr/spool/uucp
1570 # has permission of 777, and dialout device is world read/writeable.
1571 machten:
1572         @echo Making C-Kermit $(CKVER) for MachTen...
1573         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
1574         "CFLAGS= -DBSD43 -DTCPSOCKET -DSIG_V -DNDGPWNAM -DCK_CURSES -O \
1575         $(KFLAGS)"  "LIBS=-lcurses -ltermcap"
1576
1577 #Bell Labs Research UNIX V10
1578 #Can't add TCP/IP because there is no sockets library.  It would have to
1579 #be done using streams, but there is no code in C-Kermit for that.
1580 #Remove -DNOJC if desired (if your system has csh, ksh, or bash).
1581 bellv10:
1582         @echo Making C-Kermit $(CKVER) for Bell Labs Research UNIX V10...
1583         $(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1584         "CFLAGS= -DBELLV10 -DBSD4 -DNDIR -DNOJC -DNOSYSIOCTLH -DNOSETREU \
1585         -DNOCSETS -MINIDIAL $(KFLAGS)"
1586
1587 # WARNING: The early BSD entries do not build in version 7.0 with the stock
1588 # BSD compiler: "Too many defines".  Unless you can rebuild cpp to have more
1589 # space for defines, these builds must be accomplished by:
1590 # copying the /usr/include tree to someplace else, preprocessing there with cc
1591 # -E -I./include or whatever (plus all the same -D's, adding any necessary
1592 # -U/-D to override the architecture)), renaming the the resulting files back
1593 # to their original names, bringing them back to the original BSD system, and
1594 # running the make target there.  This technique was used for 4.2 and 4.3 BSD
1595 # on a VAX in C-Kermit 7.0 (later, cpp on that machine was rebuilt to allow
1596 # more symbols, so the C-Kermit 8.0 build proceeds normally).
1597
1598 #Berkeley Unix 4.1
1599 bsd41:
1600         @echo Making C-Kermit $(CKVER) for 4.1BSD...
1601         $(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1602         "CFLAGS= -DBSD41" "LIBS = -ljobs"
1603
1604 #Berkeley 4.2, 4.3, also Ultrix-32 1.x, 2.x, 3.x, many others
1605 # Add -O, -s, etc, if they work.
1606 # If you have a version of BSD but signal() is void rather than int,
1607 # "make bsd KFLAGS=-DSIG_V".
1608 bsd42:
1609         @echo Making C-Kermit $(CKVER) for 4.2BSD...
1610         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1611         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1612         -DCK_CURSES -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK -DBSD42HACK \
1613         $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1614
1615 bsd:
1616         $(MAKE) CC=$(CC) CC2=$(CC2) bsd42 KTARGET=$${KTARGET-$(@)}
1617
1618 #Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP
1619 bsdhdb:
1620         @echo Making C-Kermit $(CKVER) for 4.2BSD with HDB UUCP...
1621         $(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1622         "KFLAGS= -DHDBUUCP $(KFLAGS)"
1623
1624 #Berkeley Unix 4.3 with acucntrl program, curses, TCP/IP included.
1625 bsd43:
1626         @echo Making C-Kermit $(CKVER) for 4.3BSD...
1627         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1628         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1629         -DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1630         -DBSD42HACK $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1631
1632 #4.3BSD, curses excluded
1633 bsd43nc:
1634         @echo Making C-Kermit $(CKVER) for 4.3BSD...
1635         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1636         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH \
1637         -DACUCNTRL -DSYSTIMEBH -DNOIKSD -DNOPUTENV -DNOANSI -DBIGBUFOK \
1638         -DBSD42HACK $(KFLAGS)" "LIBS=$(LIBS)"
1639
1640 #4.3BSD, TCP/IP excluded.
1641 bsd43nonet:
1642         @echo Making C-Kermit $(CKVER) for 4.3BSD + curses...
1643         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1644         "CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1645         -DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1646         -DBSD42HACK -DNONET $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1647
1648 #Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
1649 #but without acucntrl program
1650 bsdlck:
1651         @echo Making C-Kermit $(CKVER) for 4.2BSD, /usr/spool/uucp/LCK/...
1652         $(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1653         "KFLAGS= -DLCKDIR $(KFLAGS)"
1654
1655 #Berkeley UNIX 4.4-Lite, 4.4-Encumbered, Net/2, etc (Post-Reno),
1656 #with TCP/IP networking.  This was the basis for FreeBSD, NetBSD, OpenBSD,
1657 #BSDI, BSD/OS, and Mac OS X (each of which has its own set of targets that
1658 #are newer than this one).
1659 #
1660 #NOTE: This is not a pure POSIX configuration.  Using -DPOSIX instead of
1661 # -DBSD44 prevents any kind of directory-reading (for wildcard expansion),
1662 #and disallows use of ENOTCONN symbol for detecting broken network
1663 #connections, and disallows RTS/CTS flow control, and would also require
1664 #definition of the appropriate UUCP lockfile convention.
1665 #Do not add -DCK_POSIX_SIG without reading <signal.h> first!  For example,
1666 #sigsetjmp(), etc, tend to be defined but not implemented.
1667 #
1668 #NOTE: originally crypt was in libc - later it was unbundled.
1669 #Remove the LIBS clause to build on an early 4.4BSD platform.
1670 #
1671 bsd44:
1672         @echo Making C-Kermit $(CKVER) for 4.4BSD...
1673         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1674         "CFLAGS= -DBSD44 -DTCPSOCKET $(KFLAGS) -O" "LIBS=-lcrypt"
1675
1676 #Berkeley UNIX 4.4, as above, but with curses for fullscreen display
1677 #Please read notes for bsd44 entry just above.
1678 # NOTE: This one dumped core on the real 4.4BSD development system at
1679 # UC Berkeley (an HP-9000/300), so the no-curses version was used
1680 # for that one, which was unplugged years ago.
1681 bsd44c:
1682         @echo Making C-Kermit $(CKVER) for 4.4BSD with curses...
1683         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1684         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O" \
1685         "LIBS= -lcurses -ltermcap -lcrypt $(LIBS)"
1686
1687 #For FreeBSD 1.x.
1688 freebsd1:
1689         @echo 'Making C-Kermit $(CKVER) for FreeBSD...'
1690         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1691         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1692         -DFNFLOAT -DNOHTERMCAP -DNOREALPATH -DNOSYSCONF $(KFLAGS) -O -pipe" \
1693         "LIBS= -lcurses -ltermcap -lm $(LIBS)"
1694
1695 #FreeBSD 2.x with ncurses
1696 freebsd2:
1697         @echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with ncurses...'
1698         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1699         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1700         -DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -funsigned-char \
1701         -DFNFLOAT $(KFLAGS) -O -pipe" \
1702         "LIBS= -lncurses -ltermlib -lcrypt -lm $(LIBS)"
1703
1704 #For FreeBSD 2.x -- Uses curses rather than ncurses
1705 freebsd2c:
1706         @echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with curses...'
1707         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1708         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1709         -DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -DFNFLOAT \
1710         -funsigned-char $(KFLAGS) -O -pipe" \
1711         "LIBS= -lcurses -ltermlib -lcrypt -lm $(LIBS)"
1712
1713 #FreeBSD 3.x with ncurses and uu_lock()
1714 #(Note: uu_lock() goes back to 2.2.2, but not necessarily 2.0)
1715 #OK 2011/08/20 FreeBSD 3.3
1716 freebsd3:
1717         @echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with ncurses...'
1718         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1719         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1720         -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 -DUSE_UU_LOCK -DFNFLOAT \
1721         $(KFLAGS) -O -pipe" \
1722         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1723
1724 #As above but with curses rather than ncurses.
1725 freebsd3c:
1726         @echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with curses...'
1727         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1728         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_UU_LOCK \
1729         -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 $(KFLAGS) -DFNFLOAT \
1730         -funsigned-char -pipe -O" \
1731         "LIBS= -lcurses -lcrypt -lutil -lm $(LIBS)"
1732
1733 #FreeBSD 4.0 with ncurses and uu_lock().  Note - there is no curses in 4.0.
1734 #ncurses 5.0 is broken requiring us to work around with setbuf().
1735 freebsd40:
1736         @echo 'Making C-Kermit $(CKVER) for FreeBSD 4.x with ncurses...'
1737         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1738         "CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DFNFLOAT \
1739         -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD4 \
1740         -DNONOSETBUF -DUSE_UU_LOCK $(KFLAGS) -O -pipe" \
1741         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1742
1743 #FreeBSD 4.1 and above
1744 #Like FreeBSD 4.0 but without the NONOSETBUF hack and with CK_NEWTERM.
1745 #NOTE: This target definitely does not work for FreeBSD 3.3 in 9.0.302.
1746 #and it has not been tested on 4 or 5.
1747 #OK 2011/06/xx FreeBSD 3.3, 4,4, 4.7, and 8.2
1748 #OK 2011/08/21 FreeBSD 3.3, 4.4, 6.4, 9.0
1749 freebsd freebsd41 freebsd72 freebsd5 freebsd6 freebsd7 freebsd8 freebsd9:
1750         @echo 'Making C-Kermit $(CKVER) for FreeBSD 4.1 or later...'
1751         @if test `uname -r | cut -d . -f 1` -ge 8; then \
1752            HAVE_FBSD8='-DFREEBSD8'; \
1753         else HAVE_FBSD8=''; fi; \
1754         if test `uname -r | cut -d . -f 1` -ge 9; then \
1755            HAVE_FBSD9='-DFREEBSD9'; \
1756         else HAVE_FBSD9='';  fi; \
1757         if test -f /usr/include/utmpx.h ; \
1758         then HAVE_UTMPX='-DHAVEUTMPX' ; \
1759         else HAVE_UTMPX='' ; fi; \
1760         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1761         "CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \
1762         -DFREEBSD4 $$HAVE_FBSD8 $$HAVE_FBSD9 -DUSE_UU_LOCK -DFNFLOAT \
1763         $$HAVE_UTMPX -DHERALD=\"\\\" `uname -rs`\\\"\" \
1764         -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR $(KFLAGS) \
1765         -O2 -pipe"\
1766         "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)"
1767
1768 #FreeBSD 5.0 or later with OpenSSL.
1769 #OK 2011/06/15 FreeBSD 4.7 and 8.2
1770 #OK 2011/08/20 FreeBSD 9.0-CURRENT
1771 freebsd+ssl freebsd+openssl freebsd50+openssl:
1772         @echo 'Making C-Kermit $(CKVER) for FreeBSD with Kerberos 5...'
1773         @case `openssl version` in \
1774           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1775           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1776           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1777           *) OPENSSLOPTION="" ;; \
1778         esac; \
1779         HAVE_DES=''; \
1780         DES_LIB=''; \
1781         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1782            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1783               DES_LIB='-ldes'; \
1784               HAVE_DES='-DCK_DES -DLIBDES'; \
1785               echo "HAVE DES"; \
1786            else echo "NO DES"; \
1787         fi; \
1788         $(MAKE) freebsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \
1789         KFLAGS="-DCK_AUTHENTICATION -DCK_SSL $(SSLINC) -DZLIB $$OPENSSLOPTION \
1790         $$HAVE_DES $(KFLAGS)"  "LNKFLAGS = $(LNKFLAGS)" \
1791         "LIBS= -lncurses -lcrypt -lssl -lcrypto -lutil -lm \
1792         $(SSLLIB) $$DES_LIB $(LIBS)"; \
1793         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
1794                 echo ""; \
1795                 echo "If build failed try:"; \
1796                 echo ""; \
1797                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
1798                 echo ""; \
1799         fi
1800
1801 #NetBSD 1.4.1 or later with vanity banner automated with uname
1802 #and automatic inclusion of large file support if it is available.
1803 #This target tested successfully on NetBSD 1.4.1, 1.5.2, and 2.0.3 (Jan 2006).
1804 #Fails on NetBSD 2.0 on Sun/3 mc68030 with gcc 3.3.3 unless optimization is
1805 #disabled on ckcfn2.c ("KFLAGS=-O0") (Letter O Digit Zero).
1806 #(This could be automated by testing `uname -m` for "sun3".)
1807 #OK: 2011/06/15 on NetBSD 1.5.2 and 5.1.
1808 #OK: 2011/08/21 on 5.1.
1809 netbsd netbsd2 netbsd15 netbsd16 old-netbsd:
1810         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1811         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1812         "CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1813         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1814         -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DHAVE_OPENPTY \
1815         -funsigned-char -DHERALD=\"\\\" NetBSD `uname -r`\\\"\" \
1816         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1817         "LIBS= -lcurses -lcrypt -lm -lutil $(LIBS)"
1818
1819 #NetBSD 1.4.1 or later with OpenSSL
1820 #OK: 2011/06/15 on NetBSD 5.1 (but not 1.5.2 with OpenSSL 0.9.5a)
1821 #OK: 2011/08/21 on 5.1.
1822 netbsd+ssl netbsd+openssl:
1823         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL SSLLIB=$(SSLLIB)'
1824         @case `openssl version` in \
1825           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1826           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1827           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1828           *) OPENSSLOPTION="" ;; \
1829         esac; \
1830         HAVE_DES=''; \
1831         DES_LIB=''; \
1832         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1833            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1834               DES_LIB='-ldes'; \
1835               HAVE_DES='-DCK_DES -DLIBDES'; \
1836               echo "HAVE DES"; \
1837            else echo "NO DES"; \
1838         fi; \
1839         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \
1840         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1841         -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1842         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1843         "LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB -lcurses \
1844         -lcrypto -lcrypt -lz -lm -lpam -lutil $(LIBS)"
1845
1846 #NetBSD with MIT Kerberos 5:
1847 # OK 2011/06/15 (once K5INC and K5LIB were set right).
1848 # NOT OK for Heimdal - Heimdal Kerberos support in C-Kermit needs work.
1849 # OK: 2011/08/21 on 5.1.
1850 netbsd+krb5:
1851         @echo 'Making C-Kermit $(CKVER) for NetBSD with Kerberos 5...'
1852         @case `openssl version` in \
1853           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1854           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1855           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1856           *) OPENSSLOPTION="" ;; \
1857         esac; \
1858         HAVE_DES=''; \
1859         DES_LIB=''; \
1860         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1861            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1862               DES_LIB='-ldes'; \
1863               HAVE_DES='-DCK_DES -DLIBDES'; \
1864               echo "HAVE DES"; \
1865            else echo "NO DES"; \
1866         fi; \
1867         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \
1868         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_KERBEROS -DKRB5 \
1869         -DCK_CAST $$HAVE_DES -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1870         $(KFLAGS)" \
1871         "LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lcurses $$DES_LIB \
1872         -lcrypto -lgssapi -lkrb5 -lm -lutil $(LIBS)"
1873
1874 # NetBSD - With Kerberos 5 and SSL and Zlib.
1875 # OK: 2011/08/21 on 5.1 with MIT Kerberos.
1876 netbsd+krb5+ssl netbsd+krb5+openssl+zlib:
1877         @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...'
1878         @case `openssl version` in \
1879           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1880           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1881           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1882           *) OPENSSLOPTION="" ;; \
1883         esac; \
1884         HAVE_DES=''; \
1885         DES_LIB=''; \
1886         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1887            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1888               DES_LIB='-ldes'; \
1889               HAVE_DES='-DCK_DES -DLIBDES'; \
1890               echo "HAVE DES"; \
1891            else echo "NO DES"; \
1892         fi; \
1893         $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \
1894         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1895         -DCK_KERBEROS -DKRB5 -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1896         -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1897         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1898         "LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB \
1899         -lcrypto -lcrypt -lgssapi -lkrb5 -lz -lm -lpam -lutil -lcurses $(LIBS)"
1900
1901 #Special Security Enhanced NetBSD target with SRP, SSL, and zlib support.
1902 #To build this, you need to BUILD the pkgsrc srp_client package.  After
1903 #you build it, you must go into work/srp-x.y.z/libkrypto and "bmake install"
1904 #then go to work/srp-x.y.z/libsrp and "bmake install".  As of 2005Q3, the
1905 #pkgsrc install only installed the statically linked client applications.  You
1906 #need to manually install the libraries to build your own applications.
1907 #NOT TESTED RECENTLY - probably needs work.
1908 netbsd+ssl+srp+zlib:
1909         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1910         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1911         "CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DNETBSD15 \
1912         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DHAVE_OPENPTY \
1913         -I/usr/include/openssl -I/usr/pkg/include \
1914         -DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 -DCK_ENCRYPTION \
1915         -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DZLIB -DFNFLOAT $(KFLAGS) -O" \
1916         "LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lcurses -lsrp -lgmp -ldes \
1917         -lssl -lkrypto -lcrypto -lcrypt -lz -lm -lutil $(LIBS)"
1918
1919 #NetBSD with curses left out (e.g. for use as IKSD).
1920 netbsdnc:
1921         @echo Making C-Kermit $(CKVER) for NetBSD with no curses...
1922         $(MAKE) CC=$(CC) CC2=$(CC2) netbsd KTARGET=$${KTARGET:-$(@)} \
1923         "KFLAGS=-DNOCURSES"
1924
1925 #NetBSD with ncurses requested explicitly rather than curses-which-is-ncurses
1926 netbsdn:
1927         @echo Making C-Kermit $(CKVER) for NetBSD with curses...
1928         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1929         "CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1930         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1931         -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DHAVE_OPENPTY \
1932         -DHERALD=\"\\\" NetBSD `uname -r`\\\"\" \
1933         -DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1934         "LIBS= -L/usr/pkg/lib -lncurses -lcrypt -lm -lutil $(LIBS)"
1935
1936 #OpenBSD before 2.3.
1937 #Uses ncurses as its curses so use -ltermlib, not -ltermcap
1938 #But it doesn't use uu_lock() which was introduced in OpenBSD 2.3.
1939 #For that use the next entry.
1940 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1941 openbsdold:
1942         @echo Making C-Kermit $(CKVER) for OpenBSD...
1943         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1944         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1945         -DFNFLOAT -DNDSYSERRLIST $(KFLAGS) -O" "LIBS= -lcurses -ltermlib -lm"
1946
1947 #OpenBSD 2.3 or later
1948 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1949 #For C-Kermit 8.0 (Christian Weisgerber):
1950 # -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1951 # -DUSE_UU_LOCK and -lutil added for uu_lock()
1952 # -DNDSYSERRLIST changed to -DUSE_STRERROR
1953 #If this gives you trouble use the previous entry.
1954 #NOTE: The openbsd and openbsd+ssl should be reworked to be like the
1955 #corresponding FreeBSD and NetBSD targets.  The mirbsd targets should
1956 openbsd:
1957         @echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later...
1958         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1959         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1960         -DHERALD=\"\\\" OpenBSD `uname -r`\\\"\" \
1961         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1962         "LIBS= -lcurses -lutil -lm"
1963
1964 #Better to chain to the openbsd target but...
1965 mirbsd:
1966         @echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later...
1967         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1968         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1969         -DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
1970         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1971         "LIBS= -lcurses -lutil -lm"
1972
1973 #OpenBSD 3.0 or later includes OpenSSL
1974 #Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1975 #For C-Kermit 8.0 (Christian Weisgerber):
1976 # -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1977 # -DUSE_UU_LOCK and -lutil added for uu_lock()
1978 # -DNDSYSERRLIST changed to -DUSE_STRERROR
1979 #If this gives you trouble use the previous entry.
1980 openbsd+ssl:
1981         @echo Making C-Kermit $(CKVER) for OpenBSD 3.0 or later...
1982         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1983         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1984         -DHERALD=\"\\\" OpenBSD `uname -r`\\\"\" \
1985         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
1986         -DCK_SSL $(KFLAGS) -O" \
1987         "LIBS= -lcurses -lutil -lm -lssl -lcrypto"
1988
1989 mirbsd+ssl:
1990         @echo Making C-Kermit $(CKVER) for OpenBSD 3.0 or later...
1991         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1992         "CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1993         -DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
1994         -DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
1995         -DCK_SSL -DNO_DCL_INET_ATON $(KFLAGS) -O" \
1996         "LIBS= -lcurses -lutil -lm -lssl -lcrypto"
1997
1998 # make 386bsd 0.0new, posix
1999 # for  386bsd 0.1.24, change /usr/include/termios.h to #define NCCS if
2000 #  _POSIX_SOURCE is #defined. (source: lewine, posix prgmrs guide, o`reilly)
2001 #NOTE: Lock directory is /var/spool/lock.  Formerly, it was /var/spool/uucp,
2002 #but reportedly <wjones@halcyon.com> that was due to a typo in 'man tip'.
2003 386bsd:
2004         @echo 'Making C-Kermit $(CKVER) for jolix 386BSD 0.0new and 0.1.24...'
2005         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2006         "CFLAGS= -DPOSIX -DSETREUID -DPIDSTRING -DUSLEEP \
2007         -D_386BSD -DCK_CURSES -DTCPSOCKET \
2008         -DLOCK_DIR=\\\"/var/spool/lock\\\" \
2009         $(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
2010
2011 # Mac OS X 10 early versions.
2012 # For 10.3.9 and later, use the macosx target below.
2013
2014 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP but no curses.
2015 oldmacosx10:
2016         @echo Making C-Kermit $(CKVER) for `uname -s`...
2017         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2018         "CFLAGS= -DMACOSX10 -DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
2019
2020 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and curses.
2021 #Note: curses must be obtained separately.  See next entry for ncurses.
2022 #Add "LIBS = -lcurses -ltermcap" if necessary (but reportedly it is not).
2023 oldmacosx10c:
2024         @echo Making C-Kermit $(CKVER) for `uname -s` + curses...
2025         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2026         "CFLAGS= -DMACOSX10 -DCK_CURSES -DTPUTSFNTYPE=void -DTPUTSISVOID \
2027         -DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
2028
2029 #Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and ncurses.
2030 #Note: ncurses must be obtained separately.
2031 #In the event of trouble with this one try the next one.
2032 oldmacosx10nc:
2033         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2034         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2035         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
2036         $(KFLAGS)" "LIBS= -lncurses $(LIBS)"
2037
2038 #Mac OS X 10.2 (Jaguar) ncurses.
2039 oldmacosx102nc:
2040         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2041         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2042         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
2043         $(KFLAGS) " "LIBS= -lncurses $(LIBS)"
2044
2045 #The problem here is that if curses.h also exists, it conflicts with
2046 #ncurses.h and and we have fatal errors.  If this happens to you, then
2047 #try this target.
2048 oldmacosx10ncx:
2049         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2050         @rm -f ./curses.h; touch ./curses.h
2051         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2052         "CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR \
2053         -I. -O $(KFLAGS) " \
2054         "LIBS= -lncurses $(LIBS)"
2055         @rm -f ./curses.h
2056
2057 #Mac OS X 10.3 (Panther) - Assumes ncurses is installed.
2058 oldmacosx103: 
2059         @echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2060         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2061         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2062         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -O \
2063         $(KFLAGS) " "LIBS= -lncurses -lresolv $(LIBS)"
2064
2065 #Mac OS X 10.3 (Panther) with Kerberos 5 and SSL, assumes ncurses is installed.
2066 oldmacosx103+secure:
2067         @echo Making Secure C-Kermit $(CKVER) for `uname -s` + ncurses...
2068         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2069         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET \
2070         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -O -DCK_PAM \
2071         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2072         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
2073         $(KFLAGS) " "LIBS= -lssl -lcrypto -lkrb5 -lcom_err \
2074         -lk5crypto -lgssapi_krb5 -lpam -lncurses -lresolv $(LIBS)"
2075
2076 # THIS IS THE MAIN MAC OS X TARGET (the next one is for Kerberos/SSL builds).
2077 # Use this target for 10.3.9 (or maybe earlier) through 10.6 (maybe later)
2078 # on both Power and Intel architectures.  This one uses utmp.h on 10.4 and
2079 # earlier and utmpx.h on 10.5 onwards.
2080 # Note: Mac OS X 10.5 and earlier are 32-bit; 10.6 and later 64-bit.
2081 # Note 2: As of C-Kermit 9.0 -NOUUCP is included by default because
2082 # Mac OS X doesn't support UUCP.  To undo this, use KFLAGS=-UNOUUCP.
2083 #OK: 2011/06/14 (for 10.4.11, 10.5.8, 10.6.7)
2084 macosx macosx10 macosx10.3.9 macosx10.4 macosx10.5 macosx10.6:
2085         @MACOSNAME=`/usr/bin/sw_vers -productName`; \
2086         MACOSV=`/usr/bin/sw_vers -productVersion`; \
2087         echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2088         MACCPU=$$HOSTTYPE; \
2089         if test `uname -r | cut -d . -f 1` -gt 8; \
2090         then if test -f /usr/include/utmpx.h ; \
2091         then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2092         else HAVE_UTMPX='' ; fi ; fi; \
2093         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2094         "CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2095         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2096         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2097         -funsigned-char -DNODCLINITGROUPS \
2098         -DNOUUCP -O -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2099         -DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2100         $(KFLAGS)" "LIBS= -lncurses -lresolv $(LIBS)"
2101
2102 # Mac OS X 10.3.9 or later with Kerberos 5 and OpenSSL...
2103 # NOTE: Apple has removed all support for DES in OpenSSL and Kerberos
2104 #   in Mac OS X 10.6 and later.  The DES flags are included or left out
2105 #   automatically based on the Mac OS X version number.
2106 # See note about UUCP in previous target.
2107 #OK: 2009/11/16 (for 10.3.9, 10.4.11, 10.5.8, 10.6.1)
2108 #OK: 2011/06/14 (for 10.4.11, 10.5.8, 10.6.7)
2109 macosx+krb5+ssl macosx10.5+krb5+ssl macosx10.6+krb5+ssl \
2110 macosx+krb5+openssl macosx10.5+krb5+openssl macosx10.6+krb5+openssl:
2111         @MACOSNAME=`/usr/bin/sw_vers -productName`; \
2112         MACOSV=`/usr/bin/sw_vers -productVersion`; \
2113         echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2114         MACCPU=$$HOSTTYPE; \
2115         if test `uname -r | cut -d . -f 1` -gt 8; \
2116         then if test -f /usr/include/utmpx.h ; \
2117         then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2118         else HAVE_UTMPX='' ; fi ; fi; \
2119         if test `uname -r | cut -d . -f 1` -eq 7; \
2120         then IS_MACOSX103='-DMACOSX103' ; \
2121         else IS_MACOSX103='' ; fi; \
2122         case $$MACOSV in \
2123           10.[012345].*) HAVE_DES='-DCK_DES -DLIBDES' ;; \
2124           *.*) HAVE_DES='' ;; \
2125         esac ; \
2126         if test -x /usr/bin/krb5-config ; \
2127         then HAVE_KRB5CONFIG=`/usr/bin/krb5-config --libs krb5 gssapi` ; \
2128         else HAVE_KRB5CONFIG='-lgssapi_krb5 -lkrb5 -lk5crypto \
2129         -lcom_err -lresolv' ; fi; \
2130         $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2131         "CFLAGS= -DMACOSX10 $$IS_MACOSX103 -DCK_NCURSES -DTCPSOCKET \
2132         -DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2133         -DCKHTTP -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2134         -DNODCLINITGROUPS -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2135         -DCK_ENCRYPTION -DCK_CAST -DCK_SSL -DOPENSSL_098 $$HAVE_DES \
2136         -DNOUUCP -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2137         -DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2138         -funsigned-char -O $(KFLAGS)" \
2139         "LIBS= $$HAVE_KRB5CONFIG -lssl -lcrypto -lpam -lncurses $(LIBS)"
2140
2141 # End of Mac OS X Section
2142
2143 #Acorn RISCiX, based on ...
2144 #Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
2145 #but without acucntrl program
2146 riscix:
2147         @echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2148         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2149                 "CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2150                 -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2151                 -DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2152                 -DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2153                 -DNOANSI -w -O2 -fomit-frame-pointer" \
2154                 "LIBS= -lcurses -ltermcap " \
2155                 "CC= /usr/ucb/cc" \
2156                 "CC2= /usr/ucb/cc"
2157
2158 #Acorn RISCiX, as above, but using gcc
2159 riscix-gcc:
2160         @echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2161         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2162                 "CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2163                 -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2164                 -DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2165                 -DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2166                 -DNOANSI -w -O2 -fomit-frame-pointer" \
2167                 "LIBS= -lcurses -ltermcap " \
2168                 "CC= gcc -mbsd" \
2169                 "CC2= gcc -mbsd"
2170
2171 #Convergent CTIX 6.4.1
2172 ctix:
2173         @echo 'Making C-Kermit $(CKVER) for Convergent CTIX 6.4.1'
2174         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2175         "CFLAGS= -DSVR3 -DDIRENT -DTCPSOCKET -DHDBUUCP -DCK_CURSES \
2176         -DNONAWS -DNOLEARN -DNOLONGLONG $(KFLAGS) -XO" \
2177         "LNKFLAGS=-s" "LIBS=-lsocket -lcurses -lc_s"
2178         mcs -d wermit
2179
2180 # The following makefile entry should work for any Harris Night Hawk system
2181 # (either 88k or 68k based) running release 6.1 or later of the CX/UX
2182 # operating system. This is a POSIX and ANSI-C compliant system which also
2183 # supports BSD networking. (Earlier CX/UX releases will probably work with
2184 # sys5r3, but this has not been verified).
2185 #
2186 cx_ux:
2187         @echo Making C-Kermit $(CKVER) for Harris Night Hawk CX/UX 6.1 or later
2188         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2189         "CFLAGS=-DPOSIX -DTCPSOCKET -DHDBUUCP -DPID_T=pid_t -DWAIT_T=int \
2190         -Dd_ino=d_fileno -DUID_T=uid_t -DGID_T=gid_t -DNOLONGLONG \
2191         $(KFLAGS) -Xa -O3 -g" "LNKFLAGS=-O3"
2192
2193 #Intergraph Clipper, CLIX, job control, HDB UUCP.
2194 clix:
2195         @echo 'Making C-Kermit $(CKVER) for Intergraph CLIX...'
2196         $(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2197         "CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2198         -DNOGETUSERSHELL -DNOREALPATH -DNOLEARN $(KFLAGS) -O" \
2199         "LNKFLAGS=" "LIBS= -lbsd"
2200
2201 #As above + TCP/IP...
2202 clixnet:
2203         @echo 'Making networked C-Kermit $(CKVER) for Intergraph CLIX...'
2204         $(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2205         "CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2206         -DTCPSOCKET -DNOGETUSERSHELL -DNOLEARN -DNOREALPATH $(KFLAGS) -O" \
2207         "LNKFLAGS=" "LIBS= -lbsd"
2208
2209 #Mark Williams Coherent 286 or 386 on IBM PC family.
2210 #There is a 64K limit on program size, so this is a command-line only version.
2211 coherent:
2212         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOICP -DNOSETKEY -DNOLEARN \
2213         -DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG -DNOXMIT \
2214         -DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DSELECT_H $(KFLAGS) -VSUVAR" \
2215         -DNOFLOAT KTARGET=$${KTARGET:-$(@)} wermit
2216
2217 #Mark Williams Coherent 386 on IBM PC family.
2218 #This will make a "minimum interactive" version - no scripts,
2219 #no character sets, no help, no dial, no debug/transaction logging, no
2220 #transmit, msend, mail, type, etc.
2221 coherentmi:
2222         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOSETKEY -DNOLEARN \
2223         -DNOSHOW -DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG \
2224         -DNOXMIT -DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DNOSERVER -DNOUUCP \
2225         -DNOSPL -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ -DNOFLOAT \
2226         -DNOCMDL $(KFLAGS) -VSUVAR -DSELECT_H" KTARGET=$${KTARGET:-$(@)} \
2227         wermit
2228
2229 #Mark Williams Coherent 386 on IBM PC/AT family.
2230 coherentmax:
2231         $(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DSELECT_H -DNOLEARN \
2232         -DNOFLOAT -DNOSYSIOCTLH $(KFLAGS) -VSUVAR" "LNKFLAGS = -O -s" \
2233         KTARGET=$${KTARGET:-$(@)} wermit
2234
2235 #Mark Williams Coherent 386 4.2.  Includes curses but not TCP/IP.
2236 #Requires updates to the 4.2.10 compiler; the regular compiler fails to
2237 #to handle "complex expressions".  NOFLOAT is so it can work on old PCs
2238 #without floating-point hardware.
2239 coherent42:
2240         $(MAKE) "CFLAGS = -T500000 -DNOFLOAT -DCOHERENT -DNOANSI -DSELECT \
2241         -DNOSYSLOG -DDIRENT -DCK_CURSES -DCK_NEWTERM -DCK_WREFRESH -VSUVAR \
2242         -DDCLGETCWD -DNOSYSIOCTLH -DNOINITGROUPS -DNOSYMLINK -DSELECT_H \
2243         -DDCLGETCWD -O $(KFLAGS)" \
2244         "LNKFLAGS = -O -s" KTARGET=$${KTARGET:-$(@)} \
2245         "LIBS  = -lsocket -lcurses" wermit
2246
2247 #DEC Ultrix 2.x
2248 # Add -O, -DDYNAMIC, -s, etc, if they work.
2249 ultrix2x:
2250         @echo Making C-Kermit $(CKVER) for Ultrix 2.x ...
2251         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2252         "CFLAGS= -DBSD4 -DTCPSOCKET -DDU2 -DNOGETUSERSHELL $(KFLAGS)"
2253
2254 du2:
2255         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix2x
2256
2257 #DEC Ultrix 3.0 and 3.1
2258 ultrix30:
2259         @echo Making C-Kermit $(CKVER) for Ultrix 3.0...
2260         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2261         "CFLAGS= -DBSD4 -DTCPSOCKET -DDIRENT -DSIG_V -DNOGETUSERSHELL \
2262         -DULTRIX3 -DCK_CURSES $(KFLAGS) -O" "LIBS= -lcurses -ltermcap"
2263
2264 du3:
2265         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2266
2267 ultrix3x:
2268         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2269
2270 #DEC Ultrix 4.0 or 4.1 on DECstation, VAXstation, VAX, etc.
2271 ultrix40:
2272         @echo Making C-Kermit $(CKVER) for Ultrix 4.0 or 4.1...
2273         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2274         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DDU4 -DNOGETUSERSHELL \
2275         $(KFLAGS) -Olimit 1450" "LNKFLAGS = -s"
2276
2277 #DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2278 #Like ultrix40, except now C compiler supports -O2 optimization.
2279 ultrix42:
2280         @echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2281         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2282         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL $(KFLAGS) \
2283         -O2 -Olimit 1750" "LNKFLAGS = -s"
2284
2285 du42:
2286         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix42
2287
2288 #DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2289 #Like du42, but with curses support added and a couple features.
2290 ultrix42c:
2291         @echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2292         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2293         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2294         -DCK_CURSES -DNOIKSD $(KFLAGS)-G6 -O2 -Olimit 3000 " \
2295         "LNKFLAGS = -s" "LIBS= -lcurses -ltermcap"
2296
2297 ultrix43:
2298         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2299         "KFLAGS=-DULTRIX43 $(KFLAGS)" KTARGET=$${KTARGET-$(@)} ultrix42c
2300
2301 ultrix43notcp:
2302         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2303         "KFLAGS=-DULTRIX43 -DNONET $(KFLAGS)" \
2304         KTARGET=$${KTARGET-$(@)} ultrix42c
2305
2306 # NOTE: need -DNODEBUG on MIPS to avoid relocation errors at link time.
2307 # Actually now (8.0) that we have discovered the -G option maybe debugging
2308 # can be put back.
2309 ultrix44:
2310         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2311         "KFLAGS=-DULTRIX44 -G7 -DNODEBUG -DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2312         KTARGET=$${KTARGET-$(@)} ultrix42c
2313
2314 ultrix45:
2315         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2316         "KFLAGS=-DULTRIX45 $(KFLAGS)-DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2317         KTARGET=$${KTARGET-$(@)} ultrix42c
2318
2319 du42c:
2320         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2321         KTARGET=$${KTARGET-$(@)} ultrix42c
2322
2323 #DEC Ultrix 4.3A or later on DECsystem and DECstation 5000/50, /150 or /260
2324 #with MIPS R4x00 processor.  The "-mips3" switch generates R4000-specific
2325 #code, which is faster and more compact, but *won't* run on earlier
2326 #DECsystems and DECstations.
2327 ultrix43-mips3:
2328         @echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2329         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2330         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2331         $(KFLAGS) -O2 -Olimit 1750 -mips3" "LNKFLAGS = -s -mips3"
2332
2333 du43-mips3:
2334         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) ultrix43-mips3
2335
2336 #DEC Ultrix 4.3A or later on MIPS R4x000 based systems.
2337 #Like ultrix43-mips3 but with curses support added
2338 ultrix43c-mips3:
2339         @echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2340         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2341         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL -DCK_CURSES \
2342         $(KFLAGS) -O2 -Olimit 3000 -mips3" "LNKFLAGS = -s -mips3" \
2343         "LIBS= -lcurses -ltermcap"
2344
2345 du43c-mips3:
2346         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2347         KTARGET=$${KTARGET-$(@)} ultrix43c-mips3
2348
2349 #DEC Ultrix 4.4 on DECstation 5000/50 or /150 with R4000 MIPS processor,
2350 #or 5000/260 with R4400.  The "-mips3" switch generates R4000-specific code,
2351 #which is faster and more compact but *won't* run on earlier DECstations.
2352 ultrix44-mips3:
2353         @echo Making C-Kermit $(CKVER) for Ultrix 4.4, R4000 cpu ...
2354         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2355         "CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2356         $(KFLAGS) -O2 -Olimit 1450 -mips3" "LNKFLAGS = -s -mips3"
2357
2358 du44-mips3:
2359         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2360         KTARGET=$${KTARGET-$(@)} ultrix44c-mips3
2361
2362 #DEC Ultrix 4.2 on DECstation, VAXstation, VAX, etc, System V R4 environment
2363 ultrix42s5r4:
2364         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4 on Ultrix...'
2365         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2366         "CFLAGS = -O2 -Olimit 1500 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
2367         -DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
2368
2369 #OSF/1
2370 osf osf1:
2371         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2372         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2373         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT $(KFLAGS)" \
2374         "LNKFLAGS = -s" "LIBS = $(LIBS) -lbsd -lcurses -ltermcap -lm"
2375
2376 #DEC OSF/1 V1.0-1.3 on DECstation, VAX, Alpha, or PC.
2377 dec-osf dec-osf1:
2378         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2379         "CFLAGS= -DBSD4 -DOSF -DOSF13 -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2380         -DNOREALPATH -DNOIKSD -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DNODEBUG \
2381         -DNOUNICODE $(KFLAGS)" \
2382         "LNKFLAGS = -non_shared" "LIBS = -lbsd -lcurses -ltermcap -lm"
2383
2384 # This one causes "relocation out-of-range" errors in the linker.
2385 old-dec-osf:
2386         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V1.x...
2387         @echo If you are building for DEC OSF/1 2.0, please use dec-osf20.
2388         @echo Remove or adjust -O2 and/or -Olimit if they cause trouble.
2389         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2390         "KFLAGS= -O2 -Olimit 2400 $(KFLAGS)"
2391
2392 #DEC OSF/1 2.0 on Alpha and probably nowhere else.
2393 #The only difference from OSF/1 is that optimization is omitted.
2394 #The optimized version gets strange runtime errors, like the PAUSE command
2395 #not working.  Add "-unsigned" to make all chars unsigned.
2396 dec-osf20:
2397         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V2.0...
2398         @echo Optimization omitted because it causes runtime errors.
2399         @echo See comments in makefile.
2400         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2401         "KFLAGS= -DOSF20 $(KFLAGS)"
2402
2403 dec-osf30:
2404         @echo Making C-Kermit $(CKVER) for DEC OSF/1 V3.0...
2405         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2406         "KFLAGS= -DOSF30 -O2 -Olimit 2400 $(KFLAGS)"
2407
2408 #Digital UNIX 3.2
2409 # Must compile ckuus[6x].c separately without optimization otherwise
2410 # the optimizer dumps core - keep CFLAGS here in sync with those from osf.
2411 du32:
2412         @echo Making C-Kermit $(CKVER) for Digital UNIX 3.2...
2413         $(MAKE) CC=$(CC) CC2=$(CC2) ckuus6.$(EXT) \
2414         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2415         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2416         $(MAKE) CC=$(CC) CC2=$(CC2) ckuusx.$(EXT) \
2417         "CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2418         -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2419         $(MAKE) CC=$(CC) CC2=$(CC2) osf \
2420         "KFLAGS= -DOSF32 -DHDBUUCP -O2 -Olimit 3200 $(KFLAGS)"
2421
2422 dec-osf32:
2423         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) du32 \
2424         KTARGET=$${KTARGET:-$(@)}
2425
2426 #Digital UNIX 4.0 through 4.0D (use tru64 targets for 4.0E and above)...
2427 du40:
2428         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0...
2429         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2430         "KFLAGS= -DOSF40 -DHDBUUCP -DFNFLOAT \
2431         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2432
2433 du40gcc:
2434         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0 with gcc ...
2435         $(MAKE) osf CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
2436         "KFLAGS= -DOSF40 -DHDBUUCP $(KFLAGS)"
2437
2438 #Tru64 Unix 4.0E
2439 tru64-40e:
2440         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0E...
2441         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2442         "KFLAGS= -DOSF40 -DOSF40E -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2443         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2444
2445 tru64-40f:
2446         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0F...
2447         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2448         "KFLAGS= -DOSF40 -DOSF40F -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2449         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2450
2451 tru64-40g:
2452         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0G...
2453         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2454         "KFLAGS= -DOSF40 -DOSF40G -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2455         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2456
2457 tru64-50a:
2458         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.0A...
2459         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2460         "KFLAGS= -DTRU64 -DOSF50 -DHDBUUCP \
2461         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2462
2463 tru64-51a:
2464         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1A...
2465         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2466         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DHDBUUCP \
2467         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2468
2469 tru64-51b:
2470         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1B...
2471         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2472         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2473         -unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2474
2475 # Added 5.1b version with OpenSSL - CDW 6-13-2005...
2476 tru64-51b+openssl:
2477         @echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1b
2478         @echo  including OpenSSL...
2479         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2480         "KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2481         -unsigned -std1 -O3 -Olimit 2400 \
2482         -DCK_AUTHENTICATION -DCK_SSL $(SSLINC) $(KFLAGS)" \
2483         "LIBS= $(SSLLIB) -rpath $(sslroot)/ssl/lib -lssl -lcrypto"
2484
2485 du50:
2486         $(MAKE) CC=$(CC) CC2=$(CC2) tru64-50a KTARGET=$${KTARGET:-$(@)}
2487
2488 du40-ridiculous-checking:
2489         @echo Making C-Kermit $(CKVER) for Digital UNIX 4.0.
2490         @echo Checking everything - assumes DECC...
2491         $(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2492         "KFLAGS= -DOSF40 -DHDBUUCP -w0 -warnprotos -check -portable \
2493         -unsigned -std1 -O3 -Olimit 1760 $(KFLAGS)"
2494
2495 #Sequent DYNIX/ptx 1.2.1
2496 dynixptx12:
2497         @echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.2.1...
2498         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2499         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DPTX -DNOGETUSERSHELL -DNOLEARN \
2500         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t $(KFLAGS) -i -O" \
2501         "LNKFLAGS = -i"
2502
2503 #Sequent DYNIX/ptx 1.3 or 1.4
2504 dynixptx13:
2505         @echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.3 TCP/IP...
2506         $(MAKE) xermit "CFLAGS= -O KTARGET=$${KTARGET:-$(@)} \
2507         -DSVR3 -DDIRENT -DHDBUUCP -DPTX -DCK_POLL -DNOGETUSERSHELL \
2508         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DTCPSOCKET $(KFLAGS) -i" \
2509         "LNKFLAGS = -i" "LIBS = -lsocket -linet -lnsl"
2510
2511 #Sequent DYNIX/ptx 2.0, ANSI C compilation
2512 #Should work on any hardware platform when DYNIX/ptx runs, including
2513 #386, 486, Pentium.
2514 dynixptx20:
2515         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2516         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2517         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2518         -DWAIT_T=int -DPTX -DNOGETUSERSHELL $(KFLAGS) -O" \
2519         "LIBS = -lsocket -linet -lnsl"
2520
2521 #Sequent DYNIX/ptx 2.0, ANSI C compilation, with curses
2522 dynixptx20c:
2523         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2524         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2525         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int -DPTX -DCK_CURSES \
2526         -DCK_NEWTERM -DNOGETUSERSHELL $(KFLAGS) -O" \
2527         "LIBS = -lsocket -linet -lnsl -lcurses -ltermcap"
2528
2529 #Sequent DYNIX/ptx 2.1.6, 80486, ANSI C compilation, with curses:
2530 # -Xa -- use ANSI compiler.
2531 # -Wc,-pw -- suppress portability warnings.
2532 # -Wc,-i386 -- 80386 cpu.
2533 # -Wc,-i486 -- 80486 cpu.
2534 # -Wc,-P5 -- Pentium (default).
2535 # -Wc,-O3 -- highest optimization.
2536 # -Wa,-N17061 -- increase symbol table from default of 15013 for ckcuni.c.
2537 # Early versions of DYNIX/ptx 2.1.x may need -DCK_POLL instead of -DSELECT.
2538 # Add "$&" after the colon in the "xermit" target for parallel makes.
2539 dynixptx216c:
2540         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6'
2541         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2542         "CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2543         -DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2544         -DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2545         -DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2546         $(KFLAGS) -Xa -Wc,-pw -Wc,-i486 -Wc,-O3 -Wa,-N17061" \
2547         "LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2548         "LNKFLAGS = -s"
2549
2550 #Sequent DYNIX/ptx 2.1.6, gcc 2.7.2.2, with curses:
2551 dynixptx216cgcc:
2552         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6 gcc'
2553         $(MAKE) xermit "CC = gcc" "CC2 = gcc" KTARGET=$${KTARGET:-$(@)} \
2554         "CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2555         -DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2556         -DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2557         -DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2558         $(KFLAGS) -O3 -pipe -funsigned-char" \
2559         "LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2560         "LNKFLAGS = -s"
2561
2562 #Sequent DYNIX/ptx 4.0, ANSI C compilation, with curses
2563 dynixptx41c:
2564         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.0...'
2565         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2566         "CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2567         -DWAIT_T=int -DPTX -DPTX4 -DCK_CURSES -DCK_NEWTERM \
2568         -DNOGETUSERSHELL $(KFLAGS) -O" \
2569         "LIBS = -lsocket -lnsl -lcurses -ltermcap"
2570
2571 #Sequent DYNIX/ptx 4.4, ANSI C compilation, with curses
2572 dynixptx44:
2573         @echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.4...'
2574         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2575         "CFLAGS= -DPTX -DPTX4 -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int \
2576         -DCK_CURSES -DCK_NEWTERM -DBIGBUFOK -DSELECT -DNOGETUSERSHELL \
2577         $(KFLAGS) -O" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
2578
2579 #Sequent DYNIX 3.0.x
2580 dynix3:
2581         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2582         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2583         "CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O \
2584         -DPWUID_T=int -DGID_T=int $(KFLAGS)"
2585
2586 #Sequent DYNIX 3.0.x, no ACUCNTRL
2587 dynix3noacu:
2588         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2589         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2590         "CFLAGS= -DBSD43 -DLCKDIR -DTCPSOCKET -O \
2591         -DUID_T=int -DGID_T=int $(KFLAGS)"
2592
2593 #Sequent DYNIX 3.1.x
2594 dynix31:
2595         @echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.x...
2596         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2597         "CFLAGS= -O -DDCLPOPEN -DLCKDIR -DBSD4 -DTCPSOCKET $(KFLAGS)"
2598
2599 #Sequent DYNIX 3.1.2, as above but with curses, to be compiled by gcc 2.3.3.
2600 dynix31c:
2601         @echo 'Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.2, curses...'
2602         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2603         "CFLAGS= -O2 -DDCLPOPEN -DACUCNTRL \
2604         -DBSD43 -DTCPSOCKET -DCK_CURSES -DUID_T=int \
2605         $(KFLAGS)" "LIBS= -lcurses -ltermcap"
2606
2607 #Convex C1 with Berkeley Unix
2608 convex:
2609         @echo Making C-Kermit $(CKVER) for Convex C1 / BSD...
2610         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2611         "CFLAGS= -DBSD4 -DNOLEARN $(KFLAGS) -Dmsleep=mnap"
2612
2613 #Convex C210 with Convex/OS 8
2614 convex8:
2615         @echo Making C-Kermit $(CKVER) for Convex C210 with OS 8
2616         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2617         "CFLAGS= -DBSD4 -DTCPSOCKET -DNODEBUG -DDIRENT -DNOFILEH \
2618         $(KFLAGS) -DSIG_V -Dmsleep=mnap"
2619
2620 #Convex C2 with Convex OS 9.1 (should also work with 8.1 or later)
2621 #with ANSI C compiler, uses BSD 4.3 uucp lockfile convention.
2622 convex9:
2623         @echo Making C-Kermit $(CKVER) for Convex C210 with OS 9.1
2624         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2625         "CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2626         -D__STDC__ -DLCKDIR -Dmsleep=mnap -O -ext -tm c1 $(KFLAGS)" \
2627         "LNKFLAGS = -ext"
2628
2629 #Convex C2 with Convex OS 10.1 or later
2630 #with gcc 2.x C compiler
2631 convex10gcc:
2632         @echo Making C-Kermit $(CKVER) for Convex C2 with OS 10.1 using gcc
2633         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2634         "CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2635         -D__STDC__  -Dmsleep=mnap -O2 $(KFLAGS)" CC=gcc CC2=gcc
2636
2637 #Cray X-MP or Y-MP UNICOS 6.x or 7.x.
2638 #NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2639 #processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2640 cray:
2641         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 6.x or 7.0...
2642         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2643         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2644
2645 #Cray X-MP or Y-MP UNICOS 8.0 Alpha.
2646 cray8:
2647         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 8.0 Alpha...
2648         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2649         "CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2650
2651 #Cray X-MP or Y-MP UNICOS 9.0.
2652 #This one was executed successfully for C-Kermit 8.0.209.
2653 #Earlier versions of Unicos will probably need the same flags.
2654 cray9:
2655         @echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 9.0...
2656         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2657         "CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DNOLFDEVNO \
2658         -DTCPSOCKET $(KFLAGS) -O1"
2659
2660 #Cray-2 or Cray 3-CSOS
2661 #NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2662 #processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2663 craycsos:
2664         @echo 'Making C-Kermit $(CKVER) for Cray-2/3 CSOS
2665         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2666         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET \
2667         $(KFLAGS) -DCK_ANSIC -DCK_CURSES" "LIBS=-lnet"
2668
2669 #NeXTSTEP 1.0 through 3.2.
2670 #Includes fullscreen file transfer display (curses) and TCP/IP support.
2671 #Uses shared library to make executable program about 80K smaller.
2672 #Remove "LIBS = -lsys_s" if this causes trouble.
2673 next:
2674         @echo Making C-Kermit $(CKVER) for NeXTSTEP...
2675         @echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2676         @echo 'add KFGLAGS=-DNOREDIRECT to your make command.'
2677         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2678         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2679         -pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2680
2681 nextc:
2682         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2683         KTARGET=$${KTARGET:-$(@)}
2684
2685 nextg:
2686         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2687         KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2688
2689 nextgc:
2690         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2691         KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2692
2693 #NeXTSTEP 3.3.
2694 #Includes fullscreen file transfer display and TCP/IP.
2695 # You might have to add 1 line to 1 NeXT header file <ip.h>
2696 # to declare n_long as u_long by adding #include <bsd/netinet/in_systm.h>
2697
2698 next33:
2699         @echo Making C-Kermit $(CKVER) for NeXTSTEP 3.3...
2700         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2701         "CFLAGS= -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2702         -pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2703
2704 #OPENSTEP 4.2 for Sparc, m680x0, HP PA-RISC, and Intel.
2705 #Includes fullscreen file transfer display and TCP/IP.
2706 #ckcpro.c compiled without optimization because it crashes the compiler.
2707 openstep42:
2708         @echo Making C-Kermit $(CKVER) for OPENSTEP 4.2...
2709         $(MAKE) ckcpro.$(EXT) \
2710         "CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2711         -DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -w"
2712         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2713         "CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2714         -DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -O -w" \
2715         "LIBS = -lsys_s -lcurses -ltermcap"
2716
2717 #NeXT with malloc debugger
2718 nextmd:
2719         @echo Making C-Kermit $(CKVER) for NeXT with malloc debugging...
2720         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
2721         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2722         -DCK_CURSES $(KFLAGS) -O -w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
2723         "LIBS = -lsys_s -lcurses -ltermcap"
2724
2725 #Build for NeXTSTEP with "fat" binaries (MABs) that run on both Motorola
2726 #and Intel platforms.
2727 nextfat:
2728         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2729         next KTARGET=$${KTARGET:-$(@)} \
2730         "KFLAGS=-Wall -arch m68k -arch i386" "LNKFLAGS = -arch m68k -arch i386"
2731
2732 #NeXTSTEP on Intel Platforms.
2733 next486:
2734         @echo Making C-Kermit $(CKVER) for NeXTSTEP on Intel Platforms...
2735         @echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2736         @echo 'add KFGLAGS=D-DNOREDIRECT to your make command.'
2737         $(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2738         "CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2739         -DNODEBUG -O3 -fno-omit-frame-pointer -fschedule-insns2 -pipe \
2740         -DCK_CURSES $(KFLAGS) -w" "LIBS = -lsys_s -lcurses -ltermcap"
2741
2742 #Single binary that runs on NeXT 68030 and 68040, Intel, HP, and Sparc,
2743 #as well as on OpenStep/Mach.
2744 nextquadfat:
2745         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2746         KTARGET=$${KTARGET:-$(@)} \
2747         "KFLAGS=-Wall -arch m68k -arch i386 -arch hppa -arch sparc" \
2748         "LNKFLAGS = -arch m68k -arch i386 -arch hppa -arch sparc"
2749
2750 #BeBox
2751 beboxdr7:
2752         @echo 'Making C-Kermit $(CKVER) for the BeBox...'
2753         @echo 'Link step will fail with default Metroworks linker 64K limit.'
2754         @echo 'Code Warrior Gold required to link big programs.'
2755         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2756         "CC=/boot/develop/tools/mwcc" "CC2=/boot/develop/tools/mwld" \
2757         "CFLAGS= -DBEBOX -DBE_DR_7 -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2758
2759 #BeBox BeOS DR7 only
2760 bebox:
2761         @echo 'Making C-Kermit $(CKVER) for BeBox...'
2762         @echo 'Link step will fail with default Metroworks linker 64K limit.'
2763         @echo 'Code Warrior Pro 3.0 for BeBox required to link big programs.'
2764         $(MAKE) wermit "CC=mwcc" "CC2=mwld" KTARGET=$${KTARGET:-$(@)} \
2765         "CFLAGS= -DBEBOX -DPOSIX -DNOLEARN -DNOUUCP $(KFLAGS) -O"
2766
2767 #BeOS 4.5
2768 #We have to use the wermit target because 'fd_set' is unknown.
2769 beos45:
2770         $(MAKE) wermit "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
2771         "CFLAGS= -DBEOS -DBEOS45 -DPOSIX -DNOIKSD -DNOREALPATH -DSYSTIMEH \
2772         -DNOCOTFMC -DNOUUCP -DNOLEARN $(KFLAGS) -O" \
2773         "LIBS = $(LIBS)"
2774
2775 #BeOS 4.5
2776 beos45net:
2777         $(MAKE) CC=$(CC) CC2=$(CC2) beos45 \
2778         "KFLAGS=-DTCPSOCKET -DNO_DNS_SRV $(KFLAGS)" "LIBS=-lnet -lnetapi"
2779
2780 #Plan 9 from Bell Labs
2781 plan9:
2782         @echo 'C-Kermit for Plan 9 from Bell Labs - calling ckpker.mk...'
2783         make -f ckpker.mk
2784
2785 #POSIX
2786 posix:
2787         @echo 'Making C-Kermit $(CKVER) for pure POSIX...'
2788         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2789         "CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2790
2791 # PowerMAX OS (SVR4) from Concurrent (tested on PowerMAX 5.1)
2792 powermax:
2793         @echo 'Making C-Kermit $(CKVER) for Concurrent PowerMAX OS...'
2794         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2795         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DPOWERMAX \
2796         -DNETPTY -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
2797         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
2798         -DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
2799         "LIBS= -lsocket -lnsl -lresolv -lcurses -lgen -lc -lucbc"
2800
2801 #Berkeley Software Design Inc. BSDI
2802 # Substitute "LIBS= -lnewcurses -ltermcap" if desired.
2803 bsdi:
2804         @echo 'Making C-Kermit $(CKVER) for BSDI ...'
2805         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2806         "CFLAGS= -DBSD44 -DSETREUID -DSW_ACC_ID -DBIGBUFOK -DFIXCRTSCTS \
2807         -DTCPSOCKET -DCK_CURSES -DFNFLOAT $(KFLAGS) -O" \
2808         "LIBS= -lcurses -ltermcap -lm"
2809
2810 #Berkeley Software Design Inc. BSDI - has higher serial speeds than 1.x.
2811 bsdi2:
2812         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2813         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 $(KFLAGS)"
2814
2815 bsdi3:
2816         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2817         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 -DBSDI3 $(KFLAGS)"
2818
2819 bsdi4:
2820         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2821         KTARGET=$${KTARGET:-$(@)} \
2822         "KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2823         -DCKHTTP -m486 $(KFLAGS)"
2824
2825 # (old name for the above)
2826 bsdiposix:
2827         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi
2828
2829
2830 #Build a BSDI 4.x binary that also runs under FreeBSD (Terry Kennedy).
2831 #But watch out for details like serial-port locking.
2832 bsdix:
2833         $(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2834         KTARGET=$${KTARGET:-$(@)} \
2835         "KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2836         -m486 $(KFLAGS)" "LNKFLAGS=-static -Wl,-m,i386bsdi -Wl,-e,_start"
2837
2838 #Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1
2839 pyramid:
2840         @echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2841         ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2842         "CFLAGS= -DBSD43 -DTCPSOCKET -DPYRAMID -O $(KFLAGS)" "LNKFLAGS = -s"
2843
2844 #Pyramid Dual Port OSx using HoneyDanBer UUCP, curses and TCP
2845 pyramid-hdb:
2846         @echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2847         ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2848         "CFLAGS= -DBSD43 -DTCPSOCKET -DHBDUUCP -DCK_CURSES -O $(KFLAGS)" \
2849         "LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
2850
2851 #Pyramid DC/OSx (UNIX System V R4).
2852 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
2853 #are not misplaced in sys (rather than netinet and arpa, respectively).
2854 #Uses ANSI C.
2855 #NOTE: Remove -O and Olimit:2500 from CFLAGS if TELNET connections do not work.
2856 pyrdcosx:
2857         @echo 'Making C-Kermit $(CKVER) for Pyramid DC/OSx...'
2858         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2859         "CFLAGS = -Xa -O -DSVR4 -DDIRENT -DHDBUUCP -DSELECT -DNOGETUSERSHELL \
2860         -DCK_CURSES -DSTERMIOX -DTCPSOCKET -DPYRAMID -K Olimit:3100 \
2861         -DNO_DNS_SRV $(KFLAGS)" "LIBS= -lcurses -lsocket -lnsl" "LNKFLAGS = -s"
2862
2863 #IBM's AIX 3.0 on IBM 370 mainframe, tested on AIX F44 thru F50.
2864 aix370:
2865         @echo Making C-Kermit $(CKVER) for IBM System/370 AIX 3.0...
2866         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2867         "CFLAGS= -DAIX370 -DTCPSOCKET -DLCKDIR -DDIRENT $(KFLAGS)" \
2868         "LIBS = -lbsd"
2869
2870 #IBM's AIX/ESA 2.1 (OSF/1) on IBM mainframe
2871 aixesa:
2872         @echo Making C-Kermit $(CKVER) for IBM AIX/ESA...
2873         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2874         "CFLAGS= -DAIXESA -DTCPSOCKET $(KFLAGS) -O"
2875
2876 #IBM PS/2 with AIX 1.0 thru 1.3.
2877 #  Reports indicate that -O switch must be omitted.
2878 #  It is also possible that "make bsd" will work (reports welcome).
2879 #  One report said "make LIBS=-lbsd bsd" did the trick.
2880 #  NOTLOG is to get around a 'tlog' symbol defined in one of the headers.
2881 ps2aix:
2882         @echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2883         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2884         "CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DSIG_V \
2885         -DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2886         "LNKFLAGS = -i"
2887
2888 ps2aixnetc:
2889         @echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2890         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2891         "CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DTCPSOCKET -DCK_CURSES \
2892         -DSIG_V -DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2893         "LIBS = -lcurses" "LNKFLAGS = -i"
2894
2895 ps2aix3:
2896         $(MAKE) ps2aix KTARGET=$${KTARGET:-$(@)}
2897
2898 #IBM RT PC with AIX 2.2.1, valid as of C-Kermit 8.0.
2899 #NOTLOG because of a conflict in <sys/termio.h>.
2900 #This one has unique and strange lockfiles.
2901 #  -O removed on purpose (8.0).
2902 #  In case of "compiler error: symbol table full", increase the -Nn number.
2903 #  In case of "compiler error: Constant pool too big", boost the -Np number.
2904 #  Add -DNOPUTENV if putenv() causes trouble.
2905 #  Put -DNOIKSD back if IKSD-related problems occur.
2906 rtaix:
2907         @echo 'Making C-Kermit $(CKVER) for IBM RT PC, AIX 2.2.1...'
2908         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2909         "CFLAGS = -DATTSV -DRTAIX -DHDBUUCP -DDIRENT -DNOTLOG -DTCPSOCKET \
2910         -DNOGETUSERSHELL -DCLSOPN -DNOREALPATH -DNOUNICODE -DBSD_INCLUDES \
2911         -DUSE_LSTAT -DFNFLOAT -Nn2500 -Np1000 -Wq,-SJ2 -a -w $(KFLAGS)" \
2912         "LIBS = -lm $(LIBS)" "LNKFLAGS = -s"
2913
2914 #### IBM RT PC - these targets were last verified in C-Kermit 8.0.211.
2915
2916 #IBM RT PC with AIX 2.2.1 + curses
2917 rtaixc:
2918         $(MAKE) rtaix CC=$(CC) CC2=$(CC2) "KFLAGS=-DCK_CURSES" "LIBS=-lcurses"
2919
2920 #IBM RT PC with AIX (ACIS) 2.2.1 (BSD 4.3)
2921 # Add -O, -DDYNAMIC, -s, etc, if they work.
2922 rtacis:
2923         @echo Making C-Kermit $(CKVER) for RT PC with ACIS 2.2.1 = BSD 4.3...
2924         $(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2925         "CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOIKSD -DNOPUTENV \
2926         $(KFLAGS) -U__STDC__" "LNKFLAGS = -s"
2927
2928 #### IBM AIX.  The first two targets should work for any version of AIX
2929 #### from 4.2 onwards.  The ones after that are for older versions or
2930 #### specific configurations, and/or with gcc.
2931
2932 # This one should work for any AIX 4.2 or later: "make aix".
2933 # Other tags are for compatibility with old makefile targets.
2934 #OK: 2011/06/11
2935 aix aix42 aix43 aix44 aix45 aix50 aix51 aix52 aix53 aix54 aix61:
2936         @echo Making C-Kermit $(CKVER) for IBM AIX...
2937         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2938         "CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2939         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2940         -DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
2941         -DCKCPU=\\\"`uname -p`\\\" \
2942         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2943         -D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
2944
2945 # Same but using gcc instead of cc
2946 # This works but we get "gcc: unrecognized option '-qmaxmem-..'" each module.
2947 aixg:
2948         @echo "Using gcc..."
2949         $(MAKE) aix KTARGET=$${KTARGET:-$(@)} \
2950         CC=gcc CC2=gcc "KFLAGS=-pipe -funsigned-char"
2951
2952 # AIX 4.2 or later with OpenSSL 0.9.7 or later: "make aix+ssl"
2953 # For earlier OpenSSL remove -DOPENSSL_097 or add "KFLAGS=-UOPENSSL_097".
2954 # Synonym target names added to cover old redundant targets that were removed.
2955 # If SSL is not installed in the /usr/local tree (see SSLINC and SSLLIB
2956 # definitions near the top), you can specify the locations in your make
2957 # command as in this example:
2958 #
2959 #  SSLINC=-I/opt/ssl/include SSLLIB=-L/opt/ssl/lib make -e aix+ssl
2960 #
2961 # To build with gcc use "make aix CC=gcc CC2=gcc", or "make aixg"
2962 #
2963 #OK: 2011/06/15
2964 aix+ssl aix51+openssl aix52+openssl aix53+openssl:
2965         @echo "Making C-Kermit $(CKVER) for IBM AIX with OpenSSL..."
2966         @echo "SSLINC=$(SSLINC) SSLLIB=$(SSLLIB)"
2967         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2968         CC=$(CC) CC2=$(CC2) \
2969         "CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2970         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2971         -D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2972         -DCKCPU=\\\"`uname -p`\\\" \
2973         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2974         -DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $(SSLINC) $(KFLAGS)" \
2975         "LNKFLAGS=-s" "LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
2976
2977 # AIX 5.3 or 6.1 or later with IBM OpenSSL, which is always in the directories
2978 # shown below so you don't have to set SSLINC and SSLLIB.  If for some reason
2979 # the SSL include files and libraries are not in the places assumed, then use
2980 # "make aix+ssl" (just above) and set SSLINC and SSLLIB to indicate where the
2981 # SSL files are.  To build with gcc use "make aix+ibmssl CC=gcc CC2=gcc".
2982 aix+ibmssl:
2983         @echo "Making C-Kermit $(CKVER) for IBM AIX 6.1 with OpenSSL..."
2984         @echo "If this fails use 'make aix+ss' and specify SSLINC and SSLLIB"
2985         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2986         CC=$(CC) CC2=$(CC2) \
2987         "CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2988         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2989         -D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2990         -DCKCPU=\\\"`uname -p`\\\" \
2991         -DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2992         -DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_098 \
2993         -I/usr/include/openssl $(KFLAGS)" \
2994         "LNKFLAGS=-s" \
2995         "LIBS=-L/usr/lib/openssl -lssl -lcrypto -lcurses -lm -lcrypt"
2996
2997 # Old AIX versions...
2998
2999 #IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000.
3000 rs6000:
3001         @echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
3002         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3003         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
3004         -DCK_POLL -DCLSOPN -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
3005         "LNKFLAGS = -s"
3006
3007 #IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000, with curses.
3008 rs6000c:
3009         @echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
3010         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3011         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
3012         -DCK_POLL -DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -DNOREALPATH \
3013         -O $(KFLAGS)" "LIBS= -lcurses -ltermcap" "LNKFLAGS = -s"
3014
3015 aix30:
3016         $(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
3017
3018 aix31:
3019         $(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
3020
3021 #IBM AIX 3.2 for RISC System/6000.
3022 #In case of "subprogram too complex" warnings, add "-qmaxmem=16000" to CFLAGS.
3023 rs6aix32:
3024         @echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000...
3025         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3026         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
3027         -DSELECT_H -DCLSOPN -DNOTTYLOCK -O $(KFLAGS)" "LNKFLAGS = -s"
3028
3029 #IBM AIX 3.2 for RISC System/6000.
3030 rs6aix32c:
3031         @echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000, TCP+curses...
3032         @echo In case of Subprogram Too Complex warnings,
3033         @echo add -qmaxmem=16000 to CFLAGS.
3034         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3035         "CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
3036         -DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
3037         "LNKFLAGS = -s" "LIBS=-lcurses"
3038
3039 aix32:
3040         $(MAKE) rs6aix32c KTARGET=$${KTARGET:-$(@)}
3041
3042 #IBM AIX 4.1, 4.1.x on RISC System/6000 or Power Series.
3043 #Generates common binary for all platforms if using xlc (IBM C compiler).
3044 #When using gcc, add -mcpu=common to generate common binary.
3045 #Note that this one needs CK_NEWTERM.
3046 # Add -bbigtoc in case ld fails with TOC overflow.
3047 aix41:
3048         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3049         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3050         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3051         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3052         -DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
3053         "LNKFLAGS = -s" "LIBS=-lcurses"
3054
3055 #Ditto but with gcc.
3056 #Remove "CC=gcc CC2=gcc" if you have gcc installed as cc.
3057 aix41g:
3058         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3059         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
3060         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3061         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3062         -DNOGETUSERSHELL -O $(KFLAGS)" \
3063         "LNKFLAGS = -s -Xlinker -bbigtoc" "LIBS=-lcurses"
3064
3065 # Add -bbigtoc in case ld fails with TOC overflow.
3066 aix41+krb5+krb4:
3067         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3068         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3069         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3070         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3071         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3072         -DCK_ENCRYPTION -DCK_DES $(K5INC) $(K5INC)/krb5  \
3073         -DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
3074         "LNKFLAGS = -s" \
3075         "LIBS = $(K5LIB) -lcurses -lkrb4 -ldes425 -lkrb5 \
3076         -lcom_err -lk5crypto -lgssapi_krb5"
3077
3078 #Old name for "aix41".
3079 rs6aix41c:
3080         $(MAKE) aix41 KTARGET=$${KTARGET:-$(@)}
3081
3082 #IBM AIX 4.1, 4.1.x, or 4.2 on RISC System/6000 or Power Series,
3083 # with X.25 support
3084 #Generates common binary for all platforms if using xlc (IBM C compiler).
3085 #When using gcc, add -mcpu=common to generate common binary.
3086 # Add -bbigtoc in case ld fails with TOC overflow.
3087 aix41x25:
3088         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3089         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3090         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3091         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3092         -DIBMX25 -DDEBUG -DNOGETUSERSHELL -qmaxmem=16000 -g $(KFLAGS)" \
3093         "LNKFLAGS = -g -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3094         -@echo "\e]0;kermit done\a\c"
3095
3096 #As above but without -g in LNKFLAGS.
3097 # Add -bbigtoc in case ld fails with TOC overflow.
3098 aix41x25o:
3099         @echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3100         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3101         "CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3102         -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3103         -DIBMX25 -DNODEBUG -DNOGETUSERSHELL -qmaxmem=16000 $(KFLAGS)" \
3104         "LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3105         -@echo "\e]0;kermit done\a\c"
3106
3107 #AIX 4.2 -- Use this target if the regular "make aix" doesn't work.
3108 # Must have CK_NEWTERM or echoing is lost after curses.
3109 # Add -bbigtoc in case ld fails with TOC overflow.  As of C-Kermit 8.0.212,
3110 # all AIX builds 4.2 and later include large file support.
3111 oldaix42:
3112         @echo Making C-Kermit $(CKVER) for IBM AIX 4.2 or higher...
3113         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3114         "CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3115         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
3116         -DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
3117         -DCKCPU=\\\"`uname -p`\\\" \
3118         -DHERALD=\\\"\ IBM\ AIX\ `uname -v`.`uname -r`\\\" \
3119         -D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
3120
3121 #AIX 4.3 - Use this target if the regular "make aix" doesn't work.
3122 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3123 # -bbigtoc needed on some systems but not others to avoid TOC overflow.
3124 # "man ld" says -bbigtoc makes program run slower.
3125 oldaix43:
3126         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher...
3127         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3128         "CFLAGS= -DAIXRS -DAIX41 -DAIX43 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3129         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3130         -DFNFLOAT -DNOGETUSERSHELL -qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3131         "LNKFLAGS = -s" "LIBS=-lcurses -lm"
3132
3133 #AIX 4.3 with IBM X.25.
3134 aix43x25:
3135         @echo "Making C-Kermit $(CKVER) for IBM AIX 4.3 with X.25..."
3136         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3137         "CFLAGS= -DAIXRS -DAIX41 -DAIX43 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3138         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3139         -DFNFLOAT -DNOGETUSERSHELL -DIBMX25 \
3140         -qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3141         "LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg -lm"
3142
3143 #AIX 4.3 -- Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3144 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3145 # "man ld" says -bbigtoc makes program run slower.
3146 aix43g:
3147         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3148         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3149         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3150         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3151         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3152         "LIBS=-lcurses -lm"
3153
3154 aix43gcc:
3155         $(MAKE) aix43g
3156
3157 # None of the following aix43gcc attempts work on a gcc-only AIX 4.3.3 box.
3158 # It just plain can't find the math routines (fmod, pow, exp, sqrt, log10,...)
3159 # Which is odd because nm /usr/lib/libC.a finds them...
3160
3161 #in case aix43gcc can't find its math library...
3162 aix43gccx:
3163         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3164         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3165         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3166         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3167         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3168         "LIBS= -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.1.0/2.95.2 \
3169         -lcurses -bloadmap -bnoquiet"
3170
3171 #in case aix43gccx can't find its math library...
3172 aix43gccy:
3173         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3174         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3175         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3176         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3177         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3178         "LIBS= -lcurses -bloadmap -bnoquiet"
3179
3180 #in case aix43gccx can't find its math library...
3181 aix43gccz:
3182         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3183         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3184         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3185         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3186         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3187         "LIBS= -L. -lcurses -bloadmap -bnoquiet"
3188
3189 #AIX 4.3 with MIT Kerberos 5 and Kerberos 4 compatibility mode
3190 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3191 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3192 # "man ld" says -bbigtoc makes program run slower.
3193 aix43gcc+krb5+krb4:
3194         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3195         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3196         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3197         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3198         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3199         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3200         -DCK_ENCRYPTION -DCK_DES -funsigned-char $(K5INC) $(K5INC)/krb5 \
3201         $(KFLAGS)" \
3202         "LIBS=$(K5LIB) -lcurses -lm -lkrb4 -ldes425 -lkrb5 \
3203         -lcom_err -lk5crypto -lcrypt -lgssapi_krb5"
3204
3205 #AIX 4.3 with MIT Kerberos 5, Kerberos 4 compatibility mode and OpenSSL
3206 # Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3207 # -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3208 # "man ld" says -bbigtoc makes program run slower.
3209 aix43gcc+krb5+krb4+openssl:
3210         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3211         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3212         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3213         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3214         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3215         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3216         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DLIBDES -DCK_SSL \
3217         -funsigned-char $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3218         "LIBS=$(K5LIB) $(SSLLIB) -lssl -lcrypto \
3219         -lcurses -lm -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt \
3220         -lgssapi_krb5"
3221
3222 aix43gcc+openssl:
3223         @echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/OpenSSL...
3224         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3225         "CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3226         -DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3227         -DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3228         -DCK_AUTHENTICATION -DCK_SSL -funsigned-char $(SSLINC) $(KFLAGS)" \
3229         "LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
3230
3231 aix44gcc:
3232         $(MAKE) aix43g "KFLAGS=-DAIX44 $(KFLAGS)" \
3233         KTARGET=$${KTARGET:-$(@)}
3234
3235 aix45gcc:
3236         $(MAKE) aix43g "KFLAGS=-DAIX45 $(KFLAGS)" \
3237         KTARGET=$${KTARGET:-$(@)}
3238
3239 aix50gcc:
3240         $(MAKE) aix43g "KFLAGS=-DAIX50 $(KFLAGS)" \
3241         KTARGET=$${KTARGET:-$(@)}
3242
3243 aix51gcc:
3244         $(MAKE) aix43g "KFLAGS=-DAIX51 $(KFLAGS)" \
3245         KTARGET=$${KTARGET:-$(@)}
3246
3247 aix52gcc:
3248         $(MAKE) aix43g "KFLAGS=-DAIX52 $(KFLAGS)" \
3249         KTARGET=$${KTARGET:-$(@)}
3250
3251 aix53gcc:
3252         $(MAKE) aix43g "KFLAGS=-DAIX53 $(KFLAGS)" \
3253         KTARGET=$${KTARGET:-$(@)}
3254
3255 #Bull DPX/2 with BOS/X, like AIX/RS6000
3256 bulldpx2:
3257         @echo Making C-Kermit $(CKVER) for Bull DPX/2 with BOS/X...
3258         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3259         "CFLAGS= -DSVR3 -DDIRENT -DCK_ANSIC -DCKTYP_H=<sys/types.h> \
3260         -DCK_POLL -DNOGETUSERSHELL -DCLSOPN -DNOLEARN -O $(KFLAGS)" \
3261         "LNKFLAGS = -s"
3262
3263 #Sun UNIX 3.5 with gcc 2.3.3.
3264 sunos3gcc:
3265         @echo Making C-Kermit $(CKVER) for Sun UNIX 3.5 and gcc...
3266         $(MAKE) xermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3267         CFLAGS="-g -O -DBSD4 -DTCPSOCKET $(KFLAGS)"
3268
3269 #SunOS version 4.0, BSD environment, has saved original euid feature.
3270 # Add "CC=/usr/ucb/cc CC2=/usr/ucb/cc" if necessary.
3271 # Note: Including Unicode crashes the assembler in ckcuni.c.
3272 sunos4:
3273         @echo Making C-Kermit $(CKVER) for SunOS 4.0, BSD environment...
3274         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3275         "CFLAGS= -O -DSUNOS4 -DFNFLOAT -DNOUNICODE $(KFLAGS)" \
3276         "LIBS=-lm"
3277
3278 #As above, but with SunLink X.25 support
3279 sunos4x25:
3280         @echo SunLink X.25 support
3281         $(MAKE) "MAKE=$(MAKE)" sunos4 KTARGET=$${KTARGET:-$(@)} \
3282         "KFLAGS=$(KFLAGS) -DFNFLOAT -DSUNX25" \
3283         "LIBS=-lm"
3284
3285 #SUN OS version 4.1 - 4.1.3, BSD environment, has saved original euid feature.
3286 #Uses Honey DanBer UUCP.  Requires presence of /usr/spool/locks directory.
3287 # /var/spool/ should be a symbolic link to  /usr/spool/.
3288 # ... or 'make xermit "CC= /usr/ucb/cc " \'
3289 # Note: "xermit" means use the select() version of the CONNECT module.
3290 # Note for C-Kermit 9.0: Reportedly 'you need to modify the sys/ioctl.h
3291 # include file, i.e. comment out the "struct winsize" and "struct
3292 # ttysize". Otherwise there will be a conflict with sys/ttycom.h (included by
3293 # termios.h) which also declares these structs. But you need both includes.'
3294 sunos41:
3295         @echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD...
3296         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3297         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE $(KFLAGS)" \
3298         "LIBS= $(LIBS) -lresolv -lm"
3299
3300 #As above, but compiled with gcc.  Gives 24-32K size reduction
3301 #with gcc 2.1 or 2.2.2.  CAUTION: make sure "fixincludes" has been run on
3302 #the include files, so gcc's are in sync with the regular Sun ones.
3303 #This includes the curses library for fullscreen file transfer display.
3304 #NDGPWNAM needed for GCC 2.5.6, not needed for 2.4.0, but it's uncertain
3305 #whether it will do any harm for 2.4.0 compilation -- if so, remove it.
3306 sunos41gcc:
3307         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3308         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3309         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3310         -funsigned-char $(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3311
3312 # As above, but without -funsigned-char so I can see the warnings that
3313 # everybody else will get when they use ANSI compilers that don't have this
3314 # option (gsc = gcc signed char).
3315 sunos41gsc:
3316         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3317         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3318         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3319         $(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3320
3321 #As above but with ckucon.c rather than ckucns.c (for testing only)
3322 sunos41gccfork:
3323         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3324         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3325         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3326         -DNOLEARN -funsigned-char $(KFLAGS)" \
3327         "LIBS= -lcurses -ltermcap -lresolv -lm"
3328
3329 #as above but configured for Kerberos IV
3330 sunos41gcc+krb4:
3331         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3332         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3333         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3334         -DTCPSOCKET -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3335         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK -funsigned-char \
3336         $(K4INC) $(KFLAGS)" \
3337         "LIBS= $(K4LIB) -lcurses -ltermcap -lresolv -lm -lkrb -ldes"
3338
3339 #as above but configured for SSL/TLS
3340 sunos41gcc+openssl:
3341         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, ssl...
3342         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3343         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3344         -DCK_AUTHENTICATION -funsigned-char \
3345         -DCK_SSL -DTCPSOCKET -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3346         "LIBS= $(SSLLIB) -lcurses -ltermcap -lresolv -lm -lssl -lcrypto"
3347
3348 #as above but configured for Kerberos IV and SSL/TLS
3349 sunos41gcc+krb4+openssl:
3350         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3351         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3352         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3353         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3354         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3355         $(K4INC) $(SSLINC) $(KFLAGS)" \
3356         "LIBS= $(K4LIB) $(SSLLIB) \
3357         -lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto"
3358
3359 #as above but configured for Kerberos IV and ZLIB enabled SSL/TLS
3360 sunos41gcc+krb4+openssl+zlib:
3361         @echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3362         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3363         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3364         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3365         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3366         -DZLIB $(K4INC) $(SSLINC) \
3367         $(KFLAGS)" \
3368         "LIBS= $(K4LIB) $(SSLLIB) \
3369         -lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto -lz"
3370
3371 #as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3372 sunos41gcc+krb4+srp+openssl+zlib:
3373         @echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,krb4,srp,ssl,zlib..."
3374         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3375         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3376         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3377         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3378         -DZLIB -DCK_SRP $(K4INC) $(SRPINC) $(SSLINC) $(KFLAGS)" \
3379         "LIBS= $(K4LIB) $(SRPLIB) $(SSLLIB) \
3380         -lcurses -ltermcap -lresolv -lm -lkrb -lkrypto \
3381         -lsrp -lssl -lcrypto -lz"
3382
3383 #as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3384 sunos41gcc+srp+openssl+zlib:
3385         @echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,srp,ssl,zlib..."
3386         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3387         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3388         -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES \
3389         -DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3390         -DZLIB -DCK_SRP $(SRPINC) $(SSLINC) \
3391         $(KFLAGS)" \
3392         "LIBS= $(SRPLIB) $(SSLLIB) \
3393         -lcurses -ltermcap -lresolv -lm -lkrypto -lsrp -lssl -lcrypto -lz "
3394
3395 #SUNOS 4.1 as sunos41 above, but also with curses support
3396 sunos41c:
3397         @echo Curses support
3398         $(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
3399         "KFLAGS=$(KFLAGS) -DCK_CURSES -DFNFLOAT " \
3400         "LIBS= -lcurses -ltermcap"
3401
3402 #As SunOS 4.1.x, gcc, configured as Internet Kermit Server.
3403 # . NOLOCAL removes capability to make connections
3404 # . TNCODE allows server-side Telnet negotiation.
3405 # . used to include -lpwent, why?
3406 # . used to include -L/usr/local/lib -lm, why?
3407 sunos41giks:
3408         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc for IKS...
3409         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3410         "CFLAGS= -O -DSUNOS41 -DNDGPWNAM -DFNFLOAT \
3411         -DNOLOCAL -DTCPSOCKET -DTNCODE -DNOPUSH $(KFLAGS)" \
3412         "LIBS= -lm -lresolv"
3413
3414 #SUNOS 4.1 with SunLink X.25 support
3415 sunos41x25:
3416         @echo SunLink X.25 support
3417         $(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3418         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3419         -DNOLEARN $(KFLAGS)" "LIBS= $(LIBS) -lresolv -lm"
3420
3421 #SUNOS 4.1 with SunLink X.25 support and curses
3422 sunos41x25c:
3423         @echo SunLink X.25 support + curses
3424         $(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3425         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3426         -DCK_CURSES -DNOLEARN $(KFLAGS)" \
3427         "LIBS= $(LIBS) -lcurses -ltermcap -lresolv -lm"
3428
3429 #SUN with Solaris 2.0 = SunOS 5.0.
3430 #Mostly the same as System V R4.  Don't use this with later Solaris versions.
3431 solaris20:
3432         @echo 'Making C-Kermit $(CKVER) for Sun with Solaris 2.0 and curses...'
3433         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3434         "CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3435         -DTCPSOCKET -DCK_CURSES -DFNFLOAT -DCK_POLL $(KFLAGS)" \
3436         "LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s"
3437
3438 #SUN with Solaris 2.0.
3439 #As above, but built with the gcc compiler from the Cygnus CD-ROM.
3440 solaris20g:
3441         @echo 'Making C-Kermit $(CKVER) for Sun Solaris 2.0, gcc, and curses..'
3442         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3443         "CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3444         -DTCPSOCKET -DCK_CURSES -DCK_POLL -DFNFLOAT $(KFLAGS)" \
3445         "LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s" \
3446         CC=/opt/cygnus-sol2-1.1/bin/gcc CC2=/opt/cygnus-sol2-1.1/bin/gcc
3447
3448 #SunOS 5.1 = Solaris 2.1.
3449 #NOTE: A C compiler is no longer bundled with SunOS 5.1, so to compile C
3450 #programs, you might have to change your PATH to include the directory
3451 #/usr/ccs/bin AFTER the directory containing the compiler.  SunPRO C is
3452 #installed by default in /opt/SUNWspro/bin.  So a sample PATH might be:
3453 #
3454 # /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3455 # /usr/ucb:/usr/sbin:/sbin:.
3456 #
3457 # or:
3458 #
3459 # /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3460 #
3461 #NOTE 2: Compilation with the Apogee C compiler (apcc) might not work,
3462 #because it refuses to allow "-Usun".  Reportedly, newer releases of apcc
3463 #(such as 1.2.17) work OK, use: "make -e sunos51 CC=apcc CC2=apcc".
3464 solaris21:
3465         @echo 'Making C-Kermit $(CKVER) for SunOS 5.x....'
3466         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3467         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DFNFLOAT \
3468         -DSELECT -DNODEBUG -DSTERMIOX $(KFLAGS)" "LIBS = -lm" "LNKFLAGS = -s"
3469
3470 #Solaris 2.0 - 2.4, SunPro compiler, includes curses and TCP/IP.
3471 #When using SUNWspro CC 2.0.1 under Solaris 2.3, be sure all cc patches
3472 #are applied, otherwise corrupt or truncated object files can result.
3473 #To build, set your PATH as follows:
3474 #  /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3475 #  /usr/ucb:/usr/sbin:/sbin:.
3476 # or (depending on where the compiler has been installed):
3477 #  /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3478 #For additional optimization try using "-fast -xO4 -xdepend".
3479 solaris2x:
3480         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3481         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3482         "CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3483         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
3484         "LNKFLAGS = -s" "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv"
3485
3486 #as above but configured for Kerberos IV
3487 solaris2x+krb4:
3488         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x, SunPro cc, krb4...'
3489         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3490         "CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3491         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET  \
3492         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3493         -DCK_ENCRYPTION -DCK_DES -DCK_CAST $(K4INC) $(KFLAGS)" \
3494         "LNKFLAGS = -s" \
3495         "LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes"
3496
3497 #C-Kermit for Solaris 2.0-2.4 compiled with gcc, includes curses and TCP/IP.
3498 #Change -O2 to -O if -O2 gives trouble.
3499 #Remove -Usun if it causes trouble.
3500 #Your PATH should start with something like:
3501 #  /usr/local/gnu/bin:/usr/ccs/bin:
3502 #Produces a huge executable -- strip with /usr/ccs/bin/strip (not Gnu strip).
3503 #Also don't add "LNKFLAGS = -s" -- strip manually instead.
3504 #Also note: this can NOT be linked statically - Sun makes it impossible.
3505 #And for Solaris 2.4, you might have to replace:
3506 # /usr/local/lib/gcc-lib/i486-sun-solaris2/2.4.5/include/sys/stat.h
3507 #with /usr/include/sys/stat.h.
3508 solaris2xg:
3509         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc...'
3510         @echo 'Please read the comments that accompany the solaris2xg target.'
3511         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3512         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3513         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3514         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3515
3516 #ditto but no curses.
3517 solaris2xgnc:
3518         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc...'
3519         @echo 'Please read the comments that accompany the solaris2xg target.'
3520         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3521         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3522         -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3523         "LIBS= -lsocket -lnsl -lm -lresolv $(LIBS)"
3524
3525 #and with Kerberos IV
3526 solaris2xg+krb4:
3527         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc, krb4...'
3528         @echo 'Please read the comments that accompany the solaris2xg target.'
3529         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3530         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3531         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3532         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 -DCK_ENCRYPTION \
3533         -DCK_DES -DCK_CAST -DBIGBUFOK $(K4INC) $(KFLAGS)" \
3534         "LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes \
3535         $(LIBS)"
3536
3537 #and with OpenSSL,ZLIB,PAM,SHADOW
3538 solaris2xg+openssl+zlib+pam+shadow:
3539         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3540         @echo 'Please read the comments that accompany the solaris2xg target.'
3541         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3542         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3543         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3544         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW  -DZLIB \
3545         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3546         "LIBS= $(SSLLIB) -ltermlib \
3547         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz"
3548
3549 #Ditto but with GCC 3.1 in which you have to specify 32-bit with -m32.
3550 #In Solaris 9 (and maybe 8) you'll also need specifiy the Library path.
3551 #Reportedly this can be done here, but only with:
3552 # crle -l /usr/lib:/usr/local/ssl/lib
3553 #prior to building.  Note: 64-bit not tested with SSL.
3554 #For no-crypto 64-bit builds see the solaris9g64 target.
3555 solaris2xg32+openssl+zlib+pam+shadow:
3556         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3557         @echo 'Please read the comments that accompany the solaris2xg target.'
3558         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC="gcc -m32" CC2="gcc -m32" \
3559         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3560         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3561         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW  -DZLIB \
3562         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3563         "LIBS= $(SSLLIB) -ltermlib \
3564         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz"
3565
3566 #and with Krb5,Krb4,OpenSSL,SHADOW
3567 solaris2xg+krb5+krb4+openssl+shadow:
3568         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc,k5,k4,ssl...'
3569         @echo 'Please read the comments that accompany the solaris2xg target.'
3570         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3571         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3572         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3573         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3574         -DCK_ENCRYPTION -DCK_SSL -DCK_DES -DCK_CAST -DBIGBUFOK \
3575         $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3576         "LIBS= $(K5LIB) $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3577         -lkrb4 -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3578         -ldes $(LIBS)"
3579
3580 #and with OpenSSL
3581 solaris2xg+openssl+pam+shadow:
3582         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3583         @echo 'Please read the comments that accompany the solaris2xg target.'
3584         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3585         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3586         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3587         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW \
3588         -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3589         "LIBS= $(SSLLIB) -ltermlib \
3590         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam"
3591
3592 solaris2xg+openssl+zlib+srp+pam+shadow: 
3593         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3594         @echo 'Please read the comments that accompany the solaris2xg target.'
3595         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3596         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3597         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DBIGBUFOK \
3598         -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES -DLIBDES -DCK_CAST \
3599         -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DCK_SRP $(SSLINC) $(KFLAGS)" \
3600         "LIBS= $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv -lsrp -lssl \
3601         -ldes -lkrypto -lcrypto -lpam -lz"
3602
3603 solaris22g:
3604         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3605         KTARGET=$${KTARGET:-$(@)}
3606
3607 solaris23g:
3608         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3609         KTARGET=$${KTARGET:-$(@)}
3610
3611 #Solaris 2.4 built with gcc
3612 solaris24g:
3613         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} \
3614         solaris2xg "KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3615
3616 #Solaris 2.0-2.3, SunPro compiler, with SunLink X.25 support.
3617 #This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3618 #exists and can be dynamically linked.
3619 #NOTE: Do not change target to xermit -- it doesn't support X.25.
3620 solaris2x25:
3621         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x+X.25 with SunPro cc...'
3622         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3623         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DDIRENT \
3624         -DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DNOLEARN \
3625         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3626         "LNKFLAGS = -s" \
3627         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3628         -lsockx25 -lsocket -lnsl -lm -lresolv"
3629
3630 #Solaris 2.0-2.4, gcc, SunLink X.25 added.
3631 #NOTE: Can't use xermit target with X.25.
3632 solaris2xgx25:
3633         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x + X.25 with GNU cc...'
3634         @echo 'Please read the comments that accompany the solaris2xg entry.'
3635         $(MAKE) wermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3636         "CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DSUNX25 \
3637         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DFNFLOAT \
3638         -DNOLEARN $(KFLAGS)" \
3639         "LIBS= -ltermlib -lm -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3640         -lsockx25 -lsocket -lnsl"
3641
3642 #Solaris 2.4, SunPro compiler, with SunLink X.25 support.
3643 #This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3644 #exists and can be dynamically linked.
3645 solaris24x25:
3646         @echo 'Making C-Kermit $(CKVER) for Solaris 2.4+X.25 with SunPro cc...'
3647         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3648         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DSOLARIS24 -DDIRENT -DNOLEARN \
3649         -DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DPOSIX_CRTSCTS \
3650         -DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3651         "LNKFLAGS = -s" \
3652         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3653         -lsockx25 -lsocket -lnsl -lm -lresolv"
3654
3655 #Solaris 2.5, SunPro compiler, with SunLink X.25 support.
3656 solaris25x25:
3657         @echo 'Making C-Kermit $(CKVER) for Solaris 2.5+X.25 with SunPro cc...'
3658         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3659         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS25 -DDIRENT -DSUNX25 \
3660         -DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES \
3661         -DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3662         -I/opt/SUNWconn/include $(KFLAGS)" \
3663         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3664         -lsockx25 -lsocket -lnsl -lm -lresolv"
3665
3666 solaris23:
3667         $(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3668         "KFLAGS=$(KFLAGS)"
3669
3670 solaris24:
3671         $(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3672         "KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3673
3674 # template for Solaris 2.5 and above.
3675 solaris25x:
3676         @echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3677         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3678         "CFLAGS = -DFNFLOAT -O -Usun -i $(KFLAGS)" \
3679         "LNKFLAGS = -s" \
3680         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3681
3682 #Solaris 2.5, SunPro compiler, curses, TCP/IP
3683 solaris25:
3684         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3685         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3686
3687 #Solaris 2.5, SunPro compiler, curses, TCP/IP, Kerberos IV
3688 solaris25+krb4:
3689         $(MAKE) "MAKE=$(MAKE)" solaris25x+krb4 KTARGET=$${KTARGET:-$(@)} \
3690         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3691
3692 #Solaris 2.5 built with gcc
3693 solaris25g:
3694         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3695         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3696
3697 #Solaris 2.5 built with gcc and Kerberos IV
3698 solaris25g+krb4:
3699         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3700         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3701
3702 #Solaris 2.5 built with gcc and Kerberos V/IV, SSL, ...
3703 solaris25g+krb5+krb4+openssl+shadow:
3704         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3705         KTARGET=$${KTARGET:-$(@)} \
3706         "KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3707
3708 #Solaris 2.5, gcc, SunLink X.25 added.
3709 solaris25gx25:
3710         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3711         "KFLAGS=-DSOLARIS25 $(KFLAGS)"
3712
3713 #Solaris 2.6, gcc, SunLink X.25 added.
3714 solaris26gx25:
3715         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3716         "KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3717         "LIBS= -lpam"
3718
3719 #Solaris 2.6, SunPro compiler, curses, TCP/IP
3720 solaris26:
3721         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3722         "KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3723         "LIBS= -lpam"
3724
3725 #Solaris 2.6 with gcc
3726 solaris26g:
3727         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xg \
3728         "KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3729         "LIBS = -lpam"
3730
3731 #Solaris 2.6 with gcc and SSL
3732 solaris26g+openssl:
3733         $(MAKE) "MAKE=$(MAKE)"  solaris2xg+openssl+pam+shadow \
3734         KTARGET=$${KTARGET:-$(@)} "KFLAGS= -DSOLARIS26 $(KFLAGS)"
3735
3736 #Solaris 2.6 with gcc, no curses (e.g. because libtermlib is missing).
3737 solaris26gnc:
3738         $(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgnc \
3739         "KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3740         "LIBS= -lpam"
3741
3742 #Solaris 2.6, SunPro compiler, with SunLink X.25 support.
3743 solaris26x25:
3744         @echo 'Making C-Kermit $(CKVER) for Solaris 2.6+X.25 with SunPro cc...'
3745         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3746         "CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS26 -DDIRENT -DSUNX25 \
3747         -DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES -DCK_PAM -DCK_SHADOW \
3748         -DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3749         -I/opt/SUNWconn/include $(KFLAGS)" \
3750         "LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3751         -lsockx25 -lsocket -lnsl -lm -lresolv -lpam"
3752
3753 #Solaris 7 (2.7) with Sun CC
3754 solaris7:
3755         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3756         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3757         "LIBS= -lpam"
3758
3759 #Solaris 7 with gcc (32-bit)
3760 solaris7g:
3761         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3762         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3763         "LIBS= -lpam"
3764
3765 #Solaris 7 with gcc + Kerberos IV (32-bit)
3766 solaris7g+krb4:
3767         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3768         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3769         "LIBS= -lpam"
3770
3771 solaris7g+openssl+zlib+pam+shadow:
3772         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3773         KTARGET=$${KTARGET:-$(@)} \
3774         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3775
3776 #Solaris 7 with gcc + OpenSSL (32-bit)
3777 solaris7g+openssl+zlib+srp+pam+shadow:
3778         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+srp+pam+shadow \
3779         KTARGET=$${KTARGET:-$(@)} \
3780         "KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3781
3782 #Solaris 8
3783 solaris8:
3784         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3785         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3786         "LIBS= -lpam"
3787
3788 #Solaris 8 with gcc (32-bit)
3789 solaris8g:
3790         $(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3791         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3792         "LIBS= -lpam"
3793
3794 # In OpenSSL builds add -ldl if you get unresolved references for
3795 # dlclose, dlsym, dlopen, dlerror.
3796
3797 #Solaris 8 with gcc + OpenSSL (32-bit)
3798 solaris8g+openssl+zlib+pam+shadow:
3799         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3800         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DSOLARIS8 $(KFLAGS)"
3801
3802 #Solaris 8 with gcc + Kerberos IV (32-bit)
3803 solaris8g+krb4:
3804         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3805         "KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3806         "LIBS= -lpam"
3807
3808 solaris9nolfs:
3809         $(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3810         "KFLAGS=-DSOLARIS9 -DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3811         "LIBS= -lpam"
3812
3813 #Solaris 9 with malloc debugging
3814 solaris9md:
3815         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
3816         "CFLAGS = -DFNFLOAT -O -Usun -i -D_FILE_OFFSET_BITS=64 \
3817         -DSOLARIS9 -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG \
3818         -DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3819         "LIBS= -lpam -ltermlib -lsocket -lnsl -lm -lresolv"
3820
3821 #Solaris 9 with gcc + OpenSSL + Shadow (32-bit)
3822 #Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3823 solaris9g+openssl+shadow+pam+zlib:
3824         $(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3825         KTARGET=$${KTARGET:-$(@)} \
3826         "KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
3827         -DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
3828         "LIBS= -lpam -ldes425 -lz $(LIBS)"
3829
3830 #Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow (32-bit)
3831 #Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3832 solaris9g+krb5+krb4+openssl+shadow+pam+zlib:
3833         $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3834         KTARGET=$${KTARGET:-$(@)} \
3835         "KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
3836         -DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
3837         "LIBS= -lpam -ldes -lz $(LIBS)"
3838
3839 #Solaris 9 with gcc + Kerberos 4 and 5:
3840 solaris9g+krb5+krb4:
3841         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3842         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3843         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3844         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3845         -D_FILE_OFFSET_BITS=64 \
3846         -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK \
3847         $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3848         "LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3849         -lkrb4 -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3850         -ldes $(LIBS)"
3851
3852 #Solaris 9, 10, or 11 with gcc...  
3853 #Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3854 #This target is chained to be the secure solaris9g+xxx targets below.
3855 solaris9g solaris10g solaris11g:
3856         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with gcc'
3857         @case `uname -r` in \
3858           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3859           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3860           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3861           *) SOLARISVERSION="-DSOLARIS" ;; \
3862         esac ; \
3863         $(MAKE) "MAKE=$(MAKE)" CC="gcc -m32" CC2="gcc -m32" xermit \
3864         KTARGET=$${KTARGET:-$(@)} \
3865         "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3866         -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW -funsigned-char \
3867         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3868         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3869         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3870         -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3871         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3872
3873 #Solaris 9, 10, or 11 with gcc + Kerberos 5 + OpenSSL.
3874 #OK C-Kermit 9.0.301.
3875 solaris9g+krb5+ssl solaris10g+krb5+ssl solaris11g+krb5+ssl:
3876         @case `openssl version` in \
3877           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3878           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3879           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3880           *) OPENSSLOPTION="" ;; \
3881         esac ; \
3882         HAVE_DES=''; \
3883         DES_LIB=''; \
3884         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3885               DES_LIB='-ldes425'; \
3886               HAVE_DES='-DCK_DES -DLIBDES'; \
3887               echo "HAVE DES"; \
3888            else echo "NO DES"; \
3889         fi; \
3890         GSSAPILIB=''; \
3891         K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
3892         echo K5DIR=$$K5DIR; \
3893         if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
3894               GSSAPILIB='-lgssapi_krb5'; \
3895           else GSSAPILIB='-lgssapi'; \
3896         fi; \
3897         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3898         "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3899         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET  -DBIGBUFOK \
3900         -DCK_AUTHENTICATION -DCK_SSL -DZLIB -DCK_KERBEROS -DKRB5 \
3901         -DCK_ENCRYPTION -DCK_CAST $$OPENSSLOPTION \
3902         $$HAVE_DES $(SSLINC) $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3903         "LIBS= $(SSLLIB) $(K5LIB) -lz -lssl -ltermlib -lsocket -lnsl -lm \
3904         -lresolv -lcrypto \
3905         $$GSSAPILIB -lkrb5 -lcom_err -lk5crypto $$DES_LIB $(LIBS)"
3906
3907 #Solaris 9, 10, or 11 with gcc, 64 bit build.
3908 #Peeking inside FILE struct not allowed in 64-bit world.
3909 #DON'T USE THIS ONE ON PC ARCHITECTURE - It compiles and links but won't run.
3910 #OK: 2009/09/25 (but not tested on Solaris 11)
3911 solaris9g64 solaris10g64 solaris11g64:
3912         @echo 'Making C-Kermit $(CKVER) for Solaris 9++ with gcc 64-bit'
3913         @case `uname -r` in \
3914           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3915           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3916           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3917           *) SOLARISVERSION="-DSOLARIS" ;; \
3918         esac ; \
3919         $(MAKE) "MAKE=$(MAKE)" CC="gcc -m64" CC2="gcc -m64" xermit \
3920         KTARGET=$${KTARGET:-$(@)} \
3921         "CFLAGS = -g -O -Usun -funsigned-char \
3922         -DSVR4 $$SOLARISVERSION -DNOARROWKEYS \
3923         -DSTERMIOX -DSELECT -DFNFLOAT -DUSE_STRERROR -DCK_PAM -DCK_SHADOW \
3924         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3925         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3926         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3927         "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3928
3929 #Solaris 9, 10, or 11 with SunPro CC
3930 #Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3931 #This target is chained to by the secure targets below.
3932 #OK C-Kermit 9.0
3933 solaris9 solaris10 solaris11:
3934         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with Sun CC'
3935         @case `uname -r` in \
3936           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3937           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3938           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3939           *) SOLARISVERSION="-DSOLARIS" ;; \
3940         esac ; \
3941         $(MAKE) "MAKE=$(MAKE)" xermit KTARGET=$${KTARGET:-$(@)} \
3942         "CFLAGS = -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3943         -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW \
3944         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3945         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
3946         -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3947         -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3948         "LIBS= $(LIBS) -ltermlib -lsocket -lnsl -lm -lresolv -lpam"
3949
3950 # Solaris 9, 10, or 11 with OpenSSL built with Sun CC.
3951 # Here's an example of how to invoke this target in case your OpenSSL
3952 # headers and libraries are not in /usr/local:
3953 #
3954 # make solaris9+openssl "SSLINC=" "SSLLIB=" \
3955 #  "KFLAGS= -I/opt/openssl-0.9.8k/include -L/opt/openssl-0.9.8k/lib"
3956 #
3957 # Don't use 'make -e' because that inhibits passing of KFLAGS to
3958 # the base (solaris9) target.
3959 #
3960 #OK C-Kermit 9.0
3961 solaris9+ssl solaris10+ssl solaris11+ssl \
3962 solaris9+openssl solaris10+openssl solaris11+openssl:
3963         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: cc'
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)" solaris9 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 OpenSSL, built with gcc.
3984 # Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.  This target nicely
3985 # chains to the solaris{9,10,11}g target but for some reason it doesn't work if
3986 # you add the -DFORWARD_X option, thus the solaris9g+openssl+forward_x target.
3987 #
3988 #OK: 2011/06/14
3989 solaris9g+ssl solaris10g+ssl solaris11g+ssl \
3990 solaris9g+openssl solaris10g+openssl solaris11g+openssl:
3991         @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: gcc'
3992         @case `openssl version` in \
3993           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3994           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3995           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3996           *) OPENSSLOPTION="" ;; \
3997         esac ; \
3998         HAVE_DES=''; \
3999         DES_LIB=''; \
4000         if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
4001               DES_LIB='-ldes425'; \
4002               HAVE_DES='-DCK_DES -DLIBDES'; \
4003               echo "HAVE DES"; \
4004            else echo "NO DES"; \
4005         fi; \
4006         $(MAKE) "MAKE=$(MAKE)" solaris9g KTARGET=$${KTARGET:-$(@)} \
4007         "KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
4008         -DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
4009         "LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto  $(LIBS)"
4010
4011 # Solaris 9 or later with gcc + OpenSSL + Shadow (32-bit).
4012 # Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.
4013 # Includes long file support - not sure if this was available before Solaris 9.
4014 # Detects Solaris version automatically.
4015 #
4016 solaris9g+openssl+forward_x:
4017         @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with OpenSSL...'
4018         @case `openssl version` in \
4019           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
4020           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
4021           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
4022           *) OPENSSLOPTION="" ;; \
4023         esac ; case `uname -r` in \
4024           5.9) SOLARISVERSION="-DSOLARIS9" ;; \
4025           5.10) SOLARISVERSION="-DSOLARIS10" ;; \
4026           5.11) SOLARISVERSION="-DSOLARIS11" ;; \
4027           *) SOLARISVERSION="-DSOLARIS" ;; \
4028         esac ; \
4029         $(MAKE) xermit  KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
4030         "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION \
4031         -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
4032         -DPUSH_LDTERM -DPUSH_TTCOMPAT \
4033         -DSTERMIOX -DSELECT -DFNFLOAT -DBIGBUFOK -D_FILE_OFFSET_BITS=64 \
4034         -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DLIBDES \
4035         -DFORWARD_X $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
4036         "LIBS= $(SSLLIB) -lpam -ldes425 -lz -ltermlib \
4037         -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz $(LIBS)"
4038
4039 # These two should be folded in with the ones just above.
4040
4041 #Solaris 9 with gcc 3.1 + OpenSSL (32-bit)
4042 solaris9g+openssl+zlib+pam+shadow:
4043         $(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4044         KTARGET=$${KTARGET:-$(@)} \
4045         "KFLAGS=-DSOLARIS9 -DUSE_STRERROR $(KFLAGS)"
4046
4047 #Solaris 10 with gcc 3.1 + OpenSSL (32-bit)
4048 solaris10g+openssl+zlib+pam+shadow:
4049         $(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4050         KTARGET=$${KTARGET:-$(@)} \
4051         "KFLAGS=-DSOLARIS10 -DUSE_STRERROR $(KFLAGS)"
4052
4053 #The following (old, old) sunosxxx entries are for debugging and testing only.
4054
4055 sunos41x:
4056         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4057         "CFLAGS= -O -DSUNOS41 -DDIRENT -DNOTLOG -DNOMSEND \
4058         -DNOUUCP -DNOSIGWINCH -DNOREDIRECT -DNOPUSH -DNOCCTRAP \
4059         -DNOICP -DNOLOCAL $(KFLAGS)"
4060
4061 #SunOS 4.1.x, debugging with Pure Software, Inc., Purify 2 (commercial runtime
4062 #error-detection software for catching wild array references, etc).
4063 #Before running the resulting wermit, you'll also need to define and export
4064 #the following environment variables (as in this example):
4065 #PURIFYHOME=/usr/local/purify ; export PURIFYHOME
4066 #PURIFYCACHEDIR=/tmp ; export PURIFYCACHEDIR
4067 sunos41cp:
4068         @echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD / Curses / Purify...
4069         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4070         "CC2= purify -cache_dir=/usr/tmp cc" \
4071         "CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4072         -DSAVEDUID -DCK_CURSES $(KFLAGS)" \
4073         "LIBS= -lcurses -ltermcap"
4074
4075 #SunOS 4.1 with malloc debugger
4076 sunos41md:
4077         @echo Making C-Kermit $(CKVER) for SunOS 4.1 malloc debug...
4078         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
4079         "CFLAGS= -O -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4080         -DSAVEDUID $(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG"
4081
4082 sunos41gmd:
4083         @echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
4084         $(MAKE) mermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4085         "CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4086         -DNDGPWNAM -DSAVEDUID -DCK_CURSES -DRLOGCODE \
4087         $(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
4088         "LIBS= -lcurses -ltermcap"
4089
4090 #SunOS version 4.1, gcc, profiling with gprof, no debugging.
4091 #To get profile, "make sunos41p" (on Sun), then "./wermit".  After running
4092 #wermit, "gprof ./wermit | lpr" (or whatever) to get execution profile.
4093 sunos41p:
4094         @echo Making C-Kermit $(CKVER) for SunOS 4.x with profiling...
4095         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4096         "CFLAGS= -DSUNOS41 -DNODEBUG -DSAVEDUID -DDIRENT -DTCPSOCKET \
4097         -DNDGPWNAM $(KFLAGS) -pg" "LNKFLAGS = -pg"
4098
4099 #SunOS version 4.1 or later, BSD environment, minimum features.
4100 sunos41min:
4101         @echo Minimum interactive
4102         $(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
4103         "KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNORETRY \
4104         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS \
4105         -DNOSHOW -DNOSETKEY -DNOUUCP -DNORECALL -DNOREDIRECT \
4106         -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ \
4107         -DNONET -DCK_SMALL -DNOCKSPEED -DNOCKTIMERS -DNOLOGIN \
4108         -DNOCKXYZ -DNOKERBEROS -DNOMKDIR -DNOPATTERNS -DNOPERMS -DNOPIPESEND \
4109         -DNORECURSIVE -DNORENAME -DNORESEND -DNOSETKEY \
4110         -DNOTRIGGER -DNOTUNING $(KFLAGS)" "LNKFLAGS = -s"
4111
4112 #SunOS version 4.1, BSD environment, min size, command-line only...
4113 sunos41m:
4114         @echo Minimum size
4115         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4116         "KFLAGS=-DNOICP $(KFLAGS)"
4117
4118 #SunOS version 4.1, BSD environment, min size, cmd-line only, remote only...
4119 #
4120 sunos41mr:
4121         @echo Minimum size
4122         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4123         "KFLAGS=-DNOICP -DNOLOCAL $(KFLAGS)"
4124
4125 #SunOS version 4.1, BSD environment, min size, interactive...
4126 sunos41mi:
4127         @echo Minimum size
4128         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4129         "KFLAGS=-DNOCMDL $(KFLAGS)"
4130
4131 #SunOS version 4.1, BSD environment, min size, interactive, remote only...
4132 sunos41mir:
4133         @echo Minimum size
4134         $(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4135         "KFLAGS=-DNOCMDL -DNOLOCAL $(KFLAGS)"
4136
4137 #SunOS 4.1, System V R3 environment (-i option omitted).
4138 sunos41s5:
4139         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4140         @echo For testing purposes only - NOT for production use.
4141         @echo For a useable version, make sunos41 instead.
4142         $(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4143         KTARGET=$${KTARGET:-$(@)} \
4144         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN -DCK_POLL $(KFLAGS) -O"
4145
4146 #As above, but with curses support
4147 sunos41s5c:
4148         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4149         @echo Curses included.
4150         @echo For testing purposes only - NOT for production use.
4151         @echo For a useable version, make sunos41 instead.
4152         $(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4153         KTARGET=$${KTARGET:-$(@)} \
4154         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN \
4155         -DCK_POLL -DCK_CURSES -DCK_NEWTERM $(KFLAGS) -O" "LIBS= -lcurses"
4156
4157 #As above, but with curses support AND net support
4158 sunos41s5tcpc:
4159         @echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4160         @echo TCP/IP and curses included.  No debug log.
4161         @echo For testing purposes only - NOT for production use.
4162         @echo For a useable version, make sunos41 instead.
4163         $(MAKE) xermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4164         KTARGET=$${KTARGET:-$(@)} \
4165         "CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DCK_POLL \
4166         -DNODEBUG -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET $(KFLAGS) -O" \
4167         "LIBS= -lcurses -lresolv"
4168
4169 # (End of SunOS test entries...)
4170
4171 #Apollo with Domain SR10.0 or later, BSD environment
4172 #Reportedly, it might also help to add '-A,systype=bsd4.3' to CFLAGS.
4173 #Reportedly, there is also a problem with getc & putc macros that can
4174 #be handled by using '#ifdef apollo' somewhere to redefine them???
4175 #On the other hand, other reports indicate that it works fine as-is.
4176 #NOTE: This entry was previously like this:
4177 #       $(MAKE) wermit "CFLAGS= -DNOFILEH -DBSD4 $(KFLAGS) -Uaegis \
4178 #       -DTCPSOCKET -U__STDC__"
4179 #Reports (Dec 91) indicate SR10 has an ANSI-compliant C compiler,
4180 #in addition to an older one that claimed to be ANSI-compliant but wasn't.
4181 #The following make entry (plus checks that are made in ckcdeb.h) detect
4182 #which compiler is used and define the CK_ANSIC or NOANSI flags accordingly.
4183 sr10-bsd:
4184         @echo Making C-Kermit $(CKVER) for Apollo SR10.0 / BSD ...
4185         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4186         "CFLAGS= -O -DAPOLLOSR10 -DBSD43 -DTCPSOCKET -DCK_CURSES -DNOLEARN \
4187         -Uaegis $(KFLAGS)" "LIBS= -lcurses -ltermcap"
4188
4189 #Apollo with Domain SR10.0 or later, System V R3 environment.
4190 #Don't use the optimizer (-O), it causes problems at runtime.
4191 sr10-s5r3:
4192         @echo Making C-Kermit $(CKVER) for Apollo SR10.0 / Sys V R3 ...
4193         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4194         "CFLAGS= -DNOFILEH -DSVR3 -DAPOLLOSR10 -DNOLEARN $(KFLAGS) \
4195         -Uaegis -U__STDC__"
4196
4197 #Apollo Domain/IX (untested, try this if sr10-bsd doesn't work)
4198 # -DTCPSOCKET can probably be added here.
4199 apollobsd:
4200         @echo Making C-Kermit $(CKVER) for Apollo Domain/IX...
4201         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4202         "CC= /bin/cc " "CC2= /bin/cc " \
4203         "CFLAGS= -DNOFILEH -DBSD4 -DAPOLLOBSD -DNOLEARN $(KFLAGS) -Uaegis"
4204
4205 #Version 7 Unix (see comments near top of makefile)
4206 v7:
4207         @echo Making C-Kermit $(CKVER) for UNIX Version 7.
4208         @echo Read the makefile if you have trouble with this...
4209         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4210         "CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
4211         -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
4212         -DNPTYPE=$(NPTYPE) $(DIRECT) -DO_RDWR=2 -DO_NDELAY=0 -DO_SCCS_ID \
4213         -DNOLEARN $(KFLAGS)"
4214
4215 #AT&T UNIX System V R3, signal() is void rather than int.
4216 #Uses dirent.h and Honey DanBer UUCP.
4217 #Add the -i link option if necessary.
4218 #If you get errors like "ws_row undefined" in ckutio.c, add -DNONAWS.
4219 sys5r3:
4220         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4221         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4222         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4223         "LNKFLAGS="
4224
4225 #As above, plus curses.
4226 sys5r3c:
4227         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3 + curses...'
4228         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4229         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES -DNONAWS -DNOLEARN \
4230         $(KFLAGS) -O" "LNKFLAGS=" "LIBS = -ltermlib"
4231
4232 #System V R3.2 for PCs built on Interactive UNIX SV/386 R4.x
4233 #but with all calls to dup2() disabled because generic SVR3 does not have dup2.
4234 # (The -linet library might not need to be in this one.)
4235 sys5r32is:
4236         @echo 'Making C-Kermit $(CKVER) for System V/386 R32
4237         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
4238         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
4239         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES -DNONAWS \
4240         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD -DNOFDZERO -DNOREDIRECT \
4241         -DNOZEXEC -DNOLEARN $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
4242
4243 #System V R3.2 for PCs built on Interactive UNIX SV/386 R4.x
4244 #but with all calls to dup2() disabled because generic SVR3 does not have dup2.
4245 #With TCP/IP added.
4246 sys5r32isnet:
4247         @echo 'Making C-Kermit $(CKVER) for System V/386 R32 + TCP/IP
4248         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
4249         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
4250         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES -DNONAWS \
4251         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD -DNOFDZERO -DNOREDIRECT \
4252         -DNOLEARN -DNOZEXEC -DTCPSOCKET $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
4253
4254 iclsys5r3:
4255         make sys5r3 KTARGET=$${KTARGET:-$(@)} KFLAGS=-DICLSVR3
4256
4257 #AT&T UNIX System V R3.  As above, but no ANSI prototyping.
4258 sys5r3na:
4259         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4260         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4261         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOANSI -DNOLEARN $(KFLAGS) -O" \
4262         "LNKFLAGS="
4263
4264 #AT&T UNIX System V R3, for 3B computers with Wollongong TCP/IP.
4265 sys5r3net3b:
4266         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX SVR3/3B/Wollongong...'
4267         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4268         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DWOLLONGONG -DNOLEARN $(KFLAGS) \
4269         -O" "LIBS= -lnet -lnsl_s" "LNKFLAGS ="
4270
4271 #AT&T UNIX System V R3, signal() is void rather than int.
4272 #Uses dirent.h and Honey DanBer uucp, has <termiox.h>.
4273 #Has <termiox.h> for RTS/CTS flow control.
4274 sys5r3tx:
4275         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4276         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4277         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN \
4278         $(KFLAGS) -i -O" "LNKFLAGS ="
4279
4280 #AT&T UNIX System V R3, signal() is void rather than int.
4281 #Uses dirent.h and Honey DanBer uucp, has <termiox.h>.
4282 #Has <sys/termiox.h> for RTS/CTS flow control.
4283 sys5r3sx:
4284         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4285         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4286         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4287         $(KFLAGS) -i -O" "LNKFLAGS ="
4288
4289 #AT&T UNIX System V R4.
4290 #Has <termiox.h>.
4291 sys5r4:
4292         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4293         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4294         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN $(KFLAGS)" \
4295         "LNKFLAGS = -s"
4296
4297 #AT&T UNIX System V R4 with Wollongong TCP/IP.
4298 #Has <termiox.h>.
4299 sys5r4net:
4300         @echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4301         @echo ' If sockets-library routines are missing at link time, then'
4302         @echo ' try the sys5r4net2 entry.'
4303         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4304         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4305         -DTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4306
4307 #As above, but needs libs included.
4308 sys5r4net2:
4309         @echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4310         @echo ' (Search for WOLLONGONG...)'
4311         $(MAKE) sys5r4net KTARGET=$${KTARGET:-$(@)} "LIBS= -lsocket -lnsl"
4312
4313 #As above plus curses.
4314 sys5r4net2c:
4315         echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4316         @echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4317         @echo ' (Search for WOLLONGONG...)'
4318         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4319         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4320         -DTERMIOX -DWOLLONGONG -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4321         "LIBS= -lsocket -lnsl -lcurses"
4322
4323 #DELL UNIX System V R4.
4324 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4325 #are not misplaced in sys (rather than netinet and arpa, respectively).
4326 #Uses ANSI C constructs, advisory file locking on devices, etc.
4327 #Warning: -DSTERMIOX enables hardware flow control (RTS/CTS), but reportedly
4328 #this does not work with the normal drivers.  However, it might still work
4329 #on non-Dell systems, or even Dell systems with different drivers installed.
4330 dellsys5r4:
4331         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4332         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4333         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4334         -DTCPSOCKET -DSTERMIOX -DCK_POLL $(KFLAGS)" \
4335         "LIBS= -lsocket -lnsl" "LNKFLAGS = -s"
4336
4337 #As above, curses support added...
4338 dellsys5r4c:
4339         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4340         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4341         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4342         -DTCPSOCKET -DSTERMIOX -DCK_CURSES -DCK_POLL \
4343         $(KFLAGS)" "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4344
4345 #Minimum interactive: As above, but with every conceivable option removed.
4346 dellsys5r4mi:
4347         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4348         @echo 'Minimum-size interactive'
4349         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4350         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4351         -UTCPSOCKET -DNOCMDL -DNOSPL -DNOXMIT -DCK_POLL \
4352         -DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4353         -DNOSCRIPT -DNOCSETS -DNOSHOW -DNOSETKEY -DNOSERVER -DNOUUCP \
4354         -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ  \
4355         $(KFLAGS)" "LNKFLAGS = -s"
4356
4357 #Command-line only version.
4358 dellsys5r4m:
4359         @echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4360         @echo 'Command-line only'
4361         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4362         "CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4363         -UTCPSOCKET -DNOICP -DNOFRILLS -DNODIAL -DNODEBUG -DNOTLOG -DNOCSETS \
4364         -DNOSETKEY -DNOESCSEQ -DNOJC -DNOFDZERO -DCK_POLL \
4365         $(KFLAGS)" "LNKFLAGS = -s"
4366
4367 #AT&T UNIX System V R4.
4368 #Has <sys/termiox.h>.
4369 sys5r4sx:
4370         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4371         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4372         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4373         $(KFLAGS)" "LNKFLAGS = -s" "LIBS=$(LIBS)"
4374
4375 #AT&T UNIX System V R4.
4376 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4377 #are not misplaced in sys (rather than netinet and arpa, respectively).
4378 #Uses ANSI C constructs, <sys/termiox.h>, etc etc.
4379 sys5r4sxtcp:
4380         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4381         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4382         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4383         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4384         "LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4385
4386 #AT&T UNIX System V R4.
4387 #As above + curses.
4388 sys5r4sxtcpc:
4389         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4390         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4391         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4392         -DSTERMIOX  -DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4393         "LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)" "LNKFLAGS = -s"
4394
4395 #AT&T UNIX System V R4.  CONSENSYS SVR4.2-1.
4396 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4397 #are not misplaced in sys (rather than netinet and arpa, respectively).
4398 #Uses ANSI C constructs, <sys/termiox.h>, etc.
4399 # Fullscreen -DCK_CURSES added (with curses & termcap libs)
4400 # Submission by Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu
4401 sys5r4sxtcpf:
4402         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4403         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4404         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4405         -DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
4406         "LIBS= -lsocket -lnsl -L/usr/ccs/lib -lcurses -ltermcap" \
4407         "LIBS=$(LIBS)" "LNKFLAGS = -s"
4408
4409 #Smallest possible version for System V R4
4410 s5r4m:
4411         @echo Minimum size
4412         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4413         "KFLAGS=$(KFLAGS) -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4414         -DNOSCRIPT -DNOCSETS -DNOICP -DNOMSEND -UTCPSOCKET" "LNKFLAGS = -s"
4415
4416 #Smallest possible interactive version of above
4417 s5r4mi:
4418         @echo Minimum interactive
4419         $(MAKE) "MAKE=$(MAKE)" sys5r4sx \
4420         "KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNOSHOW \
4421         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOSETKEY \
4422         -UTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
4423
4424 #AT&T UNIX System V R4, has <sys/termiox.h>
4425 #ANSI C function prototyping disabled.
4426 sys5r4sxna:
4427         @echo No ANSI C prototyping...
4428         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4429         "KFLAGS=$(KFLAGS) -DNOANSI"
4430
4431 #Stratus FTX.
4432 ftx:
4433         @echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4434         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4435         "CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DSTERMIOX \
4436         -DNOGETUSERSHELL -DNOLEARN +DA1.1 $(KFLAGS)" \
4437         "LNKFLAGS = -s" "LIBS=$(LIBS)"
4438
4439 #Stratus FTX + TCP/IP.
4440 ftxtcp:
4441         @echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4442         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4443         "CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4444         -DSTERMIOX -DTCPSOCKET -DNO_DNS_SRV +DA1.1 $(KFLAGS)" \
4445         "LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4446
4447 #NCR MP-RAS 2.03 or 3.02
4448 mpras:
4449         @echo 'Making C-Kermit $(CKVER) for NCR MP-RAS...'
4450         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4451         "CFLAGS = -O -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX \
4452         -DNOGETUSERSHELL -DUSE_FILE__CNT -DNOLEARN -DNO_DNS_SRV $(KFLAGS)" \
4453         "LNKFLAGS = -s" "LIBS=$(LIBS)"
4454
4455 #NCR MP-RAS 2.03 or 3.02 with TCP/IP and curses
4456 mprastcpc:
4457         @echo 'Making C-Kermit $(CKVER) for NCR MP-RAS + TCP/IP + curses...'
4458         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CFLAGS=-DTCPSOCKET \
4459         -DCK_CURSES -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4460         -DNOGETUSERSHELL -DNO_DNS_SRV DUSE_FILE__CNT -O $(KFLAGS)" \
4461         "LNKFLAGS = -s" "LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)"
4462
4463 #SINIX-L V5.41 - includes curses, tcp/ip - Use this one for i386.
4464 #This version of SINIX doesn't like fdopen() or popen().
4465 sinix541:
4466         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX V5.41/i386'
4467         $(MAKE) ckcpro.$(EXT) "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP \
4468         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV \
4469         -DSNI541 -DNOGETUSERSHELL -DNONETCMD -DNOPOPEN -kansi -W0 $(KFLAGS)"
4470         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4471         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DNOPOPEN \
4472         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4473         -DSNI541 -DNOGETUSERSHELL -DNONETCMD -kansi -W0 -O $(KFLAGS)" \
4474         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4475
4476 sinix541i:
4477         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sinix541
4478
4479 #SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for MIPS.
4480 # As of C-Kermit 7.1, optimization removed -- takes (literally) forever.
4481 sinix542:
4482         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4483         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4484         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4485         -DSNI542 -DNOGETUSERSHELL -kansi -W0 $(KFLAGS)" \
4486         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4487
4488 #SINIX V5.42 gcc - includes curses, tcp/ip, everything.
4489 #This one was used to build the Pyramid-architecture RM600 version
4490 #on SINIX-P 5.42 A10 with gcc but should work for SINIX 5.42 on any other
4491 #architecture with gcc.
4492 sinix542g:
4493         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4494         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4495         -DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4496         -DSNI542 -DNOGETUSERSHELL $(KFLAGS)" \
4497         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4498         "LNKFLAGS = -s"
4499
4500 #SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for Intel.
4501 # (Note: SNI discontinued Intel support after 5.42.)
4502 sinix542i:
4503         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX-Z V5.42...'
4504         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4505         "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DFNFLOAT -DSTERMIOX \
4506         -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV -kansi \
4507         -DSNI542 $(KFLAGS)" \
4508         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4509         "LNKFLAGS = -s"
4510
4511 #Siemens Nixdorf Reliant UNIX V5.43 - includes curses, tcp/ip, everything:
4512 # . gettimeofday() suddenly has only one arg instead of two (GTODONEARG).
4513 # . The syntax of the Olimit specifier changed.
4514 # . The name was changed from SINIX to Reliant UNIX in version 5.43C.
4515 sni543:
4516         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.43'
4517         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4518         "CFLAGS = -DSINIX -DSNI543 -DSVR4 -DDIRENT -DHDBUUCP \
4519         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4520         -DNO_DNS_SRV -kansi -W0 -O -F Olimit,3100 $(KFLAGS)" \
4521         "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4522
4523 #Siemens Nixdorf Reliant UNIX V5.44 - Like 5.43 but with different banner.
4524 sni544:
4525         @echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.44'
4526         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4527         "CFLAGS = -DSINIX -DSNI544 -DSVR4 -DDIRENT -DHDBUUCP \
4528         -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4529         -DNO_DNS_SRV -kansi -W0 -O -K Olimit,3100 $(KFLAGS)" \
4530         "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4531
4532 #Commodore Amiga with AT&T UNIX System V R4 and TCP/IP support.
4533 #Has <sys/termiox.h>.
4534 svr4amiganet:
4535         @echo 'Making C-Kermit $(CKVER) for Amiga SVR4 + TCP/IP...'
4536         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4537         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX \
4538         -DTCPSOCKET -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4539         "LIBS = -lsocket -lnsl -ltermlib"
4540
4541 #SCO (Novell (Univel)) UnixWare 1.x or 2.0, no TCP/IP.
4542 #This assumes the Novell SDK 1.0, which has <sys/termiox.h>.
4543 #UnixWare users with the "Prime Time Freeware" CD-ROM SDK will probably have
4544 #to use the sys5r4 entry (no termiox.h file, so no hardware flow control).
4545 #Change -DSELECT to -DCK_POLL if -DSELECT causes problems.
4546 # NOTE: Unixware 1.x builds have not been tried in C-Kermit 7.0.
4547 unixware:
4548         $(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4549         "KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4550         -DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt"
4551
4552 #UnixWare 1.x or 2.0 with TCP/IP and curses.
4553 #fork()-based CONNECT - no high serial speeds.
4554 unixwarenetc:
4555         $(MAKE) "MAKE=$(MAKE)" sys5r4sxtcpc KTARGET=$${KTARGET:-$(@)} \
4556         "KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4557         -DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt -lresolv"
4558
4559 uw10:
4560         $(MAKE) unixwarenetc KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4561
4562 #This is for Unixware 2.0.x only - use unixware21 for UW 2.1.x.
4563 #Has special library search and enables special kludge around library
4564 #foulup regarding vfork() (which Kermit doesn't use).  Forces POSIX-style
4565 #hangup.
4566 unixware20:
4567         @echo 'Making C-Kermit $(CKVER) for UnixWare 2.0.x...'
4568         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4569         "CFLAGS = -O -DOLD_UNIXWARE -DUNIXWARE2 -DSELECT -DSVR4 -DDIRENT \
4570         -DHDBUUCP -DBIGBUFOK -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES \
4571         -DTCPSOCKET -DUW200 -DFNFLOAT -DCK_NEWTERM -DNOSYSLOG $(KFLAGS)" \
4572         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lgen -lm -lresolv" \
4573         "LNKFLAGS = -s"
4574
4575 uw20:
4576         $(MAKE) unixware20 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4577
4578 #Adds big buffers ("large memory model") - otherwise the same as UnixWare 1.x.
4579 unixware21:
4580         @echo 'Making C-Kermit $(CKVER) for UnixWare 2.1.x...'
4581         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4582         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4583         -DNOSYSLOG -DSTERMIOX  -DCK_CURSES -DTCPSOCKET \
4584         -DCK_NEWTERM -DFNFLOAT -DUNIXWARE2 $(KFLAGS)" \
4585         "LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4586         $(LIBS)" "LNKFLAGS = -s"
4587
4588 #Unixware 2.1.0
4589 uw21:
4590         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4591
4592 #Unixware 2.1.3
4593 uw213:
4594         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4595         "KFLAGS=-DUSE_FILE__CNT $(KFLAGS)"
4596
4597 #Unixware 2.1 with IKSD support
4598 uw21iksd:
4599         $(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4600         "KFLAGS=-DCK_SHADOW $(KFLAGS)" "LIBS= -lgen"
4601
4602 #UnixWare 7 with tc[gs]etspeed() high serial speeds & select()-based CONNECT
4603 #and as of C-Kermit 8.0.212, large file support (LFS).
4604 #NOTE: This is the one we use.
4605 unixware7t:
4606         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4607         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4608         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4609         -DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4610         -DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4611         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNEEDMDMDEFS $(KFLAGS)" \
4612         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4613         "LNKFLAGS = -s"
4614
4615 #UnixWare 7 - select()-based CONNECT - no POSIX i/o - no high serial speeds.
4616 #In other words, just like the UnixWare 1 and 2 builds.
4617 unixware7x:
4618         @echo 'Making C-Kermit $(CKVER) for UnixWare 7...'
4619         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4620         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4621         -DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4622         -DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4623         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4624         "LNKFLAGS = -s"
4625
4626 #UnixWare 7 with POSIX cfset[oi]speed() to allow high serial speeds.
4627 #(but the high speeds don't work)
4628 unixware7p:
4629         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4630         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4631         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4632         -DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4633         -DFNFLOAT -DCK_NEWTERM -DNOLSTAT $(KFLAGS)" \
4634         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4635         "LNKFLAGS = -s"
4636
4637 # UnixWare 7 built with gcc - This does not work at all...
4638 # Reportedly gcc 2.8.1 is broken on Unixware 7.  Try egcs?
4639 unixware7g:
4640         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 with gcc...'
4641         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4642         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
4643         "CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4644         -DUW7 -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4645         -DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4646         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4647         "LNKFLAGS = -s"
4648
4649 unixware7:
4650         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4651         KTARGET=$${KTARGET:-$(@)}
4652
4653 uw7:
4654         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4655         KTARGET=$${KTARGET:-$(@)}
4656
4657 #SCO OpenUNIX 8.0
4658 ou8:
4659         @echo 'Making C-Kermit $(CKVER) for Open UNIX 8...'
4660         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DOU8 $(KFLAGS)" unixware7t \
4661         KTARGET=$${KTARGET:-$(@)}
4662
4663 #UnixWare 7 with OpenSSL
4664 uw7ssl uw7+ssl:
4665         @echo 'Making C-Kermit $(CKVER) for UnixWare 7 and OpenSSL...'
4666         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4667         "CFLAGS = -O -DCK_AUTHENTICATION -DCK_SSL -DCK_SHADOW \
4668         -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4669         -DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4670         -DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4671         $(SSLINC) $(KFLAGS)" \
4672         "LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4673         -lgen -lcudk70 $(SSLLIB) -lssl -lcrypto $(LIBS)" \
4674         "LNKFLAGS = -s"
4675
4676 #As above but includes Shadow password support needed for IKSD.
4677 uw7iksd:
4678         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4679         KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen" unixware7t
4680
4681 #As above but links with static API for realpath() so a binary built
4682 #with this target on UW7.1 will also work on 7.0.  Requires SCO UDK
4683 #rather than the stock compiler.
4684 uw7iksdudk:
4685         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4686         KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen -lcudk70" unixware7t
4687
4688 #ESIX SVR4.0.3 or 4.04 with TCP/IP support.
4689 #Has <sys/termiox.h>, ANSI C function prototyping disabled.
4690 #Add -m486 to CFLAGS if desired.
4691 esixr4:
4692         @echo 'Making C-Kermit $(CKVER) for ESIX SVR4 + TCP/IP...'
4693         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4694         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOANSI \
4695         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s" \
4696         "LIBS = -lsocket -lnsl"
4697
4698 #AT&T UNIX System V R4.
4699 #Has <sys/termiox.h>, Wollongong WIN/TCP TCP/IP.
4700 sys5r4sxnet:
4701         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4702         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4703         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4704         -DSTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4705
4706 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>.
4707 sys5r4nx:
4708         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4709         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4710         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS)" \
4711         "LNKFLAGS = -s"
4712
4713 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, curses, TCP/IP.
4714 sys5r4nxnetc:
4715         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4716         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4717         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4718         -DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4719         "LIBS = -lcurses -lsocket -lnsl -ltcpip" \
4720         "LNKFLAGS = -s"
4721
4722 #AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, Wollongong TCP/IP.
4723 sys5r4nxtwg:
4724         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4725         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4726         "CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DWOLLONGONG $(KFLAGS)"
4727         "LNKFLAGS = -s"
4728
4729 #ICL UNIX System V R4.(DRS N/X) version :-
4730 #UNIX System V Release 4.0 ICL DRS 6000 (SPARC)
4731 #DRS/NX 6000 SVR4 Version 5  Level 1  Increment 4
4732 #Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4733 #are not misplaced in sys (rather than netinet and arpa, respectively).
4734 #Uses ANSI C constructs, advisory file locking on devices, etc.
4735 #Remove -lnsl if it causes trouble.
4736 iclsys5r4:
4737         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 (DRS N/X)'
4738         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4739         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4740         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4741         "LIBS= -lsocket -lnsl -lresolv " "LNKFLAGS = -s"
4742
4743 #As above but for DRS/NX 4.2MP 7MPlus.
4744 iclsys5r4m+:
4745         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4746         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4747         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOIKSD \
4748         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4749         "LIBS= -lsocket -lnsl -lm -lc -g -lgen " "LNKFLAGS = -s"
4750
4751 #As above but for DRS/NX 4.2MP 7MPlus with IKSD support.
4752 iclsys5r4m+iksd:
4753         @echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4754         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4755         "CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4756         -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4757         "LIBS= -lsocket -lnsl -lm -lc -g -lgen -lresolv " "LNKFLAGS = -s"
4758
4759 iclsys5r4_486:
4760         $(MAKE) "MAKE=$(MAKE)" iclsys5r4 KTARGET=$${KTARGET:-$(@)}
4761
4762 #Data General DG/UX 4.30 (System V R3) for DG AViiON, with TCP/IP support.
4763 dgux430:
4764         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4765         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4766         "CFLAGS = -O -DDGUX430 -DSVR3 -DDIRENT -DTCPSOCKET \
4767         -DNOINADDRX -DNOGETUSERSHELL $(KFLAGS)"
4768
4769 #Data General DG/UX 4.30 for DG AViiON, with TCP/IP support with BSDisms.
4770 dgux430bsd:
4771         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4772         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4773         "CFLAGS = -O -DDGUX430 -D_BSD_SOURCE -DBSD4 \
4774         -DNOINADDRX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)"
4775
4776 #Data General DG/UX 5.4 (System V R4) for DG AViiON, with TCP/IP support.
4777 #Add -lsocket -lnsl if inet_addr comes up missing...
4778 #Hmmm - I really think CK_POLL can be removed from this one in which case
4779 #there is no difference between dgux540 and dgux540i.
4780 dgux540:
4781         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4782         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4783         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4784         -DSTERMIOX -DTCPSOCKET -DCK_POLL -DNOGETUSERSHELL $(KFLAGS)"
4785
4786 #Data General DG/UX 5.40 (System V R4) for Intel AViiON, with TCP/IP support.
4787 dgux540i:
4788         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4789         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4790         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4791         -DSTERMIOX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)" \
4792         "LIBS = -lsocket -lnsl"
4793
4794 dgux54:
4795         make dgux540 KTARGET=$${KTARGET:-$(@)}
4796
4797 #Data General DG/UX 5.4 (= System V R4) for DG AViiON, with TCP/IP support.
4798 # And curses.
4799 dgux540c:
4800         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4...'
4801         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4802         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4803         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4804         $(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4805
4806 #As above but for Intel - only difference is name library names.
4807 dgux540ic:
4808         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4809         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4810         "CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4811         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4812         $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4813
4814 dgux54c:
4815         make dgux540c KTARGET=$${KTARGET:-$(@)}
4816
4817 #DG/UX 5.4R3.10
4818 dgux54310:
4819         @echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4R3...'
4820         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4821         "CFLAGS = -DDGUX540 -DDGUX54310 -DDIRENT -DHDBUUCP -DSELECT \
4822         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4823         -DNOINADDRX $(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4824
4825 #DG/UX 5.4R4.10 - Includes everything.
4826 dgux54410:
4827         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.10...'
4828         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4829         "CFLAGS = -O -DDGUX540 -DDGUX54410 -DDIRENT -DHDBUUCP -DSELECT \
4830         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4831         -DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4832
4833 #DG/UX 5.4R4.11 - Includes everything.
4834 dgux54411:
4835         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.11...'
4836         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4837         "CFLAGS = -O -DDGUX540 -DDGUX54411 -DDIRENT -DHDBUUCP -DSELECT \
4838         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4839         -DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4840
4841 #DG/UX 5.4R4.20 - Includes everything.
4842 dgux54420:
4843         @echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.20...'
4844         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4845         "CFLAGS = -O -DDGUX540 -DDGUX54420 -DDIRENT -DHDBUUCP -DSELECT \
4846         -DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4847         -DNOINADDRX $(KFLAGS)" \
4848         "LIBS = -lsocket -lresolv -lnsl -lcurses -ltermcap"
4849
4850 #Silicon Graphics System V R3 with BSD file system (IRIS)
4851 iris:
4852         @echo Making C-Kermit $(CKVER) for Silicon Graphics IRIX pre-3.3...
4853         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4854         "CFLAGS = -O -DSVR3 -DLONGFN -DNOLEARN $(KFLAGS) -I/usr/include/bsd" \
4855         "LIBS = -lbsd"
4856
4857 #Silicon Graphics IRIS System V R3
4858 irix33:
4859         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 3.3...'
4860         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4861         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4862         "LNKFLAGS = -s"
4863
4864 #Silicon Graphics Iris Indigo with IRIX 4.0.0 or 5.0...
4865 #Strict ANSI C compilation, TCP/IP support included
4866 irix40:
4867         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4868         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4869         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4870         -DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O -Olimit 1600 -I/usr/include/bsd" \
4871         "LNKFLAGS = -s"
4872
4873 #As above, but with fullscreen display (curses) and Sun Yellow Pages support.
4874 #NOTE: IRIX versions prior to 5 run COFF binaries.
4875 irix40ypc:
4876         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0.'
4877         @echo 'Includes fullscreen file display and Sun Yellow Pages...'
4878         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4879         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES \
4880         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET $(KFLAGS) \
4881         -O -Olimit 1600 -I/usr/include/bsd" \
4882         "LIBS = -lcurses -lsun" "LNKFLAGS = -s"
4883
4884 # Silicon Graphics Iris Series 4D/*, IRIX 4.0.x, -O4 ucode optimized.
4885 # Huge temporary file space needed for ucode optimizer.  If you get an error
4886 # like "ugen: internal error writing to /tmp/ctmca08777: Error 0", define the
4887 # the TMPDIR environment variable to point to a file system that has more
4888 # space available, e.g. "setenv TMPDIR /usr/tmp".
4889 irix40u:
4890         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4891         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4892         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4893         -DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4894         "LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u"
4895
4896 # As above, with Curses Support added
4897 irix40uc:
4898         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4899         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4900         "CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4901         -DCK_ANSIC -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4902         "LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u" "LIBS= -lcurses -ltermcap"
4903
4904 #Silicon Graphics IRIX 5.x.
4905 #Yellow Pages and Curses support included.
4906 #IRIX version 5.x can run COFF or ELF binaries.
4907 irix51:
4908         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 5.x'
4909         @echo 'Includes fullscreen file display and Yellow Pages...'
4910         @echo 'Add -mips<n> to CFLAGS specify a particular hardware target.'
4911         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4912         "CFLAGS = -DIRIX51 -DSVR4 -DDIRENT -DHDBUUCP -DCK_CURSES -DCK_NEWTERM \
4913         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET -DSELECT -DNOGETUSERSHELL \
4914         -DSYSTIMEH -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) -ansi -O -Olimit 3000" \
4915         "LIBS = -lcurses" "LNKFLAGS = -s"
4916
4917 #Use this one if irix51 blows up due to lack of swap space or whatever.
4918 irix51x:
4919         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 5.x'
4920         @echo 'Includes fullscreen file display and Yellow Pages...'
4921         @echo 'Add -mips<n> to CFLAGS specify a particular hardware target.'
4922         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4923         "CFLAGS = -DIRIX51 -DSVR4 -DDIRENT -DHDBUUCP -DCK_CURSES -DCK_NEWTERM \
4924         -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET -DSELECT -DNOGETUSERSHELL \
4925         -DSYSTIMEH -DDCLPOPEN -DDCLFDOPEN $(KFLAGS)" \
4926         "LIBS = -lcurses" "LNKFLAGS = -s"
4927
4928 irix51ypc:
4929         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4930         "KFLAGS= $(KFLAGS)"
4931
4932 #IRIX 5.2 adds RTS/CTS
4933 irix52:
4934         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4935         "KFLAGS=-DIRIX52 -DCK_RTSCTS $(KFLAGS)"
4936
4937 irix53:
4938         $(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4939         "KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4940
4941 irix53x:
4942         $(MAKE) "MAKE=$(MAKE)" irix51x KTARGET=$${KTARGET:-$(@)} \
4943         "KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4944
4945 #Silicon Graphics IRIX 6.[024] common stuff.
4946 #Yellow Pages and Curses support included.
4947 #IRIX version 6.0 and later runs only ELF binaries.
4948 #Depends on code changes in ckcdeb.h that make -DIRIX6x define all
4949 #lower IRIX6x values and IRIX51.
4950 irix6x:
4951         @echo 'Includes fullscreen file display and Yellow Pages...'
4952         @echo 'Add -mips<n> to specify a particular hardware target.'
4953         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4954         "CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4955         -DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET \
4956         -DSELECT -DCK_RTSCTS -O $(KFLAGS)" \
4957         "LIBS = -lcurses" "LNKFLAGS = -s $(LNKFLAGS)"
4958
4959 #Silicon Graphics IRIX 6.0.
4960 irix60:
4961         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.0'
4962         @$(MAKE) "MAKE=$(MAKE)" \
4963         "KFLAGS=-DIRIX60 -Olimit 2138 $(KFLAGS)" \
4964         irix6x KTARGET=$${KTARGET:-$(@)}
4965
4966 #Silicon Graphics IRIX 6.2.
4967 #Serial speeds > 38400 are available in IRIX 6.2 on O-class machines only.
4968 #Note: Olimit must be a number > 0.
4969 irix62:
4970         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.2'
4971         @$(MAKE) "MAKE=$(MAKE)" \
4972         LNKFLAGS="-Wl,-woff,84" \
4973         "KFLAGS=-DIRIX62 -Olimit 4700 $(KFLAGS)" \
4974         irix6x KTARGET=$${KTARGET:-$(@)}
4975
4976 #Silicon Graphics IRIX 6.3.
4977 irix63:
4978         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.3'
4979         @$(MAKE) "MAKE=$(MAKE)" irix62 KTARGET=$${KTARGET:-$(@)} \
4980         "KFLAGS=-DIRIX63"
4981
4982 #Silicon Graphics IRIX 6.4.
4983 # -woff,84 to linker stops complaints about no symbols loaded from
4984 # curses, and -woff 1110 stops complaints about unreachable "break;"
4985 # statements in ckcpro.c among others.
4986 # tested on SGI Octane, running IRIX 6.4 up to 115200 bps.
4987 # -Olimit 0 means infinite.
4988 irix64:
4989         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4'
4990         @$(MAKE) "MAKE=$(MAKE)" \
4991         LNKFLAGS="-Wl,-woff,84" \
4992         "KFLAGS=-DIRIX64 -DCK_RTSCTS -Olimit 3000 -woff 1110 $(KFLAGS)" \
4993         irix6x KTARGET=$${KTARGET:-$(@)}
4994
4995 irix64gcc:
4996         @echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4 gcc'
4997         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
4998         "CFLAGS= -DSVR4 -DIRIX64 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4999         -DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
5000         -DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
5001         $(KFLAGS) -O" "LIBS= -lcurses -ltermcap -lcrypt"
5002
5003 #Note the new Optimization option syntax for MIPSpro CC 7.2.1.2m.
5004 #See note on irix65gcc target about Large File Support (LFS).
5005 irix65:
5006         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
5007         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
5008         "KFLAGS=-DIRIX65 -D_LARGEFILE_SOURCE -DCK_RTSCTS -OPT:Olimit=0 \
5009         -woff 1110,1552,1174 $(KFLAGS)" \
5010         irix6x KTARGET=$${KTARGET:-$(@)}
5011
5012 #Build for those that have GCC instead of MIPSpro.
5013 #
5014 # Large File Support note: use the define _LARGEFILE_SOURCE to enable support
5015 # for files larger than 2GB.  This may work on releases of Irix prior to
5016 # 6.5.xx.  To verify, check the man page for fstat and verify that off_t is a
5017 # 64 bit value for an -n32 build.  Also check the manpage for fseek and ftell
5018 # to verify that the fseek64 and ftell64 functions are provided.  If so, then
5019 # LFS support should work and you can try adding -D_LARGEFILE_SOURCE to CFLAGS
5020 # for your selected Irix target.
5021 #
5022 irix65gcc:
5023         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 with gcc'
5024         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5025         "CC = gcc" "CC2 = gcc" \
5026         "CFLAGS= -DSVR4 -DIRIX65 -D_LARGEFILE_SOURCE -DDIRENT -DHDBUUCP \
5027         -DNOGETUSERSHELL -DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
5028         -DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
5029         $(KFLAGS) -O" "LIBS= -lcurses"
5030
5031 # The 64-bit IRIX target works but presumably is no longer needed given the
5032 # large file support in the more portable and compact 32-bit version.
5033 irix65_64:
5034         @echo 'Making C-Kermit $(CKVER) 64-bit for SGI IRIX 6.5'
5035         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
5036         "KFLAGS=-DIRIX65 -64 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5037         -DCK_64BIT $(KFLAGS)" \
5038         irix6x KTARGET=$${KTARGET:-$(@)}
5039
5040 #Dumb down to MIPS-2 if building on R5000 or higher...
5041 irix65mips2:
5042         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 MIPS-2'
5043         @$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-o32 -mips2 -Wl,-woff,84" \
5044         "KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -o32 -mips2 \
5045         -woff 1110,1552,1174 $(KFLAGS)" \
5046         irix6x KTARGET=$${KTARGET:-$(@)}
5047
5048 #Special target that adds srp, ssl, and zlib support.  This requires
5049 #that you have pkgsrc installed instead of Irix Freeware.  See
5050 #NetBSD.org for pkgsrc for Irix.  You will need to BUILD the srp_client
5051 #package yourself.  Install it manually using the directions found
5052 #in the netbsds+ssl+srp+zlib target comments.
5053 irix65+ssl+srp+zlib:
5054         @echo 'Making C-Kermit $(CKVER) for IRIX 6.5 with gcc and SSL SRP ZLIB'
5055         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5056         "CC = gcc" "CC2 = gcc" \
5057         "CFLAGS= -DIRIX65 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL -DSELECT \
5058         -DTCPSOCKET -DNOCOTFMC -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC \
5059         -I/usr/pkg/include -DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 \
5060         -DCK_RTSCTS -DCK_NCURSES -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DCK_SSL \
5061         -DLIBDES -DZLIB -DFNFLOAT -I/usr/pkg/include/openssl $(KFLAGS) -O" \
5062         "LIBS= -L/usr/pkg/lib -rpath /usr/pkg/lib -lncurses -lsrp -lgmp -ldes \
5063         -lssl -lkrypto -lcrypto -lcrypt -lz -lm"
5064
5065 irix6x+krb5:
5066         @echo 'Includes fullscreen file display and Yellow Pages...'
5067         @echo 'Add -mips<n> to specify a particular hardware target.'
5068         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5069         "CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
5070         -DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET\
5071         -DSELECT -DCK_RTSCTS -O \
5072         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DCK_ENCRYPTION -DCK_DES \
5073         $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
5074         "LIBS = -lcurses $(K5LIB) -ldes425 -lkrb5 \
5075         -lcom_err -lcrypto -lcrypt -lgssapi_krb5" \
5076         "LNKFLAGS = -s $(LNKFLAGS)"
5077
5078 irix65+krb5:
5079         @echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
5080         @$(MAKE) "MAKE=$(MAKE)" \
5081         LNKFLAGS="-Wl,-woff,84" \
5082         "KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5083         $(KFLAGS)" \
5084         irix6x+krb5 KTARGET=$${KTARGET:-$(@)}
5085
5086 #In case they type "make sys5"...
5087 sys5:
5088         $(MAKE) "MAKE=$(MAKE)" sys3 KTARGET=$${KTARGET:-$(@)}
5089
5090 #Generic ATT System III or System V (with I&D space)
5091 sys3:
5092         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5093         @echo 'or System V R2 or earlier...'
5094         @echo 'add -DNOMKDIR if mkdir is an undefined symbol.'
5095         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5096         "CFLAGS = -DATTSV -DNOUNICODE -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL \
5097         -DNOINITGROUPS -DNOFTRUNCATE -DNOREALPATH -DNOLEARN $(KFLAGS) -i -O" \
5098         "LNKFLAGS = -i"
5099
5100 #Generic ATT System III or System V (no I&D space)
5101 sys3nid:
5102         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5103         @echo 'or System V R2 or earlier, no I&D space...'
5104         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5105         "CFLAGS = -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOSYMLINK \
5106         -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE -DNOLEARN $(KFLAGS) -O" \
5107         "LNKFLAGS ="
5108
5109 #Generic ATT System III or System V R2 or earlier, "no void":
5110 #special entry to remove "Illegal pointer combination" warnings.
5111 sys3nv:
5112         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5113         @echo 'or System V R2 or earlier...'
5114         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5115         "CFLAGS= -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOGETUSERSHELL \
5116         -DNOSYMLINK -DNOFTRUNCATE -DNOINITGROUPS -DNOLEARN \
5117         -Dvoid=int $(KFLAGS) -i -O" \
5118         "LNKFLAGS = -i"
5119
5120 # AT&T 7300 UNIX PC.  As of C-Kermit 6.1, many of these entries don't work
5121 # any more due to "Out of memory" or "Too many defines" errors during
5122 # compilation, at least not on systems without lots of memory.  The sys3upcgc
5123 # entry works (using gcc) with optimization removed, and might also work
5124 # with optimization enabled on machines with larger memories.
5125
5126 #AT&T 7300/UNIX PC (3B1) systems, sys3 but special handling for internal modem.
5127 #Link with the shared library -- the conflict with openi in shared library
5128 #is solved with -Dopeni=xopeni.  Note that the xermit target can't be used
5129 #for the Unix PC; there is no select().
5130 sys3upc:
5131         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5132         @echo 'If shared lib causes trouble, use make sys3upcold.'
5133         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5134         "CFLAGS = -O -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOREALPATH -DNOLEARN \
5135         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5136         -DNOREDIRECT -DNOGFTIMER -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5137         "CC2 = ld /lib/crt0s.o /lib/shlib.ifile" "LNKFLAGS = -s"
5138
5139 #AT&T 7300/Unix PC systems, minimum kermit for those with smaller amounts
5140 #of memory.
5141 sys3upcm:
5142         @echo Minimum interactive
5143         $(MAKE) "MAKE=$(MAKE)" sys3upc KTARGET=$${KTARGET:-$(@)} \
5144         "KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5145         -DNOSYSLOG -DNOSETKEY -DNOREALPATH"
5146
5147 #AT&T 7300/UNIX PC (3B1) systems, with curses support.
5148 #Curses and the shared library don't get along, so we don't use the
5149 #shared library.  We need to include CK_NEWTERM to avoid a conflict
5150 #with curses and buffering on stdout.  Merged with submission by
5151 #Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu.
5152 #We don't need -Dopeni=xopeni since we're not using the shared library,
5153 #but we keep it to be consistent with the other entries.
5154 sys3upcc:
5155         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5156         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5157         "CFLAGS = -O -DATT7300 -DNOREALPATH \
5158         -DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DNOLEARN \
5159         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5160         -DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5161         "LIBS = -lcurses" "LNKFLAGS = -s"
5162
5163 #Like sys3upcc but for AT&T UNIX 3.51m (released as a patch on Fix Disk 2),
5164 #adds hardware flow control.
5165 att351m:
5166         $(MAKE) "MAKE=$(MAKE)" sys3upcc KTARGET=$${KTARGET:-$(@)} \
5167         "KFLAGS=-DCK_RTSCTS -DUNIX351M"
5168
5169 #As above but with gcc.
5170 att351gm:
5171         $(MAKE) "MAKE=$(MAKE)" sys3upcgc KTARGET=$${KTARGET:-$(@)} \
5172         "KFLAGS=-DCK_RTSCTS -DUNIX351M"
5173
5174 #AT&T 7300 UNIX PC (3B1), as above, but no newterm().
5175 sys3upcx:
5176         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5177         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5178         "CFLAGS = -O -DATT7300 -DNOREALPATH -DNOUNICODE -DNOLEARN \
5179         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5180         -DCK_CURSES -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DUSE_MEMCPY $(KFLAGS) \
5181         -Dopeni=xopeni" "LIBS = -lcurses -ltermcap" "LNKFLAGS = -s"
5182
5183 #AT&T 7300/UNIX PC (3B1) systems, with curses and shared library support.
5184 sys3upcshcc:
5185         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5186         @echo 'With curses.  Requires shcc.'
5187         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5188         "CFLAGS = -O -DATT7300 -DNOMKDIR -DNOREALPATH -DNOLEARN \
5189         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5190         -DCK_NEWTERM -DCK_CURSES  -DNOREDIRECT -DNOGFTIMER \
5191         -DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5192         "LNKFLAGS = -i -s" "CC = shcc" "CC2 = shcc" "LIBS = -lcurses"
5193
5194 #AT&T 7300/UNIX PC (3B1) systems, as above, no curses, but use gcc.
5195 sys3upcg:
5196         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5197         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5198         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5199         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5200         -DNOGFTIMER -DNOMKDIR -DNOREALPATH $(KFLAGS) -Dopeni=xopeni" \
5201         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
5202
5203 #AT&T 7300/UNIX PC (3B1) systems, curses and gcc.
5204 #Optimization omitted -- add it back in if your machine has lots of memory.
5205 sys3upcgc:
5206         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5207         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5208         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOGFTIMER -DNOUNICODE \
5209         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5210         -DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREALPATH -DNOLEARN $(KFLAGS)" \
5211         "CC = gcc" "CC2 = gcc" "LIBS = -lcurses" "LNKFLAGS = -s"
5212
5213 #AT&T 7300/UNIX PC (3B1) systems, special handling for internal modem.
5214 #No FULLSCREEN file transfer display (curses).
5215 sys3upcold:
5216         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5217         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5218         "CFLAGS = -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5219         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5220         -DNOGFTIMER -DNOREDIRECT -DNOREALPATH $(KFLAGS) -O" "LNKFLAGS = -i"
5221
5222 #As above, but with gcc. mininum features - fits on a 400K UNIX PC floppy
5223 #after compression with room to spare; add -DNOSHOW or other -DNOxxxx items
5224 #to reduce size even further.
5225 sys3upcgm:
5226         @echo Minimum interactive
5227         $(MAKE) "MAKE=$(MAKE)" sys3upcg KTARGET=$${KTARGET:-$(@)} \
5228         "KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5229         -DNOSETKEY $(KFLAGS)"
5230
5231 #This target is designed to create a version with the most features possible
5232 #that, after compression, still fits on a 400K UNIX PC floppy.
5233 sys3upcgfd:
5234         @echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC floppy...'
5235         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5236         "CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOSPL -DNOLEARN \
5237         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5238         -DNOGFTIMER -DNOREALPATH -Dopeni=xopeni \
5239         -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5240         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5241
5242 #AT&T 6300 PLUS (warning, -O might make it run out of space).
5243 #NOTE: Remove -DHDBUUCP if not using Honey DanBer UUCP.
5244 att6300:
5245         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5246         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5247         "CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOREALPATH -DNOLEARN \
5248         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5249         -DNOUNICODE $(KFLAGS) -O -Ml -i" "LNKFLAGS = -i -Ml"
5250
5251 #As above, but with curses support.  Debugging disabled to prevent thrashing.
5252 att6300c:
5253         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5254         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5255         "CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOCSETS -DNOREALPATH \
5256         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5257         -DCK_CURSES -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) -O -Ml -i" \
5258         "LNKFLAGS = -i -Ml" "LIBS = -lcurses"
5259
5260 #AT&T 6300 PLUS with no curses, no debugging (about 34K smaller)
5261 # -Optimization saves about 20K too.
5262 att6300nd:
5263         @echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS, no debugging...'
5264         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5265         "CFLAGS = -DATT6300 -DHDBUUCP -DNODEBUG -DNOFILEH -DNOREALPATH \
5266         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5267         -DNOUNICODE -DNOLEARN $(KFLAGS) -O -i -Ml" "LNKFLAGS = -i -Ml"
5268
5269 #AT&T 3B2 and maybe 3B20-series computers running AT&T UNIX System V R3.
5270 #This one was actually used to build C-Kermit 7.0 successfully on a 3B2/300.
5271 att3b2:
5272         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2'
5273         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5274         "CFLAGS = -DATTSV -DNOREDIRECT -DUSE_MEMCPY \
5275         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5276         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5277         -DNOGFTIMER -DNOREALPATH -Dopeni=xopeni -DNOFRILLS -DNOLEARN \
5278         -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5279         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5280
5281 # The next two are likely not to work as-is.
5282
5283 #AT&T 3B2, 3B20-series computers running AT&T UNIX System V.
5284 #This is just generic System V with Honey DanBer UUCP, so refer to sys3hdb.
5285 #Remove -DNONAWS if you can get away with it.
5286 att3bx:
5287         $(MAKE) "MAKE=$(MAKE)" sys3hdb KTARGET=$${KTARGET:-$(@)} \
5288         "KFLAGS=$(KFLAGS) -DNONAWS -DNOTIMEVAL"
5289
5290 # 3Bx with charsets (except Unicode) but no curses.
5291 att3bx1:
5292         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5293         @echo 'with Honey DanBer UUCP  no curses...'
5294         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5295         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5296         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5297         -DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5298         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5299         -DNOREALPATH -DNOUNICODE -i" \
5300         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s"
5301
5302 #AT&T 3B2, 3B20-series computers running AT&T UNIX System V,
5303 #with fullscreen file transfer display.
5304 att3bxc:
5305         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5306         @echo 'with Honey DanBer UUCP and curses...'
5307         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5308         "CFLAGS = -DATTSV -DHDBUUCP -DNONAWS -DNOTIMEVAL $(KFLAGS) \
5309         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5310         -DNOREALPATH -DCK_CURSES -DCK_NEWTERM -DNOUNICODE -DNOLEARN -i -O" \
5311         "LNKFLAGS = -i" "LIBS=-lcurses"
5312
5313 #3bx with curses but no charsets
5314 att3bxc3:
5315         @echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5316         @echo 'with Honey DanBer UUCP with curses...  no CSETS'
5317         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5318         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5319         -DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5320         -DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5321         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5322         -DNOREALPATH -DNOCSETS -DCK_CURSES -DCK_NEWTERM -i" \
5323         "CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s" "LIBS = -lcurses"
5324
5325 #Any System V R2 or earlier with Honey DanBer UUCP (same as above)
5326 sys3hdb:
5327         @echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5328         @echo 'or System V R2 or earlier with Honey DanBer UUCP...'
5329         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5330         "CFLAGS = -DATTSV -DHDBUUCP -DNOREALPATH -DNOUNICODE -DNOLEARN \
5331         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5332         $(KFLAGS) -i -O" "LNKFLAGS = -i"
5333
5334 #Sperry/UNISYS 5000 UTS V 5.2 (System V R2), Honey DanBer UUCP
5335 unisys5r2:
5336         @echo 'Making C-Kermit $(CKVER) for Sperry/UNISYS 5000 UTS V 5.2...'
5337         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5338         "CFLAGS = -DATTSV -DUNISYS52 -DHDBUUCP -DNOREALPATH -DNOUNICODE \
5339         -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5340         -DNOLEARN $(KFLAGS) -i -O" "LNKFLAGS = -i"
5341
5342 #In case they say "make sys5hdb" instead of "make sys3hdb"...
5343 sys5hdb:
5344         $(MAKE) "MAKE=$(MAKE)" sys3hdb
5345
5346 #Create the common header line for all hpux[5-11]* entries and above. This 
5347 #extra entry is here because our header message length may differ for each 
5348 #C-Kermit version. Don't use 'fold -s' for HP-UX 5.x - 7.x! This option is 
5349 #available only for HP-UX 8.0 and above!
5350 hpux-header:
5351         @HPUX=`uname -r | sed -e 's/^[^1-9]*//' -e 's/\.00$$/.0/'` ; \
5352         [ "$(MESSAGE0)" ] && MESSAGE1="$(MESSAGE0)" ; \
5353         Message0='Making C-Kermit $(CKVER) for HP9000 HP-UX' ; \
5354         Message1=$${MESSAGE1:='without any extra compiler optimization'} ; \
5355         MessageH="$$Message0 $$HPUX" ; \
5356         case $$HPUX in \
5357           [567].*) echo "$$MessageH\n$$Message1" ;; \
5358               *.*) echo "$$MessageH $${Message1}$(MESSAGE1A)" | fold -s ;; \
5359         esac | sed -e 's/^ //' -e 's/ *$$//'
5360
5361 # Peter E's updated HP-UX 5.xx entries Oct 2001.
5362
5363 #HP-9000 500 HP-UX 5.xx, no TCP/IP.
5364 # Last known successful build: C-Kermit 8.0.206 2002/20/27.
5365 hpux0500:
5366         @MESSAGE0="no TCP/IP and no compiler optimization";\
5367         MESSAGE0=$${MESSAGE1:-$$MESSAGE0} \
5368         $(MAKE) hpux-header
5369         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5370         "CFLAGS = -DHPUX -DHPUX5 -DHPUXPRE65 -DNOREDIRECT -DDCLGETCWD \
5371         -DNOGETUSERSHELL -DNOGFTIMER -DNOSYSLOG -DNOTOMACROS -DNOLSTAT \
5372         -DNOSYMLINK -DNOINITGROUPS -DNOUNICODE -DNOLEARN -DNOLONGLONG \
5373         -DVOID=int -DCKVOID=int $(KFLAGS)" "LIBS = $(LIBS)" "LNKFLAGS = "
5374
5375 #HP-9000 500 HP-UX 5.21 with Wollongong WIN/TCP 1.2 TCP/IP.
5376 #Requires /usr/wins/usr/include and /usr/lib/libnet.a from Wollongong.
5377 #Optimization skipped - takes forever.  Really.
5378 # WARNING: this doesn't work if a file called "hpux0500" is on the disk.
5379 # Last known successful build: C-Kermit 8.0.206 2002/20/27.
5380 hpux0500wintcp:
5381         @MESSAGE1="with WIN/TCP but without any extra compiler optimization" \
5382         $(MAKE) hpux0500 KTARGET=$${KTARGET:-$(@)} \
5383         "KFLAGS = -DTCPSOCKET -DHPUX5WINTCP -DINADDRX -DNO_DNS_SRV \
5384         -DNOMHHOST -DVOID=int -DCKVOID=int -DNOHADDRLIST -DNOLONGLONG \
5385         -I/usr/wins/usr/include $(KFLAGS)" "LIBS = /usr/lib/libnet.a"
5386
5387 #HP-UX 6.5, short filenames, no network and no curses support.
5388 #ckcpro, ckuusr, ckuus3 and others are broken out because they make the
5389 #optimizer run away.  Note that the XERMIT target does not work with HP-UX 6.5!
5390 #
5391 #If you get compiler warnings like:
5392 #'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5393 #other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5394 #switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5395 #needs 257 table entries (C-Kermit Version "9.0.299").
5396 #OK: 2010/03/26
5397 hpux0650:
5398         @$(MAKE) hpux-header
5399         @MESSAGE2=$${MESSAGE2:-'and NO network'}; \
5400         echo "supporting: NO long filenames $$MESSAGE2."
5401
5402         $(MAKE) KTARGET=$${KTARGET:-$(@)} \
5403                 ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
5404                 ckuusr.$(EXT) ckuxla.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5405         "CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5406         -DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5407         $(KFLAGS)"
5408
5409         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5410         "CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5411         -DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5412         $(KFLAGS) -Wc,-Nw260 $(OFLAGS)" "LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5413
5414 #Exactly as above, plus curses:
5415 #OK: 2009/10/06
5416 hpux0650c:
5417         @MESSAGE2="and NO network but with curses" \
5418         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5419         "KFLAGS = -DCK_CURSES $(KFLAGS)" \
5420         "LIBS = -lcurses"
5421
5422 #Exactly as above, plus curses + network:
5423 #OK: 2009/10/02
5424 hpux0650tcpc:
5425         @MESSAGE2="but with curses and with TCP/IP" \
5426         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5427         "KFLAGS=-DCK_CURSES -DTCPSOCKET -DNOHADDRLIST \
5428         -DINTSELECT -DNOCKGETFQHOST $(KFLAGS)" \
5429         "LIBS=-lcurses"
5430
5431 #Exactly as hpux0650 but with compiler optimization:
5432 #OK: 2009/10/06
5433 hpux0650o:
5434         @MESSAGE1="with compiler optimization" \
5435         $(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5436         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5437
5438 #Exactly as hpux0650c but with compiler optimization:
5439 #OK: 2009/10/06
5440 hpux0650oc:
5441         @MESSAGE1="with compiler optimization" \
5442         $(MAKE) hpux0650c KTARGET=$${KTARGET:-$(@)} \
5443         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5444
5445 #Exactly as hpux0650tcpc but with compiler optimization:
5446 #OK: 2009/10/06
5447 hpux0650otcpc:
5448         @MESSAGE1="with compiler optimization" \
5449         $(MAKE) hpux0650tcpc KTARGET=$${KTARGET:-$(@)} \
5450         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5451
5452 #Take this as startup entry for all 'non-optimized' files under HP-UX 7.x!
5453 #Make sure we don't call it with the '-O' option because this will blow up
5454 #the compiler!
5455 #OK: 2009/09/30
5456 hpux0700noopt:
5457         @case "$(CFLAGS)" in \
5458         *-O*) echo "Don't use CFLAGS= -O here!" ;; \
5459            *) $(MAKE) KTARGET=$${KTARGET:-$(@)} \
5460               ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
5461               ckuus6.$(EXT) ckuus7.$(EXT) ckuxla.$(EXT) \
5462               ckcuni.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5463               ;; \
5464         esac
5465
5466 #HP-UX 7.0, no long filenames, no network support, no curses.
5467 #If you get compiler warnings like:
5468 #'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5469 #other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5470 #switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5471 #needs 257 table entries (C-Kermit Version "9.0.299").
5472 #OK: 2010/10/26
5473 hpux0700sf:
5474         @$(MAKE) hpux-header
5475         @echo 'supporting: NO long filenames, NO network, NO curses.'
5476         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5477         "CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5478         -DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260"
5479
5480         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5481         "CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5482         -DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260 $(OFLAGS)" \
5483         "LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5484
5485 #Exactly as hpux0700sf but with compiler optimization:
5486 #OK: 2009/09/30
5487 hpux0700osf:
5488         @MESSAGE1="with compiler optimization" \
5489         $(MAKE) hpux0700sf KTARGET=$${KTARGET:-$(@)} \
5490         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5491
5492 #HP-UX 7.0, short filenames, but with tcp/ip and curses.
5493 #To use this, you must have bought the ARPA Services Product from HP, and you
5494 #must have /usr/lib/libBSD.a.
5495 #
5496 #If you get compiler warnings like:
5497 #'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5498 #other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5499 #symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5500 #needs 2031 table entries (C-Kermit Version "9.0.299").
5501 #OK: 2010/03/24
5502 hpux0700sftcpc:
5503         @$(MAKE) hpux-header
5504         @echo 'supporting: NO long filenames, \c'
5505         @echo 'but with networking, curses, HDB uucp...'
5506         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5507         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5508         -DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5509         -DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5510         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5511
5512         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5513         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5514         -DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5515         -DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5516         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5517         "LNKFLAGS = -s" "LIBS = -lm -lBSD -lcurses"
5518
5519 #Exactly as above but with compiler optimization:
5520 #OK: 2009/09/30
5521 hpux0700osftcpc:
5522         @MESSAGE1="with compiler optimization" \
5523         $(MAKE) hpux0700sftcpc KTARGET=$${KTARGET:-$(@)} \
5524         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5525
5526 #HP 9000 series 300/800 HP-UX 7.0, long filenames, network support, HDB uucp,
5527 #but NO curses. See comments in hpux0700sftcpc about TCP/IP support.
5528 #
5529 #If you get compiler warnings like:
5530 #'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5531 #other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5532 #symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5533 #needs 2031 table entries (C-Kermit Version "9.0.299").
5534 #OK: 2010/03/24
5535 hpux0700lfn:
5536         @$(MAKE) hpux-header
5537         @echo 'supporting: long filenames, networking, HDB uucp$(MESSAGE2)...'
5538         $(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5539         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5540         -DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5541         -DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5542         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5543
5544         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5545         "CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5546         -DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5547         -DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5548         -DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5549         "LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5550
5551 #Exactly as above + curses.
5552 #OK: 2009/09/30
5553 hpux0700lfnc:
5554         @MESSAGE2=', curses' \
5555         $(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5556         "KFLAGS = -DCK_CURSES $(KFLAGS)" \
5557         "LIBS = -lcurses"
5558
5559 #Exactly as above hpux0700lfn but with compiler optimization:
5560 #OK: 2009/09/30
5561 hpux0700olfn:
5562         @MESSAGE1="with compiler optimization" \
5563         $(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5564         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5565
5566 #Exactly as above hpux0700lfnc but with compiler optimization:
5567 #OK: 2009/09/30
5568 hpux0700olfnc:
5569         @MESSAGE1="with compiler optimization" \
5570         $(MAKE) hpux0700lfnc KTARGET=$${KTARGET:-$(@)} \
5571         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5572
5573 #HP 9000 Series 300 or 400, HP-UX 8.0, long filenames and TCP/IP support.
5574 #This one should also work on 700/800, but without PA-specific optimization.
5575 #In case -DCK_RTSCTS and -DCK_REDIR make trouble, remove them.
5576 #NOTE: ckcpro.c, ckuusr.c and ckuus3.c blow up the optimizer, so don't optimize
5577 #them.
5578 #For HP-UX 8.0 on Motorola CPUs, you might have to reinstall your kernel with
5579 #maxdsiz >= 0x03000000.  But if physical memory is small, that still will not
5580 #help much.
5581 #OK: 2009/10/01
5582 hpux0800:
5583         @$(MAKE) hpux-header
5584         @MESSAGE3=$${MESSAGE3:='TCP/IP'}; \
5585         echo "supporting: long filenames, $$MESSAGE3, HDB UUCP$(MESSAGE2)..."
5586         $(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
5587         ckcpro.$(EXT) ckuusr.$(EXT) ckuus3.$(EXT) \
5588         "CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5589         -DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5590         -DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5591         -DNOLONGLONG $(KFLAGS)"
5592
5593         $(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" xermit KTARGET=$${KTARGET:-$(@)} \
5594         "CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5595         -DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5596         -DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5597         -DNOLONGLONG -DNODCLENDUSERSHELL $(KFLAGS) $(OFLAGS)" \
5598         "LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5599
5600 #Exactly as above hpux0800 + curses.
5601 #OK: 2009/10/01
5602 hpux0800c:
5603         @MESSAGE2=', curses' \
5604         $(MAKE) hpux0800  KTARGET=$${KTARGET:-$(@)} \
5605         "KFLAGS = $(KFLAGS) -DCK_CURSES" "LIBS = -lcurses"
5606
5607 #HP 9000 HP-UX 8.0, no TCP/IP because /usr/lib/libBSD.a can't be found,
5608 #or TCP/IP header files missing.
5609 #OK: 2009/10/01
5610 hpux0800notcp:
5611         @MESSAGE3='NO network, NO curses' \
5612         $(MAKE) "MAKE=$(MAKE)" hpux0800 KTARGET=$${KTARGET:-$(@)} \
5613         "KFLAGS = $(KFLAGS) -UTCPSOCKET"
5614
5615 #Now the same as above hpux0800 but with compiler optimization
5616 #OK: 2009/10/01
5617 hpux0800o:
5618         @MESSAGE1="with compiler optimization" \
5619         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5620         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5621
5622 #Exactly as above hpux0800 + curses and with compiler optimization.
5623 #OK: 2009/10/01
5624 hpux0800oc:
5625         @MESSAGE1="with compiler optimization" \
5626         $(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5627         "KFLAGS = $(KFLAGS)" "OFLAGS = -O" "LIBS = -lcurses"
5628
5629 #Exactly as above hpux0800notcp but with compiler optimization
5630 #OK: 2009/10/01
5631 hpux0800onotcp:
5632         @MESSAGE1="with compiler optimization" \
5633         $(MAKE) "MAKE=$(MAKE)" hpux0800notcp KTARGET=$${KTARGET:-$(@)} \
5634         "KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5635
5636 #HP 9000 Series 700 or 800, HP-UX 8.0, long filenames and TCP/IP support.
5637 # Like the previous entries, but with PA-RISC-specific optimization.
5638 #OK: 2009/10/01
5639 hpux0800pa:
5640         @MESSAGE1="with PA-RISC-specific optimization" \
5641         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5642         "KFLAGS = $(KFLAGS) +Obb1100"
5643
5644 #As above, but with curses.
5645 #OK: 2009/10/01
5646 hpux0800pac:
5647         @MESSAGE1="with PA-RISC-specific optimization" \
5648         $(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5649         "KFLAGS = $(KFLAGS) +Obb1100"
5650
5651 #As above, but compiled with GCC 2.3.3.
5652 #OK: 2009/10/01
5653 hpux0800pagcc:
5654         @MESSAGE1='using the gcc compiler' \
5655         $(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5656         "CC=gcc" "CC2=gcc" "KFLAGS = -funsigned-char $(KFLAGS)"
5657
5658 #HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5659 #configured.  Use this entry with the restricted compiler: no optimization, no
5660 #ANSI support.  If you get unresolved sockets library references at link time,
5661 #then try adding -lBSD to LIBS, or else remove -DTCPSOCKET to build a version
5662 #without TCP/IP support.
5663 #
5664 #Please note that we have to add the compiler option +DA1.0/+DA1.1 to avoid
5665 #core-dumps for large arguments in IF MATCH. The man page says these options
5666 #are default but C-Kermit dumps core without them! Therefore keep them
5667 #untouched. If you want to overwrite or disable the +DA1.0/+DA1.1 option use
5668 #'make hpux0900 OFLAGS=...'. An other possibility would be to create a new
5669 #kernel with maxssiz >= 0x01185000 (default maxssiz=0x00800000).
5670 #OK: 2009/09/24
5671 hpux0900:
5672         @MESSAGE1A='. Read hpux0900 entry comments if you have trouble.' \
5673         $(MAKE) hpux-header
5674         @case `uname -m` in \
5675           */[34]*) KFLAGS='-DNOLONGLONG $(KFLAGS)' ;; \
5676           */7*)    AFLAGS='+DA1.1' ;; \
5677           */8*)    AFLAGS='+DA1.0' ;; \
5678         esac ; \
5679         OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5680         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5681         "CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT -DUTIMEH \
5682         -DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME -DCK_REDIR -DLONGFN \
5683         -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5684         -DNODCLENDUSERSHELL $$KFLAGS $$OFLAGS" \
5685         "LNKFLAGS = -s" "LIBS = -lm -lcurses" "CC=$(CC)" "CC2=$(CC2)"
5686
5687 #Like hpux0900, but for the "value-added" compiler on all HP 9000 models.
5688 #Adds optimization and ANSI compilation:
5689 # +O2 makes smaller executable (= -O = Level-1 and global optimization)
5690 # +O3 adds interprocedural global optimization, makes bigger executable.
5691 # Please note: To support long-long we would need compiler switch '-Ae' but
5692 # this one works only on Risc systems. But the equivalant compiler flags
5693 # '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5694 # If optimization fails on some modules, you can add:
5695 #  +Obb<n>, +Olimit <n>, or +Onolimit, depending on your cc version,
5696 # where <n> is a number, e.g. +Obb1200.  In other words, if you get optimizer
5697 # warnings, add (for example) +Obb1200; if you still get optimizer warnings,
5698 # increase the number.  Repeat until warnings go away.  If your compiler
5699 # permits it, use +Onolimit. If optimizer blows up on ckcpro.c, see next entry.
5700 # Reportedly, on some configurations, such as HP9000/425e or /340, perhaps
5701 # depending on the amount of main memory, this entry might fail no matter what
5702 # you do ("Out of Memory", "cc: Fatal error in /lib/c.c1", etc).  In that case
5703 # use "make hpux0900" (no "o").
5704 #OK: 2009/09/24
5705 hpux0900o:
5706         @MESSAGE1=$${MESSAGE1:-"with compiler optimization"} \
5707         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5708         "KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5709
5710 # For HP-UX 9.0 on Motorola CPUs, optimization of ckcpro.c tends to blow up
5711 # the compiler.  You might have to reinstall your kernel with maxdsiz >=
5712 # 0x03000000.  But if physical memory is small, that still will not help much.
5713 # In that case, use this entry to skip optimization of ckcpro.c.  But for
5714 # C-Kermit 8.0.208 you need a kernel with maxdsiz >= 0x02000000 to compile an
5715 # optimized ckcftp.c.
5716 # Please note: To support long-long we would need compiler switch '-Ae' but
5717 # this one works only on Risc systems. But the equivalant compiler flags
5718 # '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5719 hpux0900m68ko:
5720         @MESSAGE1='without compiler optimization for ckcpro.$(EXT) ...' \
5721         $(MAKE) hpux-header
5722         $(MAKE) ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
5723         ckcftp.$(EXT) ckcpro.$(EXT) \
5724         "CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT \
5725         -DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME  -DCK_REDIR -DLONGFN \
5726         -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT $(KFLAGS)"
5727         @echo
5728         @MESSAGE1="with compiler optimization for the rest" \
5729         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5730         "KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5731
5732 # Old name for hpux0900m68ko.
5733 hpux0900mot:
5734         $(MAKE) hpux0900m68ko KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS)"
5735
5736 #Like hpux0900o but with additional model-700/800-specific optimizations.
5737 # +ESlit = consolidate strings in read-only memory.
5738 # +ESfsc = inline millicode calls when comparing pointers.
5739 hpux0900o700:
5740         @echo 'If you get optimizer warnings \c'
5741         @echo 'try "make hpux0900o700 KFLAGS=+Obb1200"'
5742         @MESSAGE1="with PA-RISC-specific optimizations" \
5743         $(MAKE) hpux0900o KTARGET=$${KTARGET:-$(@)} \
5744         "KFLAGS = $(KFLAGS) +ESlit +ESsfc"
5745
5746 #HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5747 #configured, built with gcc, all models except 800 series.
5748 #You might need to add the include path for gcc headers, for example:
5749 # 'KFLAGS=-I/usr/gnu/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5/include/'
5750 hpux0900gcc:
5751         @MESSAGE1='using the gcc compiler' \
5752         $(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5753         "KFLAGS = -DCK_ANSIC $(KFLAGS)" \
5754         "OFLAGS = -funsigned-char -O2 $(OFLAGS)"
5755
5756 #HP-9000 HP-UX 10.0 + TCP/IP + curses, fully configured.
5757 #Use with restricted (bundled) compiler: no optimization, no ANSI support.
5758 #libcurses needed for fullscreen file xfer display in HP-UX 10.00 and 10.01.
5759 #libHcurses (NOT libcurses!) for fullscreen display, to work around fatal bugs
5760 #in HP-UX 10.10 and 10.20 curses. Maybe we could use lcurses for 10.30, since
5761 #the 10.10 curses problem is supposedly fixed in 10.30.
5762 # +DA1.0 = Generate PA-RISC 1.0 code that runs on both 700 and 800 models.
5763 # +DA1.1 = Generate PA-RISC 1.1 code that runs on both 700 and 800 models.
5764 # Note that HP-UX 10.20 and upwards do not support PA-RISC 1.0 systems.
5765 # And that as of Dec 2001, 11.00 and 11.11 are PA-only and 11.20 is IA64-only.
5766 # Later 11.2x releases are expected to be for both.  Architecture can be
5767 # determined with the model command, at least in 10.20 and later...
5768 #For future releases, we need to include +DA1.1 for PA builds, so that a
5769 #binary built on PA 2.0 will still work on PA 1.1 machines, whereas +DA1.1
5770 #must NOT be included for IA64 builds.
5771 #4 Jan 2006 - Added Large File Support (LFS).  Large files (>2GB) are
5772 #possible in HP-UX 10.20 and later.  The only change is to add:
5773 # -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
5774 #to KFLAGS.  These should be harmless in 10.00 and 10.10, if any of examples
5775 #of those still exist, but I have no way to test this hypothesis.
5776 #OK: 2009/11/16
5777 hpux1000:
5778         @$(MAKE) hpux-header
5779         @LIBS='-lHcurses' ; \
5780         AFLAGS='+DA1.1' ; \
5781         case `uname -r` in \
5782            [AB].10.0*)  KFLAGS='-DHPUX1000 $(KFLAGS)' ; \
5783                         AFLAGS='+DA1.0' ; LIBS='-lcurses'  ;; \
5784            [AB].10.1*)  KFLAGS='-DHPUX1010 -D__HP_CURSES $(KFLAGS)' ; \
5785                         ;; \
5786            [AB].10.2*)  KFLAGS='-DHPUX1020 -D__HP_CURSES $(KFLAGS)' ; \
5787                         ;; \
5788            [AB].10.3*)  KFLAGS='-DHPUX1030 -D__HP_CURSES $(KFLAGS)' ; \
5789                         ;; \
5790            [AB].10.?*)  KFLAGS='-DHPUX10XX -D__HP_CURSES $(KFLAGS)' ; \
5791                         ;; \
5792            [AB].11.0*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5793                         ;; \
5794            [AB].11.1*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5795                         ;; \
5796            [AB].11.?*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5797                         AFLAGS='' ; LIBS='-lcurses' ;; \
5798         esac ; \
5799         OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5800         $(MAKE) "SHELL=/usr/bin/sh" xermit KTARGET=$${KTARGET:-$(@)} \
5801         "CC=$(CC)" "CC2=$(CC2)" \
5802         "CFLAGS = -DHPUX10 -DDIRENT -DSTERMIOX -DCK_DSYSINI -DHDBUUCP \
5803         -DCK_CURSES -DCK_WREFRESH -DTCPSOCKET -DCK_REDIR -DRENAME -DFNFLOAT \
5804         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
5805         $$KFLAGS $$OFLAGS" \
5806         "LNKFLAGS=-s $(LNKFLAGS)" "LIBS = -lm $$LIBS $(KLIBS)"
5807
5808 # This is a kludge, copying hpux0900gcc and adapting hpux1000
5809 # (add CC and CC2, drop the A1.[0||1])
5810 # Builds w/ no compiler warnings but minimally tested.
5811 #
5812 #OK: 2009/09/21
5813 hpux1000gcc:
5814         @MESSAGE1="using the gcc compiler $(MESSAGE1)" \
5815         $(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5816         "KFLAGS = $(KFLAGS)" "OFLAGS = -DCK_ANSIC -funsigned-char -O2"
5817
5818 # Trusted HP-UX 10
5819 # echo KFLAGS=$(KFLAGS) YTARGET YTARGET=$(YTARGET) $(XTARGET) ;
5820 hpux1000t:
5821         @case "$(KTARGET)" in \
5822            *+openssl | *+ssl) \
5823                 KENTRY=hpux1000o+openssl ;; \
5824            *gcc) \
5825                 KENTRY=hpux1000gcc ;; \
5826            *o+) KENTRY=hpux1000o+ ;; \
5827            *o)  KENTRY=hpux1000o ;; \
5828            *)   KENTRY=hpux1000 ;; \
5829         esac ; \
5830         MESSAGE1="and support for 'Trusted HP-UX'" \
5831         $(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5832         "KFLAGS = $(KFLAGS) -DHPUX10_TRUSTED" "KLIBS=-lsec"
5833
5834 hpux1000to:
5835         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5836
5837 hpux1000to+:
5838         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5839
5840 hpux1000tgcc:
5841         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5842
5843 hpux1000to+ssl hpux1000to+openssl:
5844         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5845
5846 hpux1000tgcc+ssl hpux1000tgcc+openssl:
5847         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5848
5849 #HP-9000 HP-UX 10.00 and higher with ANSI prototyping and optimization.
5850 #PA-RISC only, no Motorola or other hardware is support in HP-UX 10.00++.
5851 #The unbundled optional compiler is required.
5852 #Your path should start with /opt/ansic/bin.
5853 # -Wl,-Fw = Remove stack unwind table (info used by debuggers).
5854 # +O2 makes a smaller executable (= -O = Level-1 and global optimization).
5855 # +O3 adds interprocedural global optimization, makes a bigger executable.
5856 # +Onolimit allows all modules to be optimized, no matter how complex.  But:
5857 #  (a) +Onolimit does not seem to always be there in HP-UX 10.00, and:
5858 #  (b) some modules might take hours on low-memory and/or slow systems.
5859 # The following are PA-RISC-specific optimizations:
5860 # +ESlit = Consolidate strings in read-only memory.
5861 # +ESfsc = Inline millicode calls when comparing pointers.
5862 # You might need to configure your kernel for a maxdsiz of 0x0B000000 (176MB)
5863 # or greater to prevent the optimizer from running out of space.
5864 # December 2001: +ESlit +ESsfc removed because not supported on IA64.
5865 # Somebody who cares can use 'model' to see whether it's PA-RISC or IA64
5866 # and include the architecture-specific optimization flags.  Also note:
5867 # +DA1.1 is PA-only.  If this is included in in HP-UX 11.00 or later,
5868 # then +DS2.0 should be included too (but don't use +DS2.0 without +DA1.1,
5869 # or else the binary won't run on older PA hardware).
5870 #OK: 2009/09/21
5871 hpux1000o:
5872         @case `uname -m` in \
5873           ia64) ;; \
5874           *) MFLAGS='+ESlit +ESsfc' ;; \
5875         esac ; \
5876         MESSAGE1="with PA-RISC-specific optimizations $(MESSAGE1)" \
5877         $(MAKE) "SHELL=/usr/bin/sh" "PATH=/opt/ansic/bin:$$PATH" hpux1000 \
5878         KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS) \
5879         -Ae -D_HPUX_SOURCE -DCK_ANSIC -DUTIMEH \
5880         +O2 -Wl,-Fw $$MFLAGS"
5881
5882 #Like hpux1000o but with "+Onolimit".
5883 #On 700 series set kernel parameter maxdsiz >= 0x0D000000 (=208MB).
5884 #Takes a long time.
5885 hpux1000o+:
5886         @MESSAGE1="and +Onolimit $(MESSAGE1)" KTARGET=$${KTARGET:-$(@)} \
5887         $(MAKE) hpux1000o \
5888         "KFLAGS = $(KFLAGS) +Onolimit"
5889
5890 #HP-UX 10.xx + 11.xx with optimizing ANSI compiler and OpenSSL.
5891 #Define SSLLIB and SSLINC appropriately for your OpenSSL installation.
5892 #To overwrite the default SSLLIB and SSLINC settings you can also use the
5893 #command-line variable KSSLLIB and KSSLINC like:
5894 #make hpux1000o+openssl KSSLLIB=-L/opt/openssl/lib KSSLINC=-I/...
5895 #Ditto for the Zlib location.
5896 #This entry works for C-Kermit 8.0.206 on HP-UX 10.20 + 11.11
5897 #with OpenSSL 0.9.6 + 0.9.7
5898 #NOTE: an ANSI C compiler is required for the SSL interface.  If you don't
5899 #have the HP Optimizing ANSI compiler, see the hpux1000gcc+openssl target
5900 #below.
5901 hpux1000o+ssl hpux1000o+openssl:
5902         @case "$(KTARGET)" in \
5903            *gcc+*) \
5904                 KENTRY=hpux1000gcc ;; \
5905            *)   KENTRY=hpux1000o ;; \
5906         esac ; \
5907         case "$(KTARGET)" in \
5908            *-zlib*) \
5909                 DZLIB= LZLIB= ;; \
5910            *)   DZLIB=-DZLIB LZLIB='-L/opt/zlib/lib -lz' ;; \
5911         esac ; \
5912         SSLINC=$${KSSLINC:-$(SSLINC)}; \
5913         SSLLIB=$${KSSLLIB:-$(SSLLIB)}; \
5914         MESSAGE1="and with OpenSSL $(MESSAGE1)" \
5915         $(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5916         KFLAGS="-DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $$DZLIB \
5917         $$SSLINC $(KFLAGS)" \
5918         KLIBS="$(KLIBS) \
5919         $$SSLLIB -lssl -lcrypto \
5920         $$LZLIB \
5921         "
5922
5923 # Ditto but without Zlib:
5924 hpux1000o+ssl-zlib hpux1000o+openssl-zlib:
5925         @MESSAGE1="but without Zlib $(MESSAGE1)" \
5926         $(MAKE) hpux1000o+ssl KTARGET=$${KTARGET:-$(@)}
5927
5928 #HP-UX 10.00 or higher with OpenSSL 0.9.7.  Compiled with gcc.
5929 #From Chris Chaney, NEC America Inc.  His instructions:
5930 # (1) Install gcc version 3.2.3 & binutils version 2.13.2
5931 #     (used binary depot from http://hpux.cs.utah.edu/)
5932 # (2) Install gcc make version 3.80 from http://hpux.cs.utah.edu/
5933 #
5934 # or: gcc 2.9.2000-12-1 from "Linux to hp-ux 11.0/11i porting kit version 1.0
5935 #     (2CD)" free from:  http://www.software.hp.com
5936 #
5937 # (3) Install openSSL version 0.9.7b from http://www.software.hp.com
5938 # (4) Install flex version 2.5.4 from http://hpux.cs.utah.edu/
5939 # (5) Install gmp version 3.1.1 from http://hpux.cs.utah.edu/
5940 #
5941 #Note from Peter Eichhorn, assyst Munich. It works also without gcc make!
5942 hpux1000gcc+ssl hpux1000gcc+openssl:
5943         $(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5944
5945 # Ditto but without Zlib:
5946 hpux1000gcc+ssl-zlib hpux1000gcc+openssl-zlib:
5947         $(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5948
5949 # Same for HP-UX 11
5950 hpux1100o+ssl hpux1100o+openssl:
5951         $(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5952
5953 #OK: 2009/09/26
5954 hpux1100gcc+ssl hpux1100gcc+openssl:
5955         $(MAKE) hpux1000gcc+openssl KTARGET=$${KTARGET:-$(@)}
5956
5957 hpux1100o+ssl-zlib hpux1100o+openssl-zlib:
5958         $(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5959
5960 hpux1100gcc+ssl-zlib hpux1100gcc+openssl-zlib:
5961         $(MAKE) hpux1000gcc+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5962
5963 # HP-UX 11
5964 # Note: these are 32-bit builds even on IA64.
5965 # Adding +DD64 to CFLAGS produces 64-bit object files,
5966 # but the linker fails to find the needed 64-bit libs.
5967 #OK: 2009/09/26
5968 hpux1100:
5969         $(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)}
5970
5971 #OK: 2009/09/26
5972 hpux1100o:
5973         $(MAKE) hpux1000o KTARGET=$${KTARGET:-$(@)}
5974
5975 hpux1100o+:
5976         $(MAKE) hpux1000o+ KTARGET=$${KTARGET:-$(@)}
5977
5978 #OK: 2009/09/26
5979 hpux1100gcc:
5980         $(MAKE) hpux1000gcc KTARGET=$${KTARGET:-$(@)}
5981
5982 # Trusted HP-UX 11
5983 hpux1100t:
5984         $(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5985
5986 hpux1100to:
5987         $(MAKE) hpux1000to KTARGET=$${KTARGET:-$(@)}
5988
5989 hpux1100to+:
5990         $(MAKE) hpux1000to+ KTARGET=$${KTARGET:-$(@)}
5991
5992 hpux1100tgcc:
5993         $(MAKE) hpux1000tgcc KTARGET=$${KTARGET:-$(@)}
5994
5995 hpux1100to+ssl hpux1100to+openssl:
5996         $(MAKE) hpux1000to+openssl KTARGET=$${KTARGET:-$(@)}
5997
5998 hpux1100tgcc+ssl hpux1100tgcc+openssl:
5999         $(MAKE) hpux1000tgcc+openssl KTARGET=$${KTARGET:-$(@)}
6000
6001 #Regulus on CIE Systems 680/20
6002 cie:
6003         @echo 'Making C-Kermit $(CKVER) for CIE Systems 680/20 Regulus...'
6004         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6005         "CFLAGS = -DATTSV -DNOFILEH -DCIE -DNOLEARN $(KFLAGS) -O" "LNKFLAGS ="
6006
6007 # Linux 1.2 or later with gcc, dynamic libraries, ncurses, TCP/IP.
6008 #
6009 # If your Linux system has curses rather than ncurses, use the linuxc
6010 # entry, or if that doesn't work, linuxnc.
6011 #
6012 # The Kermit "large memory model" is used by default to configure big packet
6013 # and script buffers, etc.  For small-memory or limited-resource systems,
6014 # "make linux KFLAGS=-DNOBIGBUF".
6015 #
6016 # -DLINUXFSSTND (Linux File System Standard 1.2) gives UUCP lockfile /var/lock
6017 # with string pid.  Remove this to get /usr/spool/uucp with int pid, used in
6018 # very early Linux versions.  FSSTND 1.2 also says that the PID string in the
6019 # UUCP lock file has leading spaces.  This is a change from FSSTND 1.0, which
6020 # used leading zeros.  Add -DFSSTND10 to support FSSTND 1.0 instead of 1.2.
6021 # I hope subsequent editions of the file-system standard did not change these
6022 # again.
6023 #
6024 # Add -DOLINUXHISPEED (Old Linux High Speed support) to turn on an ugly kludge
6025 # in Linux 1.0 and earlier to support speeds of 57600 and 115200.  Extremely
6026 # old Linux systems (pre-0.99pl15) will not support this.  If OLINUXHISPEED is
6027 # not defined, then only the standard POSIX termios methods of setting the port
6028 # speed will be used, and in this case speeds can be as high as 460800 in most
6029 # modern Linux versions.
6030 #
6031 # -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
6032 # least 0.99.14; if it causes trouble for you, remove it from the CFLAGS.
6033 #
6034 # -pipe removes the need for temp files - remove it if it causes trouble.
6035 #
6036 # -funsigned-char makes all characters unsigned, as they should have been
6037 #  in the first place.
6038 #
6039 # Add -DCK_DSYSINI if you want a shared system-wide init file.
6040 #
6041 # See http://www.columbia.edu/kermit/ckubwr.html about -DNOCOTFMC.
6042 # Better still, should read the entire Linux section of that document.
6043 #
6044 # The "linuxa" entry can be referenced directly on LIBC systems, but not
6045 # GLIBC, where -lcrypt is required.  The "make linux" entry should normally
6046 # be used for all builds on all Linux distributions unless you have special
6047 # requirements, in which case keep reading.  CK_NEWTERM added after 7.0b04
6048 # due to new complaints about ncurses changing buffering of tty.
6049
6050 linuxa:
6051         @echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later...'
6052         @echo 'IMPORTANT: Read the comments in the linux section of the'
6053         @echo 'makefile if you have trouble.'
6054         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6055         "CFLAGS = -O -DLINUX -pipe -funsigned-char -DFNFLOAT -DCK_POSIX_SIG \
6056         -DCK_NEWTERM -DTCPSOCKET -DLINUXFSSTND -DNOCOTFMC -DPOSIX \
6057         -DUSE_STRERROR $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6058         "LIBS = $(LIBS) -lm"
6059
6060 # As above but with profiling
6061 linuxp:
6062         $(MAKE) linuxa KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS) -pg" \
6063         "LIBS=-pg -lcrypt -lresolv"
6064
6065 #Linux.  This entry should work for any Linux distribution on any platform,
6066 #32-bit or 64-bit, except for extremely ancient ones.  Automatically detects:
6067 # . curses, ncurses, or no curses
6068 # . Old versus new pty handling (new == glibc 2.1++)
6069 # . Presence or absence of libcrypt.a and <crypt.h>
6070 # . Presence or absence of libresolv.a
6071 # . Transitional Long File API for 32-bit platforms (SUS V2 UNIX 98 LFS).
6072 #Note: The HAVE_PTMX test was previously "if test -c /dev/ptmx" but this was
6073 #not sufficient for Debian 2.1, because although it had /dev/ptmx, it did not
6074 #have grantpt(), unlockpt(), or ptsname(), so has been changed to look for a
6075 #grantpt() prototype in the header files.  Modified in 8.0.206 to allow for
6076 #libraries that contain .so's but no .a's, e.g. Mandrake 9.0.
6077 #HAVE_BAUDBOY added in 8.0.210 for Red Hat -- it's like AIX ttylock().
6078 #Modified 17 Aug 2005 to use openpty() if available because the other stuff
6079 #dumps core in 64-bit ia64 and x86_64 builds.
6080 #Long file support for 32-bit builds added in 8.0.212 - if features.h contains
6081 #__USE_LARGEFILE64 then we set the flags that must be set before reading any
6082 #header files; on 32-bit platforms such as i386, this produces a 32-bit build
6083 #capable of accessing, sending, receiving, and managing long (> 2GB) files.
6084 #On 64-bit platforms, it does no harm.
6085 #As of 3 March 2009 we detect automatically if we have curses, ncurses,
6086 #or no curses at all.
6087 #Added HAVE_LOCKDEV as openSuSE >= 11.3 uses ttylock directly instead of
6088 #baudboy 2010/08/23
6089 #OK: 2011/06/18
6090 linux:
6091         @if test \
6092         `grep grantpt /usr/include/*.h /usr/include/sys/*.h | wc -l` -gt 0; \
6093         then if test -c /dev/ptmx; then HAVE_PTMX='-DHAVE_PTMX'; \
6094         else HAVE_PTMX=''; fi; fi ; \
6095         if test `grep openpty /usr/include/pty.h | wc -l` -gt 0; \
6096         then HAVE_OPENPTY='-DHAVE_OPENPTY'; \
6097         else HAVE_OPENPTY=''; fi ; \
6098         HAVE_LIBCURSES=''; \
6099         if test -f /usr/lib64/libncurses.so || \
6100            test -f /usr/lib/libncurses.a  || \
6101            test -f /usr/lib/libncurses.so; then \
6102           HAVE_LIBCURSES='-lncurses'; \
6103         else if test -f /usr/lib/$(MULTIARCH)/libncurses.so || \
6104            test -f /usr/lib/$(MULTIARCH)/libncurses.a  || \
6105            test -f /usr/lib/$(MULTIARCH)/libncurses.so; then \
6106           HAVE_LIBCURSES='-lncurses'; \
6107         else if test -f /usr/lib64/libcurses.so || \
6108            test -f /usr/lib/libcurses.a || \
6109            test -f /usr/lib/libcurses.so; then \
6110              HAVE_LIBCURSES='-lcurses'; fi; fi; fi; \
6111         HAVE_CURSES=''; \
6112         if test -n '$$HAVE_LIBCURSES'; then \
6113           if test -f /usr/include/ncurses.h; then \
6114             HAVE_CURSES='-DCK_NCURSES  -I/usr/include/ncurses'; \
6115           else if test -f /usr/include/curses.h; then \
6116             HAVE_CURSES='-DCK_CURSES'; \
6117         fi; fi; fi; \
6118         if test -f /usr/include/baudboy.h || test -f /usr/include/ttylock.h; \
6119         then HAVE_LOCKDEV='-DHAVE_LOCKDEV' ; \
6120         else HAVE_LOCKDEV='' ; fi ; \
6121         if test -f /usr/include/baudboy.h ; \
6122         then HAVE_BAUDBOY='-DHAVE_BAUDBOY' ; \
6123         else HAVE_BAUDBOY='' ; fi ; \
6124         $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6125         "KFLAGS=$$HAVE_CURSES $$HAVE_PTMX $$HAVE_LOCKDEV \
6126         $$HAVE_BAUDBOY $$HAVE_OPENPTY \
6127         `grep __USE_LARGEFILE64 /usr/include/features.h > /dev/null && \
6128         echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
6129         `if test -f /usr/include/crypt.h; then echo -DHAVE_CRYPT_H; fi` \
6130         $(KFLAGS)" \
6131         "LIBS=$(LIBS) $$HAVE_LIBCURSES \
6132         `if test -n '$$HAVE_OPENPTY'; then echo -lutil; fi` \
6133         `if test -f /usr/lib64/libresolv.a || test -f /usr/lib64/libresolv.so \
6134         || test -f /usr/lib/libresolv.a || test -f /usr/lib/libresolv.so \
6135         || test -f /usr/lib/i386-linux-gnu/libresolv.a \
6136         || test -f /usr/lib/i386-linux-gnu/libresolv.so \
6137         || ls /lib/$(MULTIARCH)/libresolv.* > /dev/null 2> /dev/null \
6138         || ls /lib/x86_64-linux-gnu/libresolv.* > /dev/null 2> /dev/null; \
6139         then echo -lresolv; fi` \
6140         `if test -f /usr/lib64/libcrypt.a || test -f /usr/lib64/libcrypt.so \
6141         || test -f /usr/lib/libcrypt.a || test -f /usr/lib/libcrypt.so \
6142         || ls /lib/$(MULTIARCH)/libcrypt.* > /dev/null 2> /dev/null \
6143         || ls /lib/x86_64-linux-gnu/libcrypt.* > /dev/null 2> /dev/null; \
6144         then echo -lcrypt; fi` \
6145         `if test -f /usr/lib64/liblockdev.a || \
6146         test -f /usr/lib64/liblockdev.so || \
6147         test -f /usr/lib/liblockdev.a || \
6148         test -f /usr/lib/liblockdev.so \
6149         ls /usr/lib/$(MULTIARCH)/liblockdev.* > /dev/null 2> /dev/null; \
6150         then echo -llockdev; fi`" \
6151         linuxa
6152
6153 # Linux + Shadow passwords + PAM
6154 # OK 2011/06/18
6155 linux+shadow+pam:
6156         @echo 'Making C-Kermit $(CKVER) for Linux+Shadow+PAM...'
6157         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} \
6158         KFLAGS="-DCK_SHADOW -DCK_PAM $(KFLAGS)" \
6159         "LNKFLAGS = $(LNKFLAGS)" \
6160         "LIBS = -lpam"
6161
6162 # Linux systems that have no <sys/select.h>.
6163 # (not tested in recent years, perhaps no longer needed)
6164 linuxns:
6165         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} KFLAGS=-DNO_SYS_SELECT_H
6166
6167 # Linux-script-only:
6168 # A minimum-size version for Linux that does only scripting and
6169 # serial communication -- no networks, no file transfer, no security.
6170 # OK 2011/06/18
6171 linuxso:
6172         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6173         "CFLAGS = -O -DLINUX -pipe -funsigned-char -DPOSIX -DCK_POSIX_SIG \
6174         -DLINUXFSSTND -DNOCOTFMC -DNOXFER -DNODEBUG -DNOCSETS -DNOHELP \
6175         -DNONET -DMINIDIAL -DNOSCRIPT -DNOIKSD -DNOPUSH $(KFLAGS)" \
6176         "LNKFLAGS = $(LNKFLAGS)" "LIBS = "
6177
6178 # Secure targets for Linux.  These work on RHAS4, RHEL4, and RHEL5,
6179 # unlike some of the older targets that follow.  They hook into the main Linux
6180 # target so we pick up all the other new stuff - large files, baudboy.h, the
6181 # appropriate pty interface, etc.
6182
6183 # Linux with Kerberos 5.
6184 # Use "make linux+krb5 KFLAGS=-DNO_KRB5_INIT_ETS" if necessary.
6185 #OK 2011/06/16 on Fedora 14 with:
6186 # make linux+krb5 "LIBS=$LIBS /lib/libk5crypto.so.3 /lib/libcom_err.so.2"
6187 # On RHEL5: make linux+krb5 -UCK_DES
6188 linux+krb5:
6189         @echo 'Making C-Kermit $(CKVER) for Linux with Kerberos 5...'
6190         @case `openssl version` in \
6191           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6192           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6193           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6194           *) OPENSSLOPTION="" ;; \
6195         esac; \
6196         HAVE_DES=''; \
6197         DES_LIB=''; \
6198         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6199            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6200               DES_LIB='-ldes425'; \
6201               HAVE_DES='-DCK_DES -DLIBDES'; \
6202               echo "HAVE DES"; \
6203            else echo "NO DES"; \
6204         fi; \
6205         K5CRYPTO=''; \
6206         if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6207                 K5CRYPTO='-lk5crypto'; \
6208         else if ls /usr/lib/libk5crypto* > /dev/null 2> /dev/null; then \
6209                 K5CRYPTO='-lk5crypto'; \
6210         else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
6211                 K5CRYPTO='-lk5crypto'; \
6212         fi; fi; fi; \
6213         COM_ERR=''; \
6214         if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6215                 COM_ERR='-lcom_err'; \
6216         fi; \
6217         GSSAPILIB='-lgssapi'; \
6218         if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6219                 GSSAPILIB='-lgssapi_krb5'; \
6220         else if ls /usr/lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6221                 GSSAPILIB='-lgssapi_krb5'; \
6222         else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6223                 if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6224                         GSSAPILIB='-lgssapi_krb5'; \
6225         fi; fi; fi; \
6226         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6227         "KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 $$OPENSSLOPTION \
6228         -DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6229         -I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6230         "LIBS = $(K5LIB) $$DES_LIB -lcrypto $$GSSAPILIB -lkrb5 \
6231         $$K5CRYPTO $$COM_ERR $(LIBS)" ; \
6232         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
6233                 echo ""; \
6234                 echo "If build failed try:"; \
6235                 echo ""; \
6236                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
6237                 echo ""; \
6238         fi
6239
6240 # Linux with Kerberos 5 and Kerberos 4.
6241 # Use "make linux+krb5 KFLAGS=-DNO_KRB5_INIT_ETS" if necessary.
6242 # Add "KFLAGS=-UCK_DES" if failure messages look DES-related.
6243 # UNTESTED (because I can't find a box with Krb4 and Krb5 installed)
6244 linux+krb5+krb4:
6245         @echo 'Making C-Kermit for Linux with Kerberos 4 and Kerberos 5'
6246         $(MAKE) linux+krb5 KTARGET=$${KTARGET:-$(@)} \
6247         "KFLAGS=-DKRB4 -DKRB524 $(KFLAGS)" "LIBS=$(LIBS) -lkrb4"
6248
6249 # Linux with OpenSSL 
6250 # In Linux, SSL libs are often in /lib or /usr/lib and so found by default.
6251 # This targets takes into account the DES library might or might not
6252 # exist.  If it does exist, however, the target will require some editing
6253 # if its basename is not libdes425.  - fdc Tue Sep 21 14:28:00 2010
6254 # IMPORTANT: Some Linux platforms have DES libraries but they are missing
6255 # functions used by Kermit.  In that case you will get fatal errors at
6256 # link time involving routines such as des_ecb3_encrypt, des_random_seed,
6257 # and des_set_odd_parity.  In that case, "make linux KFLAGS=-UCK_DES"
6258 # There's a new warning at the end that should come out if this happens,
6259 # and that should not come out if it didn't.
6260 #
6261 linux+ssl linux+openssl linux+openssl+zlib+shadow+pam linux+openssl+shadow:
6262         @echo 'Making C-Kermit $(CKVER) for Linux+OpenSSL SSLLIB=$(SSLLIB)'
6263         @case `openssl version` in \
6264           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6265           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6266           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6267           *) OPENSSLOPTION="" ;; \
6268         esac; \
6269         HAVE_DES=''; \
6270         DES_LIB=''; \
6271         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6272            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6273               DES_LIB='-ldes425'; \
6274               HAVE_DES='-DCK_DES -DLIBDES'; \
6275               echo "HAVE DES"; \
6276            else echo "NO DES"; \
6277         fi; \
6278         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6279         "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
6280         -DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6281         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6282         "LIBS = $(SSLLIB) -lssl $$DES_LIB -lcrypto -lpam -ldl -lz $(LIBS)" ; \
6283         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
6284                 echo ""; \
6285                 echo "If build failed try:"; \
6286                 echo ""; \
6287                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
6288                 echo ""; \
6289         fi
6290
6291 # Linux with Kerberos 5 and OpenSSL
6292 # OK 2011/05/16
6293 # Add -UCK_DES if functions like des_ecb3_encrypt, es_random_seed,
6294 # come up missing at link time.
6295 linux+krb5+ssl linux+krb5+openssl:
6296         @echo 'Making C-Kermit $(CKVER) for Linux with Krb5 and OpenSSL...'
6297         @case `openssl version` in \
6298           *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6299           *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6300           *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6301           *) OPENSSLOPTION="" ;; \
6302         esac; \
6303         HAVE_DES=''; \
6304         DES_LIB=''; \
6305         if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6306            ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6307               DES_LIB='-ldes425'; \
6308               HAVE_DES='-DCK_DES -DLIBDES'; \
6309               echo "HAVE DES"; \
6310            else echo "NO DES"; \
6311         fi; \
6312         K5CRYPTO=''; \
6313         if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6314                 K5CRYPTO='-lk5crypto'; \
6315         else if ls /usr/lib/libk5crypto* > /dev/null 2> /dev/null; then \
6316                 K5CRYPTO='-lk5crypto'; \
6317         else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
6318                 K5CRYPTO='-lk5crypto'; \
6319                 else if ls /usr/lib/$(MULTIARCH)/libk5crypto* > /dev/null 2> /dev/null; then \
6320                                         K5CRYPTO='-lk5crypto'; \
6321         fi; fi; fi; fi; \
6322         COM_ERR=''; \
6323         if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6324                 COM_ERR='-lcom_err'; \
6325         else if ls /lib/$(MULTIARCH)/libcom_err* > /dev/null 2> /dev/null; then \
6326                 COM_ERR='-lcom_err'; \
6327         fi; fi; \
6328         GSSAPILIB='-lgssapi'; \
6329         if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6330                 GSSAPILIB='-lgssapi_krb5'; \
6331         else if ls /usr/lib/$(MULTIARCH)/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6332                 GSSAPILIB='-lgssapi_krb5'; \
6333         else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6334                 if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6335                         GSSAPILIB='-lgssapi_krb5'; \
6336         fi; fi; fi; \
6337         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6338         "KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6339         -DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6340         -DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6341         -I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6342         "LIBS = $(K5LIB) $(SSLLIB) -lssl $$DES_LIB -lpam -lz \
6343         -lcrypto $$GSSAPILIB -lkrb5 $$K5CRYPTO $$COM_ERR $(LIBS)" ; \
6344         if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
6345                 echo ""; \
6346                 echo "If build failed try:"; \
6347                 echo ""; \
6348                 echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
6349                 echo ""; \
6350         fi
6351
6352 # ::BEGIN_OLD_LINUX_TARGETS::
6353
6354 # The remaining Linux entries are for special or customized builds.  They have
6355 # not been generalized ("subroutinized") like the ones above.  Ideally, we
6356 # should allow for every combination of libc vs glibc, gcc vs egcs, curses vs
6357 # ncurses, Kerberos IV vs Kerberos V vs SRP (in any combination), and so on.
6358 # The best way to do this is to set KFLAGS and LIBS values and then chain to
6359 # the main "linux" target, as in the examples just above.  To skip past all of
6360 # these old targets (and there are many) search for ::END_OLD_LINUX_TARGETS::
6361 # (after this line).
6362
6363 #Sharp Zaurus SL-5500 - Linux based
6364 zsl5500:
6365         @echo 'Making C-Kermit $(CKVER) for Sharp Zaurus SL-5500...'
6366         @touch ckcpro.c
6367         @touch wart
6368         $(MAKE) linuxnc KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DZSL5500" \
6369         "CC = gcc" "CC2 = gcc"
6370
6371 #Mklinux DR3 has horrible bug in <utmpbits.h> - see ckufio.c.
6372 mklinux:
6373         $(MAKE) KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DUTMPBUG" \
6374         "LIBS=-lcrypt -lresolv" linuxa
6375
6376 #LinuxPPC 1999
6377 linuxppc:
6378         @echo 'Making C-Kermit $(CKVER) for LinuxPPC 1999...'
6379         @if test -f /usr/lib/libcrypt.a; then \
6380             if test -f /usr/lib/libresolv.a; then \
6381                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6382                 "KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6383                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6384                 "LIBS=-lncurses -lresolv -lcrypt" linuxa ; \
6385             else \
6386                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6387                 "KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6388                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6389                 "LIBS=-lncurses -lcrypt" linuxa ; \
6390             fi \
6391         else \
6392             if test -f /usr/lib/libresolv.a; then \
6393                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6394                 "KFLAGS=$(NCURSES_CPP) \
6395                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6396                 "LIBS=-lncurses -lresolv" linuxa ; \
6397             else \
6398                 $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6399                 "KFLAGS=$(NCURSES_CPP) \
6400                 -DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6401                 "LIBS=-lncurses" linuxa ; \
6402             fi \
6403         fi
6404
6405
6406 # Like "make linux" but built with egcs rather than gcc.
6407 # If you get "Internal compiler error xxx, output pipe has been closed",
6408 # try removing -pipe.
6409 linuxegcs:
6410         @echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later with egcs...'
6411         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = egcs" "CC2 = egcs" \
6412         "CFLAGS = -O -DLINUX -pipe -funsigned-char \
6413         -DPOSIX -DCK_POSIX_SIG -DCK_NCURSES -DNOCOTFMC \
6414         -DTCPSOCKET -DLINUXFSSTND $(KFLAGS)" \
6415         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lncurses -lcrypt -lresolv"
6416
6417 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1 (no K4 compatibility).
6418 linux+krb5-old:
6419         @echo 'Making C-Kermit $(CKVER) for Linux on Intel with Kerberos...'
6420         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6421         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6422         -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6423         -DCK_ENCRYPTION -DCK_DES -DCK_CURSES -DCK_POSIX_SIG \
6424         -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H $(K5INC) $(K5INC)/krb5 \
6425         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6426         "LIBS = $(K5LIB) -lncurses -ltermcap -ldes425 -lkrb5 \
6427         -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6428
6429 # Linux on Intel PC with SRP 1.7.4 using GNU MP, Krypto, and Eric Young's
6430 # DES library.  Remove the -DCK_DES, -DLIBDES and -ldes if you do not have
6431 # Eric Young's# libdes.a installed.
6432 #
6433 linux+srp+gmp:
6434         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6435         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6436         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6437         -DCK_AUTHENTICATION -DCK_SRP \
6438         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6439         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6440         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6441         "LIBS = $(SRPLIB) \
6442         -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto -lcrypt -lresolv"
6443
6444 linux+srp+gmp+no-des:
6445         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP ...'
6446         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6447         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6448         -DCK_AUTHENTICATION -DCK_SRP \
6449         -DCK_ENCRYPTION -DCK_CAST \
6450         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6451         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6452         "LIBS = $(SRPLIB) \
6453         -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lresolv"
6454
6455 linux+srp+gmp-export:
6456         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6457         $(MAKE) srpmit-export KTARGET=$${KTARGET:-$(@)} \
6458         "CC = gcc" "CC2 = gcc" \
6459         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6460         -DCK_AUTHENTICATION -DCK_SRP -DFNFLOAT \
6461         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6462         $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6463         "LIBS = $(SRPLIB) \
6464         -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lm -lresolv"
6465
6466 linux+srp+gmp+pam:
6467         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6468         $(MAKE) srpmit 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 \
6472         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6473         -DCK_PAM -DFNFLOAT $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6474         "LIBS = $(SRPLIB) -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto \
6475         -lcrypt -lpam -ldl -lm -lresolv"
6476
6477 #Linux on Intel PC with SRP 1.7.4 built with OpenSSL for Big Number Math
6478 #and Cryptographic functionality.
6479 #
6480 linux+srp:
6481         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6482         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6483         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6484         -DCK_AUTHENTICATION -DCK_SRP \
6485         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6486         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6487         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6488         "LIBS = $(SRPLIB) $(SSLLIB) \
6489         -lncurses -ltermcap -lsrp -lkrypto -lcrypto -lcrypt -lresolv"
6490
6491 linux+srp+pam:
6492         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6493         $(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6494         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6495         -DCK_AUTHENTICATION -DCK_SRP \
6496         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6497         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6498         -DCK_PAM -DFNFLOAT $(SRPINC) $(SSLINC) $(KFLAGS)" \
6499         "LNKFLAGS = $(LNKFLAGS)" \
6500         "LIBS = $(SRPLIB) $(SSLLIB) -lncurses -ltermcap -lsrp -lkrypto \
6501         -lcrypto -lcrypt -lpam -ldl -lm -lresolv"
6502
6503 #Linux on Intel PC with SRP and SSL/TLS.
6504 #
6505 # libsrp.a should be build with OpenSSL
6506 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6507 #Remove -ltermcap if it causes trouble e.g. in Debian 2.2.
6508 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6509 linux+srp+openssl:
6510         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6511         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6512         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6513         -DCK_AUTHENTICATION -DCK_SRP \
6514         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6515         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6516         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6517         "LIBS = $(SRPLIB) $(SSLLIB) \
6518         -lncurses -ltermcap -lsrp -lssl -lkrypto -lcrypto \
6519         -lcrypt -lresolv"
6520
6521 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2 and SRP.
6522 #
6523 # libsrp.a should be build with GNU MP (libgmp.a)
6524 # instead of AT&T CryptoLib (libcrypt.a) due to naming conflicts with
6525 # standard distribution Linux libraries.
6526 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6527 linux+krb5+krb4+srp:
6528         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB54+SRP...'
6529         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6530         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6531         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6532         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6533         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6534         $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6535         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6536         "LIBS = $(K5LIB) $(SRPLIB) \
6537         -lncurses -ltermcap -lsrp -lgmp -lgssapi_krb5 -lkrypto \
6538         -ldes -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv"
6539
6540 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6541 #
6542 # libsrp.a should be build with OpenSSL
6543 # Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6544 # Requires OpenSSL 0.9.6a or higher
6545 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6546 linux+krb5+krb4+srp+openssl:
6547         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6548         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6549         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6550         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6551         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6552         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6553         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6554         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6555         "LIBS = $(K5LIB) $(SRPLIB) $(SSLLIB) \
6556         -lncurses -ltermcap -lsrp \
6557         -lkrb4 -lssl -lkrypto -lcrypto \
6558         -lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6559
6560 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SSL/TLS.
6561 #
6562 # libsrp.a should be build with OpenSSL
6563 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6564 #If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6565 linux+krb5+krb4+openssl:
6566         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6567         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6568         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6569         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6570         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6571         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6572         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6573         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6574         "LIBS = $(K5LIB) $(SSLLIB) \
6575         -lncurses -ltermcap \
6576         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6577         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6578
6579 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SSL/TLS.
6580 #
6581 # libsrp.a should be build with OpenSSL
6582 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6583 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6584 linux+krb5+krb4+openssl+shadow:
6585         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6586         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6587         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6588         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6589         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6590         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6591         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6592         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6593         "LIBS = $(K5LIB) $(SSLLIB)  \
6594         -lncurses -ltermcap \
6595         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6596         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6597
6598 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2, SSL/TLS.
6599 #
6600 # libsrp.a should be build with OpenSSL
6601 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6602 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6603 linux+krb5+krb4+openssl+zlib+shadow:
6604         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6605         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6606         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6607         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 -DZLIB \
6608         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6609         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6610         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6611         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6612         "LIBS = $(K5LIB) $(SSLLIB) \
6613         -lncurses -ltermcap \
6614         -lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6615         -lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lz"
6616
6617 linux+krb5+krb4+srp-export:
6618         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6619         $(MAKE) xermit-export KTARGET=$${KTARGET:-$(@)} \
6620         "CC = gcc" "CC2 = gcc" \
6621         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6622         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6623         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6624         $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6625         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6626         "LIBS = $(SRPLIB) $(K5LIB) \
6627         -lncurses -ltermcap -lsrp -lgmp -lkrb4 -ldes425 -lkrb5 -lgssapi_krb5 \
6628         -lcom_err -lk5crypto -lkrypto -lcrypt -lresolv"
6629
6630 linux+krb5+krb4+srp+pam:
6631         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6632         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6633         "CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6634         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6635         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6636         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6637         -DCK_PAM $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6638         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6639         "LIBS = $(SRPLIB) $(K5LIB) \
6640         -lncurses -ltermcap -lsrp -lgmp -ldes -lkrb4 -ldes425 -lkrb5 \
6641         -lcom_err -lk5crypto -lgssapi_krb5 -lkrypto -lcrypt -lpam -ldl \
6642         -lresolv"
6643
6644 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6645 # and PAM.
6646 #
6647 # libsrp.a should be build with OpenSSL
6648 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6649 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6650 linux+krb5+krb4+srp+openssl+pam-debug:
6651         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6652         $(MAKE) xermit-debug KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6653         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6654         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6655         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6656         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6657         -w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG $(K5INC) $(K5INC)/krb5 \
6658         $(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6659         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6660         -lncurses -ltermcap -lsrp -lkrb4 -lssl -lkrypto -lcrypto \
6661         -lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lpam -ldl"
6662
6663 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SRP and SSL/TLS.
6664 # and PAM.
6665 #
6666 # libsrp.a should be build with OpenSSL
6667 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6668 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6669 linux+krb5+krb4+srp+openssl+pam:
6670         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6671         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6672         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6673         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6674         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6675         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6676         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6677         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6678         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB)  \
6679         -lm -lncurses -ltermcap -lsrp \
6680         -lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6681         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6682
6683 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6684 # with ZLIB and PAM
6685 #
6686 # libsrp.a should be build with OpenSSL
6687 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6688 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6689 linux+krb5+krb4+srp+openssl+zlib+pam:
6690         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6691         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6692         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6693         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6694         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6695         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6696         $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6697         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6698         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6699         -lm -lncurses -ltermcap -lsrp \
6700         -lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6701         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6702
6703 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6704 # with ZLIB, Shadow Passwords, and PAM
6705 #
6706 # libsrp.a should be build with OpenSSL
6707 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6708 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6709 linux+krb5+krb4+srp+openssl+zlib+shadow+pam:
6710         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6711         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6712         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6713         -DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6714         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6715         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6716         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6717         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6718         "LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6719         -lm -lncurses -ltermcap -lsrp -lkrypto \
6720         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6721         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6722
6723 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6724 # with Shadow Passwords, PAM
6725 #
6726 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6727 linux+krb5+krb4+openssl+shadow+pam:
6728         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL,...'
6729         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6730         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6731         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6732         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6733         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6734         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6735         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6736         "LIBS = $(K5LIB) $(SSLLIB) \
6737         -lm -lncurses -ltermcap \
6738         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6739         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6740
6741 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6742 # with ZLIB, Shadow Passwords, PAM
6743 #
6744 # libsrp.a should be build with OpenSSL
6745 # Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6746 # If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6747 linux+krb5+krb4+openssl+zlib+shadow+pam:
6748         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6749         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6750         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6751         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6752         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6753         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6754         -DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6755         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6756         "LIBS = $(K5LIB) $(SSLLIB) \
6757         -lm -lncurses -ltermcap \
6758         -lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6759         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6760
6761 #Red Hat 9 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6762 #Also works around bug in curses in which terminal goes dead after
6763 #returning from file-transfer display.  Assumes OpenSSL 0.9.7 or later.
6764 redhat9:
6765         @echo "Building SECURE Kermit for Red Hat 9.0..."
6766         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6767         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6768
6769 #Ditto plus SRP (which is not normally included with RH Linux).
6770 redhat9+srp:
6771         @echo "Building SECURE Kermit for Red Hat 9.0..."
6772         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6773         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6774
6775 #For Red Hat AS 2.1 with OpenSSL
6776 redhat21+ssl:
6777         @echo "Building SECURE Kermit for Red Hat 2.1..."
6778         $(MAKE) linux+openssl+zlib+shadow+pam \
6779         KTARGET=$${KTARGET:-$(@)} "KFLAGS =  $(KFLAGS)"
6780
6781 #Red Hat Linux 8.0 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6782 #Also works around bug in curses in which terminal goes dead after
6783 #returning from file-transfer display.
6784 redhat80:
6785         @echo "Building SECURE Kermit for Red Hat 8.0..."
6786         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6787         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6788
6789 redhat80+srp:
6790         @echo "Building SECURE Kermit for Red Hat 8.0..."
6791         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6792         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6793
6794 #Red Hat Linux 7.3 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6795 #Also works around bug in curses in which terminal goes dead after
6796 #returning from file-transfer display.
6797 redhat73:
6798         @echo "Building SECURE Kermit for Red Hat 7.3..."
6799         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6800         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6801
6802 redhat73+srp:
6803         @echo "Building SECURE Kermit for Red Hat 7.3..."
6804         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6805         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6806
6807 #Red Hat Linux 7.2 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6808 #Also works around bug in curses in which terminal goes dead after
6809 #returning from file-transfer display.
6810 redhat72:
6811         @echo "Building SECURE Kermit for Red Hat 7.2..."
6812         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6813         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6814
6815 redhat72+srp:
6816         @echo "Building SECURE Kermit for Red Hat 7.2..."
6817         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6818         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6819
6820 #Red Hat Linux 7.1 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6821 #Also works around bug in curses in which terminal goes dead after
6822 #returning from file-transfer display.
6823 redhat71:
6824         @echo "Building SECURE Kermit for Red Hat 7.1..."
6825         $(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6826         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6827
6828 redhat71+srp:
6829         @echo "Building SECURE Kermit for Red Hat 7.1..."
6830         $(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6831         KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6832
6833 #Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6834 # with ZLIB and PAM and Shadow passwords
6835 linux+krb5+openssl+zlib+shadow+pam:
6836         @echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB5,SSL...'
6837         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6838         "CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6839         -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DCK_SHADOW -DHAVE_PTMX \
6840         -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6841         -DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6842         $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6843         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6844         "LIBS = $(K5LIB) $(SSLLIB) \
6845         -lm -lncurses -ltermcap -lssl -lcrypto -lgssapi_krb5 \
6846         -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6847
6848 linuxnotcp:
6849         $(MAKE) linux KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DNONET $(KFLAGS)"
6850
6851 # "make linuxnotcp" with lcc (see http://www.cs.princeton.edu/software/lcc)
6852 # lcc does not understand various gcc extensions:
6853 #  "__inline__" -- can be eliminated by adding "-D__inline__="
6854 #  "__asm__ and "long long" -- in header files, should be surrounded by
6855 #                              "#ifndef(__STRICT_ANSI__)"/"#endif"
6856 #  however, TCP requires some __asm__ functions, so cannot be compiled
6857 linuxnotcp-lcc:
6858         @echo 'Making C-Kermit $(CKVER) for Linux with lcc ...'
6859         @echo 'Read comments in makefile for additional information.'
6860         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = lcc" "CC2 = lcc" \
6861         "CFLAGS = -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG \
6862         -UTCPSOCKET -DLINUXFSSTND -DNOLEARN $(KFLAGS)" \
6863         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6864
6865 # Linux 0.99.14 thru 1.0 with gcc, dynamic libraries, curses, TCP/IP.
6866 # For Linux 1.2 or later, use "make linux" (above).
6867 #
6868 # -DLINUXFSSTND (Linux File System Standard) gives UUCP lockfile /var/lock with
6869 # string pid.  Remove this and get /usr/spool/uucp with int pid, which was used
6870 # in early Linux versions.
6871 #
6872 # If you get compiler errors regarding <linux/serial.h>, add -DNOHISPEED.
6873 #
6874 # -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
6875 # least 0.99.14; if it causes trouble for you, just remove it.
6876 #
6877 # -DCK_CURSES: Here we link with the regular curses library.  But you should
6878 # be using ncurses.  Internally, the ckuusx.c module includes <curses.h>, but
6879 # this really should be <ncurses.h>.  Thus if you have the new curses
6880 # material, you should either install it with the standard names, or else
6881 # create symbolic links from the standard names to the new ones.  If you get
6882 # compile-time errors complaining about data definitions in termcap.h, it
6883 # means you have new kernel material mixed with older libc header files.  To
6884 # fix, add "#include <termios.h>" to the <termcap.h> file.  Or if all this is
6885 # too confusing, create a new makefile entry based on this one, but with
6886 # -DCK_CURSES removed from CFLAGS and the entire LIBS= clause removed.
6887 #
6888 # But wait, there's more.  On most Linux systems, -ltermcap must be included
6889 # in LIBS.  But on others, the linker complains that libtermcap can't be
6890 # found.  In that case, try removing -ltermcap from LIBS=.
6891 #
6892 # But wait, there's more.  The format of the PID string in the UUCP lockfile
6893 # changed between Linux FSSTND 1.0 and 1.2.  In the earlier standard, it had
6894 # leading zeros; in the second, it has leading spaces.  By default this entry
6895 # uses the newer standard.  To force the older one, add -DFSSTND10.
6896 #
6897 # "The nice thing about the Linux standard is there are so many to choose from"
6898 #
6899 # NOTE: Remove -DBIGBUFOK for small-memory or limited-resource systems.
6900 linux10:
6901         @echo 'Making C-Kermit $(CKVER) for Linux 1.0 or earlier...'
6902         @echo 'IMPORTANT: Read the comments in the linux section of the'
6903         @echo 'makefile if you get compilation or link errors.'
6904         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6905         "CFLAGS = -O -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DLINUX \
6906         -DTCPSOCKET -DLINUXFSSTND -DOLINUXHISPEED -DNOLEARN $(KFLAGS)" \
6907         "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6908
6909 #This version was used for Linux prior to C-Kermit 6.0.192.
6910 #Now the "Linux File System Standard" is considered standard, ditto TCP/IP.
6911 linuxold:
6912         @echo 'Making C-Kermit $(CKVER) for Linux...'
6913         @echo 'For FSSTND-recommended UUCP lockfiles, use:'
6914         @echo '  make linux "KFLAGS=-DLINUXFSSTND".'
6915         @echo 'Read comments in makefile for additional options.'
6916         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6917         "CFLAGS = -O -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DNOLEARN \
6918         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6919
6920 # ::END_OLD_LINUX_TARGETS::
6921
6922 # LynxOS 2.2 with GCC compiler, TCP/IP and fullscreen display.
6923 # Probably also works with Lynx 2.1, and maybe even Lynx 2.0.
6924 # -X means use termios serial drivers rather than BSD4.3-style sgtty drivers.
6925 # If you have trouble with this, try "make bsd KFLAGS=-DNOFDZERO".
6926 lynx:
6927         @echo 'Making C-Kermit $(CKVER) for LynxOS 2.2 with TCP/IP'
6928         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6929         "CFLAGS= -O -DPOSIX -DDIRENT -DSETREUID -DCK_CURSES -DTCPSOCKET \
6930         -DCK_ANSIC -DLYNXOS -DNOLEARN" "LNKFLAGS = -X" "LIBS = -lcurses -lbsd"
6931
6932 lynx22:
6933         $(MAKE) lynx KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
6934
6935 # LynxOS 2.1 with GCC compiler 1.40 and TCP/IP.
6936 lynx21:
6937         @echo 'Making C-Kermit $(CKVER) for LynxOS 2.1 with TCP/IP'
6938         $(MAKE) kermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6939         "CFLAGS= -O -DSETREUID -DTCPSOCKET -DCK_ANSIC -DBSD4 -DLYNXOS" \
6940         "LIBS = -lbsd"
6941
6942 #SCO Xenix 2.2.1 for IBM PC, XT, PS2/30, or other 8088 or 8086 machine
6943 #Should this not work, try some of the tricks from sco286.
6944 #NOTE: -DRENAME is omitted for early SCO Xenix releases because it didn't
6945 #exist, or its semantics were different from the later POSIX-compliant
6946 #version of rename().
6947 sco86:
6948         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/86...'
6949         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6950         "CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOUNICODE -DNOLEARN \
6951         $(KFLAGS) -Dunix -F 3000 -i -M0me" \
6952         "LNKFLAGS = -F 3000 -i -s -M0me" "LIBS = -lx"
6953
6954 #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
6955 #Reportedly, this "make" can fail simply because of the size of this
6956 #makefile.  If that happens, use "makeL", or edit out some of the
6957 #other entries.  No debugging or character-set translation.
6958 sco286:
6959         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/286...'
6960         @echo 'If make fails, try using makeL.'
6961         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6962         "CFLAGS= -xenix -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
6963         -DNOIKSD -DNODEBUG -DNOTLOG -DNOCSETS -DNOLEARN \
6964         $(KFLAGS) -F 3000 -i -M2let16" \
6965         "LIBS = -lx" "LNKFLAGS = -xenix -s -O -LARGE -F 3000 -i -M2let16"
6966
6967 #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
6968 #As above, but with HDBUUCP (This one might need fixing -- see sco286).
6969 sco286hdb:
6970         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/286 with HDB UUCP...'
6971         @echo 'If make fails, try using makeL.'
6972         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6973         "CFLAGS= -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
6974         -DHDBUUCP -DNOIKSD -DNOUNICODE -DNOLEARN \
6975         $(KFLAGS) -F 3000 -i -M2let32" \
6976         "LIBS = -lx" "LNKFLAGS = -s -O -LARGE -F 3000 -i -M2let32"
6977
6978 #SCO Xenix/386 2.2.2 and 2.2.3
6979 sco386:
6980         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.2...'
6981         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6982         "CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOREDIRECT -DNOLEARN \
6983         -Dunix -DRDCHK -DNAP -DNOUNICODE $(KFLAGS) -Otcl -M3e" \
6984         "LNKFLAGS = -s" "LIBS = -lx"
6985
6986 #SCO XENIX/386 2.2.3 with Excelan TCP/IP + curses.
6987 # NOTE: This one might need some work in C-Kermit 6.0.
6988 # You might need to include /usr/include/sys/types.h
6989 # containing "typedef char *caddr_t;".  Then at least it compiles.
6990 sco386netc:
6991         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.3 + Excelan TCP'
6992         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6993         "CFLAGS= -I/usr/include/exos -DXENIX -DCK_CURSES -DNOUNICODE \
6994         -Dunix -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC -DNOMKDIR -DNOFILEH \
6995         -DNOLEARN -DNOREDIRECT -DNOIKSD -DNO_DNS_SRV $(KFLAGS) -Otcl -M3e" \
6996         "LNKFLAGS = -s" "LIBS = -lc -lx -lsocket -lcurses -ltermcap"
6997
6998 #SCO XENIX/386 2.3.3 with gcc 1.37 or later...
6999 sco386gcc:
7000         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
7001         @echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
7002         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
7003         "CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
7004         -DNOJC -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) \
7005         -traditional -fpcc-struct-return -fstrength-reduce \
7006         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
7007         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7008         -DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD -DNOREDIRECT \
7009         -DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx"
7010
7011 #As above, but with curses...
7012 sco386gccc:
7013         @echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
7014         @echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
7015         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
7016         "CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
7017         -DNOJC -DNODEBUG -DCK_CURSES -DNOUNICODE -DNOLEARN $(KFLAGS) \
7018         -traditional -fpcc-struct-return -fstrength-reduce \
7019         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DNOREDIRECT \
7020         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7021         -DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD \
7022         -DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx -lcurses -ltermlib"
7023
7024 #SCO UNIX (and ODT) entries...
7025 #
7026 #NOTE: All SCO UNIX entry LIBS should have "-lc_s -lc -lx" IN THAT ORDER (if
7027 #shared C library is desired), or else "-lc -lx" IN THAT ORDER.  Use shared C
7028 #libraries to save memory, but then don't expect to run the resulting binary
7029 #on a different machine.  When using -lc_s, you must also use -lc, because the
7030 #shared C library does not contain all of libc.a.  And in all cases, -lc must
7031 #ALWAYS precede -lx.
7032 #
7033 #ANOTHER NOTE: -DRENAME is included in all SCO UNIX entries.  Remove it if it
7034 #causes trouble.  No harm is done by removing it (see ckuins.txt).
7035 #
7036 #AND ANOTHER: In theory, it should be possible to run SCO UNIX binaries on
7037 #SCO Xenix 2.3 and later.  In practice, this might not work because of the
7038 #libraries, etc.  Also, don't add the -link -z switch (which is supposed to
7039 #root out references to null pointers) because it makes UNIX binaries core
7040 #dump when they are run under Xenix.
7041
7042 #NOTE: -Otcl removed and replaced by -O, since -Otcl produced incorrect code.
7043 #SCO UNIX/386 3.2.0, 3.2.1, and SCO Xenix 2.3.x
7044 sco3r2:
7045         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.0 or 3.2.1 ...'
7046         @echo 'Warning: If make blows up, edit the makefile to join'
7047         @echo 'the following three continued lines into one line.'
7048         @echo 'Also, remove -DRENAME if _rename unresolved at link time.'
7049         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7050         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7051         -DRENAME -DNOIKSD -DNOJC $(KFLAGS) -O" \
7052         "LNKFLAGS = -s" "LIBS = -lc -lx"
7053
7054 #SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7055 #In case of compilation or runtime problems, try adding
7056 #"-DUID_T=int -DGID_T=int" to the CFLAGS.  If that doesn't work, try
7057 #"-DUID_T=uid_t -DGID_T=gid_t".
7058 sco3r2net:
7059         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan...'
7060         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7061         "CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7062         -DHDBUUCP -DRDCHK -DNAP -DRENAME -DTCPSOCKET -DEXCELAN -DNOJC \
7063         -DNOIKSD -DNOREDIRECT $(KFLAGS) -O" \
7064         "LNKFLAGS = -s" "LIBS = -lc -lx -lsocket"
7065
7066 #SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7067 #As above, with curses added.
7068 sco3r2netc:
7069         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan / curses...'
7070         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7071         "CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7072         -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC $(KFLAGS) \
7073         -DRENAME -DCK_CURSES -DNOREDIRECT -DNOIKSD -O" "LNKFLAGS = -s" \
7074         "LIBS = -lc -lx -lsocket -lcurses -ltermcap"
7075
7076 #SCO UNIX 3.2.x or SCO Xenix 2.3.x with Racal InterLan TCP/IP support
7077 # Extra compile flags for other version of Racal InterLan TCP/IP:
7078 # Xenix286/NP621-286, use -Ml -DPARAMH -DINTERLAN -Di286 -DSYSV
7079 # Xenix386/NP621-386, use -DPARAMH -DINTERLAN -Di386 -DSYSV
7080 # ISC386ix/NP622I, use -DSYSV -Di386
7081 # SCO Unix3.2/NP622S, use -DSYSV -Di386 -DSCO_UNIX
7082 # AT&T SVR3.2/NP622A, use -DSYSV -Di386 -DATT
7083 sco3r2netri:
7084         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Racal InterLan...'
7085         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7086         "CFLAGS= -I/usr/include/interlan -DXENIX -DNOFILEH -DHDBUUCP \
7087         -DSVR3 -DRDCHK -DNAP -DTCPSOCKET -DPARAMH -DINTERLAN -Di386 -DSYSV \
7088         -DRENAME -DNOREDIRECT -DNOIKSD -DNOJC -DNOLEARN $(KFLAGS) -Otcl -M3e" \
7089         "LNKFLAGS = -s" "LIBS = -lc -lx -ltcp"
7090
7091 # SCO XENIX/386 2.3.3 SysV with SCO TCP/IP
7092 # System V STREAMS TCP developed by Lachman Associates Inc and
7093 # Convergent Technologies.
7094 # -DRENAME removed since some reports indicate it is not supported
7095 # (whereas others say it is.)
7096 sco3r2lai:
7097         @echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7098         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7099         "CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7100         -DNAP -DTCPSOCKET -DPWID_T=int -DNOREDIRECT -DNOIKSD -DNOLEARN \
7101         $(KFLAGS) -Otcl -i -M3e" \
7102         "LNKFLAGS = -i -s" "LIBS = -lc -lx -lsocket"
7103
7104 sco3r2laic:
7105         @echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7106         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7107         "CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7108         -DNAP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES -DM_TERMINFO -DNOLEARN \
7109         -DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) -Otcl -i -M3e" \
7110         "LNKFLAGS = -i -s" "LIBS = -ltinfo -lc -lx -lsocket"
7111
7112 #SCO UNIX/386 3.2v2 (POSIX job control), shared libraries.
7113 sco3r22:
7114         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7115         make wermit KTARGET=$${KTARGET:-$(@)} \
7116         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7117         -DNAP -DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOIKSD \
7118         -DNOREDIRECT $(KFLAGS) -O" \
7119         "LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7120
7121 #SCO UNIX/386 3.2v2, POSIX job control, fullscreen file transfer display,
7122 #dynamic memory allocation, shared C library
7123 sco3r22c:
7124         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7125         @echo 'Warning: If make blows up, edit the makefile to join'
7126         @echo 'the following four continued lines into one line.'
7127         make wermit KTARGET=$${KTARGET:-$(@)} \
7128         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7129         -DCK_CURSES -DDIRENT -DRENAME -DNOREDIRECT -DNOIKSD \
7130         -DPID_T=pid_t -DPWID_T=int $(KFLAGS) -O" \
7131         "LNKFLAGS = -s" "LIBS = -lcurses -lc_s -lc -lx"
7132
7133 #SCO UNIX/386 3.2v2 with gcc 1.40 or later (POSIX job control)
7134 sco3r22gcc:
7135         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2, gcc'
7136         @echo 'Warning: If make blows up, edit the makefile to join'
7137         @echo 'the following seven continued lines into one line.'
7138         make wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" \
7139         "CFLAGS= -O -DPOSIX -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
7140         -DNOLEARN -DRENAME -traditional -fpcc-struct-return -fstrength-reduce \
7141         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
7142         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7143         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7144         -DPID_T=pid_t -DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) " \
7145         "LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7146
7147 #SCO UNIX/386 3.2v2 (ODT 1.1) (POSIX job control) with SCO TCP/IP, shared libs
7148 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7149 sco3r22net:
7150         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.2 + TCP/IP...'
7151         @echo 'Warning: If make blows up, edit the makefile to join'
7152         @echo 'the following three continued lines into one line.'
7153         make xermit KTARGET=$${KTARGET:-$(@)} \
7154         "CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET \
7155         -DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOREDIRECT -DNOIKSD \
7156         $(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lsocket -lc_s -lc -lx"
7157
7158 #As above, but with curses for fullscreen file transfer display.
7159 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7160 sco3r22netc:
7161         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 + TCP/IP...'
7162         @echo 'Warning: If make blows up, edit the makefile to join'
7163         @echo 'the following three continued lines into one line.'
7164         make xermit KTARGET=$${KTARGET:-$(@)} "CFLAGS= \
7165         -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DRENAME \
7166         -DCK_CURSES -DDIRENT -DNOIKSD -DNOREDIRECT \
7167         -DPID_T=pid_t -DPWID_T=int -O $(KFLAGS)" \
7168         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7169
7170 #SCO XENIX 2.3.4, no curses, no TCP/IP, no IKSD.
7171 #This one built and tested in C-Kermit 7.0.
7172 #lcfp is C library floating-point support.
7173 #Use -M3 to generate 32-bit i386 code instead of 16-bit segmented i286 code.
7174 #Use -Me to enable MS nonstandard keywords in system headers.
7175 #Use -W2 or W3 to increase the warning level.
7176 #OK: 2011/06/15
7177 sco234:
7178         @echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4...'
7179         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7180         "CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7181         -DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7182         -DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DSCO234 -DDCLGETCWD $(KFLAGS) \
7183         -Otcl" "LNKFLAGS = -s" "LIBS = -lcfp -lc -lx"
7184
7185 #SCO XENIX 2.3.4, no TCP/IP, no IKSD, but with curses.
7186 # Built and tested in C-Kermit 7.0.
7187 # Note: XENIX 2.3.4 does not have newterm() so no point in adding -DCK_NEWTERM.
7188 sco234c:
7189         @echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4 + curses...'
7190         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7191         "CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7192         -DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7193         -DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DCK_CURSES -DSCO234 \
7194         -DDCLGETCWD $(KFLAGS) -Otcl" \
7195         "LNKFLAGS = -s" "LIBS = -lcfp -lc -ltinfo -lx"
7196
7197 #SCO XENIX 2.3.4 with SCO TCP/IP and curses, no IKSD.
7198 # Built and tested in C-Kermit 7.0.  TCP/IP works and curses works.
7199 # Previous versions of this target included -lmalloc, but this caused "error:
7200 # " _calloc : symbol defined more than once" at link time so I removed it.
7201 # Results are likely to vary depending on exactly which version of the SDK
7202 # and TCP/IP SDK you have.
7203 sco234netc:
7204         @echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4 + TCP + curses...'
7205         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7206         "CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7207         -DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7208         -DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DCK_CURSES -DSCO234 \
7209         -DDCLGETCWD -DTCPSOCKET -DNO_DNS_SRV $(KFLAGS) -Otcl" \
7210         "LNKFLAGS = -s" "LIBS = -ltinfo -lsocket -lcfp -lc -lx"
7211
7212 # SCO 3.2v4.x targets...
7213
7214 #  NOTE: Add -DDCLPOPEN and/or -DDCLFDOPEN to anySCO 3.2v4.x non-gcc entries
7215 #  that complain about fdopen() or popen() at compile time.  They compile OK
7216 #  without these flags as of July 1999.  However, the gcc entries seem to
7217 #  need them, at least for gcc 2.7.2.2.
7218
7219 #  NOTE 2: To enable IKSD support, add:
7220 #  -DCK_LOGIN -DNOGETUSERSHELL -DNOINITGROUPS
7221 #  to CFLAGS (not tested).
7222
7223 #SCO UNIX/386 3.2v4 (POSIX job control), curses, ANSI C compilation,
7224 #<dirent.h> (EAFS) file system.  Remove -lmalloc if it causes trouble.  It was
7225 #put there to avoid core dumps caused by regular libc.a malloc.  Add -J to make
7226 #all chars unsigned.  This version uses select() for CONNECT and also has
7227 #high-precision timers and so might not work on non-TCP systems, in which case
7228 #sco32v4ns should be used instead.
7229 # If you get _ftime redefinition_ complaint, try adding -DODT30 to CFLAGS.
7230 sco32v4:
7231         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7232         make xermit KTARGET=$${KTARGET:-$(@)} \
7233         "CFLAGS= -DCK_SCO32V4 -DNOFILEH -DHDBUUCP -DCK_CURSES -DM_TERMINFO \
7234         -DNOANSI -DSELECT -DNOIKSD -DDCLGETCWD -NOLSTAT \
7235         -DNOLINKBITS -DDCLGETCWD $(KFLAGS) -O" \
7236         "LNKFLAGS = -s" "LIBS = -lcurses -lmalloc -lsocket -lc_s -lc -lx"
7237
7238 # As above, but with no dependence on sockets library or select().
7239 sco32v4ns:
7240         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7241         @echo 'No select() and no sockets library.'
7242         make wermit KTARGET=$${KTARGET:-$(@)} \
7243         "CFLAGS= -DCK_SCO32V4 -DNOFILEH -DHDBUUCP -DCK_CURSES -DM_TERMINFO \
7244         -DNOANSI -DNOIKSD -DNOGFTIMER -DCK_POLL -DNAP -DDCLGETCWD -DNOLSTAT \
7245         -DNOLINKBITS -DDCLGETCWD -DNOLEARN -O $(KFLAGS)" \
7246         "LNKFLAGS = -s" "LIBS = -lcurses -lmalloc -lc_s -lc -lx"
7247
7248 #SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7249 #<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7250 #Reportedly it's OK to add -DCK_REDIR and -DCK_WREFRESH, and to remove -lc_s.
7251 #Requires SCO TCP/IP development system or ODT for telnet.h, etc.
7252 #See sco32v4 above for additional comments.
7253 #NOTE: No more room for -Dxxx -- 25 seems to be the limit.  Move some to
7254 #ckcdeb.h or somewhere...
7255 sco32v4net:
7256         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7257         @echo 'If you get _ftime redefinition_ complaint,'
7258         @echo 'use make sco-odt30.'
7259         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7260         "CFLAGS= -DNOFILEH -DHDBUUCP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES \
7261         -DNAP -DCK_WREFRESH -DNOLINKBITS -D_IBCS2 -DSELECT -DNOLSTAT \
7262         -DDCLGETCWD -DCK_SCO32V4 -DNOIKSD -O \
7263         $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS) -s" \
7264         "LIBS = $(LIBS) -lcurses -lsocket -lmalloc -lsocket -lc_s -lc -lx"
7265
7266 #SCO UNIX/386 3.2v4 with gcc 1.40 or later, POSIX job control.
7267 #Also see comments in sco32r4 entry.
7268 sco32v4gcc:
7269         make xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" \
7270         "CFLAGS= -O -DNOFILEH -DHDBUUCP -DNOANSI -DCK_CURSES -DM_TERMINFO \
7271         -traditional -fpcc-struct-return -fstrength-reduce -funsigned-char \
7272         -D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLINKBITS \
7273         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DSELECT -DNOLSTAT \
7274         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 -DDCLGETCWD \
7275         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7276         -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) " \
7277         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7278
7279 #SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7280 #Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7281 #<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7282 #gcc 1.40 or later.  Also see comments in sco32r4 entry.
7283 sco32v4netgcc:
7284         make xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2=gcc" \
7285         "CFLAGS= -O2 -DNOFILEH -DHDBUUCP -DSELECT -DNOLSTAT \
7286         -DNOANSI -DTCPSOCKET -DCK_CURSES -DM_TERMINFO \
7287         -D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLINKBITS \
7288         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DDCLGETCWD \
7289         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7290         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7291         -DDCLPOPEN -DDCLFDOPEN $(KFLAGS)" \
7292         "LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7293
7294 #As above but with bgcc BOUNDS CHECKING (for developers only).  -lcheck has
7295 #bounds-checking replacements for malloc, memcpy, bcopy, etc, so must come
7296 #before -lsocket and -lc.
7297 sco32v4netbgcc:
7298         make xermit KTARGET=$${KTARGET:-$(@)} \
7299         "CC = bgcc -pipe -m386" "CC2=bgcc -pipe -m386" \
7300         "CFLAGS= -O1 -g -DNOFILEH -DHDBUUCP -DSELECT \
7301         -DNOANSI -DTCPSOCKET -DCK_CURSES -DM_TERMINFO \
7302         -D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLSTAT \
7303         -DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DNOLINKBITS \
7304         -DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 -DDCLGETCWD \
7305         -DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7306         -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) " \
7307         "LNKFLAGS = -g" "LIBS = -lcurses -lcheck -lsocket -lx"
7308
7309 sco32v4netnd:
7310         @echo sco32v4net with no debug
7311         $(MAKE) "MAKE=$(MAKE)" sco32v4net KTARGET=$${KTARGET:-$(@)} \
7312         "KFLAGS=$(KFLAGS) -DNODEBUG -DNOTLOG" "LIBS=$(LIBS)"
7313
7314 sco3r2netnd:
7315         @echo sco32v4netnd built for SCO XENIX 2.3 under SCO UNIX...
7316         @echo   requires copying /lib/386/Slibc.a to /lib/386/Slibc_s.a and
7317         @echo   getting /lib/386/Slibsocket.a from a XENIX devkit.
7318         @echo   WARNING: poll/CK_POLL supported only on XENIX 2.3.4
7319         echo    For earlier XENIX systems, replace CK_POLL with RDCHK.
7320         $(MAKE) "MAKE=$(MAKE)" sco32v4netnd KTARGET=$${KTARGET:-$(@)} \
7321         "KFLAGS=$(KFLAGS) -x2.3 -DNORENAME -DNOSYMLINK" \
7322         "LNKFLAGS = $(LNKFLAGS) -x2.3" \
7323         "LIBS=-ldir -lcfp $(LIBS)"
7324
7325 #SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7326 #<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7327 #Reportedly it's OK to add -DCK_REDIR and -DCK_WREFRESH, and to remove -lc_s.
7328 #Requires SCO TCP/IP development system or ODT for telnet.h, etc.
7329 #See sco32v4 above for additional comments.
7330 # Note: "xermit" means use the select() version of the CONNECT module.
7331 sco32v4netx:
7332         @echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7333         @echo 'If you get _ftime redefinition_ complaint,'
7334         @echo 'use make sco-odt30.'
7335         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7336         "CFLAGS= -DNOFILEH -DHDBUUCP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES -DNAP \
7337         -DCK_WREFRESH -DNOLINKBITS -D_IBCS2 -DSELECT -DDCLGETCWD \
7338         -DCK_SCO32V4 -DNOIKSD -DNOLSTAT -O $(KFLAGS)" \
7339         "LNKFLAGS = $(LNKFLAGS) -s" \
7340         "LIBS = $(LIBS) -lcurses -lsocket -lmalloc -lsocket -lc_s -lc -lx"
7341
7342 sco32v4netndx:
7343         @echo sco32v4netx with no debug
7344         $(MAKE) "MAKE=$(MAKE)" sco32v4netx KTARGET=$${KTARGET:-$(@)} \
7345         "KFLAGS=$(KFLAGS) -DNODEBUG -DNOTLOG" "LIBS=$(LIBS)"
7346
7347 sco3r2netndx:
7348         @echo sco32v4netndx built for SCO XENIX 2.3 under SCO UNIX...
7349         @echo   requires copying /lib/386/Slibc.a to /lib/386/Slibc_s.a and
7350         @echo   getting /lib/386/Slibsocket.a from a XENIX devkit.
7351         @echo   WARNING: poll/CK_POLL supported only on XENIX 2.3.4
7352         echo    For earlier XENIX systems, replace CK_POLL with RDCHK.
7353         $(MAKE) "MAKE=$(MAKE)" sco32v4netndx KTARGET=$${KTARGET:-$(@)} \
7354         "KFLAGS=$(KFLAGS) -x2.3 -DNORENAME -DNOSYMLINK" \
7355         "LNKFLAGS = $(LNKFLAGS) -x2.3" \
7356         "LIBS=-ldir -lcfp $(LIBS)"
7357
7358 sco-odt30:
7359         @echo SCO ODT 3.0
7360         $(MAKE) "MAKE=$(MAKE)" sco32v4net KTARGET=$${KTARGET:-$(@)} \
7361         "KFLAGS=$(KFLAGS) -DODT30"
7362
7363 #SCO OpenServer 5.0 (SCO UNIX 3.2v5.0) with SCO development tools, no TCP/IP.
7364 #SCO OSR5 is much more like standard System V than previous SCO releases.
7365 #The SCO development tools include TCP/IP, so this target is only for creating
7366 #artificially limited versions of kermit required by site policy rather than
7367 #the operating system.  NOSYSLOG is included because syslog() requires the
7368 #sockets library.
7369 sco32v500:
7370         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5...
7371         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7372         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7373         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7374         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DNOSYSLOG \
7375         $(KFLAGS)" \
7376         "LIBS=-lcurses $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7377
7378 sco32v5:
7379         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v500
7380
7381
7382 #SCO OpenServer 5.0 with networking, SCO development tools.
7383 #Networking libraries are now provided with the OS.
7384 sco32v500net:
7385         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5...
7386         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7387         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7388         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7389         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7390         -DNO_DNS_SRV $(KFLAGS)" \
7391         "LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7392
7393 sco32v5net:
7394         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v500net
7395
7396 #SCO OpenServer 5.0 with networking and OpenSSL, SCO development tools.
7397 #Networking libraries are now provided with the OS.
7398 sco32v500net+ssl:
7399         @echo Making C-Kermit $(CKVER) for SCO OSR5 with OpenSSL...
7400         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7401         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7402         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7403         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7404         -DNO_DNS_SRV -DCK_AUTHENTICATION -DCK_SSL -DCK_TRIGGER \
7405         $(SSLINC) $(SSLLIB) $(KFLAGS)" \
7406         "LIBS=$(SSLLIB) -lcurses -lsocket -lssl -lcrypto $(LIBS)" \
7407         "LNKFLAGS=$(LNKFLAGS)"
7408
7409 #SCO OpenServer 5.0 with gcc, no networking.
7410 #Note: NOSYSLOG required for non-net entries because it requires <socket.h>
7411 sco32v500gcc:
7412         @echo Using gcc...
7413         $(MAKE) "MAKE=$(MAKE)" sco32v500CC=gcc CC2=gcc \
7414         KTARGET=$${KTARGET:-$(@)} "KFLAGS= $(KFLAGS)"
7415
7416 #SCO OpenServer 5.0 with networking, gcc.
7417 sco32v500netgcc:
7418         @echo TCP/IP networking added - using gcc...
7419         $(MAKE) "MAKE=$(MAKE)" sco32v500net CC=gcc CC2=gcc \
7420         KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
7421
7422 #SCO OpenServer 5.0 with networking, gcc, elf.
7423 sco32v500netgccelf:
7424         @echo TCP/IP networking added - using gcc, dynamic elf library
7425         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7426         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-O3 -belf" "LNKFLAGS=-belf"
7427
7428 sco32v502:
7429         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7430         "KFLAGS=-DSCO_OSR502 $(KFLAGS)"
7431
7432 #SCO OpenServer 5.0.2 with networking, SCO development tools.
7433 sco32v502net:
7434         @echo TCP/IP networking added...
7435         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7436         "KFLAGS=-b elf -DSCO_OSR502 $(KFLAGS)"
7437
7438 #SCO OpenServer 5.0.4 (SCO UNIX 3.2v5.0.4) with SCO development tools.
7439 #Like 5.0, but adds high serial speeds.  First POSIX-based SCO version.
7440 #Note: the -O flag is deliberately omitted for /bin/cc (= /usr/ccs/bin/cc).
7441 sco32v504:
7442         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5.0.4...
7443         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7444         "CFLAGS= -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7445         -DSCO_OSR504 -b elf -DPOSIX \
7446         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7447         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DNOSYSLOG $(KFLAGS)" \
7448         "LIBS=-lcurses $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7449
7450 #SCO OpenServer 5.0.4 with gcc, no networking.
7451 sco32v504gcc:
7452         @echo Using gcc...
7453         $(MAKE) "MAKE=$(MAKE)" sco32v504 "CC=gcc" "CC2=gcc" \
7454         KTARGET=$${KTARGET:-$(@)} "KFLAGS= $(KFLAGS)"
7455
7456 #SCO OpenServer 5.0.4 with networking.
7457 #SCO development tools (/bin/cc = /usr/ccs/bin/cc).
7458 #Optimization deliberately suppressed.
7459 sco32v504net:
7460         @echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5.0.4...
7461         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7462         "CFLAGS= -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7463         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7464         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7465         -b elf -DSCO_OSR504 -DPOSIX -DNO_DNS_SRV $(KFLAGS)" \
7466         "LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7467
7468 #SCO OpenServer 5.0.4 with networking, gcc.
7469 sco32v504netgcc:
7470         @echo TCP/IP networking added - using gcc...
7471         @echo If gcc crashes on ckwart.c then build it by hand:
7472         @echo " gcc -o wart -DCK_SCOV5 ckwart.c"
7473         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7474         KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DSCO_OSR504 -DPOSIX $(KFLAGS)"
7475
7476 #SCO OpenServer 5.0.4 with networking, gcc, elf.
7477 sco32v504netgccelf:
7478         @echo TCP/IP networking added - using gcc, dynamic elf library
7479         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc"
7480         KTARGET=$${KTARGET:-$(@)} \
7481         "KFLAGS=-DSCO_OSR504 -DPOSIX -O3 -belf $(KFLAGS)" \
7482         LNKFLAGS="-belf"
7483
7484 #SCO OpenServer 5.0.5 (SCO UNIX 3.2v5.0.5) with SCO /bin/cc.
7485 #Like 5.0, but adds high serial speeds.  First POSIX-based SCO version.
7486 #You might have to add "LIBS=-ltinfo" (some do, some don't).
7487 sco32v505:
7488         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7489         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7490
7491 #SCO OpenServer 5.0.5 (SCO UNIX 3.2v5.0.5) with SCO UDK.
7492 #This one can't see the high serial speeds and anything to do with modem
7493 #signals doesn't work because UKD cc has its own alternative universe of
7494 #header files.
7495 sco32v505udk:
7496         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7497         "KFLAGS=-DSCO_OSR505 -DDCLTIMEVAL -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7498
7499 #SCO OpenServer 5.0.5 with networking, SCO /bin/cc.
7500 #See comments with sco32v505 targets.
7501 sco32v505net:
7502         @echo TCP/IP networking added...
7503         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7504         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7505
7506 #SCO OpenServer 5.0.5 with networking and OpenSSL, SCO /bin/cc.
7507 #See comments with sco32v505 targets.
7508 sco32v505net+ssl:
7509         @echo TCP/IP networking and OpenSSL added...
7510         $(MAKE) "MAKE=$(MAKE)" sco32v500net+ssl KTARGET=$${KTARGET:-$(@)} \
7511         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS) " \
7512         "LIBS=$(SSLLIB) -lcurses -lsocket -lssl -lcrypto $(LIBS)" \
7513         "LNKFLAGS=$(LNKFLAGS)"
7514
7515 #SCO OpenServer 5.0.5 with networking, SCO UDK.
7516 #See comments with above sco32v505 targets.
7517 sco32v505udknet:
7518         @echo TCP/IP networking added...
7519         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7520         "KFLAGS=-DSCO_OSR505 -DDCLTIMEVAL -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7521
7522 #SCO OpenServer 5.0.5 with gcc, no networking.
7523 sco32v505gcc:
7524         @echo Using gcc...
7525         $(MAKE) "MAKE=$(MAKE)" sco32v500 "CC=gcc" "CC2=gcc" \
7526         KTARGET=$${KTARGET:-$(@)} \
7527         "KFLAGS=-DSCO_OSR505 -DPOSIX -funsigned-char $(KFLAGS)"
7528
7529 #SCO OpenServer 5.0.5 with gcc, no networking, no shadow passwords.
7530 sco32v505xgcc:
7531         @echo Using gcc...
7532         $(MAKE) "MAKE=$(MAKE)" sco32v500 "CC=gcc" "CC2=gcc" \
7533         KTARGET=$${KTARGET:-$(@)} \
7534         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -DPOSIX -funsigned-char $(KFLAGS)"
7535
7536 #SCO OpenServer 5.0.5 with networking, gcc.
7537 sco32v505netgcc:
7538         @echo TCP/IP networking added - using gcc...
7539         @echo If gcc crashes on ckwart.c then build it by hand:
7540         @echo " gcc -o wart -DCK_SCOV5 ckwart.c"
7541         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7542         KTARGET=$${KTARGET:-$(@)} \
7543         "KFLAGS=-DSCO_OSR505 -DNOSHADOW -DPOSIX -funsigned-char $(KFLAGS)"
7544
7545 #egcs is just like gcc but generates ELF by default.
7546 #Or you can include -melf (not -belf) to force it.
7547 sco32v505netegcs:
7548         $(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v505netgcc \
7549         KTARGET=$${KTARGET:-$(@)}
7550
7551 #SCO OpenServer 5.0.5 with networking, gcc, elf.
7552 sco32v505netgccelf:
7553         @echo TCP/IP networking added - using gcc, dynamic elf library
7554         $(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7555         "KFLAGS=-DSCO_OSR505 -DPOSIX -funsigned-char -O3 -belf $(KFLAGS)" \
7556         KTARGET=$${KTARGET:-$(@)} LNKFLAGS="-belf"
7557
7558 #SCO OpenServer 5.0.6 with SCO /bin/cc.
7559 # Add -DDCLTIMEVAL when building with UDK.
7560 #Like 5.0.5.   IMPORTANT: Use sco32v506a target for 5.0.6a.
7561 sco32v506:
7562         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7563         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -b elf -DPOSIX $(KFLAGS)"
7564
7565 #SCO OpenServer 5.0.6 with networking, SCO /bin/cc.
7566 # Add -DDCLTIMEVAL when building with UDK.
7567 # IMPORTANT: Use sco32v506a target for 5.0.6a.
7568 sco32v506net:
7569         @echo TCP/IP networking added...
7570         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7571         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -b elf -DPOSIX $(KFLAGS)"
7572
7573 #SCO OpenServer 5.0.6a, no networking, SCO development tools.
7574 #This one has patched sio drivers that, for the first time,
7575 #actually handle modem signals correctly.
7576 # Add -DDCLTIMEVAL when building with UDK.
7577 sco32v506a:
7578         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7579         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR506A -DNEEDMDMDEFS \
7580         -b elf -DPOSIX $(KFLAGS)"
7581
7582 #SCO OpenServer 5.0.6a with networking, SCO development tools.
7583 # Add -DDCLTIMEVAL when building with UDK.
7584 sco32v506anet:
7585         @echo TCP/IP networking added...
7586         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7587         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR506A -DNEEDMDMDEFS \
7588         -b elf -DPOSIX $(KFLAGS)"
7589
7590 #SCO OpenServer 5.0.7, no networking, SCO development tools.
7591 #Adds flags to make PTY and SSH commands work.  These have been tested
7592 #only in 5.0.7 but probably they can also be added to earlier OSR5 targets.
7593 sco32v507:
7594         $(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7595         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7596         -DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT \
7597         -b elf -DPOSIX $(KFLAGS)"
7598
7599 #SCO OpenServer 5.0.7 as above but with networking.
7600 sco32v507net:
7601         @echo TCP/IP networking added...
7602         $(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7603         "KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7604         -DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT \
7605         -b elf -DPOSIX $(KFLAGS)"
7606
7607 #SCO OpenServer 6 (new target 30 Jan 2006)
7608 sco_osr600 sco600:
7609         @echo Making C-Kermit $(CKVER) for SCO OpenServer 6.0.0...
7610         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7611         "CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7612         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7613         -DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7614         -DNO_DNS_SRV -DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7615         -DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT -DDCLTIMEVAL \
7616         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
7617         -DSOCKOPT_T=socklen_t -DGSOCKNAME_T=size_t -DGPEERNAME_T=size_t \
7618         -DHERALD=\"\\\" SCO OpenServer `uname -v`\\\"\" \
7619         -b elf -DPOSIX $(KFLAGS)" \
7620         "LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7621
7622 #Tandy 16/6000 with Xenix 3.0 (16 bits)
7623 #C-Kermit 7.0 (and later) do not build here; "too many defines".
7624 #Add more -DNOxxx options to remove features if program won't load.
7625 #Successful operation is a function of program size, physical memory,
7626 #available swap space, etc.  The following stripped-down configuration
7627 #seems to work on most Tandy 6000s.  NOTE: "-+" means allow long variable
7628 #names, needed for C-Kermit 6.0 because some identifiers are not unique
7629 #within the first six characters.
7630 trs16:
7631         @echo 'Making C-Kermit $(CKVER) for Tandy 16/6000, Xenix 3.0...'
7632         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7633         "CFLAGS = -+ -DATTSV -DTRS16 -DNOMKDIR -DDCLPOPEN -DCK_CURSES \
7634         -DNODEBUG -DNOTLOG -DNOHELP -DNOSCRIPT -DNOCSETS -DNOIKSD \
7635         -DNOREDIRECT -DNOSYSLOG -DNOPUTENV -DNOREALPATH -DNOLEARN \
7636         $(KFLAGS) -O" "LIBS= -lcurses -ltermcap" "LNKFLAGS = -+ -n -s"
7637
7638 # QNX 4.21 and above, 32-bit version, Watcom C32 10.6, fully configured,
7639 # except no job control because QNX 4.x does not support it.  New NCURSES
7640 # library used instead of CURSES.
7641 #
7642 # -Oatx optimizes to favor speed over size: loop optimization, inline fn's.
7643 # -Os favors size over speed.  Saves 30-40K out of about 1.75M.
7644 # -3r = generate 386 code with register-based arg passing.
7645 # -3s = generate 386 code with stack-based arg passing.
7646 # -ms = separate code & data 4GB segments (32-bit builds only).
7647 # -mf = flat memory model code+data in one 4GB segment (ditto).
7648 # -zc = place literal strings in code segment.
7649 # -N4M = Big stack (increase the digit upon SIGSEGVs at runtime).
7650 # chars are unsigned by default (-j makes them signed by default).
7651 # -NOUUCP is included because QNX doesn't use it.
7652 # Add these to the end if you like but they dump core on my QNX 4.25 system:
7653 #
7654 #       @wermit -h >use.qnx
7655 #       @usemsg wermit use.qnx
7656 #       @rm use.qnx
7657 #
7658 # If you get warnings about HEADER or C_IN add -DNO_DNS_SRV.
7659 # OK 2011/06/14
7660 qnx32:
7661         @echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit...'
7662         $(MAKE) xermit \
7663         "LNKFLAGS = -N4M -3r" \
7664         "CFLAGS = -ms -3r -DQNX -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7665         -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7666         -DNOINITGROUPS -DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7667         "LIBS= -lsocket -lncurses -ltermcap"
7668
7669 # As above but no networking since some QNX systems do not have TCP/IP
7670 # installed, or the TCP/IP developers kit, which includes all the needed
7671 # header files.  This entry has not been tested on a QNX system that, in
7672 # fact, does not have TCP/IP installed; some adjustments might be necessary,
7673 # in particular regarding the use of select(): is -lsocket needed, can we
7674 # get the needed definitions from non-TCP/IP header files (FD_SET, etc)?
7675 qnx32nonet:
7676         @echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit, no net...'
7677         $(MAKE) xermit \
7678         "LNKFLAGS = -N4M -3r" \
7679         "CFLAGS = -3r -ms -DQNX -DNONET -DNOIKSD -DCK_CURSES \
7680         -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7681         -DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7682         "LIBS= -lsocket -lncurses -ltermcap"
7683         @wermit -h >use.qnx
7684         @usemsg wermit use.qnx
7685         @rm use.qnx
7686
7687 # Synonym for qnx32.
7688 qnx:
7689         $(MAKE) qnx32 "KFLAGS=$(KFLAGS)"
7690
7691 # QNX 4.21 and above, 16-bit version, Watcom C 8.5 - and higher on i286 PCs
7692 # and above.
7693 #
7694 #       IMPORTANT: Do not use Watcom C 10.6!!!
7695 #       If you have it installed, add "-v9.52 to CFLAGS"
7696 #
7697 # NOTE: QNX 4.23 onward does not work on 286's anyway.
7698 # Stacksize 26000, objects larger than 100 bytes in their own segments,
7699 # string constants to the codesegment, etc.  Fully configured except job ctrl.
7700 # This entry works for building a 16-bit executable on a 32-bit system, but
7701 # has not been tested on a 16-bit system.  Uses large memory model, links
7702 # explicitly with large-model sockets library.  Correct-model curses library
7703 # is chosen automatically.  See comment in qnx32 entry about -DNOUUCP.
7704 #
7705 # WARNING:
7706 #
7707 # Watcom C prior to 10.6 never had released curses library. To link against it,
7708 # you must obtain ported free curses source from ftp://ftp.qnx.com/usr/free,
7709 # then compile and build library (cursesl.lib) and place it in /usr/lib.  You
7710 # must also copy curses.h to /usr/include.  Be aware that if you have Watcom
7711 # 10.6 installed, you should already have curses.h, which is the new ncurses
7712 # library. You must back it up and use free curses.h instead, since ncurses is
7713 # only for 32-bit applications and some definitions in these files are
7714 # different (e.g., clearok()).  For safety, curses is not defined in build.
7715 #
7716 # In 7.0 -DNOHELP added to keep ckuus2.c from blowing up; NOCSETS and NOSPL
7717 # added because ckuus4 was blowing up, and NOFLOAT just because it seemed
7718 # dangerous (remove -DNOFLOAT if you want to try it), The result works OK
7719 # except for some mysterious beeps upon termination of the top-level keyword.
7720 #
7721 # Things to try next time we get in trouble:
7722 #  . Change -zt100 to something smaller like -zt25
7723 #  . Change -Oatx to -Omilerat (enable stack checking)
7724 #  . Maybe get rid of -v9.52 -- it's only there because we were warned.
7725 #
7726 qnx16:
7727         @echo 'Making C-Kermit $(CKVER) for QNX 4.21, 16-bit...'
7728         $(MAKE) xermit \
7729         "LNKFLAGS = -2 -ml -N 26000" \
7730         "CFLAGS = -2 -Oatx -zc -zt100 -ml -DQNX -DQNX16 -DNOUUCP -DNOHELP \
7731         -DCK_REDIR -DSELECT -DSELECT_H -DNOJC -DNOGETUSERSHELL -DNOCSETS \
7732         -v9.52 -DTCPSOCKET -DCK_RTSCTS -DCK_ANSIC -DNOINITGROUPS -DNOKVERBS \
7733         -DNORANDOM -DNOCSETS -DNOSPL -DNOFLOAT -DPID_T=pid_t $(KFLAGS)"
7734
7735 # QNX 4.1, 16-bit version, with Watcom C 8.5 on i286 PCs and above.
7736 # stacksize 26000, objects larger than 100 bytes in their own segments,
7737 # string constants to the codesegment, etc.  Add -DNOUUCP if desired.
7738 qnx16_41:
7739         @echo 'Making C-Kermit $(CKVER) for QNX 4.1, 16-bit...'
7740         $(MAKE) xermit \
7741         "LNKFLAGS = -mh -N 26000" "CFLAGS = -Wc,-fpc -Wc,-j -DNOGETUSERSHELL \
7742         -Wc,-Ols -Wc,-zdf -Wc,-zc -Wc,-zt100 -mh -DPOSIX -DQNX -DDIRENT \
7743         -DNOCYRIL -DNODEBUG -DNOMSEND -DMINIDIAL -DNOXMIT -DNOSCRIPT -DNOSPL \
7744         -DNOSETKEY -DNOINITGROUPS -DQNX16 -DPID_T=pid_t $(KFLAGS)"
7745
7746 # QNX Neutrino 2 (pwaechtler@qnx.de) crosscompiled on QNX 4.25.
7747 # Gets lots of compiler warnings.
7748 qnx_nto2+:
7749         @echo 'Making C-Kermit $(CKVER) for QNX Neutrino 2+ '
7750         cc -o wart ckwart.c
7751         $(MAKE) xermit \
7752         "CC = qcc -Vgcc_ntox86" \
7753         "CC2 = qcc -Vgcc_ntox86" \
7754         "LNKFLAGS = " \
7755         "CFLAGS = -DNEUTRINO -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7756         -DNOUUCP -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS \
7757         -DNOJC -DNOINITGROUPS -DCK_ANSIC -DPID_T=pid_t -DUNIX -DDIRENT \
7758         -DMYREAD -DBSD44ORPOSIX -DSVORPOSIX -DNDGPWNAM $(KFLAGS)" \
7759         "LIBS= -lsocket -lncurses "
7760
7761 # QNX 6 (= Neutrino 2.xx) native build (kirussel@cisco.com).
7762 qnx6:
7763         @echo 'Making C-Kermit $(CKVER) for QNX6'
7764         $(MAKE) xermit KTARGET=QNX6 \
7765         "CFLAGS = -DPOSIX -DCK_POSIX_SIG -DNETPTY -DNOARROWKEYS \
7766         -DUSE_TIOCSDTR -DBIGBUFOK -DCKMAXOPEN=100 -DRLOGCODE -DNOREALPATH \
7767         -DMAXNAMLEN=48 -DQNX6 -DUSE_TERMIO -DINIT_SPTY \
7768         -DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DDYNAMIC \
7769         -DTCPSOCKET -DNOGETUSERSHELL -DCK_REDIR -DSELECT -DSELECT_H \
7770         -DCK_RTSCTS -DNOJC -DSVORPOSIX -DBSD44ORPOSIX -DNOUUCP -DCK_ANSIC \
7771         $(KFLAGS) -O" \
7772         "LIBS= -lsocket  -lncurses"
7773
7774 #MINIX/2.0 32 Bit version for intel 386+ running the POSIX-compliant MINIX
7775 # version 2.0 (The definition of fatal avoids a conflict with a symbol by
7776 # the same name in the curses library.) It is impossible to compile with
7777 # network support since Minix does not support Berkeley sockets.
7778 # Note: use chmem liberally on the compiler passes, make, and the final
7779 # kermit executable. (3 megabytes of memory for each is sufficient.)
7780 # From Terry McConnell, Syracuse U, and Will Rose.  Will says:
7781 # The stacks for make and some compiler passes needed to be increased
7782 # with chmem as follows:
7783 #   make 1MB
7784 #   /usr/lib/em_cemcom.ansi 3MB
7785 #   /usr/lib/em_opt 1MB
7786 #   /usr/lib/i386/cg 1MB
7787 #   /usr/lib/i386/as 1MB
7788 # The compiler temporary directory was set to /usr/tmp via the TMPDIR
7789 # environment variable; more than 1MB of temporary space was needed.
7790 # Kermit itself needs at least 1MB of stack.
7791 minix20:
7792         @echo 'Making C-Kermit $(CKVER) for MINIX 2.0/386...'
7793         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} EXT=o \
7794         "CFLAGS=  -wo -DV7 -DMINIX2 -DMINIX -DSIG_V -D_POSIX_SOURCE \
7795         -DCKCPU=\\\"i-386\\\" -DNOIKSD -Dfatal=myfatal -DCK_CURSES -DNOLEARN \
7796         -DNOSYSLOG -DUSE_MEMCPY -DNOREALPATH $(KFLAGS)" "LIBS= -lcurses"
7797
7798 #MINIX/386 (PC Minix modified by Bruce Evans in Australia for 386 addressing)
7799 # For MINIX 1.5+ (but < 2.0)
7800 minix386:
7801         @echo 'Making C-Kermit $(CKVER) for MINIX/386...'
7802         @echo 'TOTALLY UNTESTED!'
7803         $(MAKE) wermit EXT=s KTARGET=$${KTARGET:-$(@)} \
7804         "CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7805
7806 #MINIX/386 Minix modified by Bruce Evans in Australia to use 386 addressing
7807 minix386gcc:
7808         @echo 'Making C-Kermit $(CKVER) for MINIX/386 with gcc...'
7809         @echo 'TOTALLY UNTESTED!'
7810         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC=gcc -g -O" "CC2=gcc -g" \
7811         "CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7812
7813 #MINIX - 68k version with ACK compiler.
7814 # If you have trouble compiling or running wart, "touch wart".
7815 # If it still doesn't work, "touch ckcpro.c".
7816 # The version configured below has many features removed, including
7817 # the TRANSMIT, MSEND, HELP, and SCRIPT commands, international
7818 # character set support, and the entire script programming language.
7819 # But it does have an interactive command parser.
7820 # Make sure make(1) has (at least) 100000 chmemory!
7821 # If you are using the Amsterdam C compiler, you might have to add "-D__ACK__".
7822 minix68k:
7823         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with ACK...'
7824         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7825         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7826         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7827         -DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7828         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7829
7830 #MINIX - 68k version with c68 compiler.
7831 # If you have trouble compiling or running wart, "touch wart" or
7832 # "touch ckcpro.c". Compiling ckudia.c (no -DNODIAL!) might fail. :-(
7833 # Give c68 250000 bytes of stack+heap; make sure make(1) has at least
7834 # 100000 chmemory.  On a 1MB Atari ST this means that the recursive
7835 # call of make fails due to memory shortage.  Try "make -n minixc68 >makeit",
7836 # followed by ". makeit".  Otherwise, as above.
7837 minixc68:
7838         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7839         $(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7840         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7841         -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7842         -DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7843         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7844
7845 #MINIX - 68k version with c68 compiler.
7846 #A variation on the above that was recently (Sep 95) reported to work.
7847 minixc68a:
7848         @echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7849         $(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7850         "CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE \
7851         -DCK_ANSIC -DNODEBUG -DNOTLOG -DMINIDIAL -DEXTEN -DMYCURSES \
7852         -DNOSCRIPT -DNOCSETS -DNOSPL -DNOJC -DDIRENT -DNOLEARN \
7853         -DNOSETKEY -DNOESCSEQ $(KFLAGS) \
7854         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7855
7856 #MIPS Computer Systems with UMIPS RISC/OS 4.52 = AT&T UNIX System V R3.0.
7857 #Remove -DNOJC if job control can be safely used.
7858 mips:
7859         @echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7860         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7861         "CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC -DNOLEARN -DPID_T=int \
7862         -DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)"
7863
7864 #As above, but with TCP/IP and fullscreen support.
7865 mipstcpc:
7866         @echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7867         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7868         "CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC \
7869         -DTCPSOCKET -DCK_CURSES -I/usr/include/bsd \
7870         -DPID_T=int -DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)" \
7871         "LIBS = -lcurses -lbsd"
7872
7873 #Motorola Delta System V/68 R3, signal() is void rather than int.
7874 #Uses dirent.h and Honey DanBer uucp.  Supports TCP/IP.
7875 #After building, use "mcs -d" to reduce size of the executable program.
7876 sv68r3:
7877         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3...'
7878         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7879         "CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DTCPSOCKET \
7880         -DNOUNICODE -DNOLEARN -DUSE_MEMCPY $(KFLAGS) -O" "LNKFLAGS ="
7881
7882 #Motorola Delta System V/68 R3V5, signal() is void rather than int.
7883 #Uses dirent.h and Honey DanBer UUCP.  Supports TCP/IP.
7884 #After building, use "mcs -d" to reduce size of the executable program.
7885 sv68r3v5:
7886         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5'
7887         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7888         "CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DUSE_MEMCPY \
7889         -DTCPSOCKET -DINADDRX -DNOUNICODE -DFNFLOAT -DNOLEARN $(KFLAGS) -O" \
7890         "LNKFLAGS =" "LIBS = -linet -lm"
7891
7892 #Motorola MVME147 System V/68 R3 V5.1. Requires gcc 2.1 to compile.
7893 #After building, use "mcs -d" to reduce size of the executable program.
7894 sv68r3v51:
7895         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5.1'
7896         $(MAKE) wermit "CC=gcc-delta" "CC2=gcc-delta" \
7897         KTARGET=$${KTARGET:-$(@)} \
7898         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNODEBUG -DNO_DNS_SRV -DNOLEARN \
7899         -DNOUNICODE -DFNFLOAT -DSV68 -DUSE_MEMCPY $(KFLAGS) \
7900         -O2 -v -ftraditional" \
7901         "LNKFLAGS = -s -v" "LIBS = -lm881 -lm"
7902
7903 #Motorola MVME147 System V/68 R3V6. derived from Motorola Delta System R3V5.
7904 #Checked on larger Motorola System V/68 R3V6 (with NSE Network Services Ext.)
7905 #After building, use "strip" to reduce size of the executable program.
7906 # "LIBS = -lnsl" removed in C-Kermit 6.1 - put back if needed.
7907 # "LIBS = lm" added in 7.1/8.0 for floating-point math.
7908 # ckuusr.c clobbers the optimizer.
7909 sv68r3v6:
7910         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V6'
7911         $(MAKE) ckuusr.$(EXT) KTARGET=$${KTARGET:-$(@)} \
7912         "CFLAGS = -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
7913         -DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
7914         -DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)"
7915         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7916         "CFLAGS = -O -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
7917         -DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
7918         -DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)" \
7919         "LNKFLAGS =" "LIBS = -lm"
7920
7921 #Motorola Delta System V/88 R32, signal() is void rather than int.
7922 #Uses dirent.h and Honey DanBer uucp.  Needs <sys/utime.h> for setting
7923 #file dates.  Supports TCP/IP.
7924 #After building, use "mcs -d" to reduce size of the executable program.
7925 sv88r32:
7926         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R32...'
7927         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7928         "CFLAGS = -DSV88R32 -DDIRENT -DHDBUUCP -DTCPSOCKET \
7929         -DSYSUTIMEH -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG $(KFLAGS) -O" \
7930         "LIBS= -lcurses -lresolv" "LNKFLAGS = -s"
7931
7932 #Motorola Delta System V/88 R40.  Has <sys/termiox.h>, regular Berkeley
7933 #sockets library, i.e. in.h and inet.h are not misplaced in sys (rather than
7934 #netinet and arpa, respectively).  Uses ANSI C constructs, advisory file
7935 #locking on devices, etc.  curses support added.  Reportedly, the
7936 #/usr/include/sys/vnode.h file has a bug which must be fixed before this
7937 #makefile entry can work correctly.  The "if DEBUG" directive at about line
7938 #320 must be changed to "ifdef DEBUG" (Reportedly, this was fixed in
7939 #in System V/88 R4.3).
7940 #After building, use "mcs -d" to reduce size of the executable program.
7941 sv88r40:
7942         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R40...'
7943         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7944         "CFLAGS = -O -DSVR4 -DMOTSV88R4 -DDIRENT -DHDBUUCP -DSTERMIOX \
7945         -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG -DFNFLOAT \
7946         $(KFLAGS)" \
7947         "LIBS= -lsocket -lnsl -lcurses -lresolv -lm" "LNKFLAGS = -s"
7948
7949 #As above but without the floating-point math library.
7950 sv88r40nm:
7951         @echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R40...'
7952         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7953         "CFLAGS = -O -DSVR4 -DMOTSV88R4 -DDIRENT -DHDBUUCP -DSTERMIOX \
7954         -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG $(KFLAGS)" \
7955         "LIBS= -lsocket -lnsl -lcurses -lresolv" "LNKFLAGS = -s"
7956
7957 #As above but with floating-point math library support \ffp...() functions
7958 #and S-Expressions.
7959
7960 #Olivetti X/OS R2.3, 3.x.
7961 #NOTES:
7962 # . If you build the executable on 2.x X/OS, it will also run on 3.x.
7963 # . If you build it on 3.x X/OS, it will NOT run on 2.x.
7964 # . Kermit can run with no privileges unless the uucp lines are protected,
7965 #   in which case kermit must be owned by uucp with suid bit set:
7966 #   chown uucp kermit ; chmod 4111 kermit.
7967 xos23:
7968         @echo 'Making C-Kermit $(CKVER) for Olivetti X/OS...'
7969         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7970         'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP $(KFLAGS)' \
7971         "LIBS=" "LNKFLAGS="
7972
7973 #As above, but with curses.
7974 xos23c:
7975         @echo 'Making C-Kermit $(CKVER) for Olivetti X/OS with curses...'
7976         $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7977         'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP -DCK_CURSES $(KFLAGS)' \
7978         "LIBS=-lcurses" "LNKFLAGS="
7979
7980 ckuuid:
7981         @echo 'building C-Kermit $(CKVER) set-UID/set-GID test programs'
7982         $(CC) -DANYBSD -DSAVEDUID -o ckuuid1 ckuuid.c
7983         $(CC) -DANYBSD -o ckuuid2 ckuuid.c
7984         $(CC) -DANYBSD -DNOSETREU -o ckuuid3 ckuuid.c
7985         $(CC) -DANYBSD -DSETEUID -DNOSETREU -o ckuuid4 ckuuid.c
7986         $(CC) -o ckuuid5 ckuuid.c
7987         @echo 'Read the top of ckuuid.c for directions...for testing'
7988         @echo 'you must make these programs setuid and setgid'
7989
7990 ############################################################################
7991 # A N T I Q U I T I E S
7992 #
7993 # The following are antique targets from C-Kermit 5A or earlier.  They have
7994 # not been updated or tested in years.  Most of them will need recent features
7995 # disabled, usually with some combination of -DNOUNICODE, -DNOIKSD, -DNOANSI,
7996 # -DNOCKGHNLHOST, -DNO_DNS_SRV, -DNOREDIRECT, -DNOREALPATH, -DNOCURSES, etc.
7997 # They are also missing the KTARGET=$${KTARGET:-$(@)} business.
7998 # For details see ckuins.txt and ckccfg.txt.
7999 #
8000 ############################################################################
8001
8002 #Berkeley Unix 2.8, 2.9 for PDP-11s with I&D space, maybe also Ultrix-11???
8003 #C-Kermit(5A) is simply too large (even turning off almost every feature
8004 #available) to run without both I&D space plus overlays.  The old comment
8005 #suggested running 'pcc' but that won't help.  Changing 'cc' to 'ckustr.sed'
8006 #will cause a string extraction to be done, saving D space by moving strings
8007 #to a file.
8008 bsd29:
8009         @echo Making C-Kermit $(CKVER) for 2.8 or 2.9BSD.
8010         @echo Read the makefile if you have trouble with this...
8011         $(MAKE) ovwermit \
8012         "CFLAGS= -DBSD29 -DNODEBUG -DNOTLOG -DNOCSETS -DNOHELP \
8013         -DNOSCRIPT -DNOSPL -DNOXMIT -DNODIAL $(KFLAGS)" \
8014         "LNKFLAGS= -i -lndir" "CC= cc " "CC2= cc"
8015
8016 bsd210:
8017         @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.10BSD.
8018
8019 bsd211:
8020         @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.11BSD.
8021
8022 #Charles River Data Systems Universe with UNOS Version 9.2
8023 crds:
8024         @echo 'Making C-Kermit $(CKVER) for Charles River Data Systems...'
8025         make xermit \
8026         "CFLAGS = -DATTSV -DNOANSI -DDIRENT -DLONGFN -DTCPSOCKET \
8027         -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DNOSETREU \
8028         -Dsuspend=ksuspend $(KFLAGS) -O" "LNKFLAGS ="
8029
8030 #Microport SV/AT for IBM PC/AT 286 and clones, System V R2.
8031 #The -O flag may fail on some modules (like ckuus2.c), in which case you
8032 #should compile them by hand, omitting the -O.  If you get "hash table
8033 #overflow", try adding -DNODEBUG.
8034 #Also, reportedly this compiles better with gcc than with cc.
8035 mpsysv:
8036         @echo 'Making C-Kermit $(CKVER) for Microport SV/AT 286...'
8037         $(MAKE) wermit \
8038         "CFLAGS= -DATTSV -DNOLEARN $(KFLAGS) -O -Ml" "LNKFLAGS = -Ml"
8039
8040 #Microsoft "Xenix/286" e.g. for IBM PC/AT
8041 xenix:
8042         @echo 'Making C-Kermit $(CKVER) for Xenix/286'
8043         $(MAKE) wermit \
8044         "CFLAGS= -DXENIX -DNOFILEH -DNOLEARN $(KFLAGS) -Dunix -F 3000 -i" \
8045         "LNKFLAGS = -F 3000 -i"
8046
8047 #PC/IX, Interactive Corp System III for IBM PC/XT
8048 pcix:
8049         @echo 'Making C-Kermit $(CKVER) for PC/IX...'
8050         $(MAKE) wermit \
8051         "CFLAGS= -DPCIX -DISIII -DNOLEARN $(KFLAGS) \
8052         -Dsdata=sdatax -O -i" "LNKFLAGS = -i"
8053
8054 #Integrated Solutions Inc V8S VME 68020
8055 isi:
8056         @echo Making C-Kermit $(CKVER) for 4.2BSD on ISI...
8057         $(MAKE) wermit "CC = cc" \
8058         "CFLAGS= -DBSD4 -DTCPSOCKET -DINADDRX -DDCLPOPEN -DDEBUG -DNOSETREU \
8059         -DCK_CURSES -DNOLEARN $(KFLAGS)" "LIBS = -lcurses -ltermcap"
8060
8061 #Interactive Corp version of AT&T System III
8062 #is3: (very old, probably not sufficient for 5A or later)
8063 #       @echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8064 #       make wermit "CFLAGS = -DISIII -Ddata=datax -O -i" "LNKFLAGS = -i"
8065 #The following should work, use it if you don't have gcc.
8066 #Use is3gcc if you have gcc.
8067 is3:
8068         @echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8069         $(MAKE) wermit \
8070         "CFLAGS= -DISIII $(KFLAGS) -Ddata=datax -DNAP -DHDBUUCP
8071         -DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O -i" "LNKFLAGS = -i"
8072
8073 #Interactive UNIX System V R3, no network support.  Uses <dirent.h> and Honey
8074 #DanBer UUCP.  If this entry does not compile correctly, try any or all of the
8075 #following.  These suggestions also apply more or less to the other is5r3xxx
8076 #entries that follow this one.
8077 # . Remove the UID_T and GID_T definitions, or change them as required.
8078 # . Change -DDIRENT to -DSDIRENT.
8079 # . Add -DSIGTYP=void.
8080 # . Remove -g from LNKFLAGS.
8081 # . Add -DNOANSI to remove compiler complaints about ANSI C constructions
8082 # . Add other -DNOxxx's to save space (e.g. -DNOCSETS)
8083 # See the next few makefile entries for related examples.
8084 # Also see sys5r32is for making a portable i386 SVR3 binary.
8085 is5r3:
8086         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8087         @echo 'If this does not work please read the makefile entry.'
8088         $(MAKE) wermit \
8089         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8090         -DUID_T=ushort -DGID_T=ushort -DI386IX $(KFLAGS)" \
8091         "LNKFLAGS = -g"
8092
8093 #Interactive Corp System System V R3 with gcc
8094 is3gcc:
8095         @echo 'Making C-Kermit $(CKVER) for Interactive System V R3 / gcc...'
8096         $(MAKE) wermit CC=gcc CC2=gcc \
8097         'CFLAGS = -D_SYSV3 -DISIII -Ddata=datax -DNAP -DHDBUUCP -DNOREALPATH \
8098         -DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O' "LNKFLAGS ="
8099
8100 #Interactive UNIX System V R3, POSIX variant.  Untested.
8101 #Uses dirent.h and Honey DanBer uucp.  Read comments in is5r3 entry.
8102 is5r3p:
8103         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8104         $(MAKE) wermit \
8105         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8106         -DI386IX -DPOSIX $(KFLAGS)" "LNKFLAGS=" "LIBS=-lcposix"
8107
8108 #Interactive UNIX SVR3 2.2.1, job control, curses, no net, gcc.
8109 is5r3gcc:
8110         $(MAKE) wermit CC=gcc CC2=gcc \
8111         "CFLAGS=-g -posix -DSVR3 -DDIRENT -DNOREALPATH \
8112         -DHDBUUCP -O -DNOCSETS -DI386IX -DSVR3JC -DCK_CURSES \
8113         $(KFLAGS)" LNKFLAGS="-posix" LIBS="-lcurses -lc_s"
8114
8115 #Interactive UNIX System V R3 with TCP/IP network support.
8116 #Needs -linet for net functions.  signal() is void rather than int.
8117 #Uses dirent.h and Honey DanBer uucp. Read comments in is5r3 entry.
8118 #Also see is5r3net2 if you have trouble with this entry.
8119 is5r3net:
8120         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8121         @echo 'If this does not work please read the makefile entry.'
8122         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8123         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOREALPATH \
8124         -DI386IX $(KFLAGS) -O" "LIBS = -linet"
8125
8126 is5r3netgcc:
8127         $(MAKE) is5r3net CC=gcc CC2=gcc
8128
8129 #Interactive UNIX System V R3, no job control, signal() void rather than int.
8130 #Uses dirent.h and Honey DanBer uucp.  Needs -linet for net functions.
8131 #Read comments in is5r3 entry.  Use this entry if is5r3net fails.
8132 #Saves some space by stripping (-s) and using shared library (-lc_s).
8133 is5r3net2:
8134         @echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8135         $(MAKE) wermit \
8136         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOJC -DNOREALPATH \
8137         -DSIGTYP=void -DNOANSI -DI386IX $(KFLAGS) -O" \
8138         "LNKFLAGS= -s" "LIBS = -linet -lc_s"
8139
8140 #Interactive UNIX System V R3 (version 2.2 or later) with job control & curses.
8141 #Uses dirent.h and Honey DanBer UUCP.
8142 is5r3jc:
8143         @echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8144         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8145         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8146         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8147         -DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD \
8148         $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
8149
8150 is5r3jcgcc:
8151         $(MAKE) is5r3jc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8152         KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8153
8154 #Sunsoft/Interactive UNIX System V R3 (version 2.2 or later)
8155 #with job control, curses, and TCP/IP networking.
8156 #Uses dirent.h and Honey DanBer UUCP.
8157 is5r3netjc:
8158         @echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8159         $(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8160         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8161         -DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8162         -DPOSIX_JC -DCK_REDIR -DTCPSOCKET -DSELECT \
8163         $(KFLAGS)" "LIBS=-linet -lcurses -lc_s"
8164
8165 is5r3netjcgcc:
8166         $(MAKE) is5r3netjc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8167         KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8168
8169 #Masscomp System III
8170 rtu:
8171         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU System III...'
8172         $(MAKE) wermit \
8173         "CFLAGS= -UFIONREAD -DATTSV $(KFLAGS) -O" "LNKFLAGS =" "LIBS= -ljobs"
8174
8175 #Masscomp/Concurrent RTU 4.0 or later, Berkeley environment.
8176 #Includes <ndir.h> = /usr/include/ndir.h
8177 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8178 rtubsd:
8179         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8180         ucb make wermit \
8181         "CFLAGS= -DBSD4 -DRTU -DNDIR -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
8182         "LIBS = -lndir"
8183
8184 #Masscomp/Concurrent RTU 4.0 or later, same as above,
8185 #Includes "usr/lib/ndir.h"
8186 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8187 rtubsd2:
8188         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8189         ucb make wermit \
8190         "CFLAGS= -DBSD4 -DRTU -DXNDIR -DHDBUUCP $(KFLAGS)" \
8191         "LIBS = -lndir"
8192
8193 #Masscomp/Concurrent RTU 4.0 or later, same as above,
8194 #Includes <sys/ndir.h>
8195 #Note "LIBS = -lndir" might not be necessary because of "ucb make".
8196 rtubsd3:
8197         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x BSD...'
8198         ucb make wermit "CFLAGS= -DBSD4 -DRTU -DHDBUUCP $(KFLAGS)" \
8199         "LIBS = -lndir"
8200
8201 #Masscomp/Concurrent RTU 4.0 or later, System V R2, using <dirent.h>.
8202 #In case of problems, add back the -DRTU switch.
8203 #In case -DTCPSOCKET gives trouble, remove it.
8204 rtus5:
8205         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x...'
8206         $(MAKE) wermit \
8207         "CFLAGS= -DATTSV -DHDBUUCP -DDIRENT -DTCPSOCKET $(KFLAGS)"
8208
8209 #Masscomp/Concurrent RTU 4.x, System V R3, using <dirent.h>.
8210 #Use this one if rtus5 gives warnings about pointer type mismatches.
8211 #In case of problems, add back the -DRTU switch.
8212 rtus5r3:
8213         @echo 'Making C-Kermit $(CKVER) for Masscomp RTU Sys V R3...'
8214         $(MAKE) wermit "CFLAGS= -DSVR3 -DHDBUUCP -DDIRENT $(KFLAGS)"
8215
8216 #DEC Pro-3xx with Pro/Venix V1.0 or V1.1
8217 # Requires code-mapping on non-I&D-space 11/23 processor, plus some
8218 # fiddling to get interrupt targets into resident code section.
8219 # This almost certainly doesn't work any more.
8220 provx1:
8221         @echo 'Making C-Kermit $(CKVER) for DEC Pro-3xx, Pro/Venix 1.x...'
8222         $(MAKE) wart "CFLAGS= -DPROVX1 $(KFLAGS)" "LNKFLAGS= "
8223         $(MAKE) wermit "CFLAGS = -DPROVX1 -DNOFILEH -md780" \
8224                 "LNKFLAGS= -u _sleep -lc -md780"
8225
8226 #Nixdorf Targon/31.
8227 #AT&T UNIX System V R3, signal() is void rather than int.
8228 #Uses dirent.h without Honey DanBer uucp.
8229 t31tos40x:
8230         @echo 'Making C-Kermit $(CKVER) for Targon/31 with TOS 4.0.xx...'
8231                 $(MAKE) wermit \
8232                 "CFLAGS= -DSVR3 -DDIRENT $(KFLAGS) -O" \
8233                 "LNKFLAGS="
8234
8235 #NCR Tower 1632, OS 1.02
8236 tower1:
8237         @echo 'Making C-Kermit $(CKVER) for NCR Tower 1632, OS 1.02...'
8238         $(MAKE) wermit "CFLAGS= -DTOWER1 $(KFLAGS)"
8239
8240 #NCR Tower 32, OS Release 1.xx.xx
8241 tower32-1:
8242         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 1 System V R2...'
8243         @echo 'Add KFLAGS=-DISDIRBUG if you get errors about S_ISREG/S_ISDIR.'
8244         $(MAKE) wermit \
8245         "CFLAGS = -DATTSV $(KFLAGS) -O" "LNKFLAGS = -n"
8246
8247 #NCR Tower 32, OS Release 2.xx.xx
8248 tower32-2:
8249         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 2 System V R2...'
8250         $(MAKE) wermit \
8251         "CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -O2" \
8252         "LNKFLAGS = -n"
8253
8254 #NCR Tower 32, OS Releases based on System V R3
8255 #Don't add -DNAP (doesn't work right) or -DRDCHK (not available in libc).
8256 tower32:
8257         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3...'
8258         $(MAKE) wermit \
8259         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8260         -DUID_T=ushort -DGID_T=ushort -O1"
8261
8262 #NCR Tower 32, OS Releases based on System V R3
8263 tower32g:
8264         @echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3, gcc...'
8265         $(MAKE) wermit "CC = gcc" \
8266         "CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8267         DUID_T=ushort -DGID_T=ushort -O -fstrength-reduce -fomit-frame-pointer"
8268
8269 #Fortune 32:16, For:Pro 1.8 (mostly like 4.1bsd)
8270 ft18:
8271         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 1.8...'
8272         $(MAKE) wermit \
8273         "CFLAGS= -DNODEBUG -DBSD4 -DFT18 -DNOFILEH $(KFLAGS) \
8274         -DPID_T=short"
8275
8276 #Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd).
8277 #The modules that break the optimizer are compiled separately.
8278 ft21:
8279         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'
8280         $(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8281         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8282         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8283         $(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8284         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8285         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8286         $(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8287         -SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8288         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8289         $(MAKE) wermit \
8290         "CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \
8291         -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8292         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8293
8294 #Valid Scaldstar
8295 #Berkeleyish, but need to change some variable names.
8296 valid:
8297         @echo 'Making C-Kermit $(CKVER) for Valid Scaldstar...'
8298         $(MAKE) wermit \
8299         "CFLAGS= -DBSD4 -DNODEBUG -DNOTLOG -Dcc=ccx -DFREAD=1 $(KFLAGS)"
8300
8301 #IBM IX/370 on IBM 370 Series mainframes
8302 #Mostly like sys3, but should buffer packets.
8303 ix370:
8304         @echo 'Making C-Kermit $(CKVER) for IBM IX/370...'
8305         $(MAKE) wermit "CFLAGS = -DIX370 -DATTSV $(KFLAGS) -i -O" \
8306         "LNKFLAGS = -i"
8307
8308 #Amdahl UTS 2.4 on IBM 370 series compatible mainframes.
8309 #Mostly like V7, but can't do initrawq() buffer peeking.
8310 uts24:
8311         @echo 'Making C-Kermit $(CKVER) for Amdahl UTS 2.4...'
8312         $(MAKE) wermit "CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
8313         -DUTS24 -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
8314         -DNPTYPE=$(NPTYPE) $(DIRECT) $(KFLAGS)"
8315
8316 #Amdahl UTSV UNIX System V = System V R2 or earlier.
8317 utsv:
8318         @echo 'Making C-Kermit $(CKVER) for Amdahl UTSV...'
8319         $(MAKE) wermit \
8320         "CFLAGS = -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i"
8321
8322 #Amdahl UTSV UNIX System V = System V R2 or earlier, with TCP sockets library.
8323 utsvtcp:
8324         @echo 'Making C-Kermit $(CKVER) for Amdahl UTSV w/tcp...'
8325         $(MAKE) wermit "CFLAGS = \
8326         -DTCPSOCKET -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i" \
8327         "LIBS = -lsocket"
8328
8329 #BBN C/70 with IOS 2.0
8330 #Mostly Berkeley-like, but with some ATTisms
8331 c70:
8332         @echo 'Making C-Kermit $(CKVER) for BBN C/70 IOS 2.0...'
8333         $(MAKE) wermit "CFLAGS= -DBSD4 -DC70 $(KFLAGS)"
8334
8335 #Zilog ZEUS 3.21
8336 zilog:
8337         @echo 'Making C-Kermit $(CKVER) for Zilog Zeus 3.21...'
8338         $(MAKE) wermit \
8339         "CFLAGS = -DATTSV -DZILOG -DNODEBUG $(KFLAGS) -i -O" \
8340         "LNKFLAGS = -i -lpw"
8341
8342 #Whitechapel MG-1 Genix 1.3
8343 white:
8344         @echo 'Making C-Kermit $(CKVER) for Whitechapel MG-1 Genix 1.3...'
8345         @touch ckcpro.c
8346         $(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0  $(KFLAGS)"
8347
8348 #Pixel 1000
8349 pixel:
8350         @echo 'Making C-Kermit $(CKVER) for Pixel 1000...'
8351         $(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0 $(KFLAGS)"
8352
8353 ptx:
8354         $(MAKE) "MAKE=$(MAKE)" dynixptx12
8355
8356 #CDC VX/VE 5.2.1
8357 vxve:
8358         @echo 'Making C-Kermit $(CKVER) for CDC VX/VE 5.2.1...'
8359         $(MAKE) wermit \
8360         "CFLAGS = -DATTSV -DVXVE -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8361         "LNKFLAGS = -i"
8362
8363 #DIAB DS90 or LUXOR ABC-9000 with pre-5.2 DNIX.  Sys V with nap() and rdchk().
8364 # nd = no opendir(), readdir(), closedir(), etc.
8365 # Some of the modules fail to compile with -O.
8366 dnixnd:
8367         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with very old DNIX 5.2.'
8368         $(MAKE) wermit \
8369         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDCLPOPEN \
8370         -U__STDC__ $(KFLAGS)"
8371
8372 #DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8373 # This one has opendir(), readdir(), closedir(), etc.
8374 # Some of the modules fail to compile with -O.
8375 dnix:
8376         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8377         $(MAKE) wermit \
8378         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8379         -U__STDC__ $(KFLAGS)"
8380
8381 #DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8382 # As above, but with curses and TCP/IP.
8383 # You might get complaints about redefinition of O_RDONLY, etc, because
8384 # of bugs in the DNIX header files, which can be fixed by adding #ifndef...
8385 # around the offending definitions in the header files.
8386 dnixnetc:
8387         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8388         $(MAKE) wermit \
8389         "CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8390         -DTCPSOCKET -DCK_CURSES -I/usr/include/bsd -U__STDC__ $(KFLAGS)" \
8391         "LIBS = -ln -lcurses"
8392
8393 #DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk().
8394 dnix5r3:
8395         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8396         @echo 'with Honey DanBer UUCP'
8397         $(MAKE) wermit \
8398         "CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8399         -DCK_CURSES -DRENAME $(KFLAGS) -O" "LIBS= -lcurses"
8400
8401 #DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk() + TCP/IP
8402 dnix5r3net:
8403         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8404         @echo 'with Honey DanBer UUCP and TCP/IP'
8405         $(MAKE) wermit \
8406         "CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8407         -DTCPSOCKET -DCK_CURSES -DRENAME $(KFLAGS) -O \
8408         -I/usr/include/bsd" "LIBS = -ln -lcurses"
8409
8410 #DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8411 #ANSI C compilation and libraries.
8412 #Note that for DNIX 5.3 2.2 you have to correct a bug in /usr/include/stdlib.h:
8413 #change "extern void free(char *str);"
8414 #to     "extern void free(void *str);"
8415 #NOTE: This bug is reportedly fixed in DNIX 5.3 2.2.1.
8416 #Should you get fatal errors caused by harmless pointer-type mismatches,
8417 #like between signed and unsigned char, just remove -X7.
8418 dnix5r3ansi:
8419         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8420         @echo 'with ANSI C Honey DanBer UUCP'
8421         $(MAKE) wermit \
8422         "CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8423         -DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS)" \
8424         "LIBS= -lcurses"
8425
8426 #DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8427 # + TCP/IP, ANSI C compilation and libraries.
8428 #Should you get fatal errors caused by harmless pointer-type mismatches,
8429 #like between signed and unsigned char, just remove -X7.
8430 dnix5r3ansinet:
8431         @echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8432         @echo 'with ANSI C Honey DanBer UUCP'
8433         $(MAKE) wermit \
8434         "CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8435         -DTCPSOCKET -DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS) \
8436         -I/usr/include/bsd" "LIBS= -ln -lcurses"
8437
8438 #Ridge 32 with ROS 3.2
8439 ridge32:
8440         @echo 'Making C-Kermit $(CKVER) Ridge 32 ROS 3.2'
8441         $(MAKE) wermit \
8442         "CFLAGS = -DATTSV -DNOFILEH -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8443         "LNKFLAGS = -i"
8444
8445 #Altos 486, 586, or 986 with Xenix 3.0
8446 altos:
8447         @echo 'Making C-Kermit $(CKVER) for Altos x86 with Xenix 3.0...'
8448         $(MAKE) wermit \
8449         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8450         "LNKFLAGS= -i"
8451
8452 #Altos 986 with Xenix 3.0, as above, but command-line only, minimal size.
8453 #For systems with small memories.  It might also be necessary to chop certain
8454 #modules up into smaller pieces, e.g. ckuus3-6, because of symbol table
8455 #overflow.   If this makefile is too big or complex for the Altos, compile
8456 #and link by hand or write shell scripts.
8457 altosc:
8458         @echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, remote...'
8459         $(MAKE) wermit \
8460         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8461         -DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOICP $(KFLAGS) -Mm -O" \
8462         "LNKFLAGS= -Mm -s"
8463
8464 #Altos 986 with Xenix 3.0, as above, but interactive only, minimal size.
8465 altosi:
8466         @echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, local...'
8467         $(MAKE) wermit \
8468         "CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8469         -DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOCMDL -DNOFRILLS -DNOHELP \
8470         -DNOSETKEY $(KFLAGS) -Mm -O" "LNKFLAGS= -Mm -s"
8471
8472 # Altos ACS68000 68000 System, UNIX System 3 Release 2, 512k memory.
8473 # also needs getcwd() external function; see ckuins.txt file.
8474 # also, sys/types.h needed modifying:
8475 #   #ifdef __SYS_TYPES_H__, #define ..., #endif
8476 # also, ckuus2.c MUST be compiled NOOPT else symbol table is destroyed!
8477 # Submission by Robert Weiner/Programming Plus, rweiner@progplus.com.
8478 #
8479 altos3:
8480         @echo 'Making C-Kermit $(CKVER) for Altos ACS68k UNIX System III'
8481         $(MAKE) ckuus2.$(EXT) "CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8482         -DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i"
8483         $(MAKE) wermit \
8484         "CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8485         -DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i -O" \
8486         "LNKFLAGS = -i" "LIBS = getcwd.$(EXT)"
8487
8488 #MINIX - Original PC version with 64K+64K limit.
8489 # Reportedly, the linker (asld) can run out of space while linking.  The only
8490 # way around this is to make a copy of libc.a from which all modules that are
8491 # not used by Kermit are removed.  If you have trouble compiling or running
8492 # wart, "touch wart".  If that doesn't help, "touch ckcpro.c".
8493 # The version configured below has no interactive command parser.
8494 # If you can build this version successfully, maybe there will be room for
8495 # a minimal interactive command parser too; try replacing -DNOICP with
8496 # -DNOSPL, plus every other -DNOxxx flag there is, except for -DNOICP
8497 # (see ckccfg.txt).
8498 minix:
8499         @echo 'Making C-Kermit $(CKVER) for MINIX, no command parser...'
8500         @echo 'TOTALLY UNTESTED!'
8501         $(MAKE) wermit EXT=s \
8502         "CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8503         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V \
8504         -DNOXMIT -DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
8505         -DNOSCRIPT -DNOCSETS -DNOICP -DNOSETKEY $(KFLAGS)" \
8506         "LNKFLAGS= -i -T"
8507
8508 #MINIX - PC version with 64K+64K limit, new (as yet unreleased) ACK 2.0 beta C
8509 #compiler, which outputs .o object files, rather than .s.  But 'make' still
8510 #expects .s files, so must be patched to use .o.  Tested on Minix 1.5.10.
8511 minix15:
8512         @echo 'Making C-Kermit $(CKVER) for MINIX (new ACK 2.0 compiler),'
8513         @echo 'no command parser...  TOTALLY UNTESTED!'
8514         $(MAKE) wermit \
8515         "CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8516         -DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V -DNODIAL \
8517         -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOICP $(KFLAGS)" \
8518         "LNKFLAGS= -i -T"
8519
8520 #MINIX3 - MINIX 3.0 (no VM) - May-Aug 2005 (not sure if this ever worked...)
8521 minix3:
8522         @echo 'Making C-Kermit $(CKVER) for MINIX3...'
8523         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8524         "CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -DMINIX2 \
8525         -DMINIX3 -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8526         -DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DDNOREALPATH \
8527         -DTCPSOCKET -DNOTIMEZONE -DNOFTP -DNO_DNS_SRV -O"
8528
8529 #MINIX315 - MINIX 3 1.5 - January 2010
8530 minix315:
8531         @echo 'Making C-Kermit $(CKVER) for Minix 3 1.5...'
8532         $(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8533         "CFLAGS= -DMINIX315 -DPOSIX -DNOUUCP -DNOJC -DNOLEARN $(KFLAGS) \
8534         -DHAVE_OPENPTY -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8535         -DSYSTIMEH -DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DNOREALPATH \
8536         -DTCPSOCKET -DNOTIMEZONE -DNO_DNS_SRV -DNOFTP -O"
8537
8538 #PFU Compact A Series UNIX System V R3, SX/A TISP V10/L50 (Japan)
8539 #Maybe the -i link option should be removed?
8540 sxae50:
8541         @echo 'Making C-Kermit $(CKVER) for PFU SX/A V10/L50...'
8542         $(MAKE) xermit \
8543         "CFLAGS= -DSVR3 -DDIRENT -DsxaE50 -DTCPSOCKET $(KFLAGS) -i -O" \
8544         "LNKFLAGS= "
8545
8546 #Tektronix 6130, 4319, 4301, etc, with UTek OS, /usr/spool/uucp/LCK./...
8547 #The models that support hardware flow control.
8548 utek:
8549         @echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, hardware flow control'
8550         $(MAKE) wermit \
8551         "CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8552         -DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8553         -DTRMBUFL=2048 -DCK_DTRCTS $(KFLAGS)"
8554
8555 #Tektronix 4315, 4316, 4317 with UTek OS, /usr/spool/uucp/LCK./...
8556 #The models that do not fully support hardware flow control.
8557 uteknohwfc:
8558         @echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, no h/w flow control'
8559         $(MAKE) wermit \
8560         "CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8561         -DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8562         -DTRMBUFL=2048 $(KFLAGS)"
8563
8564 #Tektronix XD88 with  UTekV OS
8565 utekvr3:
8566         @echo 'Making C-Kermit $(CKVER) for Tektronix XD88 UTekV R3...'
8567         $(MAKE) wermit \
8568         "CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP \
8569         -DTCPSOCKET -DSYSUTIMEH -DCK_CURSES $(KFLAGS) -O" \
8570         "LIBS= -lcurses" "LNKFLAGS= -s"
8571
8572 #Perkin-Elmer 3200 Xelos R02 or earlier
8573 ccop1:
8574         @echo 'Making C-Kermit $(CKVER) for Xelos & Public Domain Dirent calls'
8575         @echo 'or System V R2 or earlier...'
8576         $(MAKE) wermit \
8577         "CFLAGS = -DATTSV -Dvoid=int -DDIRENT -DCK_CURSES \
8578         $(KFLAGS) -O" "LNKFLAGS =" "LIBS= -lcurses -ltermlib"
8579
8580 #Encore, UMAX 4.3 (BSD) but without acucntrl program.
8581 encore:
8582         $(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=$(KFLAGS)"
8583
8584 #Encore, as above, but with curses file transfer display included.
8585 encorec:
8586         $(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=-DCK_CURSES $(KFLAGS)" \
8587         "LIBS= -lcurses -ltermcap"
8588
8589 #Encore, UMAX 4.3 (BSD) but without acucntrl program.
8590 umax43:
8591         @echo Making C-Kermit $(CKVER) for Encore UMAX 4.3...
8592         $(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8593         "CFLAGS= -DBSD43 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8594
8595 #Encore, UMAX 4.2 (BSD)
8596 umax42:
8597         @echo Making C-Kermit $(CKVER) for Encore UMAX 4.2...
8598         $(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8599         "CFLAGS= -DBSD4 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8600
8601 #Encore 88K UMAX 5.3 with TCP/IP support
8602 encore88k:
8603         @echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP...'
8604         $(MAKE) xermit \
8605         "CFLAGS = -q ext=pcc -DSVR3 -DTCPSOCKET -DDIRENT \
8606         -DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8607
8608 #Encore 88K UMAX 5.3 with TCP/IP support
8609 encore88kgcc:
8610         @echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP, gcc...'
8611         $(MAKE) xermit CC=gcc CC2=gcc \
8612         "CFLAGS = -DSVR3 -DTCPSOCKET -DDIRENT \
8613         -DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8614
8615 #SONY NEWS, NEWS-OS 4.01C
8616 sonynews:
8617         @echo Making C-Kermit $(CKVER) for SONY NEWS-OS 4.01C...
8618         $(MAKE) xermit "CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O"
8619
8620 #Run Lint on this mess for selected versions.
8621 #These are pretty much obsolete since ANSI C / gcc.
8622 lintsun:
8623         @echo 'Running Lint on C-Kermit $(CKVER) sources for SunOS version...'
8624         lint -x -DSUNOS4 -DDIRENT -DTCPSOCKET -DSAVEDUID \
8625         ck[cu]*.c > ckuker.lint.sun
8626
8627 lintbsd:
8628         @echo 'Running Lint on C-Kermit $(CKVER) sources for BSD 4.2 version..'
8629         lint -x -DBSD4 -DTCPSOCKET ck[cu]*.c > ckuker.lint.bsd42
8630
8631 lints5:
8632         @echo 'Running Lint on C-Kermit $(CKVER) sources for Sys V version...'
8633         lint -x -DATTSV ck[cu]*.c > ckuker.lint.s5
8634
8635 #Who remembers TECO?
8636 love:
8637         @echo 'Not war?'