1# makefile / Makefile / ckuker.mak / CKUKER.MAK
2#
3# Wed Oct  7 16:51:19 2020
4BUILDID=20201007
5CKVER= "9.0.305" # Alpha.03
6#
7# -- Makefile to build C-Kermit for UNIX and UNIX-like platforms --
8#
9# Copyright (C) 1985, 2020,
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 (principal author)
17# Email:  fdc@kermitproject.org
18# Web:    http://www.kermitproject.org
19# FTP:    ftp://ftp.kermitproject.org
20#
21# Note: Author is no longer at Columbia University or at the 115th Street
22# address as of 1 July 2011.  Even so, C-Kermit remains Copyright Columbia
23# University because that is where it was first written in 1985 and further
24# developed through mid-2011.
25#
26# Contributions from many others.  Special thanks to Jeff Altman for the
27# secure-build targets, Peter Eichhorn, assyst GmbH, for the consolidated
28# HP-UX targets and the "uninstall" target, to Robert Lipe for the updated
29# and consolidated SCO UNIX / ODT / OSR5 targets, to Ric Anderson for the
30# IRIX 6.x targets, to Seth Theriault for major improvements to the
31# Mac OS X targets, and to Alexey Dokuchaev for FreeBSD 9.0.
32#
33# C-Kermit is written and produced by hand without any external automated
34# procedures such as autoconf / automake / configure, although some of the
35# targets below (especially the linux target) inspect the environment and make
36# some decisions in the most portable way possible. The automated tools are
37# not used because (a) C-Kermit predates them, and (b) they are not portable
38# to all the platforms where C-Kermit must be (or once was) built, (c) the
39# automated tools are always changing, and (d) to keep C-Kermit as independent
40# as possible from external tools over which we have no control.
41#
42# Most entries use the "xermit" target, which uses the select()-based CONNECT
43# module, ckucns.c.  The "wermit" target uses the original fork()-based
44# CONNECT module, ckucon.c, which has some drawbacks but was portable to every
45# Unix variant whether it had TCP/IP or not (select() is part of the TCP/IP
46# library, which was not standard on older Unixes).  If your target still uses
47# the "wermit" target, please try substituting the "xermit" one and if it
48# works, let us know (mailto:fdc@columbia.edu).  When changing a target over
49# from wermit to xermit, also remove -DNOLOEARN.
50#
51# CAREFUL: Don't put the lowercase word "if", "define", or "end" as the first
52# word after the "#" comment introducer in the makefile, even if it is
53# separated by whitespace.  Some versions of "make" understand these as
54# directives.  Uppercase letters remove the danger, e.g. "# If you have..."
55#
56# WARNING: This is a huge makefile.  Although it is less likely since the
57# turn of the century, some "make" programs might run out of memory.  If this
58# happens to you, edit away the parts that do not apply to your platform and
59# try again.
60#
61# WARNING 2: In many cases this file invokes itself recursively, sometimes
62# several levels deep (as in the Linux targets); i.e. some targets are used
63# as 'subroutines' of other targets, with parameters passed by setting
64# environment variables.  For that reason, don't use 'make -e'.
65#
66# Certain UNIX variations have their own separate makefiles:
67#  . For Android, use android.mk.
68#  . For 2.10 or 2.11 BSD on the DEC PDP-11, use ckubs2.mak.
69#  . For Plan 9, use ckpker.mk.
70#
71# Separate build procedures are provided non-UNIX platforms: VMS, VOS,
72# AOS/VS, etc.  See the ckaaaa.txt file or the Kermit website for details.
73#
74#
75# DIRECTIONS FOR UNIX
76#
77# Rename this file to "makefile" or "Makefile" if necessary.  Pick out the
78# entry most appropriate for your UNIX version from the list below and then
79# give the appropriate "make" command, for example "make aix", "make macosx",
80# "make linux".  If you experience any difficulties with the build procedure,
81# then please also read any comments that accompany the make entry itself
82# (search for the make entry name on the left margin).
83#
84# Other targets:
85#  'make install' is an installation script (read accompanying comments!).
86#  'make uninstall' undoes 'make install' (read accompanying comments!).
87#  'make clean' removes intermediate and object files.
88#  'make show' tells the default include and lib paths for secure builds.
89#
90# IMPORTANT:
91#   For more detailed installation instructions, read the files ckuins.txt
92#   and ckccfg.txt, also available at the Kermit website in HTML form:
93#   http://www.columbia.edu/kermit/ckuins.html
94#   http://www.columbia.edu/kermit/ckccfg.html
95#
96#  For descriptions of known problems and limitations,
97#   read the files ckcbwr.txt and ckubwr.txt (the "beware files") or:
98#   http://www.columbia.edu/kermit/ckcbwr.html
99#   http://www.columbia.edu/kermit/ckubwr.html
100#
101# Most targets build C-Kermit with its symbol table included.  To reduce the
102# size of the executable program, add "LNKFLAGS=-s" to the end of your 'make'
103# command or to the makefile entry, or 'strip' the executable after
104# building.  To further reduce the size after building, use 'mcs -d' if your
105# Unix version has such a command.  For further details on size reduction, read
106# ckccfg.txt to find out how to remove features that you don't need.
107#
108# TCP/IP networking support: If your C-Kermit version does not include TCP/IP
109# networking, but your UNIX system does, try adding -DTCPSOCKET to the CFLAGS
110# of your makefile entry.  If that doesn't work, look at some of the other
111# targets that include this flag for ideas about what libraries might need to
112# be included (typically -lsocket and/or -lBSD and/or -lnsl and/or -linet).
113# NOTE: In some cases (old versions of SCO or HP-UX), you might need not only
114# a C compiler, but also a "TCP/IP developers kit" for the required object
115# libraries and header files.
116#
117# Please report modifications, failures (preferably with fixes) or successes
118# to the author, fdc@columbia.edu.
119#
120# TARGETS FOR DIFFERENT UNIX PLATFORMS AND VERSIONS:
121#
122# + Marks those that have been built successfully for C-Kermit 9.0 or later.
123# - Those that once built OK but no longer do (e.g. too big).
124# ? Those that worked in a previous version but have not been tested recently.
125# --------------------------
126# Some commonly used targets:
127#
128# + "make -f android.mk" (separate makefile) for Android.
129# + "make linux" should work for any version of Linux on any hardware.
130#     Note: new "make linux" (2016) not yet widely tested.
131#     Use "make linux-2015" (the old "make linux")
132#     if "make linux" causes problems.
133# + "make linux+ssl" ditto, with OpenSSL security added.
134# + "make linux+krb5" ditto, with Kerberos 5 security added.
135# + "make linux+krb5+ssl" Linux with OpenSSL and Kerberos 5.
136#     Note: the Linux targets work for Raspberry Pi with Debian 7.0 (Raspbian)
137# + "make netbsd", NetBSD, any version.
138# + "make netbsd+ssl", NetBSD with OpenSSL 0.9.7 or later.
139# + "make netbsd+krb5", NetBSD with Kerberos 5.
140# + "make netbsd+krb5+ssl", NetBSD with Kerberos 5 and OpenSSL 0.9.7 or later.
141# ? "make freebsd1" for FreeBSD 1.x
142# ? "make freebsd2" for FreeBSD 2.x
143# + "make freebsd3" for FreeBSD 3.x
144# ? "make freebsd4" for FreeBSD 4.0
145# + "make freebsd", FreeBSD 4.1 or later.
146# + "make freebsd+ssl", FreeBSD 5.0 or later with OpenSSL 0.9.7 or later.
147# + "make openbsd", OpenBSD 2.3 or later.
148# + "make openbsd+ssl", OpenBSD 2.3 or later with OpenSSL 0.9.7 or later.
149# + "make mirbsd", MirBSD.
150# + "make mirbsd+ssl", MirBSD with OpenSSL 0.9.7 or later.
151# + "make macosx" should work for any Mac OS X version 10.3.9 or later.
152# + "make macosx+krb5+openssl" Mac OS X 10.3.9 or later + Kerberos V + OpenSSL.
153# + "make aix" should work for any version of AIX 4.2 or later.
154# + "make aixg" should work for any version of AIX 4.2 or later, using gcc.
155# + "make aix+ssl" ditto, with OpenSSL (specifying SSLLIB and SSLINC)
156# + "make aix+ibmssl" ditto, with IBM OpenSSL
157# + "make solaris9", "make solaris10" for Solaris 9 or 10 with Sun cc.
158# + "make solaris9g", "make solaris10g" for Solaris 9 or 10 with gcc.
159# + "make solaris11" for Solaris 11 with Sun CC
160# + "make solaris11g" for Solaris 11 with gcc
161# + "make sco_osr600" for SCO OpenServer 6.0.0.
162#
163# For other current OSs such as Solaris, HP-UX, and SCO there are separate
164# targets for different combinations of OS version and compiler; see the
165# complete list.  For older OS's see the complete list.  If an old target
166# doesn't work in this release of C-Kermit you can get a previous release from
167# the Kermit FTP site: ftp://kermit.columbia.edu/kermit/
168#
169# SECURE TARGETS (versions that support authentication and encryption)
170#  are described after the following list.  Search for ******* below.
171#
172# --------------------------
173# Complete list (alphabetical):
174# ? for 386BSD (Jolix) 0.0, 0.1, "make 386bsd" (see comments in entry),
175#     or (preferably, if it works) "make bsd44" or "make bsd44c".
176# ? for Acorn RISCiX, "make riscix" or "make riscix-gcc"
177# ? for Alliant FX/8 with Concentrix 4.1 or later, "make bsdlck"
178# ? for Altos 486, 586, 986 with Xenix 3.0, "make altos"
179# ? for Altos ACS68000, 8Mhz 68000, UNIX System 3 Rel 2, 512K, "make altos3"
180# ? for Amdahl UTS 2.4 on IBM 370 series & compatible mainframes, "make uts24"
181# ? for Amdahl UTSV IBM 370 series & compatible mainframes, "make utsv"
182# ? for Amdahl UTSV IBM 370 series mainframes with TCP/IP, "make utsvtcp"
183# ? for Amdahl mainframes with UNIX System V R 5.2.6b 580, "make sys3"
184# ? for Apollo Aegis 9.x, DOMAIN/IX 9.x, "make aegis"
185#    (Last tested in C-Kermit 5A(189))
186# ? for Apollo DOMAIN/IX, if the above fails, try "make apollobsd"
187# ? for Apollo with SR10.0 or later, BSD environment, "make sr10-bsd"
188# ? for Apollo with SR10.0 or later, System V environment, "make sr10-s5r3"
189# ? for Apple Macintosh II with A/UX pre-3.0, "make aux", "auxgcc" or "auxufs"
190# ? for Apple Macintosh with A/UX 3.0 and gcc, "make aux3gcc" or aux3gccc
191# ? for Apple PowerMac with MkLinux, "make mklinux" (read Linux entry first)
192# ? for Apple PowerMac with LinuxPPC, "make linuxppc"
193# ? for Apple Macintosh with Minix 1.5.10, "make minix68k" or "make minixc68"
194# ? for Apple Macintosh with Mac OS X 1.0 (Rhapsody), "make macosx10"
195#     (no curses), "make macosx10c" (curses), or "make macosx10nc" (ncurses).
196#     Or "make macosx10ncx" (ncurses but "make macosx10nc" doesn't work).
197# ? for Apple Macintosh with Mac OS X 10.2, "make macosx102nc" (ncurses).
198# ? for Apple Macintosh with Mac OS X 10.3, "make macosx103"
199# ? for Apple Macintosh with Mac OS X 10.3.9 or later, "make macosx"
200# ? for Arix System 90 with AT&T SVR3, "make sys5r3na"
201# - for AT&T 6300 with IN/ix, "make sys5"
202# - for AT&T 6300 PLUS, "make att6300" or (with no debugging) "make att6300nd"
203# ? for AT&T 6386 WGS UNIX PC, "make sys5r3"
204# ? for AT&T 3B2, 3B20 systems, "make att3b2".
205#   for AT&T 3B1, 7300 UNIX PC (see notes with the entries):
206#     In C-Kermit 7.0, only the gcc entries work:
207# ?   "make sys3upcg", "make sys3upcgc", "make att351gm"
208#    The others fail with "too many defines" (usually in ckuusr.h):
209# -   "make sys3upc", "make sys3upcold", "make sys3upcc", "make sys3upcx",
210#       "make sys3upcm", "make att351m"
211# ? for AT&T System III/System V R2 or earlier, "make sys3" or "make sys3nid"
212# ? for AT&T System III/System V with Honey DanBer UUCP, "make sys3hdb"
213# ? for AT&T System V on DEC VAX, "make sys3" or "make sys5r3"
214# ? for AT&T System V R3, use "make sys5r3" or "make sys5r3c"
215# ? for AT&T System V/386 R3.2 built on Interactive 4.1.1, "make sys5r32is".
216# ? for AT&T System V/386 R320.0 Versyss Systems, use "make sys5r3"
217#     or "make sys5r3c".
218# ? for AT&T System V R4, "make sys5r4", "make sys5r4sx", or "make sys5r4nx",
219#     or if the ANSI C function prototyping makes trouble, add -DNOANSI,
220#     as in "sys5r4sxna" entry
221# ? for AT&T (USL) System V R4.2 use the sys5r4* entries.
222# ? for Atari Falcon with MiNT, "make posix"
223# ? for Atari ST with Minix ST 1.5.10.3, "make minix68k" or "make minixc68"
224# ? for BBN C/70 with IOS 2.0, "make c70"
225# ? for BeBox with Be OS 1.x DR7, "make beboxdr7"
226#     Compiles OK but doesn't link with default linker which is limited to 64K.
227#     Links OK with "Code Warrior Gold".  Many hacks in the source code need
228#     to be removed when DR8 and later come out.
229#     (Last tested in C-Kermit 6.0)
230# - for BeBox with Be OS 1.x DR8, "make bebox"
231#     (Needed functions missing from operating system and/or not working.)
232# - for Bell Labs UNIX Version 6 (6th Edition), there is no makefile entry.
233# ? for Bell Labs UNIX Version 7 (7th Edition), "make v7" (but see notes below)
234#    (last built successfully in C-Kermit 5A188)
235# ? for Bell Labs Research UNIX Version 10, "make bellv10"
236#    (last built successfully in C-Kermit 6.0)
237# ? for Bell Labs / Lucent Plan 9, use separate makefile ckpker.mk:
238#    can be built for Intel, MIPS, 680x0, and PowerPC (last built C-Kermit 7.0)
239# ? for BSDI BSD/386 1.x, "make bsdi"
240# ? for BSDI BSD/OS 2.x, "make bsdi2"
241# ? for BSDI BSD/OS 3.0 or 3.1, "make bsdi3"
242# ? for BSDI BSD/OS 4.x, "make bsdi4"
243# ? for BSDI BSD/OS 4.x, to build a binary that also works on FreeBSD,
244#     "make bsdix".
245# ? for Berkeley Unix 2.4, "make v7" (but read v7 material below)
246# ? for Berkeley Unix 2.9 (DEC PDP-11 or Pro-3xx), "make bsd29"
247# - for Berkeley Unix 2.10, use ckubs2.mak (a separate makefile)
248# - for Berkeley Unix 2.11, use ckubs2.mak (a separate makefile)
249#     This makefile is too big.  Read the instructions in ckubs2.mak.
250#     "make -f ckubs2.mak bsd210" or "make -f ckubs2.mak bsd211".
251#     (last built successfully in C-Kermit 6.0 - later versions too big)
252# ? for Berkeley Unix 2.11 "make -f ckubs2.mak bsd210noicp" (no command parser)
253# ? for Berkeley Unix 4.1, "make bsd41"
254# ? for Berkeley Unix 4.2 on VAX, "make bsd42" or "make bsd42c"
255# ? for Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP, "make bsdhdb"
256# ? for Berkeley Unix 4.3 on VAX, "make bsd43", "make bsd43nc".
257# ? for Berkeley Unix 4.3 on VAX, no networking "make bsd43nonet.
258# ? for Berkeley Unix 4.3 without acucntrl program, "make bsd42" or "bsd42c"
259#     NOTE: all the C-Kermit 7.0 full builds for old BSDs fail with
260#     "too many defines" in CPP, even on big architectures like VAX.  This
261#     can be worked around with a clever ruse.  See comments at target.
262# ? for Berkeley Unix 4.3, command-line only, "make bsdm".
263# ? for Berkeley Unix 4.3-Tahoe, same as 4.3 BSD
264# ? for Berkeley Unix 4.3-Reno, "make bsd43" or "make bsd44" or "make bsd44c"
265# ? for Berkeley Unix 4.3-Carson City, "make bsd44" or "make bsd44c"
266# ? for Berkeley Unix 4.4-Networking/2 or -Alpha, "make bsd44" or "make bsd44c"
267# ? for Berkeley Unix 4.4, "make bsd44" or "make bsd44c"
268# ? for Berkeley Unix 4.4-Lite, "make bsd44" or "make bsd44c"
269# ? for Bull DPX/2 with BOS/X, "make bulldpx2"
270# ? for Cadmus, "make sys3"
271#   for Caldera, see SCO, Linux.
272# ? for Callan Unistar, "make sys3"
273# ? for CDC VX/VE 5.2.1 System V emulation, "make vxve"
274# ? for Charles River Data Systems Universe 680x0 with UNOS 9.2, maybe
275#     also other UNOS versions, "make crds"
276# ? for CIE Systems 680/20 with Regulus, "make cie"
277# ? for Commodore Amiga 3000UX Sys V R4, "make sys5r4sx"
278# ? for Commodore Amiga 3000UX Sys V R4 and TCP/IP, "make svr4amiganet"
279# ? for Commodore Amiga with Minix 1.5.10, "make minix68k" of "make minixc68"
280# ? for Concurrent/Masscomp with RTU 4.0 or later, BSD environment, "make
281#     rtubsd", "make rtubsd2", "make rtubsd3" (depending on where ndir.h
282#     is stored, see entries below).
283# ? for Concurrent/Masscomp with RTU 4.0 or later, System V R2, "make rtus5"
284# ? for Concurrent (Perkin-Elmer) 3200 series, "make sys5".
285# ? for Concurrent (Perkin-Elmer) 3200 series with <dirent.h>, "make ccop1"
286# ? for Concurrent PowerMAX OS SVR4, "make powermax"
287# ? for Consensys UNIX SV/386 R4V3, "make sys5r4sxtcpc" or "make sys5r4sx"
288# ? for Convergent with CTIX Sys V R2, "make sys5"
289# ? for Convergent with CTIX 6.4.1, "make ctix"
290# ? for Convex C1, "make convex"
291# ? for Convex C210 with Convex/OS 8, "make convex8"
292# ? for Convex C2 with Convex/OS 9.1, "make convex9"
293# ? for Convex C2 with Convex/OS 10.1 and gcc 2.x, "make convex10gcc"
294# ? for Cray Research X/MP or YMP or C90 with UNICOS 6.x (System V R3),
295#	"make cray"
296# ? for Cray Research X/MP or YMP or C90 with UNICOS 7.x (System V R4),
297#	"make cray"
298# ? for Cray Research X/MP or YMP or C90 with UNICOS 8.0 Alpha, "make cray8"
299# ? for Cray Research X/MP or Y-MP or C90 with UNICOS 9.0, "make cray9"
300# ? for Cray Computer Cray-2 or Cray3 with CSOS, "make craycsos"
301# ? for Cyber 910 (Silicon-Graphics Iris) with Irix 3.3, "irix33"
302# ? for Data General AViiON with DG/UX 5.4 before R3.00, "make dgux540"
303#     or "make dgux540c" (compile ckwart separately if necessary)
304# ? for DG/UX 5.4 on AViiON Intel models, "make dgux540i" or dgux540ic.
305# ? for DG/UX 5.4R4.11 on AViiON, all models, "make dgux54411"
306# ? for DG/UX 5.4R4.20 on AViiON, all models, "make dgux54420"
307# ? for Data General AViiON with DG/UX 4.3x using Sys V-isms, "make dgux430"
308# ? for Data General AViiON with DG/UX 4.3x using BSD-isms, "make dgux430bsd"
309# ? for Data General AViiON, earlier UNIX versions,
310#     "make sys5r3" (maybe compile ckwart separately, or "touch ckcpro.c")
311# ? for Data General MV systems with DG/UX, ???
312# ? for Data General MV systems with MV/UX, use AOS/VS C-Kermit (CKDKER.MAK)
313# ? for Data General MV systems with AOS/VS, use CKDKER.MAK (last = C-K 7.0)
314# ? for DEC PDP-11 with Berkeley UNIX 2.x, see Berkeley UNIX 2.x.
315# ? for DEC PDP-11 with Mini-UNIX (Bell 6th Edition for PDP-11 with no MMU),
316#     probably no way to fit C-Kermit without I&D space.
317# ? for DEC PDP-11 with Ultrix-11 3.x, ??? (probably needs overlays)
318# ? for DEC VAX with Ultrix 1.x "make bsd"
319# ? for DEC VAX with Ultrix 2.x "make ultrix2x"
320# ? for DEC VAX or DECstation with Ultrix 3.0, 3.1, "make ultrix3x"
321# ? for DECstation or VAX with Ultrix 4.0 or 4.1, "make ultrix40"
322# ? for DECstation or VAX with Ultrix 4.2, "make ultrix42" or "make ultrix42c"
323# ? for DECstation or VAX with Ultrix 4.x, POSIX world, "make posix"
324# ? for DECstation or VAX with Ultrix 4.3, "make ultrix43".
325# ? for DECstation or VAX with Ultrix 4.4, "make ultrix44".
326# ? for DECstation 5000/50, /150 or /260 (R4x00 MIPS CPU), Ultrix 4.3A or later
327#     "make ultrix43-mips3" or "make ultrix43c-mips3"
328# ? for DECstation (MIPS) with Berkeley Sprite, "make bsd44"?
329# ? for DECstation (MIPS) with OSF/1 V1.0 to 1.3, "make dec-osf"
330# ? for DEC Alpha with OSF/1 1.0 to 1.3, "make dec-osf"
331# ? for DEC PC 486 with OSF/1, "make dec-osf"
332# ? for DEC Alpha with OSF/1 2.x, "make dec-osf20"
333# ? for DEC Alpha with OSF/1 3.0, "make dec-osf30"
334# ? for DEC Alpha with Digital UNIX 3.2, "make du32"
335# ? for DEC Alpha with Digital UNIX 4.0-4.0D, "make du40" or "make du40gcc"
336# ? for DEC Alpha with Digital UNIX 4.0E or higher, see Tru64.
337# + for DEC Alpha with any version of DU or OSF/1, "make dec-osf1"
338# - for DEC Pro-350 with Pro/Venix V1.x, "make provx1" (version 5A is too big)
339# ? for DEC Pro-380 with Pro/Venix V2.0 (Sys V), "make sys3" or "make sys3nid"
340# ? for DEC Pro-380 with 2.9, 2.10, or 2.11 BSD, "make bsd29" or "make bsd210"
341#   for DEC PDP-11 with 2.xBSD (use separate makefile ckubs2.mak)
342# ? for Dell UNIX Issue 2.x (= USL Sys V/386 R4.x + fixes), "make dellsys5r4"
343#     or "make dellsys5r4c" (last tested in C-Kermit 5A).
344# ? for DIAB DS90 with DNIX (any version) create an empty <sys/file.h> if
345#     this file does not already exist (or add -DNOFILEH to the make entry).
346# ? for DIAB DS90 with DNIX 5.2 (Sys V.2) or earlier, "make dnix",
347#     "make dnixnd", or (to add curses and TCP/IP) "make dnixnetc",
348# ? for DIAB DS90 with DNIX 5.3 (Sys V.3), "make dnix5r3"
349# ? for DIAB DS90 with DNIX 5.3 (Sys V.3) and TCP/IP, "make dnix5r3net"
350# ? for DIAB DS90 with DNIX 5.3 2.2 (Sys V.3), ANSI C, "make dnix5r3ansi"
351#     or, to include TCP/IP, "make dnix5r3ansinet",
352#     but you have to fix a bug in /usr/include/stdlib.h first:
353#     change "extern void free(char *str);" to "extern void free(void *str);"
354# ? for Dolphin Server Technology Triton 88/17 with SV/88 R3.2, "make sv88r32"
355# ? for Encore Multimax 310, 510 with Umax 4.2, "make umax42"
356# ? for Encore Multimax 310, 510 with Umax 4.3, "make umax43"
357# ? for Encore Multimax 310, 510 with Umax V 2.2, use Berkeley cc, "make bsd"
358# ? for Encore 88K with Umax V 5.2, "make encore88k"
359# ? for ESIX System V R4.0.3 or 4.04 with TCP/IP support, "make esixr4"
360#     NOTE: You can also build on Unixware 2.x with "make esixr4", and run
361#     on ESIX, but there you must first:
362#       ln /usr/lib/libsocket.so /usr/lib/libsocket.so.1
363#       ln /usr/lib/libnsl.so /usr/lib/libnsl.so.1
364#     (This worked for C-Kermit 6.0 but does not work for 7.0)
365#     (But you can probably still build a non-networking version this way)
366# ? for Everex STEP 386/25 Rev G with ESIX Sys V R3.2D, "make sys5r3"
367# ? for Fortune 32:16, For:Pro 1.8, "make ft18"
368# ? for Fortune 32:16, For:Pro 2.1, "make ft21"
369# ? for FPS 500 with FPX 4.1, "made bsd"
370# ? for FreeBSD 1.0, "make freebsd1"
371# ? for FreeBSD 2.x, "make freebsd2" (ncurses) or "make freebsd2c" (curses)
372# ? for FreeBSD 3.x, "make freebsd3" (ncurses) or "make freebsd3c" (curses)
373# ? for FreeBSD 4.0, "make freebsd40"
374# ? for FreeBSD 4.1 or later, "make freebsd"
375# + NOTE: Just use "make freebsd" for any reasonably recent FreeBSD version.
376# ? for Harris HCX-2900, "make sys5r3"
377# ? for Harris Night Hawk 88K or 68K with CX/UX pre-6.1, "make sys5r3"
378# ? for Harris Night Hawk 88K or 68K with CX/UX 6.1 or later, "make cx_ux"
379# ? for Heurikon, "make sys3"
380# ? for HP-3000, MPE/ix, "make posix"?
381# ? for HP-9000 Series 300 with 4.4BSD, "make bsd44"
382
383# NOTE: Most of the HP-UX targets were tested successfully in 2010.
384# Verification needed for C-Kermit 9.0 Beta.01...
385
386# ? for HP-9000 Series 500, HP-UX 5.21 and no networking "make hpux0500"
387# ? for HP-9000 Series 500, HP-UX 5.21 with WIN/TCP 1.2 "make hpux0500wintcp"
388# ? for HP-9000 Series, HP-UX 6.5, without long filenames,
389#     "make hpux0650", "make hpux0650c" or "make hpux0650tcpc"
390# ? for HP-9000 Series, HP-UX 7.0 or later no long filenames, "make hpux0700sf"
391#     or (to include tcp/ip, curses, etc) "make hpux0700sftcpc"
392# ? for HP-9000 Series with HP-UX 7.0, TCP/IP,long filenames,"make hpux0700lfn"
393# ? for HP-9000 300/400 Series (680x0) with HP-UX 8.0, TCP/IP, "make hpux0800"
394#      or "make hpux0800c"
395# ? for HP-9000 700/800 Series (PA-RISC), HP-UX 8.0, TCP/IP, "make hpux0800pa"
396#      or "make hpux0800pac"
397# ? for HP-9000 Series with HP-UX 8.0, no TCP/IP, long filenames,
398#      "make hpux0800notcp"
399# ? for HP-9000 Series, HP-UX 9.0 - 9.10, TCP/IP, curses, restricted compiler
400#     (no optimization, no ANSI), all models, "make hpux0900".  Read the
401#     hpux0900 entry below for more info.
402# ? for HP-9000 700 and 800 Series, HP-UX 9.x, TCP/IP, curses,
403#     HP optimizing ANSI C compiler, "make hpux0900o700".
404# ? for HP-9000 with Motorola CPUs, HP-UX 9.x, TCP/IP, curses,
405#     HP optimizing ANSI C compiler, "make hpux0900mot".
406# ? for HP-9000 on other CPUs, HP-UX 9.x, TCP/IP, curses,
407#     HP optimizing ANSI C compiler, "make hpux0900o".
408# ? for HP-9000 series, HP-UX 9.x, TCP/IP, curses, gcc, all models,
409#     "make hpux0900gcc"
410# ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
411#     curses, restricted compiler (no optimization, no ANSI) "make hpux1000".
412# ? for HP-9000 700/800 Series, HP-UX 10.00,10.01,10.10,10.20,10.30, TCP/IP,
413#     curses, HP ANSI/optimizing compiler "make hpux1000o" or "make hpux1000o+"
414# ? for HP-9000 HP-UX 10.00 or later with gcc, "make hpux1000gcc"
415# ? for Trusted HP-UX 10.xx "make hpux1000t", "make hpux1000to",
416#     or make hpux1000to+"
417# ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
418#     (no optimization, no ANSI) "make hpux1100".
419# ? for HP-9000 700/800 Series, HP-UX 11.00,TCP/IP,curses, restricted compiler
420#     HP ANSI/optimizing compiler "make hpux1100o" or "make hpux1100o+"
421# ? for Trusted HP-UX 11.xx "make hpux1100t", "make hpux1100to",
422#     make hpux1100to+"
423# ? for HP-9000 PA-RISC models with NeXTSTEP 3.3, "make nextquadfat".
424# ? for HP-9000 PA-RISC models with OPENSTEP/Mach 4.1, "make nextquadfat".
425# ? for IBM 370 Series with IX/370, "make ix370"
426# ? for IBM 370 Series with AIX/370 1.2, "make aix370"
427# ? for IBM 370 Series with AIX/370 3.0, "make aix370"
428# ? for IBM 370 Series with AIX/ESA 2.1, "make aixesa"
429# - for IBM PC/AT 286 & compatibles with Mark Williams Coherent OS,
430#     command-line-only version, "make coherent" (version 5A & later too big)
431# ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
432#     minimum interactive version, "make coherentmi"
433# ? for IBM PC 386 & compatibles with Mark Williams Coherent OS,
434#     full interactive version, prior to v4.2, "make coherentmax"
435# ? for IBM PC 386 & compatibles with Mark Williams Coherent OS 4.2,
436#     "make coherent42"
437# ? for IBM PC 386 & compatibles with LynxOS 2.0 or 2.1, "make lynx21"
438# ? for IBM PC 386 & compatibles with LynxOS 2.2, "make lynx"
439# - for IBM PC/AT & compatibles with original MINIX, "make minix" (too big)
440# ? for IBM PC family, 386-based, with MINIX/386 1.5, "make minix386"
441#     or if you have GNU CC, "make minix386gcc"
442# ? for IBM PC family, 386-based, with MINIX 2.0, "make minix20"
443# ? for IBM PC family, 386-based, with MINIX 3.0, "make minix3"
444# + for IBM PC family, 386-based, with MINIX 3.0, "make minix315"
445# ? for IBM PS/2 with PS/2 AIX 1.0, 1.1, or 1.2, "make ps2aix" or ps2aixnetc.
446# ? for IBM PS/2 with PS/2 AIX 1.3, "make ps2aix3"
447# ? for IBM RISC System/6000 with AIX 3.0, "make aix30"
448# ? for IBM RISC System/6000 with AIX 3.1.x, "make aix31"
449# ? for IBM RISC System/6000 with AIX 3.2.0 thru 3.2.5, "make aix32"
450# ? for IBM RS/6000 or Power Series with AIX 4.1.x, "make aix41"
451# ? for IBM RS/6000 or Power Series with AIX 4.1.x with gcc, "make aix41g"
452# ? for IBM RS/6000 or Power Series with AIX 4.1 with X.25, "make aix41x25"
453# ? for IBM RS/6000 or Power Series with AIX 4.2 or later: "make aix"
454#  (the following "make aixnn" targets are no longer necessary except for gcc)
455# ? for IBM RS/6000 or Power Series with AIX 4.2, "make aix42"
456# ? for IBM RS/6000 or Power Series with AIX 4.3, "make aix43" (or aix43gcc)
457# ? for IBM RS/6000 or Power Series with AIX 4.4, "make aix44" (or aix44gcc)
458# ? for IBM RS/6000 or Power Series with AIX 4.5, "make aix45" (or aix45gcc)
459# ? for IBM RS/6000 or Power Series with AIX 5.0, "make aix50" (or aix50gcc)
460# ? for IBM RS/6000 or Power Series with AIX 5.1, "make aix51" (or aix51gcc)
461# ? for IBM RS/6000 or Power Series with AIX 5.2, "make aix52" (or aix52gcc)
462# ? for IBM RS/6000 or Power Series with AIX 5.3, "make aix53" (or aix53gcc)
463# ? for IBM RS/6000 or Power Series with AIX 6.1, "make aix61" (or aix53gcc)
464# ? for IBM RT PC with AIX 2.1, "make sys3"
465# ? for IBM RT PC with AIX 2.2.1, "make rtaix" or "make rtaixc"
466# ? for IBM RT PC with ACIS 4.2, "make bsd"
467# ? for IBM RT PC with ACIS 4.3, "make rtacis" or "make bsd KFLAGS=-DNOANSI"
468# ? for IBM RT PC with 4.3BSD/Reno, "make bsd44" or "make bsd44c"
469# ? for ICL DRS400 or 400E, "make iclsys5r3"
470# ? for ICL DRS3000 (80486) with DRS/NX, "make iclsys5r4_486"
471# ? for ICL DRS6000 (SPARC) with DRS/NX, "make iclsys5r4"
472# ? for ICL DRS6000 (SPARC) with DRS/NX 4.2MP 7MPlus, "make iclsys5r4m+"
473# ?     Ditto but with IKSD support included, "make iclsys5r4m+iksd"
474# ? for Integrated Solutions Inc V8S VME 68020, "make isi"
475# ? for Intel 302 with Bell Tech Sys V/386 R3.2, "make sys5r3"
476# ? for Intel Xenix/286, "make sco286"
477# ? for Interactive System III (PC/IX), "make pcix" or "make is3"
478# ? for Interactive System III (PC/IX) with gcc, "make is3gcc"
479# ? for Interactive 386/ix 1.0.6 with TCP/IP networking, "make is5r3net2"
480# ? for Interactive 386/ix 2.0.x, "make is5r3" or (POSIX) "make is5r3p"
481# ? for Interactive 386/ix 2.0.x with TCP/IP networking, "make is5r3net"
482#     or "make is5r3net2"
483# ? for Interactive 386/ix 2.2.1, job control, curses, no net, gcc,
484#     "make is5r3gcc"
485# ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 without TCP/IP, "make is5r3jc"
486# ? for Interactive UNIX Sys V R3.2 V2.2 - 4.0 with TCP/IP, "make is5r3netjc"
487# ? for Intergraph Clipper, "make clix" or "make clixnet"
488# ? for Jolix (see 386BSD)
489# + for Linux 1.2 and later, "make linux".  Uses ncurses.  This version
490#     handles serial speeds up to 460800 bps, Linux FSSTD 1.2, TCP/IP, and
491#     should work on both libc and glibc systems.  For static linking, use
492#     "make linux LNKFLAGS=-static".  Please read the comments that accompany
493#     the linux entry.  As of 8.0.212 Dev.10, this also includes Large File
494#     Support (LFS).
495# + for Linux builds that fail with "sys/select.h: No such file or directory",
496#     "make linuxns"
497# + for Linux 1.2 and later but with curses.h and libcurses (rather than
498#     ncurses.h and libncurses), use "make linuxc".
499# + for Linux 1.2 and later with no curses support at all, "make linuxnc".
500# + for Linux with no TCP/IP, "make linuxnotcp"
501# (The following Linux targets are historic and might not work...)
502# ? for Red Hat Linux 7.1 through RH9, fully configured (krb5, SSL, etc):
503#     "make redhat71", "make redhat72", "make redhat73", "make redhat80"
504#     "make redhat9"
505#     NOTE: You must use this target for Red Hat 7.1 since it
506#     also includes a workaround for its broken curses library.
507#     WARNING: These targets create binaries that include code for
508#     strong encryption and are therefore not exportable. DO NOT PUT
509#     THESE BINARIES ON US OR CANADIAN WEB OR FTP SITES.
510# ? for Linux on PowerMac (Mklinux DR3), "make mklinux".
511# ? for Linux 1.2 and later, to build with egcs, "make linuxegcs".
512# ? for Linux with lcc compiler, no TCP/IP, "make linuxnotcp-lcc"
513# ? for Linux 1.0 or earlier, "make linux10".
514# (End old linux targets)
515# ? for Mach 2.6 on (anything, e.g. DECstation), "make bsd42" or "make bsd43".
516# ? for MachTen (Tenon) 2.1.1.D on (e.g.) Apple Powerbook, "make machten".
517# ? for Masscomp RTU AT&T System III, "make rtu"
518#   for other Masscomp, see Concurrent.
519# ? for Microport SV/AT (System V R2), "make mpsysv" (last edit tested: 144)
520# ? for Microport SVR4 2.2, 3.1, or 4.1 "make sys5r4sx"
521# ? for Microsoft,IBM Xenix (/286, PC/AT, etc), "make xenix" or "make sco286"
522# ? for MIPS System with RISC/os (UMIPS) 4.52 = AT&T SVR3, "make mips"
523#     or "make mipstcpc"
524# ? for MkLinux on Power Macintosh, "make mklinux"
525# ? for Modcomp 9730, Real/IX, "make sys5r3" (or modify to use gcc = GLS cc)
526# ? for Modcomp Realstar 1000 with REAL/IX D.1, "make sv88r32"
527# ? for Motorola Four Phase, "make sys3" or "make sys3nid"
528# ? for Motorola Delta System V/68 R3, "make sv68r3"
529# ? for Motorola Delta System V/68 R3V5, "make sv68r3v5"
530# ? for Motorola Delta System V/68 R3V5.1, "make sv68r3v51"
531# ? for Motorola Delta System V/68 R3V6 with NSE TCP/IP, "make sv68r3v6"
532# ? for Motorola Delta System V/88 R32, "make sv88r32"
533# ? for Motorola Delta System V/88 R40, "make sv88r40"
534# ? for Mt Xinu Mach386 on 386/486-based PCs, "make bsd43"
535# ? for NCR Tower 1632, OS 1.02, "make tower1"
536# ? for NCR Tower 1632 or Minitower with System V R2, "make sys3"
537#     or "make sys3nv"
538# ? for NCR Tower 32, OS Release 1.xx.xx, "make tower32-1"
539# ? for NCR Tower 32, OS Release 2.xx.xx, "make tower32-2"
540# ? for NCR Tower 32, OS Releases based on Sys V R3, "make tower32"
541# ? for NCR Tower 32, OS Releases based on Sys V R3 with gcc "make tower32g"
542# ? for NCR System 3000, AT&T UNIX System V R4 2.0, "make sys5r4sxna"
543# ? for NCR System 3000, AT&T UNIX System V R4 2.0 with Wollongong TCP/IP,
544#     "make sys5r4net2" or "make sys5r4net2c".
545#      Some header files might be misplaced; try this:
546#       ln /usr/include/netinet/in.h /usr/include/sys/in.h
547#       ln /usr/include/arpa/inet.h /usr/include/sys/inet.h
548#       ln /usr/include/sys/termiox.h /usr/include/termiox.h
549# ? for NCR System 3000, NCR UNIX 02.02.01, same as above.
550# ? for NCR MP-RAS System V R4 V2.03 or 3.02, "make mpras" or "make mprastcpc"
551# + for NetBSD any version on any architecture, "make netbsd"
552# + for NetBSD with OpenSSL, "make netbsd+ssl"
553# ? for NetBSD with ncurses specified instead of curses, "make netbsdn"
554# ? for NetBSD with all curses support omitted, "make netbsdnc"
555# ? for NeXT with NeXTSTEP 1.0 through 3.2, "make next" (on a NeXT)
556# ? for NeXT with NeXTSTEP 3.3, "make next33"
557# ? for NeXT with OPENSTEP/Mach 4.1, "make nextquadfat".
558# ? for NeXT with OPENSTEP/Mach 4.2, "make openstep42".
559# ? for NeXTSTEP/486, "make next" (on a PC)
560# ? for NeXTSTEP portable binary (runs on Intel or Motorola), "make nextfat"
561# ? for NeXTSTEP portable binary (Intel, Motorola, HP PA-RISC, or SPARC),
562#     "make nextquadfat"
563# ? for Nixdorf Targon/31, "make t31tos40x"
564# ? for Norsk Data Uniline 88/17 with SV/88 R3.2, "make sv88r32"
565#   for Novell UnixWare - see UnixWare
566# ? for OSF/1 (vanilla, from OS/F), "make posix"
567# ? for OkiStation 7300 Series, "make sys5r4sxtcp"
568# ? for Olivetti LSX-3020 with X/OS R.2.3, "make xos23" or "make xos23c"
569# + for OpenBSD, "make openbsd" (also see secure targets listed below).
570# ? for OPENSTEP/Mach 4.1, "make nextquadfat" (NeXT, Intel, PA-RISC, SPARC)
571# ? for OPENSTEP/Mach 4.2, "make openstep42" (tested on NeXT)
572# ? for Perkin-Elmer (Concurrent) 3200 series, "make sys5".
573# ? for Perkin-Elmer (Concurrent) 3200 series with <dirent.h>, "make ccop1"
574# ? for Perkin-Elmer/Concurrent 3200 with Xelos R02, "make ccop1"
575# ? for PFU Compact A Series SX/A TISP V10/E50 (Japan), "make sxae50"
576# ? for Plexus, "make sys3"
577# ? for Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1,
578#     "ucb make pyramid" or for HDB UUCP, "ucb make pyramid-hdb" or:
579# ? for Pyramid MIServer S or ES Series, DataCenter/OSx, "make pyrdcosx"
580# ? for Pyramid MIS-S MIPS R3000, DataCenter OSx System V R4, "make pyrdcosx"
581# ? for POSIX on anything, "make posix" (but adjustments might be necessary).
582#      NOTE: this target is not very useful - many features are missing.
583# ? for Prime 8000 MIPS, SVR3, "make mips" or "make mipstcpc"
584# - for QNX 2.x (sorry we don't have a version of C-Kermit for QNX 2.x)
585# ? for QNX 4.0 or 4.1, 16-bit, on 286 PC, Watcom C 8.5, "make qnx16_41"
586# ? for QNX 4.21 - 4.22A (286+), and 4.23 (386+), or higher, 16-bit,
587#     Watcom C 9.5x or higher, "make qnx16"
588# + for QNX 4.21-4.25, 32-bit, 386 or above, Watcom C 10.6, "make qnx32"
589#     NOTE: ("make qnx" == "make qnx32")
590# ? for QNX Neutrino 2+, "make qnx_nto2+" (crosscompiled on QNX4 with Watcom C)
591# ? for QNX 6 = Neutrino 2.xx, "make qnx6"
592# ? for Ridge 32 (ROS3.2), "make ridge32"
593# ? for Samsung MagicStation, "make sys5r4"
594# ? for SCO Xenix 2.2.1 with development system 2.2 on 8086/8 "make sco86"
595# ? for SCO Xenix/286 2.2.1 with development system 2.2 on 80286, "make sco286"
596#     NOTE: reportedly this makefile is too long for SCO Xenix/286 make, but it
597#     works with "makeL", or if some of the other make entries are edited out.
598# ? for SCO Xenix/386 2.2.2, "make sco386"
599# ? for SCO Xenix/386 2.3.x, "make sco3r2"
600# ? for SCO Xenix/386 SCO 2.3.3 or 2.3.4 with gcc 1.37 or later,
601#     "make sco386gcc" or (to add curses) "make sco386gccc".
602# ? for SCO Xenix/386 or UNIX/386 with Excelan TCP/IP, "make sco3r2net"
603#     or (to add curses support) "make sco3r2netc" or "sco386netc"
604# + for SCO XENIX 2.3.4, "make sco234" or "make sco234c" to add curses.
605# ? for SCO XENIX 2.3.4 with SCO TCP/IP & curses, "make sco234netc".
606# ? for SCO Xenix 2.3.x with Racal-InterLan TCP/IP, "make sco3r2netri"
607#   for other UNIX varieties with Racal Interlan TCP/IP, read sco3r2netri entry
608# ? for SCO Xenix 2.3.x with SCO (Lachman) TCP/IP, "make sco3r2lai"
609#     or (to add curses) "make sco3r2laic"
610#   for SCO UNIX...  ALSO READ COMMENTS in the SCO UNIX entries for more info!
611# ? for SCO UNIX/386 3.2.0 or 3.2.1, "make sco3r2" or "make sco3r2x"
612# ? for SCO UNIX/386 3.2.2, "make sco3r22" or "make sco3r22gcc"
613#     or "make sco3r22c"
614# ? for SCO UNIX/386 3.2.2 with SCO TCP/IP, "make sco3r22net"
615#     or "make sco3r22netc" (curses)
616# ? for SCO ODT 1.1, "make sco3r22net" or "make sco3r22netc" (curses)
617# ? for SCO UNIX/386 3.2 V4.x, no network support, "make sco32v4"
618# ?   or "make sco32v4ns" (this one uses no select() or sockets library)
619# ? for SCO UNIX/386 3.2 V4.x with TCP/IP, "make sco32v4net"
620#     (also sco32v4gcc, sco32v4netgcc)
621# ? for SCO UNIX/386 3.2 V5.0 - see SCO OpenServer.
622# ? for SCO UNIX 3.2v4.x with TCP/IP, <dirent.h> for Extended Acer File
623#     System (EAFS), curses, ANSI C compilation, "make sco32v4net"
624# ?   or (to use select()-based CONNECT module) "make sco32v4netx".
625# ? for SCO UNIX 3.2v4.2, "make sco-odt30" (includes TCP/IP).
626# ? for SCO MPX 3.0 - The SCO UNIX binary runs on the corresponding MPX system.
627#
628# NOTE: Also see below for other entries that are variations on these.
629# Also be sure to read the comments accompanying each SCO entry.
630# Also see Unixware section.
631#
632# ? for SCO ODT 2.0, "make sco32v4net"
633# ? for SCO ODT 3.0, "make sco-odt30"
634# ? for SCO OpenServer 5.0 (OSR5), "make sco32v500"
635# ? for SCO OpenServer 5.0 (OSR5) with networking, "make sco32v500net"
636# ? for SCO OpenServer 5.0 (OSR5), gcc, "make sco32v500gcc"
637# ? for SCO OpenServer 5.0 (OSR5), gcc, with networking, "make sco32v500netgcc"
638# ? for SCO OpenServer 5.0 (OSR5), as above, ELF, "make sco32v500netgccelf"
639# ? for SCO OpenServer 5.0.2, use "make sco32v502xxx" entries as above.
640# ? for SCO OpenServer 5.0.4, use "make sco32v504xxx" entries as above.
641# ? for SCO OpenServer 5.0.5, use "make sco32v505xxx" entries as above.
642#     Use the sco32v505udkxxx entries if you have the UDK rather than /bin/cc.
643# ? for SCO OpenServer 5.0.6, use "make sco32v506xxx" entries as above.
644# ? for SCO OpenServer 5.0.6a,use "make sco32v506axxx" entries as above.
645# ? for SCO OpenServer 5.0.7, use "make sco32v507", "make sco32v507net"
646# ? for SCO (Univel) UnixWare 1.x, "make unixware" or "make unixwarenetc".
647#     If there are problems with this in C-K 7+ see notes at unixware entry.
648# + for SCO OpenServer 6.0.0, "make sco_osr600"
649# ? for SCO UnixWare 2.0.x, "make uw20"
650# ? for SCO UnixWare 2.1.0, "make uw21"
651# ? for SCO UnixWare 2.1.3, "make uw213"
652# + for SCO UnixWare 7, "make uw7" (includes large file support)
653# ? for SCO UnixWare 7 with IKSD support, "make uw7iksd" or "make uw7iksdudk"
654# ? for SCO UnixWare 7 with OpenSSL, "make uw7ssl"
655# ? for SCO (Caldera) Open UNIX 8, "make ou8"
656# ? for Sharp Zaurus SL5500 PDA, "make zsl5500".
657# ? for Sequent with DYNIX/ptx 1.2.1, "make dynixptx12"
658# ? for Sequent with DYNIX/ptx 1.3 or 1.4 with TCP/IP, "make dynixptx13"
659# ? for Sequent with DYNIX/ptx 2.0 or 2.1 with TCP/IP, "make dynixptx20"
660#     or "dynixptx20c"
661# ? for Sequent with DYNIX/ptx 2.1.6 on i486, "dynixptx216c"
662# ? for Sequent with DYNIX/ptx V4.1.3 with TCP/IP, "make dynixptx41c"
663# ? for Sequent with DYNIX/ptx V4.4.2 with TCP/IP, "make dynixptx44"
664# ? for Sequent Balance 8000 or B8 with DYNIX 3.0.xx, "make dynix3"
665#    or "make dynix3noacu"
666# ? for Sequent Symmetry S81 with DYNIX 3.0.xx, "make dynix3"
667# ? for Sequent DYNIX 3.1.xx, "make dynix31" or "make dynix31c"
668# ? for Siemens/Nixdorf SINIX-L Intel V5.41, "make sinix541i"
669# + for Siemens/Nixdorf SINIX-N MIPS V5.42, "make sinix542"
670# ? for Siemens/Nixdorf SINIX-P MIPS V5.42 with gcc, "make sinix542g"
671# ? for Siemens/Nixdorf SINIX-Z Intel V5.42, "make sinix542i"
672# ? for Siemens/Nixdorf Reliant UNIX V5.43, "make sni543"
673# ? for Siemens/Nixdorf Reliant UNIX V5.44, "make sni544"
674# ? for Silicon Graphics Iris System V IRIX 3.2 or earlier, "make iris"
675# ? for Silicon Graphics Sys V R3 with IRIX 3.3 or later, "make sys5r3"
676# ? for Silicon Graphics Iris Indigo with IRIX 4.0 or 5.0, "make irix40" or
677#     (to include Yellow Pages and Curses) "make irix40ypc"
678# ? for Silicon Graphics Iris Indigo or Elan with IRIX 4.0.x with microcode
679#     optimization and -O4, "make irix40u" or "irix40uc" (and read notes
680#     accompanying these entries).
681# ? for Silicon Graphics IRIX 5.1, "make irix51" or "irix51x" (no optimize)
682# ? for Silicon Graphics IRIX 5.2, "make irix52"
683# ? for Silicon Graphics IRIX 5.3, "make irix53" or "irix53x" (no optimize)
684# ? for Silicon Graphics IRIX 6.0, "make irix60".
685# ? for Silicon Graphics IRIX 6.2, "make irix62".
686# ? for Silicon Graphics IRIX 6.3, "make irix63".
687# ? for Silicon Graphics IRIX 6.4, "make irix64" or "make irix64gcc".
688# + for Silicon Graphics (SGI) IRIX 6.5, "make irix65"
689# +   or "make irix65mips2" to force MIPS2, or "make irix65gcc" for GCC.
690# + for Silicon Graphics (SGI) IRIX 6.5, "make irix65" or "make irix65mips2"
691# ? for SGI IRIX 6.5 with SSL/TLS, SRP, and ZLIB "make irix65+ssl+srp+zlib"
692# ? for Solaris 2.0-2.3 on SPARC or Intel, SunPro CC, "make solaris2x",
693# ?   or to add SunLink X.25 8.0x support, "make solaris2x25".
694# ? for Solaris 2.4 built with gcc, "make solaris24g".
695# ? for Solaris 2.0-2.3 on SPARC or Intel, GNU CC, "make solaris2xg".
696# ? for Solaris 2.4 with X.25, "make solaris24x25".
697# ? for Solaris 2.5 on SPARC or Intel, SunPro CC, "make solaris25".
698# ?   or to add SunLink X.25 8.0x support, "make solaris25x25".
699# ? for Solaris 2.5 on SPARC or Intel, GNU CC, "make solaris25g".
700# ? for Solaris 2.6 on SPARC or Intel, "make solaris26".
701# ? for Solaris 7 on SPARC or Intel, SunPro CC, "make solaris7".
702# ? for Solaris 7 on SPARC or Intel, GNU CC, "make solaris7g".
703# ? for Solaris 8 on SPARC or Intel, SunPro CC, "make solaris8".
704# ? for Solaris 8 on SPARC or Intel, GNU CC, "make solaris8g".
705# + for Solaris 9 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris9".
706# + for Solaris 9 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris9g".
707# ? for Solaris 9 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris9g64".
708# + for Solaris 10 on SPARC (or Intel?), 32-bit, SunPro CC, "make solaris10".
709# + for Solaris 10 on SPARC 64-bit, SunPro CC, "make solaris10_64".
710# + for Solaris 10 on SPARC (or Intel?), 32-bit, GNU CC, "make solaris10g".
711# ? for Solaris 10 on SPARC (or Intel?), 64-bit, GNU CC, "make solaris10g64".
712# ? for Solbourne 4/500 with OS/MP 4 "make sunos4"
713# ? for Solbourne 4/500 with OS/MP 4.1 "make sunos41" or "make sunos41c"
714# ? for SONY NEWS with NEWS-OS 4.0.1C, "make sonynews"
715# ? for SONY NEWS with NEWS-OS 4.1.2C, "make sonynews"
716# ? for Sperry/UNISYS 5000/20, UTS V 5.2 3R1, "make sys5"
717# ? for Sperry/UNISYS 5000/30/35/50/55, UTS V 5.2 2.01, "make unisys5r2"
718# ? for Sperry/UNISYS 5000/80 with System V R3, "make sys5r3"
719# ? for Sperry/UNISYS 5000/95 with System V R3, "make sys5r3"
720#     For UNISYS SVR3 it might be necessary to "make sys5r3 KFLAGS=-UDYNAMIC"
721# ? for Stardent 1520, "make sys5r3"
722# ? for Stratus FTX 2.x, try "make ftx" or else "make sys5r4" or "sys5r4sx"
723# ? for Stratus FTX 3.x, PA-RISC 1.0 or 2.0, "make ftx" or "make ftxtcp"
724# ? for Sun with Sun UNIX 3.5 and gcc, "make sunos3gcc"
725# ? for Sun with pre-4.0 SunOS versions, "make bsd" (or appropriate variant)
726# ? for Sun with SunOS 4.0, BSD environment, "make sunos4"
727# ? for Sun with SunOS 4.0, BSD, with SunLink X.25, make sunos4x25
728# ? for Sun with SunOS 4.1 or 4.1.1, BSD environment, "make sunos41"
729#     or "make sunos41c" (curses) or "make sunos41gcc" (compile with gcc)
730# ? for Sun with SunOS 4.1.x, BSD, with SunLink X.25 7.00 or earlier,
731#     "make sunos41x25" or "make sunos41x25c" (curses)
732# ? for Sun with SunOS 4.1, 4.1.1, AT&T Sys V R3 environment, "make sunos41s5"
733# ? for Sun with SunOS 4.1.2, "make sunos41" or any of its variations.
734#     NOTE:  All SunOS 4.x systems -- Shared libraries are used by default.
735#       If this causes problems, add -Bstatic to CFLAGS.
736#     NOTE2: When building C-Kermit under SunOS for the BSD universe,
737#       but /usr/5bin/cc is ahead of /usr/ucb/cc in your PATH, add
738#       "CC=/usr/ucb/cc CC2=/usr/ucb/cc" to the make entry.
739#     NOTE3: If an executable built on one type of Sun hardware does not work
740#       on another type, rebuild the program from source on the target machine.
741#   for Sun with Solaris 1.x use SunOS 4.1 entries.
742#   for Sun with Solaris 2.0 and higher use Solaris entries.
743# + for Sun SPARC with Linux, "make linux"
744# ? for Sun SPARC with OPENSTEP/Mach 4.1, "make nextquadfat"
745# ? for Sun SPARC with OPENSTEP/Mach 4.2, "make openstep42"
746# - for Tandy 16/6000 with Xenix 3.0, "make trs16" (C-Kermit 7.0 is too big)
747# ? for Tektronix 6130/4132/43xx (e.g.4301) with UTek OS, "make utek"
748#     or (for models without hardware flow control), "make uteknohwfc"
749# ? for Tektronix XD88 series with UTekV OS, "make utekvr3"
750# ? for Tri Star Flash Cache with Esix SVR3.2, "make sys5r3"
751# NOTE: The Tru64 builds have been failing since 2010, but "make dec-osf" is OK
752# ? for Tru64 UNIX 4.0E, "make tru64-40e"
753# ? for Tru64 UNIX 4.0F, "make tru64-40f"
754# ? for Tru64 UNIX 4.0G, "make tru64-40g"
755# ? for Tru64 UNIX 5.0A, "make tru64-50a"
756# ? for Tru64 UNIX 5.1A, "make tru64-51a"
757# ? for Tru64 UNIX 5.1B, "make tru64-51b"
758# ? for Unistar, "make sys5"
759# ? for Unisys S/4040 68040 CTIX SVR3.2 6.4.1, "make ctix" or "make sys5r3"
760# ? for Unisys U5000 UNIX SVR3 6.x, "make sys5r3" or "make sys5r3c"
761# ? for Unisys U6000 UNIX SVR4 1.x, "make sys5r4nx" or "make sys5r4nxnetc"
762#   for Unisys ... (also see Sperry)
763#   for Univel - see UnixWare
764#   for Unixware - see SCO
765# ? for Valid Scaldstar, "make valid"
766# ? for Whitechapel MG01 Genix 1.3, "make white"
767# ? for Zilog ZEUS 3.21, "make zilog"
768#
769# The result should be a runnable program called "wermit" in the current
770# directory.  After satisfactory testing, you can rename wermit to "kermit"
771# and put it in some directory that's in everybody's PATH, such as
772# /usr/local or /opt/local.
773#
774# To remove intermediate and object files, "make clean".
775# If your C compiler produces files with an extension other than "o",
776# then "make clean EXT=u", "make clean EXT=s", or whatever.
777#
778# To run lint on the source files, "make lintsun", "make lintbsd",
779# "make lints5", as appropriate.
780#
781# ******************************
782# SECURE TARGETS
783#
784# Beginning with C-Kermit 7.0, secure targets are included, as are the
785# source modules (ckuat*.[ch], ck_*.[ch]) needed to build them.  Secure
786# target names are like the regular names, but with security features
787# indicated by plus (+) signs.  The features are:
788#
789# krb4     MIT Kerberos IV
790# krb5     MIT Kerberos V
791# openssl  OpenSSL (SSL/TLS)
792# zlib     ZLIB compression for SSL/TLS
793# srp      Stanford Secure Remote Password
794# pam      PAM (pluggable authentication module)
795# shadow   Shadow Password File
796#
797# You can build these targets if you have the Kermit source files and the
798# required libraries (Kerberos, OpenSSL, SRP, etc) and header files.  See:
799#   http://www.columbia.edu/kermit/security.html
800# for specific details regarding supported versions.
801#
802# NOTE: OpenSSL 0.9.6 and earlier are not compatible with 0.9.7 and later.
803# C-Kermit code was originally designed for 0.9.6.  To build with 0.9.7 you
804# must add -DOPENSSL_097 to avoid missing symbols in the DES library and to
805# use the entry points that were renamed to avoid conflict with Kerberos 4.
806# If you have OpenSSL 0.9.8, add -DOPENSSL_098, which is a synonym for
807# -DOPENSSL_097.  If you have 1.0.0 or later, add -DOPENSSL_100, which is
808# another synonym.
809
810# In OpenSSL builds add -ldl if you get unresolved references for
811# dlopen, dlclose, dlsym, and/or dlerror.
812#
813# In order to build a secure version of Kermit, you need to know the location
814# of the header (include) files and libraries for the desired form of
815# security.  Unless you specify a location, this makefile looks in /usr/local
816# and if the required files are not found, the build fails.
817#
818# If the secure headers and libraries are not on your computer, you have
819# to download and install them, for example from http://www.openssl.org .
820#
821# The following symbols are used to specify library and header file locations:
822#
823prefix  = /usr/local
824srproot = $(prefix)
825sslroot = $(prefix)
826manroot = $(prefix)
827
828K4LIB=-L/usr/kerberos/lib
829K4INC=-I/usr/kerberos/include
830K5LIB=-L/usr/kerberos/lib
831K5INC=-I/usr/kerberos/include
832SRPLIB=-L$(srproot)/lib
833SRPINC=-I$(srproot)/include
834SSLLIB=-L$(sslroot)/ssl/lib
835SSLINC=-I$(sslroot)/ssl/include
836
837# To override these assignments; for example, if your OpenSSL files are
838# not in /usr/local/ssl, invoke the desired target like this:
839#
840#  make solaris9+openssl "SSLINC=-I/opt/openssl-0.9.8k/include" \
841#   "SSLLIB=-L/opt/openssl-0.9.8k/lib"
842#
843# (don't set the variables and then do "make -e" because that breaks
844# chaining of makefile targets.)
845#
846# Here are some up-to-date secure targets as of Sep 2009:
847#
848# aix+openssl:                        IBM AIX 4.2 or later with OpenSSL
849# freebsd44+srp+openssl               FreeBSD 4.4 with SRP and OpenSSL
850# freebsd50+openssl                   FreeBSD 5.0 with OpenSSL
851# hpux1100o+openssl:                  HP-UX 11.xx with OpenSSL
852# hpux1000gcc+openssl:                HP-UX 10.xx with OpenSSL (build with gcc)
853# hpux1100gcc+openssl:                HP-UX 11.xx with OpenSSL (build with gcc)
854# irix6x+krb5:                        IRIX 6.x with Kerberos V
855# irix65+krb5:                        etc etc...
856# solaris9+openssl                    Solaris 9,10, or 11 with Openssl (Sun cc)
857# solaris9g+openssl                   Solaris 9,10, or 11 with Openssl (gcc)
858# linux+ssl                           OpenSSL only
859# linux+krb5+ssl                      Linux with Kerberos 5 and OpenSSL
860# linux+krb5:                         Kerberos 5 only
861#
862# The following secure Linux targets have not been updated or tested recently.
863# linux+krb5+krb4:
864# linux+srp:
865# linux+srp+pam:
866# linux+srp+gmp:
867# linux+srp+gmp+no-des:
868# linux+srp+gmp-export:
869# linux+srp+gmp+pam:
870# linux+shadow+pam:
871# linux+openssl:
872# linux+openssl+shadow:
873# linux+openssl+zlib+shadow+pam:
874# linux+srp+openssl:
875# linux+krb5+krb4+srp:
876# linux+krb5+krb4+srp+openssl:
877# linux+krb5+krb4+openssl:
878# linux+krb5+krb4+openssl+shadow:
879# linux+krb5+krb4+openssl+zlib+shadow:
880# linux+krb5+krb4+srp-export:
881# linux+krb5+krb4+srp+pam:
882# linux+krb5+krb4+srp+openssl+pam-debug:
883# linux+krb5+krb4+srp+openssl+pam:
884# linux+krb5+krb4+srp+openssl+zlib+pam:
885# linux+krb5+krb4+openssl+shadow+pam:
886# linux+krb5+openssl+zlib+shadow+pam:
887#
888# The following have not been tested recently either and might
889# need adjustment.
890#
891# macosx+krb5+ssl:     Mac OS X 10.3.9 or later + OpenSSL and Kerberos 5
892# macosx103+secure:    This one is probably redundant
893# netbsd+openssl:      NetBSD with OpenSSL
894# openbsd30+ssl:       OpenBSD 3.0 with OpenSSL
895# redhat71,redhat72,redhat73,redhat80,redhat9 (Krb5,OpenSSL,Showdow,PAM,Zlib)
896# sco32v500net+ssl:
897# sco32v505net+ssl:
898# solaris2x+krb4:
899# solaris2xg+krb4:
900# solaris2xg+openssl+pam+shadow:
901# solaris2xg+openssl+zlib+pam+shadow:
902# solaris2xg+krb5+krb4+openssl+shadow:
903# solaris25+krb4:
904# solaris25g+krb4:
905# solaris26g+openssl:
906# solaris8g+openssl+zlib+pam+shadow:
907# solaris8g+krb4:
908# solaris9g+openssl+zlib+pam+shadow:
909# solaris9g+openssl+shadow+pam+zlib
910# sunos41gcc+krb4:                    SunOS 4.1 built with gcc with Kerberos IV
911# sunos41gcc+openssl:                 SunOS 4.1 built with gcc with OpenSSL
912# sunos41gcc+krb4+openssl:            ...with Kerberos IV and OpenSSL
913# sunos41gcc+krb4+openssl+zlib:       ditto, plus ZLIB compression
914# sunos41gcc+krb4+srp+openssl+zlib:   ditto, plus SRP
915# sunos41gcc+srp+openssl+zlib:
916# tru64-51b-openssl:                  Tru64 (Digital) Unix 5.1B with OpenSSL
917# uw7ssl                              Unixware 7 with SSL
918#
919###########################################################################
920#
921#  Compile and Link variables:
922#
923#  EXT is the extension (file type) for object files, normally o.
924#  See MINIX entry for what to do if another filetype must be used.
925#
926EXT=o
927#LNKFLAGS=
928SHAREDLIB=
929CC= cc
930CC2= cc
931MAKE= make
932SHELL=/bin/sh
933
934###########################################################################
935# (Ancient) UNIX V7-specific variables.
936# These are set up for Perkin-Elmer 3230 V7 Unix:
937#
938PROC=proc
939DIRECT=
940NPROC=nproc
941NPTYPE=int
942BOOTFILE=/edition7
943#
944# ( For old Tandy TRS-80 Model 16A or 6000 V7-based Xenix, use PROC=_proc,
945#   DIRECT=-DDIRECT, NPROC=_Nproc, NPTYPE=short, BOOTFILE=/xenix )
946#
947
948###########################################################################
949# SAMPLE INSTALLATION SCRIPT
950#
951# Modify to suit your own computer's file organization and permissions.  If
952# you don't have write access to the destination directories, "make install"
953# fails.  In most cases, a real installation also requires you to chown /
954# chgrp the Kermit binary for the UUCP lockfile and/or tty devices, and
955# perhaps also to chmod +s the corresponding permission fields.
956#
957# Default binary, man, and doc directories are supplied below.  You can
958# override them in your 'make' command.  Examples:
959#
960#   make install                                   # Accept defaults.
961#   make "INFODIR=/usr/share/lib/kermit" install   # Override INFODIR default.
962#
963# You can also build and install in one step, e.g.:
964#
965#   make linux install
966#
967# If you use the 'install' target to install C-Kermit, it creates an
968# UNINSTALL script that can be used to uninstall it.
969#
970WERMIT = makewhat
971BINARY = wermit
972DESTDIR =
973BINDIR = $(prefix)/bin
974MANDIR = $(manroot)/man/man1
975MANEXT = 1
976SRCDIR =
977INFODIR =
978CERTDIR =
979
980TEXTFILES = COPYING.TXT ckcbwr.txt ckubwr.txt ckuins.txt ckccfg.txt \
981		ckcplm.txt ckermit.ini ckermod.ini ckermit70.txt ckermit80.txt
982
983ALL = $(WERMIT)
984
985all: $(ALL)
986
987.c.o:
988	$(CC) $(CFLAGS) -DKTARGET=\"$(KTARGET)\" -c $<
989
990#Clean up intermediate and object files
991clean:
992	@echo 'Removing object files...'
993	-rm -f ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
994ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckcpro.$(EXT) ckcfns.$(EXT) \
995ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) \
996ckufio.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) ckwart.$(EXT) ckuusx.$(EXT) \
997ckuusy.$(EXT) ckcnet.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckusig.$(EXT) \
998ckucns.$(EXT) ckcmdb.$(EXT) ckuath.$(EXT) ckctel.$(EXT) ckclib.$(EXT) \
999ckcuni.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1000ckcpro.c wart
1001
1002show:
1003	@echo prefix=$(prefix)
1004	@echo srproot=$(srproot)
1005	@echo sslroot=$(sslroot)
1006	@echo manroot=$(manroot)
1007	@echo K4LIB=$(K4LIB)
1008	@echo K4INC=$(K4INC)
1009	@echo K5LIB=$(K5LIB)
1010	@echo K5INC=$(K5INC)
1011	@echo SRPLIB=$(SRPLIB)
1012	@echo SRPINC=$(SRPINC)
1013	@echo SSLLIB=$(SSLLIB)
1014	@echo SSLINC=$(SSLINC)
1015	@exit
1016
1017# Install C-Kermit after building -- IMPORTANT: Read the instructions above
1018# (SAMPLE INSTALLATION SCRIPT).  For SSL/TLS versions, ca_certs.pem file
1019# should be installed in the appropriate place for your OpenSSL library, e.g.:
1020#
1021#   cp ca_certs.pem /usr/local/ssl/
1022#   cp ca_certs.pem /usr/share/ssl/
1023#
1024# To make sure 'man' notices the new source file and doesn't keep
1025# showing the old formatted version, remove the old formatted version,
1026# something like this:
1027#		rm -f $(MANDIR)/../cat$(MANEXT)/kermit.$(MANEXT)
1028# or this (which requires CATDIR to be defined):
1029#		rm -f $(CATDIR)/kermit.$(MANEXT)
1030#
1031# As of C-Kermit 8.0.205 this target also builds an UNINSTALL script, and
1032# so it might be too long for some old Bourne shells, in which case you can
1033# use a different shell:
1034#
1035#   make SHELL=ksh install
1036#   make SHELL=/bin/posix/sh install
1037#
1038install:
1039	@echo Installing C-Kermit version $(CKVER)...;\
1040	rm -f UNINSTALL;\
1041	exec 3>./UNINSTALL;\
1042	echo "# C-Kermit UNINSTALL script" >&3;\
1043	echo "# `date`\n" >&3;\
1044	echo "CKVER=$(CKVER)" >&3;\
1045	echo "PrN Uninstalling C-Kermit version $(CKVER)..." >&3;\
1046	echo DESTDIR=$(DESTDIR);\
1047	if test -n "$(DESTDIR)"; then\
1048		if test -d $(DESTDIR); then\
1049			echo  "$(DESTDIR) exists...\n";\
1050		else\
1051			echo "Creating $(DESTDIR)...";\
1052			DESTDIR=`echo $(DESTDIR) | sed 's!/*$$!!'`;\
1053			mkdir $$DESTDIR  || exit 1;\
1054		fi;\
1055		chmod 755 $(DESTDIR) || exit 1;\
1056	fi;\
1057	echo BINARY=$(BINARY);\
1058	if test -f $(BINARY); then\
1059		ls -l $(BINARY);\
1060	else\
1061		echo "?$(BINARY) not found";\
1062		exit 1;\
1063	fi;\
1064	if test -z "$(DESTDIR)$(BINDIR)"; then\
1065		echo "Binary directory not specified";\
1066		exit 1;\
1067	fi;\
1068	if test -d $(DESTDIR)$(BINDIR); then\
1069		echo  "$(DESTDIR)$(BINDIR) exists...";\
1070	else\
1071		echo "Creating $(DESTDIR)$(BINDIR)/...";\
1072		mkdir     $(DESTDIR)$(BINDIR) || exit 1;\
1073		chmod 755 $(DESTDIR)$(BINDIR);\
1074	fi;\
1075	rm -f $(DESTDIR)$(BINDIR)/kermit;\
1076	cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1077	chmod 755    $(DESTDIR)$(BINDIR)/kermit || exit 1;\
1078	rm -f        $(DESTDIR)$(BINDIR)/kermit-sshsub;\
1079	ln -s        $(DESTDIR)$(BINDIR)/kermit\
1080		     $(DESTDIR)$(BINDIR)/kermit-sshsub || exit 1;\
1081	echo 'set flag=f\nPrC Removing binaries' >&3;\
1082	echo "RmF $(DESTDIR)$(BINDIR)/kermit-sshsub" >&3;\
1083	echo "RmF $(DESTDIR)$(BINDIR)/kermit" >&3;\
1084	if test -f ckermit.ini; then\
1085		echo "#!$(BINDIR)/kermit" >\
1086			$(DESTDIR)$(BINDIR)/_tmp.ini;\
1087		cat ckermit.ini >> $(DESTDIR)$(BINDIR)/_tmp.ini;\
1088		mv $(DESTDIR)$(BINDIR)/_tmp.ini\
1089		   $(DESTDIR)$(BINDIR)/ckermit.ini;\
1090		chmod 755 $(DESTDIR)$(BINDIR)/ckermit.ini;\
1091		echo "RmF $(DESTDIR)$(BINDIR)/ckermit.ini" >&3;\
1092	fi;\
1093	echo;\
1094	echo 'EfM' >&3;\
1095	echo "Kermit binary installed:";\
1096	ls -l $(DESTDIR)$(BINDIR)/kermit\
1097	      $(DESTDIR)$(BINDIR)/kermit-sshsub\
1098	      $(DESTDIR)$(BINDIR)/ckermit.ini;\
1099	echo;\
1100	echo " WARNING: If C-Kermit is to be used for dialing out,";\
1101	echo " you must change its owner and group and permissions";\
1102	echo " to match the 'cu' program.  See the ckuins.txt file";\
1103	echo " for details.";\
1104	echo;\
1105	echo MANDIR=$(MANDIR);\
1106	if test -n "$(DESTDIR)$(MANDIR)"; then\
1107		if test -d $(DESTDIR)$(MANDIR); then\
1108			echo  "$(DESTDIR)$(MANDIR) exists...";\
1109		else\
1110			echo "Creating $(MANDIR)...";\
1111			mkdir $(MANDIR) || exit 1;\
1112			chmod 755 $(MANDIR) || exit 1;\
1113		fi;\
1114		rm -f $(DESTDIR)$(MANDIR)/kermit.$(MANEXT);\
1115		cp ckuker.nr $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1116		chmod 644 $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
1117		echo 'set flag=f\nPrC Removing man pages' >&3;\
1118		echo "RmF $(DESTDIR)$(MANDIR)/kermit.$(MANEXT)" >&3;\
1119		echo 'EfM' >&3;\
1120		echo;\
1121	else\
1122		echo "Not installing man page!\n";\
1123	fi;\
1124	echo CERTDIR=$(CERTDIR);\
1125	if test -n "$(CERTDIR)"; then\
1126		if test -f ca_certs.pem; then\
1127			if test -d $(CERTDIR); then\
1128				echo  "$(CERTDIR) exists...";\
1129			else\
1130				echo "Creating $(CERTDIR)...";\
1131				mkdir $(CERTDIR) || exit 1;\
1132				chmod 755 $(CERTDIR) || exit 1;\
1133			fi;\
1134			echo "Installing certificates file...";\
1135			cp ca_certs.pem $(CERTDIR) || exit 1;\
1136			echo 'set flag=f' >&3;\
1137			echo 'PrC Removing certificates file' >&3;\
1138			echo "RmF $(CERTDIR)/ca_certs.pem" >&3;\
1139			echo 'EfM' >&3;\
1140			echo;\
1141		fi;\
1142	else\
1143		echo "Not installing certificates file!\n";\
1144	fi;\
1145	echo SRCDIR=$(DESTDIR)$(SRCDIR);\
1146	if test -n "$(SRCDIR)"; then\
1147		echo "Installing source files...";\
1148		if test -d $(DESTDIR)$(SRCDIR); then\
1149			echo  "$(DESTDIR)$(SRCDIR) exists...";\
1150		else\
1151			echo "Creating $(DESTDIR)$(SRCDIR)/...";\
1152			mkdir     $(DESTDIR)$(SRCDIR) || exit 1;\
1153			chmod 755 $(DESTDIR)$(SRCDIR);\
1154		fi;\
1155		echo "Copying source files to $(DESTDIR)$(SRCDIR)...";\
1156		echo 'set flag=f\nPrC Removing source files' >&3;\
1157		for TextFile in COPYING.TXT ck[cuw_]*.[cwh] makefile; do\
1158			cp $$TextFile $(DESTDIR)$(SRCDIR)/ && echo ".\c";\
1159			echo "RmF $(DESTDIR)$(SRCDIR)/$$TextFile" >&3;\
1160		done; echo;\
1161		echo 'EfM' >&3;\
1162		( cd $(DESTDIR)$(SRCDIR)/ &&\
1163		ls -l COPYING.TXT ck[cuw_]*.[cwh] makefile );echo;\
1164	else\
1165		echo "Not installing source code!\n";\
1166	fi;\
1167	echo INFODIR=$(DESTDIR)$(INFODIR);\
1168	if test -n "$(INFODIR)"; then\
1169		echo "Installing info files...";\
1170		if test -d $(DESTDIR)$(INFODIR); then\
1171			echo  "$(DESTDIR)$(INFODIR) exists...";\
1172		else\
1173			echo "Creating $(DESTDIR)$(INFODIR)/...";\
1174			mkdir     $(DESTDIR)$(INFODIR) || exit 1;\
1175			chmod 755 $(DESTDIR)$(INFODIR);\
1176		fi;\
1177		echo "Copying text files to $(DESTDIR)$(INFODIR)...";\
1178		echo 'set flag=f\nPrC Removing text files' >&3;\
1179		FileCopyList='';\
1180		for TextFile in $(TEXTFILES); do\
1181			test -f $$TextFile || continue;\
1182			cp $$TextFile $(DESTDIR)$(INFODIR) && echo ".\c" &&\
1183			FileCopyList="$$FileCopyList $$TextFile";\
1184			echo "RmF $(DESTDIR)$(INFODIR)/$$TextFile" >&3;\
1185		done; echo;\
1186		echo 'EfM' >&3;\
1187		( cd $(DESTDIR)$(INFODIR)/ && chmod  644   $$FileCopyList );\
1188		( cd $(DESTDIR)$(INFODIR)/ && pwd && ls -l $$FileCopyList );\
1189	else\
1190		echo "Not installing text files!\n";\
1191	fi;\
1192	echo "set flag=d\nPrN Removing empty dirs..." >&3;\
1193	echo "RmD $(DESTDIR)$(BINDIR)" >&3;\
1194	echo "RmD $(DESTDIR)$(SRCDIR)" >&3;\
1195	echo "RmD $(DESTDIR)$(INFODIR)" >&3;\
1196	echo "RmD $(CERTDIR)" >&3;\
1197	echo "RmD $(MANDIR)" >&3;\
1198	echo "RmD $(DESTDIR)" >&3;\
1199	echo "EfM" >&3;\
1200	echo "PrN C-Kermit version $(CKVER) is uninstalled!" >&3;\
1201	echo C-Kermit version $(CKVER) installed!
1202
1203# UN-Install C-Kermit after building
1204# Please to not remove the extra blanks before and after '{}' within the
1205# functions. You would get syntax errors for some older Bourne shells! Best is
1206# you don't change or remove anything.
1207#
1208uninstall:
1209	@if test ! -f UNINSTALL; then\
1210		echo "?C-Kermit UNINSTALL data file not found!";\
1211		exit 1;\
1212	fi; \
1213	X=`grep '^CKVER='$(CKVER)'$$' ./UNINSTALL || :`;\
1214	if test -z "$$X"; then\
1215		echo "?UNINSTALL file is not for C-Kermit version $(CKVER)";\
1216		exit 2;\
1217	fi;\
1218	PrN () { echo "$$*"; };\
1219	PrC () { echo "$$* \c"; };\
1220	RmF () { test -f "$$1" && rm -f "$$1" && echo ".\c" && flag=F ; };\
1221	RmD () { \
1222	dir=$$1;\
1223	while test -d "$$dir"; do\
1224		rmdir "$$dir" 2>&- || return && echo "$$dir" && flag=D;\
1225		dir=`echo "$$dir" | sed 's!/[^/]*/*$$!!'`;\
1226	done; \
1227	};\
1228	EfM () { \
1229	case "$$flag" in\
1230		f) echo "- Nothing to remove!";;\
1231		d) echo "Nothing to remove!";;\
1232		F) echo " done";;\
1233		D) echo "done";;\
1234	esac; \
1235	};\
1236	while read Act Args; do\
1237		case $$Act in\
1238			EfM) EfM;;\
1239			RmD) RmD $$Args;;\
1240			RmF) RmF $$Args;;\
1241			PrN) PrN $$Args;;\
1242			PrC) PrC $$Args;;\
1243			set) eval $$Args;;\
1244		esac;\
1245	done < ./UNINSTALL
1246
1247makewhat:
1248	@echo 'make what?  You must tell which platform to make C-Kermit for.'
1249	@echo Examples: make linux, make aix, make solaris10, make hpux1100.
1250	@echo Please read the comments at the beginning of the makefile.
1251
1252###########################################################################
1253#
1254# Dependencies Section:
1255
1256wermit:	ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1257		ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1258		ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1259		ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1260		ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1261		ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1262		ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1263	$(CC2) $(LNKFLAGS) -o wermit \
1264		ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1265		ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1266		ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1267		ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1268		ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucon.$(EXT) \
1269		ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1270		ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1271		$(LIBS)
1272
1273# Preferred configuration with select()-based CONNECT
1274
1275xermit:	ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1276		ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1277		ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1278		ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1279		ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1280		ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1281		ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) ckuath.$(EXT) \
1282		ck_crp.$(EXT) ck_ssl.$(EXT)
1283	$(CC2) $(LNKFLAGS) -o wermit \
1284		ckcmai.$(EXT) ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1285		ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1286		ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \
1287		ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
1288		ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) \
1289		ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckusig.$(EXT) \
1290		ckctel.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1291		ckuath.$(EXT) ck_crp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1292
1293# Malloc Debugging version
1294
1295mermit:	ckcmdb.$(EXT) ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1296		ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1297		ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1298		ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1299		ckuxla.$(EXT) ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1300		ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1301		ckusig.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1302	$(CC2) $(LNKFLAGS) -o mermit ckcmdb.$(EXT) ckclib.$(EXT) ckcmai.$(EXT)\
1303		ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1304		ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1305		ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1306		ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1307		ckuusr.$(EXT) ckucon.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1308		ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckcuni.$(EXT) \
1309		ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1310
1311# Kerberized Version - Subject to USA export restrictions.
1312
1313# NOTE: We don't use this any more -- As of 15 Feb 2003, the "xermit"
1314# target is used for both secure and regular version.
1315
1316krbmit:	ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1317		ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1318		ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1319		ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1320		ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1321		ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1322		ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1323		ckcftp.$(EXT) ck_ssl.$(EXT)
1324	$(CC2) $(LNKFLAGS) -o krbmit ckcmai.$(EXT) ckclib.$(EXT) \
1325		ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1326		ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1327		ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1328		ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1329		ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1330		ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1331		ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) \
1332		ck_ssl.$(EXT) $(LIBS)
1333
1334krbmit-debug:	ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) \
1335		ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1336		ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1337		ckcpro.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \
1338		ckuxla.$(EXT) ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) \
1339		ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) \
1340		ckusig.$(EXT) ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) \
1341		ckupty.$(EXT) ck_ssl.$(EXT) ckcmdb.$(EXT) ckcftp.$(EXT)
1342	$(CC2) $(LNKFLAGS) -o krbmit ckcmdb.$(EXT) ckcmai.$(EXT) \
1343		ckclib.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) \
1344		ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) \
1345		ckucmd.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
1346		ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) \
1347		ckuusy.$(EXT) ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) \
1348		ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1349		ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1350		ckcftp.$(EXT) ck_ssl.$(EXT) $(LIBS)
1351
1352# SRP(TM) Version - Subject to USA export restrictions.
1353
1354srpmit:	ckcmai.$(EXT) ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1355		ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1356		ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1357		ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1358		ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1359		ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1360		ckuath.$(EXT) ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) \
1361		ckcftp.$(EXT) ck_ssl.$(EXT)
1362	$(CC2) $(LNKFLAGS) -o srpmit ckcmai.$(EXT) ckclib.$(EXT) \
1363		ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1364		ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1365		ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1366		ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1367		ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1368		ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1369		ck_crp.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ck_ssl.$(EXT) \
1370		ckcftp.$(EXT) $(LIBS)
1371
1372# Kerberized Version - Not subject to USA export restrictions.
1373
1374krbmit-export:	ckcmai.$(EXT) \
1375		ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1376		ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1377		ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1378		ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1379		ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1380		ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1381		ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1382	$(CC2) $(LNKFLAGS) -o krbmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1383		ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1384		ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1385		ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1386		ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1387		ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1388		ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1389		ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1390
1391# SRP(TM) Version - Not subject to USA export restrictions.
1392
1393srpmit-export:	ckcmai.$(EXT) \
1394		ckclib.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
1395		ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
1396		ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \
1397		ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
1398		ckucns.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
1399		ckuscr.$(EXT) ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) \
1400		ckuath.$(EXT) ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT)
1401	$(CC2) $(LNKFLAGS) -o srpmit-export ckcmai.$(EXT) ckclib.$(EXT) \
1402		ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \
1403		ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \
1404		ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
1405		ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \
1406		ckuusr.$(EXT) ckucns.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \
1407		ckcnet.$(EXT) ckctel.$(EXT) ckusig.$(EXT) ckuath.$(EXT) \
1408		ckcuni.$(EXT) ckupty.$(EXT) ckcftp.$(EXT) $(LIBS)
1409
1410###########################################################################
1411# man page...
1412#
1413ckuker.nr:
1414	@echo This target is obsolete.
1415	@echo The ckuker.nr file no longer needs any preprocessing.
1416
1417###########################################################################
1418# Dependencies for each module...
1419#
1420ckcmai.$(EXT): ckcmai.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h ckcsig.h \
1421		ckuusr.h ckctel.h ckclib.h
1422
1423ckclib.$(EXT): ckclib.c ckclib.h ckcdeb.h ckcasc.h ckcsym.h
1424
1425ckcpro.$(EXT): ckcpro.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckclib.h
1426
1427ckcpro.c: ckcpro.w wart ckcdeb.h ckcsym.h ckcasc.h ckcker.h ckcnet.h ckctel.h \
1428	 ckclib.h
1429	./wart ckcpro.w ckcpro.c
1430
1431ckcfns.$(EXT): ckcfns.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckcuni.h \
1432		ckuxla.h ckclib.h ckcnet.h
1433
1434ckcfn2.$(EXT): ckcfn2.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1435		ckuxla.h ckctel.h ckclib.h ckcnet.h ckcuni.h
1436
1437ckcfn3.$(EXT): ckcfn3.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
1438		ckuxla.h ckclib.h ckcuni.h
1439
1440ckuxla.$(EXT): ckuxla.c ckcker.h ckcsym.h ckcdeb.h ckcxla.h ckuxla.h ckclib.h \
1441		 ckcuni.h
1442
1443ckcuni.$(EXT): ckcuni.c ckcdeb.h ckcker.h ckucmd.h ckcuni.h ckcxla.h ckuxla.h
1444
1445ckuusr.$(EXT): ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcsym.h ckcdeb.h ckcxla.h \
1446		ckuxla.h ckcasc.h ckcnet.h ckctel.h ckclib.h ckcuni.h
1447
1448ckuus2.$(EXT): ckuus2.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
1451ckuus3.$(EXT): ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1452		ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1453
1454ckuus4.$(EXT): ckuus4.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1455		ckcasc.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1456
1457ckuus5.$(EXT): ckuus5.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1458		 ckcsym.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1459
1460ckuus6.$(EXT): ckuus6.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \
1461		 ckcsym.h ckctel.h ckclib.h
1462
1463ckuus7.$(EXT): ckuus7.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
1464		ckcasc.h ckcnet.h ckcsym.h ckctel.h ckclib.h ckcuni.h
1465
1466ckuusx.$(EXT): ckuusx.c ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcsym.h \
1467		ckcsig.h ckcnet.h ckctel.h ckclib.h ckcxla.h ckuxla.h ckcuni.h
1468
1469ckuusy.$(EXT): ckuusy.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1470		 ckclib.h
1471
1472ckucmd.$(EXT): ckucmd.c ckcasc.h ckucmd.h ckcdeb.h ckcsym.h ckctel.h ckclib.h
1473
1474ckufio.$(EXT): ckufio.c ckcdeb.h ckuver.h ckcsym.h ckclib.h \
1475		ckcxla.h ckuxla.h ckcuni.h
1476
1477ckutio.$(EXT): ckutio.c ckcdeb.h ckcnet.h ckuver.h ckcsym.h ckctel.h ckclib.h
1478
1479ckucon.$(EXT): ckucon.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1480		 ckclib.h
1481
1482ckucns.$(EXT): ckucns.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.h ckctel.h \
1483		 ckclib.h ckcxla.h ckuxla.h ckcuni.h
1484
1485ckcnet.$(EXT): ckcnet.c ckcdeb.h ckcker.h ckcnet.h ckcsym.h ckcsig.h ckctel.h \
1486		 ckclib.h
1487
1488ckctel.$(EXT): ckcsym.h ckcdeb.h ckcker.h ckcnet.h ckctel.h ckclib.h
1489
1490# ck_off_t: ck_off_t.$(EXT)
1491#	$(CC) -o ck_off_t ck_off_t.$(EXT)
1492
1493wart: ckwart.$(EXT)
1494	$(CC) $(LNKFLAGS) -o wart ckwart.$(EXT) $(LIBS)
1495
1496ckcmdb.$(EXT): ckcmdb.c ckcdeb.h ckcsym.h ckclib.h
1497
1498ckwart.$(EXT): ckwart.c
1499
1500ckudia.$(EXT): ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckcsym.h ckcsig.h \
1501		ckcnet.h ckctel.h ckclib.h
1502
1503ckuscr.$(EXT): ckuscr.c ckcker.h ckcdeb.h ckcasc.h ckcsym.h ckcsig.h \
1504		ckcnet.h ckctel.h ckclib.h
1505
1506ckusig.$(EXT): ckusig.c ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h \
1507		ckcsig.h ckctel.h ckclib.h
1508
1509ckcftp.$(EXT): ckcftp.c ckcdeb.h ckcasc.h ckcker.h ckucmd.h ckuusr.h \
1510		ckcnet.h ckctel.h ckcxla.h ckuxla.h ckcuni.h
1511
1512ckupty.$(EXT): ckupty.c ckupty.h ckcdeb.h
1513
1514ckuath.$(EXT): ckuath.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1515		 ckclib.h ckcnet.h
1516
1517ck_crp.$(EXT): ck_crp.c ckcdeb.h ckcnet.h ckuath.h ckclib.h
1518
1519ck_ssl.$(EXT): ck_ssl.c ckcdeb.h ckucmd.h ckuath.h ckuat2.h ckctel.h \
1520		 ckclib.h ck_ssl.h
1521
1522###########################################################################
1523#
1524# Entries to make C-Kermit for specific systems.
1525#
1526# Put the ones that need short makefiles first.
1527
1528#Apollo Aegis 9.x.  Includes TCP/IP support.
1529#You can also add processor-dependent optimization switches like -M570.
1530aegis:
1531	@echo Making C-Kermit $(CKVER) for Apollo Aegis 9.x...
1532	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1533	"CFLAGS= -DBSD4 -DTCPSOCKET -DNOCSETS -DCK_CURSES -O $(KFLAGS)" \
1534	"LIBS = -lcurses -ltermcap"
1535
1536#Apple Mac II, A/UX pre-3.0
1537#Warning, if "send *" doesn't work, try the auxufs makefile entry below.
1538aux:
1539	@echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1540	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1541	"CFLAGS = -DAUX -DTCPSOCKET $(KFLAGS) -i -O" "LNKFLAGS = -i"
1542
1543#Apple Mac II, A/UX pre-3.0, compiled with gcc
1544auxgcc:
1545	@echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1546	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1547	"CFLAGS = -DAUX -DTCPSOCKET -traditional $(KFLAGS) -i -O" \
1548	"LNKFLAGS = " "CC = gcc" "CC2 = gcc"
1549
1550#Apple Mac II, A/UX, pre-3.0, but with ufs file volumes, uses <dirent.h>.
1551auxufs:
1552	@echo Making C-Kermit $(CKVER) for Macintosh A/UX...
1553	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1554	"CFLAGS = -DAUX -DTCPSOCKET -DDIRENT $(KFLAGS) -i -O" "LNKFLAGS = -i"
1555
1556#Apple Mac II, A/UX 3.0, compiled with gcc
1557aux3gcc:
1558	@echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1559	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
1560	"CFLAGS = -DAUX -DHDBUUCP -DLFDEVNO -DTCPSOCKET -DDIRENT $(KFLAGS)" \
1561	"LNKFLAGS = -s" "LIBS = $(LIBS)" \
1562	"CC=gcc -pipe -traditional" "CC2=gcc -pipe -traditional"
1563
1564#Apple Mac II, A/UX 3.0, compiled with gcc, uses curses
1565aux3cgcc:
1566	@echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0...
1567	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) aux3gcc \
1568	KTARGET=$${KTARGET:-$(@)} \
1569	"KFLAGS=$(KFLAGS) -DCK_CURSES" "LIBS = -lcurses $(LIBS)"
1570
1571# Tenon MachTen, tested on Apple Powerbook with MachTen 2.1.1.D.
1572# NOTE: This doesn't do anything about UUCP.  It only works if /usr/spool/uucp
1573# has permission of 777, and dialout device is world read/writeable.
1574machten:
1575	@echo Making C-Kermit $(CKVER) for MachTen...
1576	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
1577	"CFLAGS= -DBSD43 -DTCPSOCKET -DSIG_V -DNDGPWNAM -DCK_CURSES -O \
1578	$(KFLAGS)"  "LIBS=-lcurses -ltermcap"
1579
1580#Bell Labs Research UNIX V10
1581#Can't add TCP/IP because there is no sockets library.  It would have to
1582#be done using streams, but there is no code in C-Kermit for that.
1583#Remove -DNOJC if desired (if your system has csh, ksh, or bash).
1584bellv10:
1585	@echo Making C-Kermit $(CKVER) for Bell Labs Research UNIX V10...
1586	$(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1587	"CFLAGS= -DBELLV10 -DBSD4 -DNDIR -DNOJC -DNOSYSIOCTLH -DNOSETREU \
1588	-DNOCSETS -MINIDIAL $(KFLAGS)"
1589
1590# WARNING: The early BSD entries do not build in version 7.0 with the stock
1591# BSD compiler: "Too many defines".  Unless you can rebuild cpp to have more
1592# space for defines, these builds must be accomplished by:
1593# copying the /usr/include tree to someplace else, preprocessing there with cc
1594# -E -I./include or whatever (plus all the same -D's, adding any necessary
1595# -U/-D to override the architecture)), renaming the the resulting files back
1596# to their original names, bringing them back to the original BSD system, and
1597# running the make target there.  This technique was used for 4.2 and 4.3 BSD
1598# on a VAX in C-Kermit 7.0 (later, cpp on that machine was rebuilt to allow
1599# more symbols, so the C-Kermit 8.0 build proceeds normally).
1600
1601#Berkeley Unix 4.1
1602bsd41:
1603	@echo Making C-Kermit $(CKVER) for 4.1BSD...
1604	$(MAKE) wermit KTARGET=$${KTARGET-$(@)} \
1605	"CFLAGS= -DBSD41" "LIBS = -ljobs"
1606
1607#Berkeley 4.2, 4.3, also Ultrix-32 1.x, 2.x, 3.x, many others
1608# Add -O, -s, etc, if they work.
1609# If you have a version of BSD but signal() is void rather than int,
1610# "make bsd KFLAGS=-DSIG_V".
1611bsd42:
1612	@echo Making C-Kermit $(CKVER) for 4.2BSD...
1613	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1614	"CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1615	-DCK_CURSES -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK -DBSD42HACK \
1616	$(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1617
1618bsd:
1619	$(MAKE) CC=$(CC) CC2=$(CC2) bsd42 KTARGET=$${KTARGET-$(@)}
1620
1621#Berkeley Unix 4.2 or 4.3 with HoneyDanBer UUCP
1622bsdhdb:
1623	@echo Making C-Kermit $(CKVER) for 4.2BSD with HDB UUCP...
1624	$(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1625	"KFLAGS= -DHDBUUCP $(KFLAGS)"
1626
1627#Berkeley Unix 4.3 with acucntrl program, curses, TCP/IP included.
1628bsd43:
1629	@echo Making C-Kermit $(CKVER) for 4.3BSD...
1630	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1631	"CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1632	-DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1633	-DBSD42HACK $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1634
1635#4.3BSD, curses excluded
1636bsd43nc:
1637	@echo Making C-Kermit $(CKVER) for 4.3BSD...
1638	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1639	"CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH \
1640	-DACUCNTRL -DSYSTIMEBH -DNOIKSD -DNOPUTENV -DNOANSI -DBIGBUFOK \
1641	-DBSD42HACK $(KFLAGS)" "LIBS=$(LIBS)"
1642
1643#4.3BSD, TCP/IP excluded.
1644bsd43nonet:
1645	@echo Making C-Kermit $(CKVER) for 4.3BSD + curses...
1646	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
1647	"CFLAGS= -DBSD4 -DBSD43 -DTCPSOCKET -DNOREALPATH -DNOTIMEH -DNOIKSD \
1648	-DCK_CURSES -DACUCNTRL -DSYSTIMEBH -DNOPUTENV -DNOANSI -DBIGBUFOK \
1649	-DBSD42HACK -DNONET $(KFLAGS)" "LIBS=-lcurses -ltermcap $(LIBS)"
1650
1651#Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
1652#but without acucntrl program
1653bsdlck:
1654	@echo Making C-Kermit $(CKVER) for 4.2BSD, /usr/spool/uucp/LCK/...
1655	$(MAKE) CC=$(CC) CC2=$(CC2) bsd KTARGET=$${KTARGET-$(@)} \
1656	"KFLAGS= -DLCKDIR $(KFLAGS)"
1657
1658#Berkeley UNIX 4.4-Lite, 4.4-Encumbered, Net/2, etc (Post-Reno),
1659#with TCP/IP networking.  This was the basis for FreeBSD, NetBSD, OpenBSD,
1660#BSDI, BSD/OS, and Mac OS X (each of which has its own set of targets that
1661#are newer than this one).
1662#
1663#NOTE: This is not a pure POSIX configuration.  Using -DPOSIX instead of
1664# -DBSD44 prevents any kind of directory-reading (for wildcard expansion),
1665#and disallows use of ENOTCONN symbol for detecting broken network
1666#connections, and disallows RTS/CTS flow control, and would also require
1667#definition of the appropriate UUCP lockfile convention.
1668#Do not add -DCK_POSIX_SIG without reading <signal.h> first!  For example,
1669#sigsetjmp(), etc, tend to be defined but not implemented.
1670#
1671#NOTE: originally crypt was in libc - later it was unbundled.
1672#Remove the LIBS clause to build on an early 4.4BSD platform.
1673#
1674bsd44:
1675	@echo Making C-Kermit $(CKVER) for 4.4BSD...
1676	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1677	"CFLAGS= -DBSD44 -DTCPSOCKET $(KFLAGS) -O" "LIBS=-lcrypt"
1678
1679#Berkeley UNIX 4.4, as above, but with curses for fullscreen display
1680#Please read notes for bsd44 entry just above.
1681# NOTE: This one dumped core on the real 4.4BSD development system at
1682# UC Berkeley (an HP-9000/300), so the no-curses version was used
1683# for that one, which was unplugged years ago.
1684bsd44c:
1685	@echo Making C-Kermit $(CKVER) for 4.4BSD with curses...
1686	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1687	"CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O" \
1688	"LIBS= -lcurses -ltermcap -lcrypt $(LIBS)"
1689
1690#For FreeBSD 1.x.
1691freebsd1:
1692	@echo 'Making C-Kermit $(CKVER) for FreeBSD...'
1693	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1694	"CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1695	-DFNFLOAT -DNOHTERMCAP -DNOREALPATH -DNOSYSCONF $(KFLAGS) -O -pipe" \
1696	"LIBS= -lcurses -ltermcap -lm $(LIBS)"
1697
1698#FreeBSD 2.x with ncurses
1699freebsd2:
1700	@echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with ncurses...'
1701	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1702	"CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1703	-DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -funsigned-char \
1704	-DFNFLOAT $(KFLAGS) -O -pipe" \
1705	"LIBS= -L/usr/local/lib -lncurses -ltermlib -lcrypt -lm $(LIBS)"
1706
1707#For FreeBSD 2.x -- Uses curses rather than ncurses
1708freebsd2c:
1709	@echo 'Making C-Kermit $(CKVER) for FreeBSD 2.x with curses...'
1710	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1711	"CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_STRERROR \
1712	-DTPUTSARGTYPE=int -DTPUTSARG1CONST -DFREEBSD2 -DFNFLOAT \
1713	-funsigned-char $(KFLAGS) -O -pipe" \
1714	"LIBS= -lcurses -ltermlib -lcrypt -lm $(LIBS)"
1715
1716#FreeBSD 3.x with ncurses and uu_lock()
1717#(Note: uu_lock() goes back to 2.2.2, but not necessarily 2.0)
1718#OK 2011/08/20 FreeBSD 3.3
1719freebsd3:
1720	@echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with ncurses...'
1721	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1722	"CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -funsigned-char \
1723	-DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 -DUSE_UU_LOCK -DFNFLOAT \
1724	$(KFLAGS) -O -pipe" \
1725	"LIBS= -L/usr/local/lib -lncurses -lcrypt -lutil -lm $(LIBS)"
1726
1727#As above but with curses rather than ncurses.
1728freebsd3c:
1729	@echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with curses...'
1730	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1731	"CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DNOCOTFMC -DUSE_UU_LOCK \
1732	-DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD3 $(KFLAGS) -DFNFLOAT \
1733	-funsigned-char -pipe -O" \
1734	"LIBS= -lcurses -lcrypt -lutil -lm $(LIBS)"
1735
1736#FreeBSD 4.0 with ncurses and uu_lock().  Note - there is no curses in 4.0.
1737#ncurses 5.0 is broken requiring us to work around with setbuf().
1738freebsd40:
1739	@echo 'Making C-Kermit $(CKVER) for FreeBSD 4.x with ncurses...'
1740	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1741	"CFLAGS= -DBSD44 -DCK_NCURSES -DTCPSOCKET -DNOCOTFMC -DFNFLOAT \
1742	-funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR -DFREEBSD4 \
1743	-DNONOSETBUF -DUSE_UU_LOCK $(KFLAGS) -O -pipe" \
1744	"LIBS= -L/usr/local/lib -lncurses -lcrypt -lutil -lm $(LIBS)"
1745
1746#FreeBSD 4.1 and above
1747#Like FreeBSD 4.0 but without the NONOSETBUF hack and with CK_NEWTERM.
1748#NOTE: This target definitely does not work for FreeBSD 3.3 in 9.0.302.
1749#and it has not been tested on 4 or 5.
1750#OK 2011/06/xx FreeBSD 3.3, 4,4, 4.7, and 8.2
1751#OK 2011/08/21 FreeBSD 3.3, 4.4, 6.4, 9.0
1752freebsd freebsd41 freebsd72 freebsd5 freebsd6 freebsd7 freebsd8 freebsd9:
1753	@echo 'Making C-Kermit $(CKVER) for FreeBSD 4.1 or later...'
1754	@if test `uname -r | cut -d . -f 1` -ge 8; then \
1755	   HAVE_FBSD8='-DFREEBSD8'; \
1756	else HAVE_FBSD8=''; fi; \
1757	if test `uname -r | cut -d . -f 1` -ge 9; then \
1758	   HAVE_FBSD9='-DFREEBSD9'; \
1759	else HAVE_FBSD9='';  fi; \
1760	if test -f /usr/include/utmpx.h ; \
1761	then HAVE_UTMPX='-DHAVEUTMPX' ; \
1762	else HAVE_UTMPX='' ; fi; \
1763	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1764	"CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \
1765	-DFREEBSD4 $$HAVE_FBSD8 $$HAVE_FBSD9 -DUSE_UU_LOCK -DFNFLOAT \
1766	$$HAVE_UTMPX -DHERALD=\"\\\" `uname -rs`\\\"\" \
1767	-funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR $(KFLAGS) \
1768	-pipe -D__FreeBSD__=9 -I/usr/local/include -I/usr/local/include/ncurses -O2 -fno-strict-aliasing "\
1769	"LIBS= -L/usr/local/lib -lncurses -lcrypt -lutil -lm $(LIBS)"
1770
1771#FreeBSD 5.0 or later with OpenSSL.
1772#OK 2011/06/15 FreeBSD 4.7 and 8.2
1773#OK 2011/08/20 FreeBSD 9.0-CURRENT
1774freebsd+ssl freebsd+openssl freebsd50+openssl:
1775	@echo 'Making C-Kermit $(CKVER) for FreeBSD with Kerberos 5...'
1776	@case `openssl version` in \
1777	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1778	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1779	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1780	  *) OPENSSLOPTION="" ;; \
1781	esac; \
1782	HAVE_DES=''; \
1783	DES_LIB=''; \
1784	if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1785	   ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1786	      DES_LIB='-ldes'; \
1787	      HAVE_DES='-DCK_DES -DLIBDES'; \
1788		echo "HAVE DES"; \
1789	      else echo "NO DES"; \
1790	fi; \
1791	$(MAKE) freebsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \
1792	KFLAGS="-DCK_AUTHENTICATION -DCK_SSL $(SSLINC) -DZLIB $$OPENSSLOPTION \
1793	$$HAVE_DES $(KFLAGS)"  "LNKFLAGS = $(LNKFLAGS)" \
1794	"LIBS= -L/usr/local/lib -lncurses -lcrypt -lssl -lcrypto -lutil -lm \
1795	$(SSLLIB) $$DES_LIB $(LIBS)"; \
1796	if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \
1797		echo ""; \
1798		echo "If build failed try:"; \
1799		echo ""; \
1800		echo "  make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \
1801		echo ""; \
1802	fi
1803
1804#NetBSD 1.4.1 or later with vanity banner automated with uname
1805#and automatic inclusion of large file support if it is available.
1806#This target tested successfully on NetBSD 1.4.1, 1.5.2, and 2.0.3 (Jan 2006).
1807#Fails on NetBSD 2.0 on Sun/3 mc68030 with gcc 3.3.3 unless optimization is
1808#disabled on ckcfn2.c ("KFLAGS=-O0") (Letter O Digit Zero).
1809#(This could be automated by testing `uname -m` for "sun3".)
1810#OK: 2011/06/15 on NetBSD 1.5.2 and 5.1.
1811#NetBSD 4.1: have to include <time.h>.
1812#OK: 2011/08/21 on 5.1.
1813#OK: (many more up through NetBSD 7.2.1)
1814#OK: NetBSD 8.x
1815#OK: 2020/08/24 NetBSD 9.0
1816# `uname -r | grep "[6789].[0-9]" > /dev/null && echo '-DTIMEH'`
1817
1818netbsd netbsd2 netbsd15 netbsd16 old-netbsd:
1819	@echo Making C-Kermit $(CKVER) for NetBSD `uname -r` with curses...
1820	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1821	"CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1822	echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1823	-DTIMEH	-DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR \
1824	-funsigned-char -DHERALD=\"\\\" `uname -s -r`\\\"\" \
1825	-DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1826	"LIBS= -lcurses -lcrypt -lm -lutil $(LIBS)"
1827
1828#NetBSD 1.4.1 or later with OpenSSL
1829#OK: 2011/06/15 on NetBSD 5.1 (but not 1.5.2 with OpenSSL 0.9.5a)
1830#OK: 2011/08/21 on 5.1.
1831netbsd+ssl netbsd+openssl:
1832	@echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL SSLLIB=$(SSLLIB)'
1833	@case `openssl version` in \
1834	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1835	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1836	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1837	  *) OPENSSLOPTION="" ;; \
1838	esac; \
1839	HAVE_DES=''; \
1840	DES_LIB=''; \
1841	if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1842	   ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1843	      DES_LIB='-ldes'; \
1844	      HAVE_DES='-DCK_DES -DLIBDES'; \
1845		echo "HAVE DES"; \
1846	      else echo "NO DES"; \
1847	fi; \
1848	$(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \
1849	"KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1850	-DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1851	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1852	"LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB -lcurses \
1853	-lcrypto -lcrypt -lz -lm -lpam -lutil $(LIBS)"
1854
1855#NetBSD with MIT Kerberos 5:
1856# OK 2011/06/15 (once K5INC and K5LIB were set right).
1857# NOT OK for Heimdal - Heimdal Kerberos support in C-Kermit needs work.
1858# OK: 2011/08/21 on 5.1.
1859netbsd+krb5:
1860	@echo 'Making C-Kermit $(CKVER) for NetBSD with Kerberos 5...'
1861	@case `openssl version` in \
1862	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1863	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1864	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1865	  *) OPENSSLOPTION="" ;; \
1866	esac; \
1867	HAVE_DES=''; \
1868	DES_LIB=''; \
1869	if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1870	   ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1871	      DES_LIB='-ldes'; \
1872	      HAVE_DES='-DCK_DES -DLIBDES'; \
1873		echo "HAVE DES"; \
1874	      else echo "NO DES"; \
1875	fi; \
1876	$(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \
1877	"KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_KERBEROS -DKRB5 \
1878	-DCK_CAST $$HAVE_DES -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1879	$(KFLAGS)" \
1880	"LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lcurses $$DES_LIB \
1881	-lcrypto -lgssapi -lkrb5 -lm -lutil $(LIBS)"
1882
1883# NetBSD - With Kerberos 5 and SSL and Zlib.
1884# OK: 2011/08/21 on 5.1 with MIT Kerberos.
1885netbsd+krb5+ssl netbsd+krb5+openssl+zlib:
1886	@echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...'
1887	@case `openssl version` in \
1888	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
1889	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
1890	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
1891	  *) OPENSSLOPTION="" ;; \
1892	esac; \
1893	HAVE_DES=''; \
1894	DES_LIB=''; \
1895	if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
1896	   ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
1897	      DES_LIB='-ldes'; \
1898	      HAVE_DES='-DCK_DES -DLIBDES'; \
1899		echo "HAVE DES"; \
1900	      else echo "NO DES"; \
1901	fi; \
1902	$(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \
1903	"KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
1904	-DCK_KERBEROS -DKRB5 -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \
1905	-DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \
1906	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
1907	"LIBS= $(K5LIB) -L/usr/pkg/lib -R/usr/pkg/lib -lssl $$DES_LIB \
1908	-lcrypto -lcrypt -lgssapi -lkrb5 -lz -lm -lpam -lutil -lcurses $(LIBS)"
1909
1910#Special Security Enhanced NetBSD target with SRP, SSL, and zlib support.
1911#To build this, you need to BUILD the pkgsrc srp_client package.  After
1912#you build it, you must go into work/srp-x.y.z/libkrypto and "bmake install"
1913#then go to work/srp-x.y.z/libsrp and "bmake install".  As of 2005Q3, the
1914#pkgsrc install only installed the statically linked client applications.  You
1915#need to manually install the libraries to build your own applications.
1916#NOT TESTED RECENTLY - probably needs work.
1917netbsd+ssl+srp+zlib:
1918	@echo Making C-Kermit $(CKVER) for NetBSD with curses...
1919	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1920	"CFLAGS= -DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR -DNETBSD15 \
1921	-DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int \
1922	-I/usr/include/openssl -I/usr/pkg/include \
1923	-DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 -DCK_ENCRYPTION \
1924	-DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DZLIB -DFNFLOAT $(KFLAGS) -O" \
1925	"LIBS= -L/usr/pkg/lib -R/usr/pkg/lib -lcurses -lsrp -lgmp -ldes \
1926	-lssl -lkrypto -lcrypto -lcrypt -lz -lm -lutil $(LIBS)"
1927
1928#NetBSD with curses left out (e.g. for use as IKSD).
1929netbsdnc:
1930	@echo Making C-Kermit $(CKVER) for NetBSD with no curses...
1931	$(MAKE) CC=$(CC) CC2=$(CC2) netbsd KTARGET=$${KTARGET:-$(@)} \
1932	"KFLAGS=-DNOCURSES"
1933
1934#NetBSD with ncurses requested explicitly rather than curses-which-is-ncurses
1935netbsdn:
1936	@echo Making C-Kermit $(CKVER) for NetBSD with curses...
1937	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1938	"CFLAGS=`grep fseeko /usr/include/stdio.h > /dev/null && \
1939	echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
1940	-DBSD44 -DCK_CURSES -DTCPSOCKET -DUSE_STRERROR \
1941	-DHERALD=\"\\\" NetBSD `uname -r`\\\"\" \
1942	-DCK_DTRCD -DCK_DTRCTS -DTPUTSARGTYPE=int -DFNFLOAT $(KFLAGS) -O" \
1943	"LIBS= -L/usr/pkg/lib -L/usr/local/lib -lncurses -lcrypt -lm -lutil $(LIBS)"
1944
1945#OpenBSD before 2.3.
1946#Uses ncurses as its curses so use -ltermlib, not -ltermcap
1947#But it doesn't use uu_lock() which was introduced in OpenBSD 2.3.
1948#For that use the next entry.
1949#Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1950openbsdold:
1951	@echo Making C-Kermit $(CKVER) for OpenBSD...
1952	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1953	"CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1954	-DFNFLOAT -DNDSYSERRLIST $(KFLAGS) -O" "LIBS= -lcurses -ltermlib -lm"
1955
1956#OpenBSD 2.3 or later
1957#Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1958#For C-Kermit 8.0 (Christian Weisgerber):
1959# -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1960# -DUSE_UU_LOCK and -lutil added for uu_lock()
1961# -DNDSYSERRLIST changed to -DUSE_STRERROR
1962#If this gives you trouble use the previous entry.
1963#NOTE: The openbsd and openbsd+ssl should be reworked to be like the
1964#corresponding FreeBSD and NetBSD targets.  The mirbsd targets should
1965openbsd:
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=\"\\\" OpenBSD `uname -r`\\\"\" \
1970	-DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1971	"LIBS= -lcurses -lutil -lm"
1972
1973#Better to chain to the openbsd target but...
1974mirbsd:
1975	@echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later...
1976	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
1977	"CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
1978	-DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
1979	-DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR $(KFLAGS) -O" \
1980	"LIBS= -lcurses -lutil -lm"
1981
1982#OpenBSD 3.0 or later includes OpenSSL
1983#Add -DMAINTYPE=int if you get complaints about main: return type is not int.
1984#For C-Kermit 8.0 (Christian Weisgerber):
1985# -ltermlib removed (presumably because -lcurses==ncurses already includes it)
1986# -DUSE_UU_LOCK and -lutil added for uu_lock()
1987# -DNDSYSERRLIST changed to -DUSE_STRERROR
1988#If this gives you trouble use the previous entry.
1989openbsd+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=\"\\\" OpenBSD `uname -r`\\\"\" \
1994	-DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
1995	-DCK_SSL $(KFLAGS) -O" \
1996	"LIBS= -lcurses -lutil -lm -lssl -lcrypto"
1997
1998mirbsd+ssl:
1999	@echo Making C-Kermit $(CKVER) for OpenBSD 3.0 or later...
2000	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2001	"CFLAGS= -DBSD44 -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET -DOPENBSD \
2002	-DHERALD=\"\\\" MirBSD `uname -r`\\\"\" \
2003	-DUSE_UU_LOCK -DFNFLOAT -DUSE_STRERROR -DCK_AUTHENTICATION \
2004	-DCK_SSL -DNO_DCL_INET_ATON $(KFLAGS) -O" \
2005	"LIBS= -lcurses -lutil -lm -lssl -lcrypto"
2006
2007# make 386bsd 0.0new, posix
2008# for  386bsd 0.1.24, change /usr/include/termios.h to #define NCCS if
2009#  _POSIX_SOURCE is #defined. (source: lewine, posix prgmrs guide, o`reilly)
2010#NOTE: Lock directory is /var/spool/lock.  Formerly, it was /var/spool/uucp,
2011#but reportedly <wjones@halcyon.com> that was due to a typo in 'man tip'.
2012386bsd:
2013	@echo 'Making C-Kermit $(CKVER) for jolix 386BSD 0.0new and 0.1.24...'
2014	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2015	"CFLAGS= -DPOSIX -DSETREUID -DPIDSTRING -DUSLEEP \
2016	-D_386BSD -DCK_CURSES -DTCPSOCKET \
2017	-DLOCK_DIR=\\\"/var/spool/lock\\\" \
2018	$(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
2019
2020# Mac OS X 10 early versions.
2021# For 10.3.9 and later, use the macosx target below.
2022
2023#Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP but no curses.
2024oldmacosx10:
2025	@echo Making C-Kermit $(CKVER) for `uname -s`...
2026	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2027	"CFLAGS= -DMACOSX10 -DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
2028
2029#Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and curses.
2030#Note: curses must be obtained separately.  See next entry for ncurses.
2031#Add "LIBS = -lcurses -ltermcap" if necessary (but reportedly it is not).
2032oldmacosx10c:
2033	@echo Making C-Kermit $(CKVER) for `uname -s` + curses...
2034	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2035	"CFLAGS= -DMACOSX10 -DCK_CURSES -DTPUTSFNTYPE=void -DTPUTSISVOID \
2036	-DTCPSOCKET -DUSE_STRERROR -O $(KFLAGS)"
2037
2038#Mac OS X 1.0 (Rhapsody, Darwin) -- TCP/IP and ncurses.
2039#Note: ncurses must be obtained separately.
2040#In the event of trouble with this one try the next one.
2041oldmacosx10nc:
2042	@echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2043	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2044	"CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
2045	$(KFLAGS)" "LIBS= -L/usr/local/lib -lncurses $(LIBS)"
2046
2047#Mac OS X 10.2 (Jaguar) ncurses.
2048oldmacosx102nc:
2049	@echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2050	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2051	"CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
2052	$(KFLAGS) " "LIBS= -L/usr/local/lib -lncurses $(LIBS)"
2053
2054#The problem here is that if curses.h also exists, it conflicts with
2055#ncurses.h and and we have fatal errors.  If this happens to you, then
2056#try this target.
2057oldmacosx10ncx:
2058	@echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2059	@rm -f ./curses.h; touch ./curses.h
2060	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2061	"CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR \
2062	-I. -O $(KFLAGS) " \
2063	"LIBS= -L/usr/local/lib -lncurses $(LIBS)"
2064	@rm -f ./curses.h
2065
2066#Mac OS X 10.3 (Panther) - Assumes ncurses is installed.
2067oldmacosx103:
2068	@echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
2069	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2070	"CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2071	-DUSE_STRERROR -DUSE_NAMESER_COMPAT -O \
2072	$(KFLAGS) " "LIBS= -L/usr/local/lib -lncurses -lresolv $(LIBS)"
2073
2074#Mac OS X 10.3 (Panther) with Kerberos 5 and SSL, assumes ncurses is installed.
2075oldmacosx103+secure:
2076	@echo Making Secure C-Kermit $(CKVER) for `uname -s` + ncurses...
2077	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2078	"CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET \
2079	-DUSE_STRERROR -DUSE_NAMESER_COMPAT -O -DCK_PAM \
2080	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2081	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
2082	$(KFLAGS) " "LIBS= -lssl -lcrypto -lkrb5 -lcom_err \
2083	-lk5crypto -lgssapi_krb5 -lpam -L/usr/local/lib -lncurses -lresolv $(LIBS)"
2084
2085# THIS IS THE MAIN MAC OS X TARGET (the next one is for Kerberos/SSL builds).
2086# Use this target for 10.3.9 (or maybe earlier) through 10.6 (maybe later)
2087# on both Power and Intel architectures.  This one uses utmp.h on 10.4 and
2088# earlier and utmpx.h on 10.5 onwards.
2089# Note: Mac OS X 10.5 and earlier are 32-bit; 10.6 and later 64-bit.
2090# Note 2: As of C-Kermit 9.0 -DNOUUCP is included by default because
2091# Mac OS X doesn't support UUCP.  To undo this, use KFLAGS=-UNOUUCP.
2092#OK: 2011/06/14 (for 10.4.11, 10.5.8, 10.6.7)
2093macosx macosx10 macosx10.3.9 macosx10.4 macosx10.5 macosx10.6:
2094	@MACOSNAME=`/usr/bin/sw_vers -productName`; \
2095	MACOSV=`/usr/bin/sw_vers -productVersion`; \
2096	echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2097	MACCPU=$$HOSTTYPE; \
2098	if test `uname -r | cut -d . -f 1` -gt 8; \
2099	then if test -f /usr/include/utmpx.h ; \
2100	then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2101	else HAVE_UTMPX='' ; fi ; fi; \
2102	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2103	"CFLAGS= -DMACOSX10 -DMACOSX103 -DCK_NCURSES -DTCPSOCKET -DCKHTTP \
2104	-DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2105	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2106	-funsigned-char -DNODCLINITGROUPS \
2107	-DNOUUCP -O -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2108	-DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2109	$(KFLAGS)" "LIBS= -L/usr/local/lib -lncurses -lresolv $(LIBS)"
2110
2111# Mac OS X 10.3.9 or later with Kerberos 5 and OpenSSL...
2112# NOTE: Apple has removed all support for DES in OpenSSL and Kerberos
2113#   in Mac OS X 10.6 and later.  The DES flags are included or left out
2114#   automatically based on the Mac OS X version number.
2115# See note about UUCP in previous target.
2116#OK: 2009/11/16 (for 10.3.9, 10.4.11, 10.5.8, 10.6.1)
2117#OK: 2011/06/14 (for 10.4.11, 10.5.8, 10.6.7)
2118macosx+krb5+ssl macosx10.5+krb5+ssl macosx10.6+krb5+ssl \
2119macosx+krb5+openssl macosx10.5+krb5+openssl macosx10.6+krb5+openssl:
2120	@MACOSNAME=`/usr/bin/sw_vers -productName`; \
2121	MACOSV=`/usr/bin/sw_vers -productVersion`; \
2122	echo Making C-Kermit $(CKVER) for $$MACOSNAME $$MACOSV... ; \
2123	MACCPU=$$HOSTTYPE; \
2124	if test `uname -r | cut -d . -f 1` -gt 8; \
2125	then if test -f /usr/include/utmpx.h ; \
2126	then HAVE_UTMPX='-DHAVEUTMPX -D_UTMPX_COMPAT' ; \
2127	else HAVE_UTMPX='' ; fi ; fi; \
2128	if test `uname -r | cut -d . -f 1` -eq 7; \
2129	then IS_MACOSX103='-DMACOSX103' ; \
2130	else IS_MACOSX103='' ; fi; \
2131	case $$MACOSV in \
2132	  10.[012345].*) HAVE_DES='-DCK_DES -DLIBDES' ;; \
2133	  *.*) HAVE_DES='' ;; \
2134	esac ; \
2135	if test -x /usr/bin/krb5-config ; \
2136	then HAVE_KRB5CONFIG=`/usr/bin/krb5-config --libs krb5 gssapi` ; \
2137	else HAVE_KRB5CONFIG='-lgssapi_krb5 -lkrb5 -lk5crypto \
2138	-lcom_err -lresolv' ; fi; \
2139	$(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \
2140	"CFLAGS= -DMACOSX10 $$IS_MACOSX103 -DCK_NCURSES -DTCPSOCKET \
2141	-DUSE_STRERROR -DUSE_NAMESER_COMPAT -DNOCHECKOVERFLOW -DFNFLOAT \
2142	-DCKHTTP -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $$HAVE_UTMPX \
2143	-DNODCLINITGROUPS -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DZLIB \
2144	-DCK_ENCRYPTION -DCK_CAST -DCK_SSL -DOPENSSL_098 $$HAVE_DES \
2145	-DNOUUCP -DHERALD=\"\\\" $${MACOSNAME} $${MACOSV}\\\"\" \
2146	-DCKCPU=\"\\\"$${MACCPU}\\\"\" \
2147	-funsigned-char -O $(KFLAGS)" \
2148	"LIBS= $$HAVE_KRB5CONFIG -lssl -lcrypto -lpam -L/usr/local/lib -lncurses $(LIBS)"
2149
2150# End of Mac OS X Section
2151
2152#Acorn RISCiX, based on ...
2153#Berkeley Unix 4.2 or 4.3 with lock directory /usr/spool/uucp/LCK/LCK..ttyxx,
2154#but without acucntrl program
2155riscix:
2156	@echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2157	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2158		"CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2159		-DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2160		-DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2161		-DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2162		-DNOANSI -w -O2 -fomit-frame-pointer" \
2163		"LIBS= -lcurses -ltermcap " \
2164		"CC= /usr/ucb/cc" \
2165		"CC2= /usr/ucb/cc"
2166
2167#Acorn RISCiX, as above, but using gcc
2168riscix-gcc:
2169	@echo Making C-Kermit $(CKVER) for RISCiX, /usr/spool/uucp/LCK..ttyxx
2170	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2171		"CFLAGS= -DBSD42 -DBSD4 -DRISCIX -DNOCSETS \
2172		-DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DDIRENT -DCK_CURSES \
2173		-DMAXSP=9024 -DMAXRD=9024 -DSBSIZ=9050 -DRBSIZ=9050 \
2174		-DDFTTY=\\\"/dev/serial\\\" -DNOCSETS -DNOCYRIL \
2175		-DNOANSI -w -O2 -fomit-frame-pointer" \
2176		"LIBS= -lcurses -ltermcap " \
2177		"CC= gcc -mbsd" \
2178		"CC2= gcc -mbsd"
2179
2180#Convergent CTIX 6.4.1
2181ctix:
2182	@echo 'Making C-Kermit $(CKVER) for Convergent CTIX 6.4.1'
2183	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2184	"CFLAGS= -DSVR3 -DDIRENT -DTCPSOCKET -DHDBUUCP -DCK_CURSES \
2185	-DNONAWS -DNOLEARN -DNOLONGLONG $(KFLAGS) -XO" \
2186	"LNKFLAGS=-s" "LIBS=-lsocket -lcurses -lc_s"
2187	mcs -d wermit
2188
2189# The following makefile entry should work for any Harris Night Hawk system
2190# (either 88k or 68k based) running release 6.1 or later of the CX/UX
2191# operating system. This is a POSIX and ANSI-C compliant system which also
2192# supports BSD networking. (Earlier CX/UX releases will probably work with
2193# sys5r3, but this has not been verified).
2194#
2195cx_ux:
2196	@echo Making C-Kermit $(CKVER) for Harris Night Hawk CX/UX 6.1 or later
2197	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2198	"CFLAGS=-DPOSIX -DTCPSOCKET -DHDBUUCP -DPID_T=pid_t -DWAIT_T=int \
2199	-Dd_ino=d_fileno -DUID_T=uid_t -DGID_T=gid_t -DNOLONGLONG \
2200	$(KFLAGS) -Xa -O3 -g" "LNKFLAGS=-O3"
2201
2202#Intergraph Clipper, CLIX, job control, HDB UUCP.
2203clix:
2204	@echo 'Making C-Kermit $(CKVER) for Intergraph CLIX...'
2205	$(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2206	"CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2207	-DNOGETUSERSHELL -DNOREALPATH -DNOLEARN $(KFLAGS) -O" \
2208	"LNKFLAGS=" "LIBS= -lbsd"
2209
2210#As above + TCP/IP...
2211clixnet:
2212	@echo 'Making networked C-Kermit $(CKVER) for Intergraph CLIX...'
2213	$(MAKE) wermit "CC=acc" "CC2=acc" KTARGET=$${KTARGET:-$(@)} \
2214	"CFLAGS= -w -DSVR3 -DCLIX -DDIRENT -DHDBUUCP -DNOSYSLOG -DUSE_MEMCPY \
2215	-DTCPSOCKET -DNOGETUSERSHELL -DNOLEARN -DNOREALPATH $(KFLAGS) -O" \
2216	"LNKFLAGS=" "LIBS= -lbsd"
2217
2218#Mark Williams Coherent 286 or 386 on IBM PC family.
2219#There is a 64K limit on program size, so this is a command-line only version.
2220coherent:
2221	$(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOICP -DNOSETKEY -DNOLEARN \
2222	-DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG -DNOXMIT \
2223	-DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DSELECT_H $(KFLAGS) -VSUVAR" \
2224	-DNOFLOAT KTARGET=$${KTARGET:-$(@)} wermit
2225
2226#Mark Williams Coherent 386 on IBM PC family.
2227#This will make a "minimum interactive" version - no scripts,
2228#no character sets, no help, no dial, no debug/transaction logging, no
2229#transmit, msend, mail, type, etc.
2230coherentmi:
2231	$(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DNOSETKEY -DNOLEARN \
2232	-DNOSHOW -DNOCSETS -DNOHELP -DNODIAL -DNOSCRIPT -DNODEBUG -DNOTLOG \
2233	-DNOXMIT -DNOMSEND -DNOFRILLS -DNOSYSIOCTLH -DNOSERVER -DNOUUCP \
2234	-DNOSPL -DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ -DNOFLOAT \
2235	-DNOCMDL $(KFLAGS) -VSUVAR -DSELECT_H" KTARGET=$${KTARGET:-$(@)} \
2236	wermit
2237
2238#Mark Williams Coherent 386 on IBM PC/AT family.
2239coherentmax:
2240	$(MAKE) "CFLAGS = -O -DCOHERENT -DNOANSI -DSELECT_H -DNOLEARN \
2241	-DNOFLOAT -DNOSYSIOCTLH $(KFLAGS) -VSUVAR" "LNKFLAGS = -O -s" \
2242	KTARGET=$${KTARGET:-$(@)} wermit
2243
2244#Mark Williams Coherent 386 4.2.  Includes curses but not TCP/IP.
2245#Requires updates to the 4.2.10 compiler; the regular compiler fails to
2246#to handle "complex expressions".  NOFLOAT is so it can work on old PCs
2247#without floating-point hardware.
2248coherent42:
2249	$(MAKE) "CFLAGS = -T500000 -DNOFLOAT -DCOHERENT -DNOANSI -DSELECT \
2250	-DNOSYSLOG -DDIRENT -DCK_CURSES -DCK_NEWTERM -DCK_WREFRESH -VSUVAR \
2251	-DDCLGETCWD -DNOSYSIOCTLH -DNOINITGROUPS -DNOSYMLINK -DSELECT_H \
2252	-DDCLGETCWD -O $(KFLAGS)" \
2253	"LNKFLAGS = -O -s" KTARGET=$${KTARGET:-$(@)} \
2254	"LIBS  = -lsocket -lcurses" wermit
2255
2256#DEC Ultrix 2.x
2257# Add -O, -DDYNAMIC, -s, etc, if they work.
2258ultrix2x:
2259	@echo Making C-Kermit $(CKVER) for Ultrix 2.x ...
2260	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2261	"CFLAGS= -DBSD4 -DTCPSOCKET -DDU2 -DNOGETUSERSHELL $(KFLAGS)"
2262
2263du2:
2264	$(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix2x
2265
2266#DEC Ultrix 3.0 and 3.1
2267ultrix30:
2268	@echo Making C-Kermit $(CKVER) for Ultrix 3.0...
2269	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2270	"CFLAGS= -DBSD4 -DTCPSOCKET -DDIRENT -DSIG_V -DNOGETUSERSHELL \
2271	-DULTRIX3 -DCK_CURSES $(KFLAGS) -O" "LIBS= -lcurses -ltermcap"
2272
2273du3:
2274	$(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2275
2276ultrix3x:
2277	$(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix30
2278
2279#DEC Ultrix 4.0 or 4.1 on DECstation, VAXstation, VAX, etc.
2280ultrix40:
2281	@echo Making C-Kermit $(CKVER) for Ultrix 4.0 or 4.1...
2282	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2283	"CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DDU4 -DNOGETUSERSHELL \
2284	$(KFLAGS) -Olimit 1450" "LNKFLAGS = -s"
2285
2286#DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2287#Like ultrix40, except now C compiler supports -O2 optimization.
2288ultrix42:
2289	@echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2290	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2291	"CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL $(KFLAGS) \
2292	-O2 -Olimit 1750" "LNKFLAGS = -s"
2293
2294du42:
2295	$(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET-$(@)} ultrix42
2296
2297#DEC Ultrix 4.2-4.5 on DECstation, DECsystem, VAXstation, VAX, etc.
2298#Like du42, but with curses support added and a couple features.
2299ultrix42c:
2300	@echo Making C-Kermit $(CKVER) for Ultrix 4.2 or later...
2301	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2302	"CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2303	-DCK_CURSES -DNOIKSD $(KFLAGS)-G6 -O2 -Olimit 3000 " \
2304	"LNKFLAGS = -s" "LIBS= -lcurses -ltermcap"
2305
2306ultrix43:
2307	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2308	"KFLAGS=-DULTRIX43 $(KFLAGS)" KTARGET=$${KTARGET-$(@)} ultrix42c
2309
2310ultrix43notcp:
2311	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2312	"KFLAGS=-DULTRIX43 -DNONET $(KFLAGS)" \
2313	KTARGET=$${KTARGET-$(@)} ultrix42c
2314
2315# NOTE: need -DNODEBUG on MIPS to avoid relocation errors at link time.
2316# Actually now (8.0) that we have discovered the -G option maybe debugging
2317# can be put back.
2318ultrix44:
2319	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2320	"KFLAGS=-DULTRIX44 -G7 -DNODEBUG -DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2321	KTARGET=$${KTARGET-$(@)} ultrix42c
2322
2323ultrix45:
2324	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2325	"KFLAGS=-DULTRIX45 $(KFLAGS)-DNETPTY -DNO_DEVTTY $(KFLAGS)" \
2326	KTARGET=$${KTARGET-$(@)} ultrix42c
2327
2328du42c:
2329	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2330	KTARGET=$${KTARGET-$(@)} ultrix42c
2331
2332#DEC Ultrix 4.3A or later on DECsystem and DECstation 5000/50, /150 or /260
2333#with MIPS R4x00 processor.  The "-mips3" switch generates R4000-specific
2334#code, which is faster and more compact, but *won't* run on earlier
2335#DECsystems and DECstations.
2336ultrix43-mips3:
2337	@echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2338	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2339	"CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2340	$(KFLAGS) -O2 -Olimit 1750 -mips3" "LNKFLAGS = -s -mips3"
2341
2342du43-mips3:
2343	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) ultrix43-mips3
2344
2345#DEC Ultrix 4.3A or later on MIPS R4x000 based systems.
2346#Like ultrix43-mips3 but with curses support added
2347ultrix43c-mips3:
2348	@echo Making C-Kermit $(CKVER) for Ultrix 4.3A or later, R4000 cpu...
2349	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2350	"CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL -DCK_CURSES \
2351	$(KFLAGS) -O2 -Olimit 3000 -mips3" "LNKFLAGS = -s -mips3" \
2352	"LIBS= -lcurses -ltermcap"
2353
2354du43c-mips3:
2355	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2356	KTARGET=$${KTARGET-$(@)} ultrix43c-mips3
2357
2358#DEC Ultrix 4.4 on DECstation 5000/50 or /150 with R4000 MIPS processor,
2359#or 5000/260 with R4400.  The "-mips3" switch generates R4000-specific code,
2360#which is faster and more compact but *won't* run on earlier DECstations.
2361ultrix44-mips3:
2362	@echo Making C-Kermit $(CKVER) for Ultrix 4.4, R4000 cpu ...
2363	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2364	"CFLAGS= -DBSD4 -DTCPSOCKET -DSIG_V -DNOGETUSERSHELL \
2365	$(KFLAGS) -O2 -Olimit 1450 -mips3" "LNKFLAGS = -s -mips3"
2366
2367du44-mips3:
2368	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2369	KTARGET=$${KTARGET-$(@)} ultrix44c-mips3
2370
2371#DEC Ultrix 4.2 on DECstation, VAXstation, VAX, etc, System V R4 environment
2372ultrix42s5r4:
2373	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4 on Ultrix...'
2374	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2375	"CFLAGS = -O2 -Olimit 1500 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
2376	-DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
2377
2378#OSF/1
2379osf osf1:
2380	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2381	"CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2382	-DCK_CURSES -DCK_RTSCTS -DFNFLOAT $(KFLAGS)" \
2383	"LNKFLAGS = -s" "LIBS = $(LIBS) -lbsd -lcurses -ltermcap -lm"
2384
2385#DEC OSF/1 V1.0-1.3 on DECstation, VAX, Alpha, or PC.
2386dec-osf dec-osf1:
2387	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2388	"CFLAGS= -DBSD4 -DOSF -DOSF13 -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2389	-DNOREALPATH -DNOIKSD -DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DNODEBUG \
2390	-DNOUNICODE $(KFLAGS)" \
2391	"LNKFLAGS = -non_shared" "LIBS = -lbsd -lcurses -ltermcap -lm"
2392
2393# This one causes "relocation out-of-range" errors in the linker.
2394old-dec-osf:
2395	@echo Making C-Kermit $(CKVER) for DEC OSF/1 V1.x...
2396	@echo If you are building for DEC OSF/1 2.0, please use dec-osf20.
2397	@echo Remove or adjust -O2 and/or -Olimit if they cause trouble.
2398	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2399	"KFLAGS= -O2 -Olimit 2400 $(KFLAGS)"
2400
2401#DEC OSF/1 2.0 on Alpha and probably nowhere else.
2402#The only difference from OSF/1 is that optimization is omitted.
2403#The optimized version gets strange runtime errors, like the PAUSE command
2404#not working.  Add "-unsigned" to make all chars unsigned.
2405dec-osf20:
2406	@echo Making C-Kermit $(CKVER) for DEC OSF/1 V2.0...
2407	@echo Optimization omitted because it causes runtime errors.
2408	@echo See comments in makefile.
2409	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2410	"KFLAGS= -DOSF20 $(KFLAGS)"
2411
2412dec-osf30:
2413	@echo Making C-Kermit $(CKVER) for DEC OSF/1 V3.0...
2414	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2415	"KFLAGS= -DOSF30 -O2 -Olimit 2400 $(KFLAGS)"
2416
2417#Digital UNIX 3.2
2418# Must compile ckuus[6x].c separately without optimization otherwise
2419# the optimizer dumps core - keep CFLAGS here in sync with those from osf.
2420du32:
2421	@echo Making C-Kermit $(CKVER) for Digital UNIX 3.2...
2422	$(MAKE) CC=$(CC) CC2=$(CC2) ckuus6.$(EXT) \
2423	"CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2424	-DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2425	$(MAKE) CC=$(CC) CC2=$(CC2) ckuusx.$(EXT) \
2426	"CFLAGS= -DBSD4 -DOSF -D_BSD -DTCPSOCKET -DCK_ANSIC -DSIG_V \
2427	-DCK_CURSES -DCK_RTSCTS -DFNFLOAT -DOSF32 -DHDBUUCP $(KFLAGS)"
2428	$(MAKE) CC=$(CC) CC2=$(CC2) osf \
2429	"KFLAGS= -DOSF32 -DHDBUUCP -O2 -Olimit 3200 $(KFLAGS)"
2430
2431dec-osf32:
2432	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) du32 \
2433	KTARGET=$${KTARGET:-$(@)}
2434
2435#Digital UNIX 4.0 through 4.0D (use tru64 targets for 4.0E and above)...
2436du40:
2437	@echo Making C-Kermit $(CKVER) for Digital UNIX 4.0...
2438	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2439	"KFLAGS= -DOSF40 -DHDBUUCP -DFNFLOAT \
2440	-unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2441
2442du40gcc:
2443	@echo Making C-Kermit $(CKVER) for Digital UNIX 4.0 with gcc ...
2444	$(MAKE) osf CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
2445	"KFLAGS= -DOSF40 -DHDBUUCP $(KFLAGS)"
2446
2447#Tru64 Unix 4.0E
2448tru64-40e:
2449	@echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0E...
2450	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2451	"KFLAGS= -DOSF40 -DOSF40E -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2452	-unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2453
2454tru64-40f:
2455	@echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0F...
2456	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2457	"KFLAGS= -DOSF40 -DOSF40F -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2458	-unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2459
2460tru64-40g:
2461	@echo Making C-Kermit $(CKVER) for Tru64 UNIX 4.0G...
2462	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2463	"KFLAGS= -DOSF40 -DOSF40G -DTRU64 -DHDBUUCP -DFNFLOAT -DNOCOTFMC \
2464	-unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)" "LIBS=-lm"
2465
2466tru64-50a:
2467	@echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.0A...
2468	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2469	"KFLAGS= -DTRU64 -DOSF50 -DHDBUUCP \
2470	-unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2471
2472tru64-51a:
2473	@echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1A...
2474	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2475	"KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DHDBUUCP \
2476	-unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2477
2478tru64-51b:
2479	@echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1B...
2480	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2481	"KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2482	-unsigned -std1 -O3 -Olimit 2400 $(KFLAGS)"
2483
2484# Added 5.1b version with OpenSSL - CDW 6-13-2005...
2485tru64-51b+openssl:
2486	@echo Making C-Kermit $(CKVER) for Tru64 UNIX 5.1b
2487	@echo  including OpenSSL...
2488	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2489	"KFLAGS= -DTRU64 -DOSF50 -DOSF51A -DOSF51B -DHDBUUCP \
2490	-unsigned -std1 -O3 -Olimit 2400 \
2491	-DCK_AUTHENTICATION -DCK_SSL $(SSLINC) $(KFLAGS)" \
2492	"LIBS= $(SSLLIB) -rpath $(sslroot)/ssl/lib -lssl -lcrypto"
2493
2494du50:
2495	$(MAKE) CC=$(CC) CC2=$(CC2) tru64-50a KTARGET=$${KTARGET:-$(@)}
2496
2497du40-ridiculous-checking:
2498	@echo Making C-Kermit $(CKVER) for Digital UNIX 4.0.
2499	@echo Checking everything - assumes DECC...
2500	$(MAKE) CC=$(CC) CC2=$(CC2) osf KTARGET=$${KTARGET:-$(@)} \
2501	"KFLAGS= -DOSF40 -DHDBUUCP -w0 -warnprotos -check -portable \
2502	-unsigned -std1 -O3 -Olimit 1760 $(KFLAGS)"
2503
2504#Sequent DYNIX/ptx 1.2.1
2505dynixptx12:
2506	@echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.2.1...
2507	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2508	"CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DPTX -DNOGETUSERSHELL -DNOLEARN \
2509	-DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t $(KFLAGS) -i -O" \
2510	"LNKFLAGS = -i"
2511
2512#Sequent DYNIX/ptx 1.3 or 1.4
2513dynixptx13:
2514	@echo Making C-Kermit $(CKVER) for Sequent DYNIX/ptx 1.3 TCP/IP...
2515	$(MAKE) xermit "CFLAGS= -O KTARGET=$${KTARGET:-$(@)} \
2516	-DSVR3 -DDIRENT -DHDBUUCP -DPTX -DCK_POLL -DNOGETUSERSHELL \
2517	-DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DTCPSOCKET $(KFLAGS) -i" \
2518	"LNKFLAGS = -i" "LIBS = -lsocket -linet -lnsl"
2519
2520#Sequent DYNIX/ptx 2.0, ANSI C compilation
2521#Should work on any hardware platform when DYNIX/ptx runs, including
2522#386, 486, Pentium.
2523dynixptx20:
2524	@echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2525	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2526	"CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2527	-DWAIT_T=int -DPTX -DNOGETUSERSHELL $(KFLAGS) -O" \
2528	"LIBS = -lsocket -linet -lnsl"
2529
2530#Sequent DYNIX/ptx 2.0, ANSI C compilation, with curses
2531dynixptx20c:
2532	@echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.0...'
2533	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2534	"CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int -DPTX -DCK_CURSES \
2535	-DCK_NEWTERM -DNOGETUSERSHELL $(KFLAGS) -O" \
2536	"LIBS = -lsocket -linet -lnsl -lcurses -ltermcap"
2537
2538#Sequent DYNIX/ptx 2.1.6, 80486, ANSI C compilation, with curses:
2539# -Xa -- use ANSI compiler.
2540# -Wc,-pw -- suppress portability warnings.
2541# -Wc,-i386 -- 80386 cpu.
2542# -Wc,-i486 -- 80486 cpu.
2543# -Wc,-P5 -- Pentium (default).
2544# -Wc,-O3 -- highest optimization.
2545# -Wa,-N17061 -- increase symbol table from default of 15013 for ckcuni.c.
2546# Early versions of DYNIX/ptx 2.1.x may need -DCK_POLL instead of -DSELECT.
2547# Add "$&" after the colon in the "xermit" target for parallel makes.
2548dynixptx216c:
2549	@echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6'
2550	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2551	"CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2552	-DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2553	-DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2554	-DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2555	$(KFLAGS) -Xa -Wc,-pw -Wc,-i486 -Wc,-O3 -Wa,-N17061" \
2556	"LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2557	"LNKFLAGS = -s"
2558
2559#Sequent DYNIX/ptx 2.1.6, gcc 2.7.2.2, with curses:
2560dynixptx216cgcc:
2561	@echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 2.1.6 gcc'
2562	$(MAKE) xermit "CC = gcc" "CC2 = gcc" KTARGET=$${KTARGET:-$(@)} \
2563	"CFLAGS= -DPOSIX -DHDBUUCP -DDYNAMIC -DTCPSOCKET \
2564	-DSELECT -DCK_REDIR -DCK_NAWS -DCK_WREFRESH -DSW_ACC_ID \
2565	-DTCP_NODELAY=1 -DTRMBUFL=2048 -DBIGBUFOK -DHADDRLIST \
2566	-DPTX  -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL -DNOREALPATH \
2567	$(KFLAGS) -O3 -pipe -funsigned-char" \
2568	"LIBS = -lXbsd -lseq -lsocket -linet -lnsl -lmalloc -lm -lcurses" \
2569	"LNKFLAGS = -s"
2570
2571#Sequent DYNIX/ptx 4.0, ANSI C compilation, with curses
2572dynixptx41c:
2573	@echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.0...'
2574	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2575	"CFLAGS= -DPOSIX -DHDBUUCP -DTCPSOCKET \
2576	-DWAIT_T=int -DPTX -DPTX4 -DCK_CURSES -DCK_NEWTERM \
2577	-DNOGETUSERSHELL $(KFLAGS) -O" \
2578	"LIBS = -lsocket -lnsl -lcurses -ltermcap"
2579
2580#Sequent DYNIX/ptx 4.4, ANSI C compilation, with curses
2581dynixptx44:
2582	@echo 'Making C-Kermit $(CKVER) for POSIX, Sequent DYNIX/ptx 4.4...'
2583	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2584	"CFLAGS= -DPTX -DPTX4 -DPOSIX -DHDBUUCP -DTCPSOCKET -DWAIT_T=int \
2585	-DCK_CURSES -DCK_NEWTERM -DBIGBUFOK -DSELECT -DNOGETUSERSHELL \
2586	$(KFLAGS) -O" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
2587
2588#Sequent DYNIX 3.0.x
2589dynix3:
2590	@echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2591	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2592	"CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O \
2593	-DPWUID_T=int -DGID_T=int $(KFLAGS)"
2594
2595#Sequent DYNIX 3.0.x, no ACUCNTRL
2596dynix3noacu:
2597	@echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.0.x...
2598	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2599	"CFLAGS= -DBSD43 -DLCKDIR -DTCPSOCKET -O \
2600	-DUID_T=int -DGID_T=int $(KFLAGS)"
2601
2602#Sequent DYNIX 3.1.x
2603dynix31:
2604	@echo Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.x...
2605	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2606	"CFLAGS= -O -DDCLPOPEN -DLCKDIR -DBSD4 -DTCPSOCKET $(KFLAGS)"
2607
2608#Sequent DYNIX 3.1.2, as above but with curses, to be compiled by gcc 2.3.3.
2609dynix31c:
2610	@echo 'Making C-Kermit $(CKVER) for Sequent DYNIX 3.1.2, curses...'
2611	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2612	"CFLAGS= -O2 -DDCLPOPEN -DACUCNTRL \
2613	-DBSD43 -DTCPSOCKET -DCK_CURSES -DUID_T=int \
2614	$(KFLAGS)" "LIBS= -lcurses -ltermcap"
2615
2616#Convex C1 with Berkeley Unix
2617convex:
2618	@echo Making C-Kermit $(CKVER) for Convex C1 / BSD...
2619	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2620	"CFLAGS= -DBSD4 -DNOLEARN $(KFLAGS) -Dmsleep=mnap"
2621
2622#Convex C210 with Convex/OS 8
2623convex8:
2624	@echo Making C-Kermit $(CKVER) for Convex C210 with OS 8
2625	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2626	"CFLAGS= -DBSD4 -DTCPSOCKET -DNODEBUG -DDIRENT -DNOFILEH \
2627	$(KFLAGS) -DSIG_V -Dmsleep=mnap"
2628
2629#Convex C2 with Convex OS 9.1 (should also work with 8.1 or later)
2630#with ANSI C compiler, uses BSD 4.3 uucp lockfile convention.
2631convex9:
2632	@echo Making C-Kermit $(CKVER) for Convex C210 with OS 9.1
2633	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2634	"CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2635	-D__STDC__ -DLCKDIR -Dmsleep=mnap -O -ext -tm c1 $(KFLAGS)" \
2636	"LNKFLAGS = -ext"
2637
2638#Convex C2 with Convex OS 10.1 or later
2639#with gcc 2.x C compiler
2640convex10gcc:
2641	@echo Making C-Kermit $(CKVER) for Convex C2 with OS 10.1 using gcc
2642	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2643	"CFLAGS= -DPOSIX -DCONVEX9 -DNOIEXTEN -DDIRENT -DNOFILEH -DTCPSOCKET \
2644	-D__STDC__  -Dmsleep=mnap -O2 $(KFLAGS)" CC=gcc CC2=gcc
2645
2646#Cray X-MP or Y-MP UNICOS 6.x or 7.x.
2647#NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2648#processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2649cray:
2650	@echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 6.x or 7.0...
2651	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2652	"CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2653
2654#Cray X-MP or Y-MP UNICOS 8.0 Alpha.
2655cray8:
2656	@echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 8.0 Alpha...
2657	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2658	"CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS) -O1"
2659
2660#Cray X-MP or Y-MP UNICOS 9.0.
2661#This one was executed successfully for C-Kermit 8.0.209.
2662#Earlier versions of Unicos will probably need the same flags.
2663cray9:
2664	@echo 'Making C-Kermit $(CKVER) for Cray X/Y-MP UNICOS 9.0...
2665	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2666	"CFLAGS= -DSVR4 -DDIRENT -DHDBUUCP -DNOLFDEVNO \
2667	-DTCPSOCKET $(KFLAGS) -O1"
2668
2669#Cray-2 or Cray 3-CSOS
2670#NOTE: NPROC tells how many parallel makes to run.  If your Cray has multiple
2671#processors, you can set NPROC up to the number of CPUs, e.g. NPROC=16.
2672craycsos:
2673	@echo 'Making C-Kermit $(CKVER) for Cray-2/3 CSOS
2674	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} NPROC=1 \
2675	"CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET \
2676	$(KFLAGS) -DCK_ANSIC -DCK_CURSES" "LIBS=-lnet"
2677
2678#NeXTSTEP 1.0 through 3.2.
2679#Includes fullscreen file transfer display (curses) and TCP/IP support.
2680#Uses shared library to make executable program about 80K smaller.
2681#Remove "LIBS = -lsys_s" if this causes trouble.
2682next:
2683	@echo Making C-Kermit $(CKVER) for NeXTSTEP...
2684	@echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2685	@echo 'add KFGLAGS=-DNOREDIRECT to your make command.'
2686	$(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2687	"CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2688	-pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2689
2690nextc:
2691	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2692	KTARGET=$${KTARGET:-$(@)}
2693
2694nextg:
2695	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2696	KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2697
2698nextgc:
2699	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2700	KFLAGS=-Wall KTARGET=$${KTARGET:-$(@)}
2701
2702#NeXTSTEP 3.3.
2703#Includes fullscreen file transfer display and TCP/IP.
2704# You might have to add 1 line to 1 NeXT header file <ip.h>
2705# to declare n_long as u_long by adding #include <bsd/netinet/in_systm.h>
2706
2707next33:
2708	@echo Making C-Kermit $(CKVER) for NeXTSTEP 3.3...
2709	$(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2710	"CFLAGS= -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2711	-pipe -DCK_CURSES $(KFLAGS) -O -w" "LIBS = -lsys_s -lcurses -ltermcap"
2712
2713#OPENSTEP 4.2 for Sparc, m680x0, HP PA-RISC, and Intel.
2714#Includes fullscreen file transfer display and TCP/IP.
2715#ckcpro.c compiled without optimization because it crashes the compiler.
2716openstep42:
2717	@echo Making C-Kermit $(CKVER) for OPENSTEP 4.2...
2718	$(MAKE) ckcpro.$(EXT) \
2719	"CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2720	-DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -w"
2721	$(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2722	"CFLAGS= -DOPENSTEP42 -DNEXT33 -DTCPSOCKET -DLCKDIR -DNOPUTENV \
2723	-DFNFLOAT -pipe -DCK_CURSES $(KFLAGS) -O -w" \
2724	"LIBS = -lsys_s -lcurses -ltermcap"
2725
2726#NeXT with malloc debugger
2727nextmd:
2728	@echo Making C-Kermit $(CKVER) for NeXT with malloc debugging...
2729	$(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
2730	"CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2731	-DCK_CURSES $(KFLAGS) -O -w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
2732	"LIBS = -lsys_s -lcurses -ltermcap"
2733
2734#Build for NeXTSTEP with "fat" binaries (MABs) that run on both Motorola
2735#and Intel platforms.
2736nextfat:
2737	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) \
2738	next KTARGET=$${KTARGET:-$(@)} \
2739	"KFLAGS=-Wall -arch m68k -arch i386" "LNKFLAGS = -arch m68k -arch i386"
2740
2741#NeXTSTEP on Intel Platforms.
2742next486:
2743	@echo Making C-Kermit $(CKVER) for NeXTSTEP on Intel Platforms...
2744	@echo 'If you get errors in ckutio.c about w_S, w_T, etc,'
2745	@echo 'add KFGLAGS=D-DNOREDIRECT to your make command.'
2746	$(MAKE) xermit CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)} \
2747	"CFLAGS= -DNEXT -DTCPSOCKET -DLCKDIR -DNOPUTENV -DFNFLOAT \
2748	-DNODEBUG -O3 -fno-omit-frame-pointer -fschedule-insns2 -pipe \
2749	-DCK_CURSES $(KFLAGS) -w" "LIBS = -lsys_s -lcurses -ltermcap"
2750
2751#Single binary that runs on NeXT 68030 and 68040, Intel, HP, and Sparc,
2752#as well as on OpenStep/Mach.
2753nextquadfat:
2754	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) next \
2755	KTARGET=$${KTARGET:-$(@)} \
2756	"KFLAGS=-Wall -arch m68k -arch i386 -arch hppa -arch sparc" \
2757	"LNKFLAGS = -arch m68k -arch i386 -arch hppa -arch sparc"
2758
2759#BeBox
2760beboxdr7:
2761	@echo 'Making C-Kermit $(CKVER) for the BeBox...'
2762	@echo 'Link step will fail with default Metroworks linker 64K limit.'
2763	@echo 'Code Warrior Gold required to link big programs.'
2764	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2765	"CC=/boot/develop/tools/mwcc" "CC2=/boot/develop/tools/mwld" \
2766	"CFLAGS= -DBEBOX -DBE_DR_7 -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2767
2768#BeBox BeOS DR7 only
2769bebox:
2770	@echo 'Making C-Kermit $(CKVER) for BeBox...'
2771	@echo 'Link step will fail with default Metroworks linker 64K limit.'
2772	@echo 'Code Warrior Pro 3.0 for BeBox required to link big programs.'
2773	$(MAKE) wermit "CC=mwcc" "CC2=mwld" KTARGET=$${KTARGET:-$(@)} \
2774	"CFLAGS= -DBEBOX -DPOSIX -DNOLEARN -DNOUUCP $(KFLAGS) -O"
2775
2776#BeOS 4.5
2777#We have to use the wermit target because 'fd_set' is unknown.
2778beos45:
2779	$(MAKE) wermit "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
2780	"CFLAGS= -DBEOS -DBEOS45 -DPOSIX -DNOIKSD -DNOREALPATH -DSYSTIMEH \
2781	-DNOCOTFMC -DNOUUCP -DNOLEARN $(KFLAGS) -O" \
2782	"LIBS = $(LIBS)"
2783
2784#BeOS 4.5
2785beos45net:
2786	$(MAKE) CC=$(CC) CC2=$(CC2) beos45 \
2787	"KFLAGS=-DTCPSOCKET -DNO_DNS_SRV $(KFLAGS)" "LIBS=-lnet -lnetapi"
2788
2789#Plan 9 from Bell Labs
2790plan9:
2791	@echo 'C-Kermit for Plan 9 from Bell Labs - calling ckpker.mk...'
2792	make -f ckpker.mk
2793
2794#POSIX
2795posix:
2796	@echo 'Making C-Kermit $(CKVER) for pure POSIX...'
2797	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2798	"CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -O"
2799
2800# PowerMAX OS (SVR4) from Concurrent (tested on PowerMAX 5.1)
2801powermax:
2802	@echo 'Making C-Kermit $(CKVER) for Concurrent PowerMAX OS...'
2803	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2804	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DPOWERMAX \
2805	-DNETPTY -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
2806	-DPUSH_LDTERM -DPUSH_TTCOMPAT \
2807	-DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
2808	"LIBS= -lsocket -lnsl -lresolv -lcurses -lgen -lc -lucbc"
2809
2810#Berkeley Software Design Inc. BSDI
2811# Substitute "LIBS= -lnewcurses -ltermcap" if desired.
2812bsdi:
2813	@echo 'Making C-Kermit $(CKVER) for BSDI ...'
2814	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2815	"CFLAGS= -DBSD44 -DSETREUID -DSW_ACC_ID -DBIGBUFOK -DFIXCRTSCTS \
2816	-DTCPSOCKET -DCK_CURSES -DFNFLOAT $(KFLAGS) -O" \
2817	"LIBS= -lcurses -ltermcap -lm"
2818
2819#Berkeley Software Design Inc. BSDI - has higher serial speeds than 1.x.
2820bsdi2:
2821	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2822	KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 $(KFLAGS)"
2823
2824bsdi3:
2825	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2826	KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DBSDI2 -DBSDI3 $(KFLAGS)"
2827
2828bsdi4:
2829	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2830	KTARGET=$${KTARGET:-$(@)} \
2831	"KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2832	-DCKHTTP -m486 $(KFLAGS)"
2833
2834# (old name for the above)
2835bsdiposix:
2836	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi
2837
2838
2839#Build a BSDI 4.x binary that also runs under FreeBSD (Terry Kennedy).
2840#But watch out for details like serial-port locking.
2841bsdix:
2842	$(MAKE) "MAKE=$(MAKE)" CC=$(CC) CC2=$(CC2) bsdi \
2843	KTARGET=$${KTARGET:-$(@)} \
2844	"KFLAGS=-DBSDI2 -DBSDI3 -DBSDI4 -DTPUTSFNTYPE=void -DTPUTSISVOID \
2845	-m486 $(KFLAGS)" "LNKFLAGS=-static -Wl,-m,i386bsdi -Wl,-e,_start"
2846
2847#Pyramid 9XXX (e.g. 9845) or MIServer T series, OSx 4.4b thru 5.1
2848pyramid:
2849	@echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2850	ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2851	"CFLAGS= -DBSD43 -DTCPSOCKET -DPYRAMID -O $(KFLAGS)" "LNKFLAGS = -s"
2852
2853#Pyramid Dual Port OSx using HoneyDanBer UUCP, curses and TCP
2854pyramid-hdb:
2855	@echo Making C-Kermit $(CKVER) for Pyramid Dual Port OSx
2856	ucb $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2857	"CFLAGS= -DBSD43 -DTCPSOCKET -DHBDUUCP -DCK_CURSES -O $(KFLAGS)" \
2858	"LNKFLAGS = -s" "LIBS = -lcurses -ltermcap"
2859
2860#Pyramid DC/OSx (UNIX System V R4).
2861#Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
2862#are not misplaced in sys (rather than netinet and arpa, respectively).
2863#Uses ANSI C.
2864#NOTE: Remove -O and Olimit:2500 from CFLAGS if TELNET connections do not work.
2865pyrdcosx:
2866	@echo 'Making C-Kermit $(CKVER) for Pyramid DC/OSx...'
2867	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2868	"CFLAGS = -Xa -O -DSVR4 -DDIRENT -DHDBUUCP -DSELECT -DNOGETUSERSHELL \
2869	-DCK_CURSES -DSTERMIOX -DTCPSOCKET -DPYRAMID -K Olimit:3100 \
2870	-DNO_DNS_SRV $(KFLAGS)" "LIBS= -lcurses -lsocket -lnsl" "LNKFLAGS = -s"
2871
2872#IBM's AIX 3.0 on IBM 370 mainframe, tested on AIX F44 thru F50.
2873aix370:
2874	@echo Making C-Kermit $(CKVER) for IBM System/370 AIX 3.0...
2875	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2876	"CFLAGS= -DAIX370 -DTCPSOCKET -DLCKDIR -DDIRENT $(KFLAGS)" \
2877	"LIBS = -lbsd"
2878
2879#IBM's AIX/ESA 2.1 (OSF/1) on IBM mainframe
2880aixesa:
2881	@echo Making C-Kermit $(CKVER) for IBM AIX/ESA...
2882	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2883	"CFLAGS= -DAIXESA -DTCPSOCKET $(KFLAGS) -O"
2884
2885#IBM PS/2 with AIX 1.0 thru 1.3.
2886#  Reports indicate that -O switch must be omitted.
2887#  It is also possible that "make bsd" will work (reports welcome).
2888#  One report said "make LIBS=-lbsd bsd" did the trick.
2889#  NOTLOG is to get around a 'tlog' symbol defined in one of the headers.
2890ps2aix:
2891	@echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2892	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2893	"CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DSIG_V \
2894	-DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2895	"LNKFLAGS = -i"
2896
2897ps2aixnetc:
2898	@echo 'Making C-Kermit $(CKVER) for IBM AIX 1.x PS/2...'
2899	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
2900	"CFLAGS = -DATTSV -DNOREALPATH -DPS2AIX10 -DTCPSOCKET -DCK_CURSES \
2901	-DSIG_V -DNOUNICODE -DNOTLOG -DNOLEARN $(KFLAGS) -i" \
2902	"LIBS = -lcurses" "LNKFLAGS = -i"
2903
2904ps2aix3:
2905	$(MAKE) ps2aix KTARGET=$${KTARGET:-$(@)}
2906
2907#IBM RT PC with AIX 2.2.1, valid as of C-Kermit 8.0.
2908#NOTLOG because of a conflict in <sys/termio.h>.
2909#This one has unique and strange lockfiles.
2910#  -O removed on purpose (8.0).
2911#  In case of "compiler error: symbol table full", increase the -Nn number.
2912#  In case of "compiler error: Constant pool too big", boost the -Np number.
2913#  Add -DNOPUTENV if putenv() causes trouble.
2914#  Put -DNOIKSD back if IKSD-related problems occur.
2915rtaix:
2916	@echo 'Making C-Kermit $(CKVER) for IBM RT PC, AIX 2.2.1...'
2917	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2918	"CFLAGS = -DATTSV -DRTAIX -DHDBUUCP -DDIRENT -DNOTLOG -DTCPSOCKET \
2919	-DNOGETUSERSHELL -DCLSOPN -DNOREALPATH -DNOUNICODE -DBSD_INCLUDES \
2920	-DUSE_LSTAT -DFNFLOAT -Nn2500 -Np1000 -Wq,-SJ2 -a -w $(KFLAGS)" \
2921	"LIBS = -lm $(LIBS)" "LNKFLAGS = -s"
2922
2923#### IBM RT PC - these targets were last verified in C-Kermit 8.0.211.
2924
2925#IBM RT PC with AIX 2.2.1 + curses
2926rtaixc:
2927	$(MAKE) rtaix CC=$(CC) CC2=$(CC2) "KFLAGS=-DCK_CURSES" "LIBS=-lcurses"
2928
2929#IBM RT PC with AIX (ACIS) 2.2.1 (BSD 4.3)
2930# Add -O, -DDYNAMIC, -s, etc, if they work.
2931rtacis:
2932	@echo Making C-Kermit $(CKVER) for RT PC with ACIS 2.2.1 = BSD 4.3...
2933	$(MAKE) xermit KTARGET=$${KTARGET-$(@)} \
2934	"CFLAGS= -DBSD4 -DTCPSOCKET -DNOREALPATH -DNOIKSD -DNOPUTENV \
2935	$(KFLAGS) -U__STDC__" "LNKFLAGS = -s"
2936
2937#### IBM AIX.  The first two targets should work for any version of AIX
2938#### from 4.2 onwards.  The ones after that are for older versions or
2939#### specific configurations, and/or with gcc.
2940
2941# This one should work for any AIX 4.2 or later: "make aix".
2942# Other tags are for compatibility with old makefile targets.
2943#OK: 2011/06/11
2944aix aix42 aix43 aix44 aix45 aix50 aix51 aix52 aix53 aix54 aix61:
2945	@echo Making C-Kermit $(CKVER) for IBM AIX...
2946	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2947	"CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2948	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2949	-DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
2950	-DCKCPU=\\\"`uname -p`\\\" \
2951	-DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2952	-D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
2953
2954# Same but using gcc instead of cc
2955# This works but we get "gcc: unrecognized option '-qmaxmem-..'" each module.
2956aixg:
2957	@echo "Using gcc..."
2958	$(MAKE) aix KTARGET=$${KTARGET:-$(@)} \
2959	CC=gcc CC2=gcc "KFLAGS=-pipe -funsigned-char"
2960
2961# AIX 4.2 or later with OpenSSL 0.9.7 or later: "make aix+ssl"
2962# For earlier OpenSSL remove -DOPENSSL_097 or add "KFLAGS=-UOPENSSL_097".
2963# Synonym target names added to cover old redundant targets that were removed.
2964# If SSL is not installed in the /usr/local tree (see SSLINC and SSLLIB
2965# definitions near the top), you can specify the locations in your make
2966# command as in this example:
2967#
2968#  SSLINC=-I/opt/ssl/include SSLLIB=-L/opt/ssl/lib make -e aix+ssl
2969#
2970# To build with gcc use "make aix CC=gcc CC2=gcc", or "make aixg"
2971#
2972#OK: 2011/06/15
2973aix+ssl aix51+openssl aix52+openssl aix53+openssl:
2974	@echo "Making C-Kermit $(CKVER) for IBM AIX with OpenSSL..."
2975	@echo "SSLINC=$(SSLINC) SSLLIB=$(SSLLIB)"
2976	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2977	CC=$(CC) CC2=$(CC2) \
2978	"CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2979	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2980	-D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2981	-DCKCPU=\\\"`uname -p`\\\" \
2982	-DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
2983	-DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $(SSLINC) $(KFLAGS)" \
2984	"LNKFLAGS=-s" "LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
2985
2986# AIX 5.3 or 6.1 or later with IBM OpenSSL, which is always in the directories
2987# shown below so you don't have to set SSLINC and SSLLIB.  If for some reason
2988# the SSL include files and libraries are not in the places assumed, then use
2989# "make aix+ssl" (just above) and set SSLINC and SSLLIB to indicate where the
2990# SSL files are.  To build with gcc use "make aix+ibmssl CC=gcc CC2=gcc".
2991aix+ibmssl:
2992	@echo "Making C-Kermit $(CKVER) for IBM AIX 6.1 with OpenSSL..."
2993	@echo "If this fails use 'make aix+ss' and specify SSLINC and SSLLIB"
2994	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
2995	CC=$(CC) CC2=$(CC2) \
2996	"CFLAGS=-DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
2997	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
2998	-D_LARGE_FILES -DSELECT -DSELECT_H -DNOGETUSERSHELL \
2999	-DCKCPU=\\\"`uname -p`\\\" \
3000	-DHERALD=\"\\\" IBM AIX `uname -v`.`uname -r`\\\"\" \
3001	-DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_098 \
3002	-I/usr/include/openssl $(KFLAGS)" \
3003	"LNKFLAGS=-s" \
3004	"LIBS=-L/usr/lib/openssl -lssl -lcrypto -lcurses -lm -lcrypt"
3005
3006# Old AIX versions...
3007
3008#IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000.
3009rs6000:
3010	@echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
3011	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3012	"CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
3013	-DCK_POLL -DCLSOPN -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
3014	"LNKFLAGS = -s"
3015
3016#IBM AIX 3.0, 3.1, or 3.2 for RISC System/6000, with curses.
3017rs6000c:
3018	@echo Making C-Kermit $(CKVER) for IBM AIX 3.0 or 3.1, RS/6000...
3019	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3020	"CFLAGS= -DAIXRS -DTCPSOCKET -DSVR3 -DDIRENT -DCK_ANSIC \
3021	-DCK_POLL -DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -DNOREALPATH \
3022	-O $(KFLAGS)" "LIBS= -lcurses -ltermcap" "LNKFLAGS = -s"
3023
3024aix30:
3025	$(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
3026
3027aix31:
3028	$(MAKE) rs6000 CC=$(CC) CC2=$(CC2) KTARGET=$${KTARGET:-$(@)}
3029
3030#IBM AIX 3.2 for RISC System/6000.
3031#In case of "subprogram too complex" warnings, add "-qmaxmem=16000" to CFLAGS.
3032rs6aix32:
3033	@echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000...
3034	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3035	"CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
3036	-DSELECT_H -DCLSOPN -DNOTTYLOCK -O $(KFLAGS)" "LNKFLAGS = -s"
3037
3038#IBM AIX 3.2 for RISC System/6000.
3039rs6aix32c:
3040	@echo Making C-Kermit $(CKVER) for IBM AIX 3.2, RS/6000, TCP+curses...
3041	@echo In case of Subprogram Too Complex warnings,
3042	@echo add -qmaxmem=16000 to CFLAGS.
3043	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3044	"CFLAGS= -DAIXRS -DTCPSOCKET -DSVR4 -DDIRENT -DCK_ANSIC -DNOREALPATH \
3045	-DCLSOPN -DCK_CURSES -DSELECT_H -DNOTTYLOCK -O $(KFLAGS)" \
3046	"LNKFLAGS = -s" "LIBS=-lcurses"
3047
3048aix32:
3049	$(MAKE) rs6aix32c KTARGET=$${KTARGET:-$(@)}
3050
3051#IBM AIX 4.1, 4.1.x on RISC System/6000 or Power Series.
3052#Generates common binary for all platforms if using xlc (IBM C compiler).
3053#When using gcc, add -mcpu=common to generate common binary.
3054#Note that this one needs CK_NEWTERM.
3055# Add -bbigtoc in case ld fails with TOC overflow.
3056aix41:
3057	@echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3058	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3059	"CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3060	-DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3061	-DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
3062	"LNKFLAGS = -s" "LIBS=-lcurses"
3063
3064#Ditto but with gcc.
3065#Remove "CC=gcc CC2=gcc" if you have gcc installed as cc.
3066aix41g:
3067	@echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3068	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
3069	"CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3070	-DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3071	-DNOGETUSERSHELL -O $(KFLAGS)" \
3072	"LNKFLAGS = -s -Xlinker -bbigtoc" "LIBS=-lcurses"
3073
3074# Add -bbigtoc in case ld fails with TOC overflow.
3075aix41+krb5+krb4:
3076	@echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3077	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3078	"CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3079	-DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3080	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3081	-DCK_ENCRYPTION -DCK_DES $(K5INC) $(K5INC)/krb5  \
3082	-DNOGETUSERSHELL -qmaxmem=16000 -O $(KFLAGS)" \
3083	"LNKFLAGS = -s" \
3084	"LIBS = $(K5LIB) -lcurses -lkrb4 -ldes425 -lkrb5 \
3085	-lcom_err -lk5crypto -lgssapi_krb5"
3086
3087#Old name for "aix41".
3088rs6aix41c:
3089	$(MAKE) aix41 KTARGET=$${KTARGET:-$(@)}
3090
3091#IBM AIX 4.1, 4.1.x, or 4.2 on RISC System/6000 or Power Series,
3092# with X.25 support
3093#Generates common binary for all platforms if using xlc (IBM C compiler).
3094#When using gcc, add -mcpu=common to generate common binary.
3095# Add -bbigtoc in case ld fails with TOC overflow.
3096aix41x25:
3097	@echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3098	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3099	"CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3100	-DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3101	-DIBMX25 -DDEBUG -DNOGETUSERSHELL -qmaxmem=16000 -g $(KFLAGS)" \
3102	"LNKFLAGS = -g -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3103	-@echo "]0;kermit done\c"
3104
3105#As above but without -g in LNKFLAGS.
3106# Add -bbigtoc in case ld fails with TOC overflow.
3107aix41x25o:
3108	@echo Making C-Kermit $(CKVER) for IBM AIX 4.1.1 RS/6000 or PowerPC...
3109	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3110	"CFLAGS= -DAIXRS -DAIX41 -DSVR4 -DSTERMIOX -DTCPSOCKET -DDIRENT \
3111	-DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DSELECT -DSELECT_H \
3112	-DIBMX25 -DNODEBUG -DNOGETUSERSHELL -qmaxmem=16000 $(KFLAGS)" \
3113	"LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg"
3114	-@echo "]0;kermit done\c"
3115
3116#AIX 4.2 -- Use this target if the regular "make aix" doesn't work.
3117# Must have CK_NEWTERM or echoing is lost after curses.
3118# Add -bbigtoc in case ld fails with TOC overflow.  As of C-Kermit 8.0.212,
3119# all AIX builds 4.2 and later include large file support.
3120oldaix42:
3121	@echo Making C-Kermit $(CKVER) for IBM AIX 4.2 or higher...
3122	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3123	"CFLAGS= -DAIXRS -DAIX41 -DAIX42 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3124	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DCK_NEWTERM -DFNFLOAT \
3125	-DSELECT -DSELECT_H -DNOGETUSERSHELL -qmaxmem=16000 -O \
3126	-DCKCPU=\\\"`uname -p`\\\" \
3127	-DHERALD=\\\"\ IBM\ AIX\ `uname -v`.`uname -r`\\\" \
3128	-D_LARGE_FILES $(KFLAGS)" "LNKFLAGS = -s" "LIBS=-lcurses -lm"
3129
3130#AIX 4.3 - Use this target if the regular "make aix" doesn't work.
3131# Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3132# -bbigtoc needed on some systems but not others to avoid TOC overflow.
3133# "man ld" says -bbigtoc makes program run slower.
3134oldaix43:
3135	@echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher...
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 -qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3140	"LNKFLAGS = -s" "LIBS=-lcurses -lm"
3141
3142#AIX 4.3 with IBM X.25.
3143aix43x25:
3144	@echo "Making C-Kermit $(CKVER) for IBM AIX 4.3 with X.25..."
3145	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3146	"CFLAGS= -DAIXRS -DAIX41 -DAIX43 -DSVR4 -DSTERMIOX -DTCPSOCKET \
3147	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3148	-DFNFLOAT -DNOGETUSERSHELL -DIBMX25 \
3149	-qmaxmem=16000 -bbigtoc -O $(KFLAGS)" \
3150	"LNKFLAGS = -bI:/lib/pse.exp" "LIBS=-lcurses -lodm -lcfg -lm"
3151
3152#AIX 4.3 -- Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3153# -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3154# "man ld" says -bbigtoc makes program run slower.
3155aix43g:
3156	@echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3157	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3158	"CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3159	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3160	-DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3161	"LIBS=-lcurses -lm"
3162
3163aix43gcc:
3164	$(MAKE) aix43g
3165
3166# None of the following aix43gcc attempts work on a gcc-only AIX 4.3.3 box.
3167# It just plain can't find the math routines (fmod, pow, exp, sqrt, log10,...)
3168# Which is odd because nm /usr/lib/libC.a finds them...
3169
3170#in case aix43gcc can't find its math library...
3171aix43gccx:
3172	@echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3173	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3174	"CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3175	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3176	-DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3177	"LIBS= -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.1.0/2.95.2 \
3178	-lcurses -bloadmap -bnoquiet"
3179
3180#in case aix43gccx can't find its math library...
3181aix43gccy:
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= -lcurses -bloadmap -bnoquiet"
3188
3189#in case aix43gccx can't find its math library...
3190aix43gccz:
3191	@echo Making C-Kermit $(CKVER) for IBM AIX 4.3 gcc...
3192	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3193	"CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3194	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3195	-DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL $(KFLAGS)" \
3196	"LIBS= -L. -lcurses -bloadmap -bnoquiet"
3197
3198#AIX 4.3 with MIT Kerberos 5 and Kerberos 4 compatibility mode
3199# Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3200# -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3201# "man ld" says -bbigtoc makes program run slower.
3202aix43gcc+krb5+krb4:
3203	@echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3204	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3205	"CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3206	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3207	-DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3208	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3209	-DCK_ENCRYPTION -DCK_DES -funsigned-char $(K5INC) $(K5INC)/krb5 \
3210	$(KFLAGS)" \
3211	"LIBS=$(K5LIB) -lcurses -lm -lkrb4 -ldes425 -lkrb5 \
3212	-lcom_err -lk5crypto -lcrypt -lgssapi_krb5"
3213
3214#AIX 4.3 with MIT Kerberos 5, Kerberos 4 compatibility mode and OpenSSL
3215# Must NOT have CK_NEWTERM or else C-Kermit hangs after curses.
3216# -mminimal-toc needed on some systems but not others to avoid TOC overflow.
3217# "man ld" says -bbigtoc makes program run slower.
3218aix43gcc+krb5+krb4+openssl:
3219	@echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/Kerberos...
3220	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3221	"CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3222	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3223	-DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3224	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3225	-DCK_ENCRYPTION -DCK_DES -DCK_CAST -DLIBDES -DCK_SSL \
3226	-funsigned-char $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3227	"LIBS=$(K5LIB) $(SSLLIB) -lssl -lcrypto \
3228	-lcurses -lm -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt \
3229	-lgssapi_krb5"
3230
3231aix43gcc+openssl:
3232	@echo Making C-Kermit $(CKVER) for IBM AIX 4.3 or higher w/OpenSSL...
3233	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3234	"CFLAGS= -mminimal-toc -g -O -DAIXRS -DAIX41 -DAIX43 -DSVR4 \
3235	-DDIRENT -DCK_ANSIC -DCLSOPN -DCK_CURSES -DSELECT -DSELECT_H \
3236	-DSTERMIOX -DTCPSOCKET -DFNFLOAT -DNOGETUSERSHELL \
3237	-DCK_AUTHENTICATION -DCK_SSL -funsigned-char $(SSLINC) $(KFLAGS)" \
3238	"LIBS=$(SSLLIB) -lssl -lcrypto -lcurses -lm -lcrypt"
3239
3240aix44gcc:
3241	$(MAKE) aix43g "KFLAGS=-DAIX44 $(KFLAGS)" \
3242	KTARGET=$${KTARGET:-$(@)}
3243
3244aix45gcc:
3245	$(MAKE) aix43g "KFLAGS=-DAIX45 $(KFLAGS)" \
3246	KTARGET=$${KTARGET:-$(@)}
3247
3248aix50gcc:
3249	$(MAKE) aix43g "KFLAGS=-DAIX50 $(KFLAGS)" \
3250	KTARGET=$${KTARGET:-$(@)}
3251
3252aix51gcc:
3253	$(MAKE) aix43g "KFLAGS=-DAIX51 $(KFLAGS)" \
3254	KTARGET=$${KTARGET:-$(@)}
3255
3256aix52gcc:
3257	$(MAKE) aix43g "KFLAGS=-DAIX52 $(KFLAGS)" \
3258	KTARGET=$${KTARGET:-$(@)}
3259
3260aix53gcc:
3261	$(MAKE) aix43g "KFLAGS=-DAIX53 $(KFLAGS)" \
3262	KTARGET=$${KTARGET:-$(@)}
3263
3264#Bull DPX/2 with BOS/X, like AIX/RS6000
3265bulldpx2:
3266	@echo Making C-Kermit $(CKVER) for Bull DPX/2 with BOS/X...
3267	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3268	"CFLAGS= -DSVR3 -DDIRENT -DCK_ANSIC -DCKTYP_H=<sys/types.h> \
3269	-DCK_POLL -DNOGETUSERSHELL -DCLSOPN -DNOLEARN -O $(KFLAGS)" \
3270	"LNKFLAGS = -s"
3271
3272#Sun UNIX 3.5 with gcc 2.3.3.
3273sunos3gcc:
3274	@echo Making C-Kermit $(CKVER) for Sun UNIX 3.5 and gcc...
3275	$(MAKE) xermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3276	CFLAGS="-g -O -DBSD4 -DTCPSOCKET $(KFLAGS)"
3277
3278#SunOS version 4.0, BSD environment, has saved original euid feature.
3279# Add "CC=/usr/ucb/cc CC2=/usr/ucb/cc" if necessary.
3280# Note: Including Unicode crashes the assembler in ckcuni.c.
3281sunos4:
3282	@echo Making C-Kermit $(CKVER) for SunOS 4.0, BSD environment...
3283	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3284	"CFLAGS= -O -DSUNOS4 -DFNFLOAT -DNOUNICODE $(KFLAGS)" \
3285	"LIBS=-lm"
3286
3287#As above, but with SunLink X.25 support
3288sunos4x25:
3289	@echo SunLink X.25 support
3290	$(MAKE) "MAKE=$(MAKE)" sunos4 KTARGET=$${KTARGET:-$(@)} \
3291	"KFLAGS=$(KFLAGS) -DFNFLOAT -DSUNX25" \
3292	"LIBS=-lm"
3293
3294#SUN OS version 4.1 - 4.1.3, BSD environment, has saved original euid feature.
3295#Uses Honey DanBer UUCP.  Requires presence of /usr/spool/locks directory.
3296# /var/spool/ should be a symbolic link to  /usr/spool/.
3297# ... or 'make xermit "CC= /usr/ucb/cc " \'
3298# Note: "xermit" means use the select() version of the CONNECT module.
3299# Note for C-Kermit 9.0: Reportedly 'you need to modify the sys/ioctl.h
3300# include file, i.e. comment out the "struct winsize" and "struct
3301# ttysize". Otherwise there will be a conflict with sys/ttycom.h (included by
3302# termios.h) which also declares these structs. But you need both includes.'
3303sunos41:
3304	@echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD...
3305	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3306	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE $(KFLAGS)" \
3307	"LIBS= $(LIBS) -lresolv -lm"
3308
3309#As above, but compiled with gcc.  Gives 24-32K size reduction
3310#with gcc 2.1 or 2.2.2.  CAUTION: make sure "fixincludes" has been run on
3311#the include files, so gcc's are in sync with the regular Sun ones.
3312#This includes the curses library for fullscreen file transfer display.
3313#NDGPWNAM needed for GCC 2.5.6, not needed for 2.4.0, but it's uncertain
3314#whether it will do any harm for 2.4.0 compilation -- if so, remove it.
3315sunos41gcc:
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	-funsigned-char $(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3320
3321# As above, but without -funsigned-char so I can see the warnings that
3322# everybody else will get when they use ANSI compilers that don't have this
3323# option (gsc = gcc signed char).
3324sunos41gsc:
3325	@echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3326	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3327	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3328	$(KFLAGS)" "LIBS= -lcurses -ltermcap -lresolv -lm"
3329
3330#As above but with ckucon.c rather than ckucns.c (for testing only)
3331sunos41gccfork:
3332	@echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
3333	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3334	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3335	-DNOLEARN -funsigned-char $(KFLAGS)" \
3336	"LIBS= -lcurses -ltermcap -lresolv -lm"
3337
3338#as above but configured for Kerberos IV
3339sunos41gcc+krb4:
3340	@echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3341	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3342	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3343	-DTCPSOCKET -DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3344	-DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK -funsigned-char \
3345	$(K4INC) $(KFLAGS)" \
3346	"LIBS= $(K4LIB) -lcurses -ltermcap -lresolv -lm -lkrb -ldes"
3347
3348#as above but configured for SSL/TLS
3349sunos41gcc+openssl:
3350	@echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, ssl...
3351	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3352	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3353	-DCK_AUTHENTICATION -funsigned-char \
3354	-DCK_SSL -DTCPSOCKET -DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3355	"LIBS= $(SSLLIB) -lcurses -ltermcap -lresolv -lm -lssl -lcrypto"
3356
3357#as above but configured for Kerberos IV and SSL/TLS
3358sunos41gcc+krb4+openssl:
3359	@echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3360	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3361	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3362	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3363	-DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3364	$(K4INC) $(SSLINC) $(KFLAGS)" \
3365	"LIBS= $(K4LIB) $(SSLLIB) \
3366	-lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto"
3367
3368#as above but configured for Kerberos IV and ZLIB enabled SSL/TLS
3369sunos41gcc+krb4+openssl+zlib:
3370	@echo Making C-Kermit $(CKVER) for SunOS 4.1, gcc, curses, krb4...
3371	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3372	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3373	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3374	-DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3375	-DZLIB $(K4INC) $(SSLINC) \
3376	$(KFLAGS)" \
3377	"LIBS= $(K4LIB) $(SSLLIB) \
3378	-lcurses -ltermcap -lresolv -lm -lkrb -lssl -lcrypto -lz"
3379
3380#as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3381sunos41gcc+krb4+srp+openssl+zlib:
3382	@echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,krb4,srp,ssl,zlib..."
3383	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3384	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3385	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB4 -DCK_ENCRYPTION -DCK_DES \
3386	-DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3387	-DZLIB -DCK_SRP $(K4INC) $(SRPINC) $(SSLINC) $(KFLAGS)" \
3388	"LIBS= $(K4LIB) $(SRPLIB) $(SSLLIB) \
3389	-lcurses -ltermcap -lresolv -lm -lkrb -lkrypto \
3390	-lsrp -lssl -lcrypto -lz"
3391
3392#as above but configured for Kerberos IV and SRP and ZLIB enabled SSL/TLS
3393sunos41gcc+srp+openssl+zlib:
3394	@echo "C-Kermit $(CKVER) SunOS 4.1: gcc,curses,srp,ssl,zlib..."
3395	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3396	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNDGPWNAM -DCK_CURSES -DFNFLOAT \
3397	-DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES \
3398	-DCK_CAST -DCK_SSL -DLIBDES -DTCPSOCKET -DBIGBUFOK -funsigned-char \
3399	-DZLIB -DCK_SRP $(SRPINC) $(SSLINC) \
3400	$(KFLAGS)" \
3401	"LIBS= $(SRPLIB) $(SSLLIB) \
3402	-lcurses -ltermcap -lresolv -lm -lkrypto -lsrp -lssl -lcrypto -lz "
3403
3404#SUNOS 4.1 as sunos41 above, but also with curses support
3405sunos41c:
3406	@echo Curses support
3407	$(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
3408	"KFLAGS=$(KFLAGS) -DCK_CURSES -DFNFLOAT " \
3409	"LIBS= -lcurses -ltermcap"
3410
3411#As SunOS 4.1.x, gcc, configured as Internet Kermit Server.
3412# . NOLOCAL removes capability to make connections
3413# . TNCODE allows server-side Telnet negotiation.
3414# . used to include -lpwent, why?
3415# . used to include -L/usr/local/lib -lm, why?
3416sunos41giks:
3417	@echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc for IKS...
3418	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc" "CC2= gcc" \
3419	"CFLAGS= -O -DSUNOS41 -DNDGPWNAM -DFNFLOAT \
3420	-DNOLOCAL -DTCPSOCKET -DTNCODE -DNOPUSH $(KFLAGS)" \
3421	"LIBS= -lm -lresolv"
3422
3423#SUNOS 4.1 with SunLink X.25 support
3424sunos41x25:
3425	@echo SunLink X.25 support
3426	$(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3427	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3428	-DNOLEARN $(KFLAGS)" "LIBS= $(LIBS) -lresolv -lm"
3429
3430#SUNOS 4.1 with SunLink X.25 support and curses
3431sunos41x25c:
3432	@echo SunLink X.25 support + curses
3433	$(MAKE) "MAKE=$(MAKE)" wermit KTARGET=$${KTARGET:-$(@)} \
3434	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DNOUNICODE -DFNFLOAT -DSUNX25 \
3435	-DCK_CURSES -DNOLEARN $(KFLAGS)" \
3436	"LIBS= $(LIBS) -lcurses -ltermcap -lresolv -lm"
3437
3438#SUN with Solaris 2.0 = SunOS 5.0.
3439#Mostly the same as System V R4.  Don't use this with later Solaris versions.
3440solaris20:
3441	@echo 'Making C-Kermit $(CKVER) for Sun with Solaris 2.0 and curses...'
3442	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3443	"CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3444	-DTCPSOCKET -DCK_CURSES -DFNFLOAT -DCK_POLL $(KFLAGS)" \
3445	"LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s"
3446
3447#SUN with Solaris 2.0.
3448#As above, but built with the gcc compiler from the Cygnus CD-ROM.
3449solaris20g:
3450	@echo 'Making C-Kermit $(CKVER) for Sun Solaris 2.0, gcc, and curses..'
3451	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3452	"CFLAGS = -O -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DSTERMIOX \
3453	-DTCPSOCKET -DCK_CURSES -DCK_POLL -DFNFLOAT $(KFLAGS)" \
3454	"LIBS= -lsocket -lnsl -lcurses -ltermlib -lm" "LNKFLAGS = -s" \
3455	CC=/opt/cygnus-sol2-1.1/bin/gcc CC2=/opt/cygnus-sol2-1.1/bin/gcc
3456
3457#SunOS 5.1 = Solaris 2.1.
3458#NOTE: A C compiler is no longer bundled with SunOS 5.1, so to compile C
3459#programs, you might have to change your PATH to include the directory
3460#/usr/ccs/bin AFTER the directory containing the compiler.  SunPRO C is
3461#installed by default in /opt/SUNWspro/bin.  So a sample PATH might be:
3462#
3463# /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3464# /usr/ucb:/usr/sbin:/sbin:.
3465#
3466# or:
3467#
3468# /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3469#
3470#NOTE 2: Compilation with the Apogee C compiler (apcc) might not work,
3471#because it refuses to allow "-Usun".  Reportedly, newer releases of apcc
3472#(such as 1.2.17) work OK, use: "make -e sunos51 CC=apcc CC2=apcc".
3473solaris21:
3474	@echo 'Making C-Kermit $(CKVER) for SunOS 5.x....'
3475	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3476	"CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DDIRENT -DHDBUUCP -DFNFLOAT \
3477	-DSELECT -DNODEBUG -DSTERMIOX $(KFLAGS)" "LIBS = -lm" "LNKFLAGS = -s"
3478
3479#Solaris 2.0 - 2.4, SunPro compiler, includes curses and TCP/IP.
3480#When using SUNWspro CC 2.0.1 under Solaris 2.3, be sure all cc patches
3481#are applied, otherwise corrupt or truncated object files can result.
3482#To build, set your PATH as follows:
3483#  /usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:\
3484#  /usr/ucb:/usr/sbin:/sbin:.
3485# or (depending on where the compiler has been installed):
3486#  /usr/openwin/bin:/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin.
3487#For additional optimization try using "-fast -xO4 -xdepend".
3488solaris2x:
3489	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3490	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3491	"CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3492	-DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
3493	"LNKFLAGS = -s" "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv"
3494
3495#as above but configured for Kerberos IV
3496solaris2x+krb4:
3497	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x, SunPro cc, krb4...'
3498	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3499	"CFLAGS = -O -Usun -i -DSVR4 -DDIRENT -DSOLARIS -DHDBUUCP -DFNFLOAT \
3500	-DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX -DTCPSOCKET  \
3501	-DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 \
3502	-DCK_ENCRYPTION -DCK_DES -DCK_CAST $(K4INC) $(KFLAGS)" \
3503	"LNKFLAGS = -s" \
3504	"LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes"
3505
3506#C-Kermit for Solaris 2.0-2.4 compiled with gcc, includes curses and TCP/IP.
3507#Change -O2 to -O if -O2 gives trouble.
3508#Remove -Usun if it causes trouble.
3509#Your PATH should start with something like:
3510#  /usr/local/gnu/bin:/usr/ccs/bin:
3511#Produces a huge executable -- strip with /usr/ccs/bin/strip (not Gnu strip).
3512#Also don't add "LNKFLAGS = -s" -- strip manually instead.
3513#Also note: this can NOT be linked statically - Sun makes it impossible.
3514#And for Solaris 2.4, you might have to replace:
3515# /usr/local/lib/gcc-lib/i486-sun-solaris2/2.4.5/include/sys/stat.h
3516#with /usr/include/sys/stat.h.
3517solaris2xg:
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	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3523	"LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3524
3525#ditto but no curses.
3526solaris2xgnc:
3527	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc...'
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	-DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3532	"LIBS= -lsocket -lnsl -lm -lresolv $(LIBS)"
3533
3534#and with Kerberos IV
3535solaris2xg+krb4:
3536	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x with GNU cc, krb4...'
3537	@echo 'Please read the comments that accompany the solaris2xg target.'
3538	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3539	"CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3540	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3541	-DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB4 -DCK_ENCRYPTION \
3542	-DCK_DES -DCK_CAST -DBIGBUFOK $(K4INC) $(KFLAGS)" \
3543	"LIBS= $(K4LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lkrb -ldes \
3544	$(LIBS)"
3545
3546#and with OpenSSL,ZLIB,PAM,SHADOW
3547solaris2xg+openssl+zlib+pam+shadow:
3548	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3549	@echo 'Please read the comments that accompany the solaris2xg target.'
3550	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3551	"CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3552	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3553	-DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW  -DZLIB \
3554	-DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3555	"LIBS= $(SSLLIB) -ltermlib \
3556	-lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz"
3557
3558#Ditto but with GCC 3.1 in which you have to specify 32-bit with -m32.
3559#In Solaris 9 (and maybe 8) you'll also need specifiy the Library path.
3560#Reportedly this can be done here, but only with:
3561# crle -l /usr/lib:/usr/local/ssl/lib
3562#prior to building.  Note: 64-bit not tested with SSL.
3563#For no-crypto 64-bit builds see the solaris9g64 target.
3564solaris2xg32+openssl+zlib+pam+shadow:
3565	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3566	@echo 'Please read the comments that accompany the solaris2xg target.'
3567	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC="gcc -m32" CC2="gcc -m32" \
3568	"CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3569	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3570	-DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW  -DZLIB \
3571	-DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3572	"LIBS= $(SSLLIB) -ltermlib \
3573	-lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz"
3574
3575#and with Krb5,Krb4,OpenSSL,SHADOW
3576solaris2xg+krb5+krb4+openssl+shadow:
3577	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc,k5,k4,ssl...'
3578	@echo 'Please read the comments that accompany the solaris2xg target.'
3579	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3580	"CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3581	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3582	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3583	-DCK_ENCRYPTION -DCK_SSL -DCK_DES -DCK_CAST -DBIGBUFOK \
3584	$(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \
3585	"LIBS= $(K5LIB) $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3586	-lkrb4 -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3587	-ldes $(LIBS)"
3588
3589#and with OpenSSL
3590solaris2xg+openssl+pam+shadow:
3591	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3592	@echo 'Please read the comments that accompany the solaris2xg target.'
3593	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3594	"CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3595	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3596	-DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW \
3597	-DBIGBUFOK $(SSLINC) $(KFLAGS)" \
3598	"LIBS= $(SSLLIB) -ltermlib \
3599	-lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam"
3600
3601solaris2xg+openssl+zlib+srp+pam+shadow:
3602	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x with gcc, OpenSSL...'
3603	@echo 'Please read the comments that accompany the solaris2xg target.'
3604	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3605	"CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \
3606	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DBIGBUFOK \
3607	-DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES -DLIBDES -DCK_CAST \
3608	-DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DCK_SRP $(SSLINC) $(KFLAGS)" \
3609	"LIBS= $(SSLLIB) -ltermlib -lsocket -lnsl -lm -lresolv -lsrp -lssl \
3610	-ldes -lkrypto -lcrypto -lpam -lz"
3611
3612solaris22g:
3613	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3614	KTARGET=$${KTARGET:-$(@)}
3615
3616solaris23g:
3617	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DPOSIX_CRTSCTS $(KFLAGS)" solaris2xg \
3618	KTARGET=$${KTARGET:-$(@)}
3619
3620#Solaris 2.4 built with gcc
3621solaris24g:
3622	$(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} \
3623	solaris2xg "KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3624
3625#Solaris 2.0-2.3, SunPro compiler, with SunLink X.25 support.
3626#This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3627#exists and can be dynamically linked.
3628#NOTE: Do not change target to xermit -- it doesn't support X.25.
3629solaris2x25:
3630	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x+X.25 with SunPro cc...'
3631	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3632	"CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DDIRENT \
3633	-DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DNOLEARN \
3634	-DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3635	"LNKFLAGS = -s" \
3636	"LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3637	-lsockx25 -lsocket -lnsl -lm -lresolv"
3638
3639#Solaris 2.0-2.4, gcc, SunLink X.25 added.
3640#NOTE: Can't use xermit target with X.25.
3641solaris2xgx25:
3642	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x + X.25 with GNU cc...'
3643	@echo 'Please read the comments that accompany the solaris2xg entry.'
3644	$(MAKE) wermit CC=gcc CC2=gcc KTARGET=$${KTARGET:-$(@)} \
3645	"CFLAGS = -g -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DSUNX25 \
3646	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DFNFLOAT \
3647	-DNOLEARN $(KFLAGS)" \
3648	"LIBS= -ltermlib -lm -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3649	-lsockx25 -lsocket -lnsl"
3650
3651#Solaris 2.4, SunPro compiler, with SunLink X.25 support.
3652#This will only run if user has /opt/SUNWconn/lib/libsockx25.so.1
3653#exists and can be dynamically linked.
3654solaris24x25:
3655	@echo 'Making C-Kermit $(CKVER) for Solaris 2.4+X.25 with SunPro cc...'
3656	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3657	"CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS -DSOLARIS24 -DDIRENT -DNOLEARN \
3658	-DSUNX25 -DTCPSOCKET -DHDBUUCP -DFNFLOAT -DPOSIX_CRTSCTS \
3659	-DSELECT -DCK_CURSES -DCK_NEWTERM -DSTERMIOX $(KFLAGS)" \
3660	"LNKFLAGS = -s" \
3661	"LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3662	-lsockx25 -lsocket -lnsl -lm -lresolv"
3663
3664#Solaris 2.5, SunPro compiler, with SunLink X.25 support.
3665solaris25x25:
3666	@echo 'Making C-Kermit $(CKVER) for Solaris 2.5+X.25 with SunPro cc...'
3667	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3668	"CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS25 -DDIRENT -DSUNX25 \
3669	-DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES \
3670	-DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3671	-I/opt/SUNWconn/include $(KFLAGS)" \
3672	"LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3673	-lsockx25 -lsocket -lnsl -lm -lresolv"
3674
3675solaris23:
3676	$(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3677	"KFLAGS=$(KFLAGS)"
3678
3679solaris24:
3680	$(MAKE) "MAKE=$(MAKE)" solaris2x KTARGET=$${KTARGET:-$(@)} \
3681	"KFLAGS=-DSOLARIS24 -DPOSIX_CRTSCTS $(KFLAGS)"
3682
3683# template for Solaris 2.5 and above.
3684solaris25x:
3685	@echo 'Making C-Kermit $(CKVER) for Solaris 2.x with SunPro cc...'
3686	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
3687	"CFLAGS = -DFNFLOAT -O -Usun -i $(KFLAGS)" \
3688	"LNKFLAGS = -s" \
3689	"LIBS= -ltermlib -lsocket -lnsl -lm -lresolv $(LIBS)"
3690
3691#Solaris 2.5, SunPro compiler, curses, TCP/IP
3692solaris25:
3693	$(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3694	"KFLAGS=-DSOLARIS25 $(KFLAGS)"
3695
3696#Solaris 2.5, SunPro compiler, curses, TCP/IP, Kerberos IV
3697solaris25+krb4:
3698	$(MAKE) "MAKE=$(MAKE)" solaris25x+krb4 KTARGET=$${KTARGET:-$(@)} \
3699	"KFLAGS=-DSOLARIS25 $(KFLAGS)"
3700
3701#Solaris 2.5 built with gcc
3702solaris25g:
3703	$(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3704	"KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3705
3706#Solaris 2.5 built with gcc and Kerberos IV
3707solaris25g+krb4:
3708	$(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3709	"KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3710
3711#Solaris 2.5 built with gcc and Kerberos V/IV, SSL, ...
3712solaris25g+krb5+krb4+openssl+shadow:
3713	$(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3714	KTARGET=$${KTARGET:-$(@)} \
3715	"KFLAGS=-funsigned-char -DSOLARIS25 $(KFLAGS)"
3716
3717#Solaris 2.5, gcc, SunLink X.25 added.
3718solaris25gx25:
3719	$(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3720	"KFLAGS=-DSOLARIS25 $(KFLAGS)"
3721
3722#Solaris 2.6, gcc, SunLink X.25 added.
3723solaris26gx25:
3724	$(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgx25 \
3725	"KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3726	"LIBS= -lpam"
3727
3728#Solaris 2.6, SunPro compiler, curses, TCP/IP
3729solaris26:
3730	$(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3731	"KFLAGS=-DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3732	"LIBS= -lpam"
3733
3734#Solaris 2.6 with gcc
3735solaris26g:
3736	$(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xg \
3737	"KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3738	"LIBS = -lpam"
3739
3740#Solaris 2.6 with gcc and SSL
3741solaris26g+openssl:
3742	$(MAKE) "MAKE=$(MAKE)"  solaris2xg+openssl+pam+shadow \
3743	KTARGET=$${KTARGET:-$(@)} "KFLAGS= -DSOLARIS26 $(KFLAGS)"
3744
3745#Solaris 2.6 with gcc, no curses (e.g. because libtermlib is missing).
3746solaris26gnc:
3747	$(MAKE) "MAKE=$(MAKE)" KTARGET=$${KTARGET:-$(@)} solaris2xgnc \
3748	"KFLAGS= -DSOLARIS26 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3749	"LIBS= -lpam"
3750
3751#Solaris 2.6, SunPro compiler, with SunLink X.25 support.
3752solaris26x25:
3753	@echo 'Making C-Kermit $(CKVER) for Solaris 2.6+X.25 with SunPro cc...'
3754	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
3755	"CFLAGS = -O -i -Usun -DSVR4 -DSOLARIS26 -DDIRENT -DSUNX25 \
3756	-DTCPSOCKET -DHDBUUCP -DSELECT -DCK_CURSES -DCK_PAM -DCK_SHADOW \
3757	-DCK_NEWTERM -DSTERMIOX -DFNFLOAT -DPOSIX_CRTSCTS -DNOLEARN \
3758	-I/opt/SUNWconn/include $(KFLAGS)" \
3759	"LIBS= -ltermlib -L/opt/SUNWconn/lib -R/opt/SUNWconn/lib \
3760	-lsockx25 -lsocket -lnsl -lm -lresolv -lpam"
3761
3762#Solaris 7 (2.7) with Sun CC
3763solaris7:
3764	$(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3765	"KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3766	"LIBS= -lpam"
3767
3768#Solaris 7 with gcc (32-bit)
3769solaris7g:
3770	$(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3771	"KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3772	"LIBS= -lpam"
3773
3774#Solaris 7 with gcc + Kerberos IV (32-bit)
3775solaris7g+krb4:
3776	$(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3777	"KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3778	"LIBS= -lpam"
3779
3780solaris7g+openssl+zlib+pam+shadow:
3781	$(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3782	KTARGET=$${KTARGET:-$(@)} \
3783	"KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3784
3785#Solaris 7 with gcc + OpenSSL (32-bit)
3786solaris7g+openssl+zlib+srp+pam+shadow:
3787	$(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+srp+pam+shadow \
3788	KTARGET=$${KTARGET:-$(@)} \
3789	"KFLAGS=-DSOLARIS7 -DCK_PAM -DCK_SHADOW $(KFLAGS)"
3790
3791#Solaris 8
3792solaris8:
3793	$(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3794	"KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3795	"LIBS= -lpam"
3796
3797#Solaris 8 with gcc (32-bit)
3798solaris8g:
3799	$(MAKE) "MAKE=$(MAKE)" solaris2xg KTARGET=$${KTARGET:-$(@)} \
3800	"KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3801	"LIBS= -lpam"
3802
3803# In OpenSSL builds add -ldl if you get unresolved references for
3804# dlclose, dlsym, dlopen, dlerror.
3805
3806#Solaris 8 with gcc + OpenSSL (32-bit)
3807solaris8g+openssl+zlib+pam+shadow:
3808	$(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+shadow \
3809	KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DSOLARIS8 $(KFLAGS)"
3810
3811#Solaris 8 with gcc + Kerberos IV (32-bit)
3812solaris8g+krb4:
3813	$(MAKE) "MAKE=$(MAKE)" solaris2xg+krb4 KTARGET=$${KTARGET:-$(@)} \
3814	"KFLAGS=-DSOLARIS8 -DCK_PAM -DCK_SHADOW $(KFLAGS)" \
3815	"LIBS= -lpam"
3816
3817solaris9nolfs:
3818	$(MAKE) "MAKE=$(MAKE)" solaris25x KTARGET=$${KTARGET:-$(@)} \
3819	"KFLAGS=-DSOLARIS9 -DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3820	"LIBS= -lpam"
3821
3822#Solaris 9 with malloc debugging
3823solaris9md:
3824	$(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
3825	"CFLAGS = -DFNFLOAT -O -Usun -i -D_FILE_OFFSET_BITS=64 \
3826	-DSOLARIS9 -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG \
3827	-DCK_PAM -DCK_SHADOW -DUSE_STRERROR $(KFLAGS)" \
3828	"LIBS= -lpam -ltermlib -lsocket -lnsl -lm -lresolv"
3829
3830#Solaris 9 with gcc + OpenSSL + Shadow (32-bit)
3831#Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3832solaris9g+openssl+shadow+pam+zlib:
3833	$(MAKE) "MAKE=$(MAKE)" solaris2xg+openssl+zlib+pam+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 -ldes425 -lz $(LIBS)"
3838
3839#Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow (32-bit)
3840#Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
3841solaris9g+krb5+krb4+openssl+shadow+pam+zlib:
3842	$(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
3843	KTARGET=$${KTARGET:-$(@)} \
3844	"KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
3845	-DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
3846	"LIBS= -lpam -ldes -lz $(LIBS)"
3847
3848#Solaris 9 with gcc + Kerberos 4 and 5:
3849solaris9g+krb5+krb4:
3850	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3851	"CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3852	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3853	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
3854	-D_FILE_OFFSET_BITS=64 \
3855	-DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK \
3856	$(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3857	"LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv \
3858	-lkrb4 -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
3859	-ldes $(LIBS)"
3860
3861#Solaris 9, 10, or 11 with gcc...
3862#Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3863#This target is chained to be the secure solaris9g+xxx targets below.
3864solaris9g solaris10g solaris11g:
3865	@echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with gcc'
3866	@case `uname -r` in \
3867	  5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3868	  5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3869	  5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3870	  *) SOLARISVERSION="-DSOLARIS" ;; \
3871	esac ; \
3872	$(MAKE) "MAKE=$(MAKE)" CC="gcc -m32" CC2="gcc -m32" xermit \
3873	KTARGET=$${KTARGET:-$(@)} \
3874	"CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3875	-DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW -funsigned-char \
3876	-DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3877	-DPUSH_LDTERM -DPUSH_TTCOMPAT \
3878	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3879	-D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3880	"LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3881
3882#Solaris 9, 10, or 11 with gcc + Kerberos 5 + OpenSSL.
3883#OK C-Kermit 9.0.301.
3884solaris9g+krb5+ssl solaris10g+krb5+ssl solaris11g+krb5+ssl:
3885	@case `openssl version` in \
3886	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3887	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3888	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3889	  *) OPENSSLOPTION="" ;; \
3890	esac ; \
3891	HAVE_DES=''; \
3892	DES_LIB=''; \
3893	if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3894	      DES_LIB='-ldes425'; \
3895	      HAVE_DES='-DCK_DES -DLIBDES'; \
3896		echo "HAVE DES"; \
3897	      else echo "NO DES"; \
3898	fi; \
3899	GSSAPILIB=''; \
3900	K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
3901	echo K5DIR=$$K5DIR; \
3902	if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
3903		GSSAPILIB='-lgssapi_krb5'; \
3904		else GSSAPILIB='-lgssapi'; \
3905	fi; \
3906	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
3907	"CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
3908	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET  -DBIGBUFOK \
3909	-DCK_AUTHENTICATION -DCK_SSL -DZLIB -DCK_KERBEROS -DKRB5 \
3910	-DCK_ENCRYPTION -DCK_CAST $$OPENSSLOPTION \
3911	$$HAVE_DES $(SSLINC) $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
3912	"LIBS= $(SSLLIB) $(K5LIB) -lz -lssl -ltermlib -lsocket -lnsl -lm \
3913	-lresolv -lcrypto \
3914	$$GSSAPILIB -lkrb5 -lcom_err -lk5crypto $$DES_LIB $(LIBS)"
3915
3916#Solaris 9, 10, or 11 with gcc, 64 bit build.
3917#Peeking inside FILE struct not allowed in 64-bit world.
3918#DON'T USE THIS ONE ON PC ARCHITECTURE - It compiles and links but won't run.
3919#OK: 2009/09/25 (but not tested on Solaris 11)
3920solaris9g64 solaris10g64 solaris11g64:
3921	@echo 'Making C-Kermit $(CKVER) for Solaris 9++ with gcc 64-bit'
3922	@case `uname -r` in \
3923	  5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3924	  5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3925	  5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3926	  *) SOLARISVERSION="-DSOLARIS" ;; \
3927	esac ; \
3928	$(MAKE) "MAKE=$(MAKE)" CC="gcc -m64" CC2="gcc -m64" xermit \
3929	KTARGET=$${KTARGET:-$(@)} \
3930	"CFLAGS = -g -O -Usun -funsigned-char \
3931	-DSVR4 $$SOLARISVERSION -DNOARROWKEYS \
3932	-DSTERMIOX -DSELECT -DFNFLOAT -DUSE_STRERROR -DCK_PAM -DCK_SHADOW \
3933	-DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3934	-DPUSH_LDTERM -DPUSH_TTCOMPAT \
3935	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
3936	"LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
3937
3938#Solaris 9, 10, or 11 with SunPro CC
3939#Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
3940#This target is chained to by the secure targets below.
3941#OK C-Kermit 9.0
3942solaris9 solaris10 solaris11:
3943	@echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with Sun CC'
3944	@case `uname -r` in \
3945	  5.9) SOLARISVERSION="-DSOLARIS9" ;; \
3946	  5.10) SOLARISVERSION="-DSOLARIS10" ;; \
3947	  5.11) SOLARISVERSION="-DSOLARIS11" ;; \
3948	  *) SOLARISVERSION="-DSOLARIS" ;; \
3949	esac ; \
3950	$(MAKE) "MAKE=$(MAKE)" xermit KTARGET=$${KTARGET:-$(@)} \
3951	"CFLAGS = -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
3952	-DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW \
3953	-DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
3954	-DPUSH_LDTERM -DPUSH_TTCOMPAT \
3955	-DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
3956	-D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
3957	"LIBS= $(LIBS) -ltermlib -lsocket -lnsl -lm -lresolv -lpam"
3958
3959# Solaris 9, 10, or 11 with OpenSSL built with Sun CC.
3960# Here's an example of how to invoke this target in case your OpenSSL
3961# headers and libraries are not in /usr/local:
3962#
3963# make solaris9+openssl "SSLINC=" "SSLLIB=" \
3964#  "KFLAGS= -I/opt/openssl-0.9.8k/include -L/opt/openssl-0.9.8k/lib"
3965#
3966# Don't use 'make -e' because that inhibits passing of KFLAGS to
3967# the base (solaris9) target.
3968#
3969#OK C-Kermit 9.0
3970solaris9+ssl solaris10+ssl solaris11+ssl \
3971solaris9+openssl solaris10+openssl solaris11+openssl:
3972	@echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: cc'
3973	@case `openssl version` in \
3974	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
3975	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
3976	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
3977	  *) OPENSSLOPTION="" ;; \
3978	esac ; \
3979	HAVE_DES=''; \
3980	DES_LIB=''; \
3981	if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
3982	      DES_LIB='-ldes425'; \
3983	      HAVE_DES='-DCK_DES -DLIBDES'; \
3984		echo "HAVE DES"; \
3985	      else echo "NO DES"; \
3986	fi; \
3987	$(MAKE) "MAKE=$(MAKE)" solaris9 KTARGET=$${KTARGET:-$(@)} \
3988	"KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
3989	-DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
3990	"LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto  $(LIBS)"
3991
3992# Solaris 9 or later with OpenSSL, built with gcc.
3993# Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.  This target nicely
3994# chains to the solaris{9,10,11}g target but for some reason it doesn't work if
3995# you add the -DFORWARD_X option, thus the solaris9g+openssl+forward_x target.
3996#
3997#OK: 2011/06/14
3998solaris9g+ssl solaris10g+ssl solaris11g+ssl \
3999solaris9g+openssl solaris10g+openssl solaris11g+openssl:
4000	@echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: gcc'
4001	@case `openssl version` in \
4002	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
4003	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
4004	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
4005	  *) OPENSSLOPTION="" ;; \
4006	esac ; \
4007	HAVE_DES=''; \
4008	DES_LIB=''; \
4009	if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
4010	      DES_LIB='-ldes425'; \
4011	      HAVE_DES='-DCK_DES -DLIBDES'; \
4012		echo "HAVE DES"; \
4013	      else echo "NO DES"; \
4014	fi; \
4015	$(MAKE) "MAKE=$(MAKE)" solaris9g KTARGET=$${KTARGET:-$(@)} \
4016	"KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
4017	-DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
4018	"LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto  $(LIBS)"
4019
4020# Solaris 9 or later with gcc + OpenSSL + Shadow (32-bit).
4021# Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.
4022# Includes long file support - not sure if this was available before Solaris 9.
4023# Detects Solaris version automatically.
4024#
4025solaris9g+openssl+forward_x:
4026	@echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with OpenSSL...'
4027	@case `openssl version` in \
4028	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
4029	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
4030	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
4031	  *) OPENSSLOPTION="" ;; \
4032	esac ; case `uname -r` in \
4033	  5.9) SOLARISVERSION="-DSOLARIS9" ;; \
4034	  5.10) SOLARISVERSION="-DSOLARIS10" ;; \
4035	  5.11) SOLARISVERSION="-DSOLARIS11" ;; \
4036	  *) SOLARISVERSION="-DSOLARIS" ;; \
4037	esac ; \
4038	$(MAKE) xermit 	KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
4039	"CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION \
4040	-DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
4041	-DPUSH_LDTERM -DPUSH_TTCOMPAT \
4042	-DSTERMIOX -DSELECT -DFNFLOAT -DBIGBUFOK -D_FILE_OFFSET_BITS=64 \
4043	-DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DLIBDES \
4044	-DFORWARD_X $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
4045	"LIBS= $(SSLLIB) -lpam -ldes425 -lz -ltermlib \
4046	-lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz $(LIBS)"
4047
4048# These two should be folded in with the ones just above.
4049
4050#Solaris 9 with gcc 3.1 + OpenSSL (32-bit)
4051solaris9g+openssl+zlib+pam+shadow:
4052	$(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4053	KTARGET=$${KTARGET:-$(@)} \
4054	"KFLAGS=-DSOLARIS9 -DUSE_STRERROR $(KFLAGS)"
4055
4056#Solaris 10 with gcc 3.1 + OpenSSL (32-bit)
4057solaris10g+openssl+zlib+pam+shadow:
4058	$(MAKE) "MAKE=$(MAKE)" solaris2xg32+openssl+zlib+pam+shadow \
4059	KTARGET=$${KTARGET:-$(@)} \
4060	"KFLAGS=-DSOLARIS10 -DUSE_STRERROR $(KFLAGS)"
4061
4062#The following (old, old) sunosxxx entries are for debugging and testing only.
4063
4064sunos41x:
4065	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4066	"CFLAGS= -O -DSUNOS41 -DDIRENT -DNOTLOG -DNOMSEND \
4067	-DNOUUCP -DNOSIGWINCH -DNOREDIRECT -DNOPUSH -DNOCCTRAP \
4068	-DNOICP -DNOLOCAL $(KFLAGS)"
4069
4070#SunOS 4.1.x, debugging with Pure Software, Inc., Purify 2 (commercial runtime
4071#error-detection software for catching wild array references, etc).
4072#Before running the resulting wermit, you'll also need to define and export
4073#the following environment variables (as in this example):
4074#PURIFYHOME=/usr/local/purify ; export PURIFYHOME
4075#PURIFYCACHEDIR=/tmp ; export PURIFYCACHEDIR
4076sunos41cp:
4077	@echo Making C-Kermit $(CKVER) for SunOS 4.1 / BSD / Curses / Purify...
4078	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4079	"CC2= purify -cache_dir=/usr/tmp cc" \
4080	"CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4081	-DSAVEDUID -DCK_CURSES $(KFLAGS)" \
4082	"LIBS= -lcurses -ltermcap"
4083
4084#SunOS 4.1 with malloc debugger
4085sunos41md:
4086	@echo Making C-Kermit $(CKVER) for SunOS 4.1 malloc debug...
4087	$(MAKE) mermit KTARGET=$${KTARGET:-$(@)} \
4088	"CFLAGS= -O -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4089	-DSAVEDUID $(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG"
4090
4091sunos41gmd:
4092	@echo Making C-Kermit $(CKVER) for SunOS 4.1 with gcc and curses...
4093	$(MAKE) mermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4094	"CFLAGS= -g -DSUNOS41 -DHDBUUCP -DDIRENT -DTCPSOCKET \
4095	-DNDGPWNAM -DSAVEDUID -DCK_CURSES -DRLOGCODE \
4096	$(KFLAGS) -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG" \
4097	"LIBS= -lcurses -ltermcap"
4098
4099#SunOS version 4.1, gcc, profiling with gprof, no debugging.
4100#To get profile, "make sunos41p" (on Sun), then "./wermit".  After running
4101#wermit, "gprof ./wermit | lpr" (or whatever) to get execution profile.
4102sunos41p:
4103	@echo Making C-Kermit $(CKVER) for SunOS 4.x with profiling...
4104	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC= gcc " "CC2= gcc" \
4105	"CFLAGS= -DSUNOS41 -DNODEBUG -DSAVEDUID -DDIRENT -DTCPSOCKET \
4106	-DNDGPWNAM $(KFLAGS) -pg" "LNKFLAGS = -pg"
4107
4108#SunOS version 4.1 or later, BSD environment, minimum features.
4109sunos41min:
4110	@echo Minimum interactive
4111	$(MAKE) "MAKE=$(MAKE)" sunos41 KTARGET=$${KTARGET:-$(@)} \
4112	"KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNORETRY \
4113	-DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS \
4114	-DNOSHOW -DNOSETKEY -DNOUUCP -DNORECALL -DNOREDIRECT \
4115	-DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ \
4116	-DNONET -DCK_SMALL -DNOCKSPEED -DNOCKTIMERS -DNOLOGIN \
4117	-DNOCKXYZ -DNOKERBEROS -DNOMKDIR -DNOPATTERNS -DNOPERMS -DNOPIPESEND \
4118	-DNORECURSIVE -DNORENAME -DNORESEND -DNOSETKEY \
4119	-DNOTRIGGER -DNOTUNING $(KFLAGS)" "LNKFLAGS = -s"
4120
4121#SunOS version 4.1, BSD environment, min size, command-line only...
4122sunos41m:
4123	@echo Minimum size
4124	$(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4125	"KFLAGS=-DNOICP $(KFLAGS)"
4126
4127#SunOS version 4.1, BSD environment, min size, cmd-line only, remote only...
4128#
4129sunos41mr:
4130	@echo Minimum size
4131	$(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4132	"KFLAGS=-DNOICP -DNOLOCAL $(KFLAGS)"
4133
4134#SunOS version 4.1, BSD environment, min size, interactive...
4135sunos41mi:
4136	@echo Minimum size
4137	$(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4138	"KFLAGS=-DNOCMDL $(KFLAGS)"
4139
4140#SunOS version 4.1, BSD environment, min size, interactive, remote only...
4141sunos41mir:
4142	@echo Minimum size
4143	$(MAKE) "MAKE=$(MAKE)" sunos41min KTARGET=$${KTARGET:-$(@)} \
4144	"KFLAGS=-DNOCMDL -DNOLOCAL $(KFLAGS)"
4145
4146#SunOS 4.1, System V R3 environment (-i option omitted).
4147sunos41s5:
4148	@echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4149	@echo For testing purposes only - NOT for production use.
4150	@echo For a useable version, make sunos41 instead.
4151	$(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4152	KTARGET=$${KTARGET:-$(@)} \
4153	"CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN -DCK_POLL $(KFLAGS) -O"
4154
4155#As above, but with curses support
4156sunos41s5c:
4157	@echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4158	@echo Curses included.
4159	@echo For testing purposes only - NOT for production use.
4160	@echo For a useable version, make sunos41 instead.
4161	$(MAKE) wermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4162	KTARGET=$${KTARGET:-$(@)} \
4163	"CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DNOLEARN \
4164	-DCK_POLL -DCK_CURSES -DCK_NEWTERM $(KFLAGS) -O" "LIBS= -lcurses"
4165
4166#As above, but with curses support AND net support
4167sunos41s5tcpc:
4168	@echo Making C-Kermit $(CKVER) for SunOS 4.1 System V R3...
4169	@echo TCP/IP and curses included.  No debug log.
4170	@echo For testing purposes only - NOT for production use.
4171	@echo For a useable version, make sunos41 instead.
4172	$(MAKE) xermit "CC= /usr/5bin/cc " "CC2=/usr/5bin/cc " \
4173	KTARGET=$${KTARGET:-$(@)} \
4174	"CFLAGS = -DSUN4S5 -DDIRENT -DHDBUUCP -DCK_POLL \
4175	-DNODEBUG -DCK_CURSES -DCK_NEWTERM -DTCPSOCKET $(KFLAGS) -O" \
4176	"LIBS= -lcurses -lresolv"
4177
4178# (End of SunOS test entries...)
4179
4180#Apollo with Domain SR10.0 or later, BSD environment
4181#Reportedly, it might also help to add '-A,systype=bsd4.3' to CFLAGS.
4182#Reportedly, there is also a problem with getc & putc macros that can
4183#be handled by using '#ifdef apollo' somewhere to redefine them???
4184#On the other hand, other reports indicate that it works fine as-is.
4185#NOTE: This entry was previously like this:
4186#	$(MAKE) wermit "CFLAGS= -DNOFILEH -DBSD4 $(KFLAGS) -Uaegis \
4187#	-DTCPSOCKET -U__STDC__"
4188#Reports (Dec 91) indicate SR10 has an ANSI-compliant C compiler,
4189#in addition to an older one that claimed to be ANSI-compliant but wasn't.
4190#The following make entry (plus checks that are made in ckcdeb.h) detect
4191#which compiler is used and define the CK_ANSIC or NOANSI flags accordingly.
4192sr10-bsd:
4193	@echo Making C-Kermit $(CKVER) for Apollo SR10.0 / BSD ...
4194	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4195	"CFLAGS= -O -DAPOLLOSR10 -DBSD43 -DTCPSOCKET -DCK_CURSES -DNOLEARN \
4196	-Uaegis $(KFLAGS)" "LIBS= -lcurses -ltermcap"
4197
4198#Apollo with Domain SR10.0 or later, System V R3 environment.
4199#Don't use the optimizer (-O), it causes problems at runtime.
4200sr10-s5r3:
4201	@echo Making C-Kermit $(CKVER) for Apollo SR10.0 / Sys V R3 ...
4202	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4203	"CFLAGS= -DNOFILEH -DSVR3 -DAPOLLOSR10 -DNOLEARN $(KFLAGS) \
4204	-Uaegis -U__STDC__"
4205
4206#Apollo Domain/IX (untested, try this if sr10-bsd doesn't work)
4207# -DTCPSOCKET can probably be added here.
4208apollobsd:
4209	@echo Making C-Kermit $(CKVER) for Apollo Domain/IX...
4210	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4211	"CC= /bin/cc " "CC2= /bin/cc " \
4212	"CFLAGS= -DNOFILEH -DBSD4 -DAPOLLOBSD -DNOLEARN $(KFLAGS) -Uaegis"
4213
4214#Version 7 Unix (see comments near top of makefile)
4215v7:
4216	@echo Making C-Kermit $(CKVER) for UNIX Version 7.
4217	@echo Read the makefile if you have trouble with this...
4218	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4219	"CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
4220	-DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
4221	-DNPTYPE=$(NPTYPE) $(DIRECT) -DO_RDWR=2 -DO_NDELAY=0 -DO_SCCS_ID \
4222	-DNOLEARN $(KFLAGS)"
4223
4224#AT&T UNIX System V R3, signal() is void rather than int.
4225#Uses dirent.h and Honey DanBer UUCP.
4226#Add the -i link option if necessary.
4227#If you get errors like "ws_row undefined" in ckutio.c, add -DNONAWS.
4228sys5r3:
4229	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4230	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4231	"CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4232	"LNKFLAGS="
4233
4234#As above, plus curses.
4235sys5r3c:
4236	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3 + curses...'
4237	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4238	"CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES -DNONAWS -DNOLEARN \
4239	$(KFLAGS) -O" "LNKFLAGS=" "LIBS = -ltermlib"
4240
4241#System V R3.2 for PCs built on Interactive UNIX SV/386 R4.x
4242#but with all calls to dup2() disabled because generic SVR3 does not have dup2.
4243# (The -linet library might not need to be in this one.)
4244sys5r32is:
4245	@echo 'Making C-Kermit $(CKVER) for System V/386 R32
4246	$(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
4247	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
4248	-DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES -DNONAWS \
4249	-DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD -DNOFDZERO -DNOREDIRECT \
4250	-DNOZEXEC -DNOLEARN $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
4251
4252#System V R3.2 for PCs built on Interactive UNIX SV/386 R4.x
4253#but with all calls to dup2() disabled because generic SVR3 does not have dup2.
4254#With TCP/IP added.
4255sys5r32isnet:
4256	@echo 'Making C-Kermit $(CKVER) for System V/386 R32 + TCP/IP
4257	$(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
4258	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
4259	-DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES -DNONAWS \
4260	-DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD -DNOFDZERO -DNOREDIRECT \
4261	-DNOLEARN -DNOZEXEC -DTCPSOCKET $(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
4262
4263iclsys5r3:
4264	make sys5r3 KTARGET=$${KTARGET:-$(@)} KFLAGS=-DICLSVR3
4265
4266#AT&T UNIX System V R3.  As above, but no ANSI prototyping.
4267sys5r3na:
4268	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4269	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4270	"CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -DNOANSI -DNOLEARN $(KFLAGS) -O" \
4271	"LNKFLAGS="
4272
4273#AT&T UNIX System V R3, for 3B computers with Wollongong TCP/IP.
4274sys5r3net3b:
4275	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX SVR3/3B/Wollongong...'
4276	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4277	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DWOLLONGONG -DNOLEARN $(KFLAGS) \
4278	-O" "LIBS= -lnet -lnsl_s" "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 <termiox.h> for RTS/CTS flow control.
4283sys5r3tx:
4284	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4285	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4286	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN \
4287	$(KFLAGS) -i -O" "LNKFLAGS ="
4288
4289#AT&T UNIX System V R3, signal() is void rather than int.
4290#Uses dirent.h and Honey DanBer uucp, has <termiox.h>.
4291#Has <sys/termiox.h> for RTS/CTS flow control.
4292sys5r3sx:
4293	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R3...'
4294	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4295	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4296	$(KFLAGS) -i -O" "LNKFLAGS ="
4297
4298#AT&T UNIX System V R4.
4299#Has <termiox.h>.
4300sys5r4:
4301	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4302	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4303	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DTERMIOX -DNOLEARN $(KFLAGS)" \
4304	"LNKFLAGS = -s"
4305
4306#AT&T UNIX System V R4 with Wollongong TCP/IP.
4307#Has <termiox.h>.
4308sys5r4net:
4309	@echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4310	@echo ' If sockets-library routines are missing at link time, then'
4311	@echo ' try the sys5r4net2 entry.'
4312	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4313	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4314	-DTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4315
4316#As above, but needs libs included.
4317sys5r4net2:
4318	@echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4319	@echo ' (Search for WOLLONGONG...)'
4320	$(MAKE) sys5r4net KTARGET=$${KTARGET:-$(@)} "LIBS= -lsocket -lnsl"
4321
4322#As above plus curses.
4323sys5r4net2c:
4324	echo 'Making C-Kermit $(CKVER) for System V R4 + Wollongong TCP/IP...'
4325	@echo ' PLEASE READ ckuins.txt IF YOU GET MISSING HEADER FILES.'
4326	@echo ' (Search for WOLLONGONG...)'
4327	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4328	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN \
4329	-DTERMIOX -DWOLLONGONG -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4330	"LIBS= -lsocket -lnsl -lcurses"
4331
4332#DELL UNIX System V R4.
4333#Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4334#are not misplaced in sys (rather than netinet and arpa, respectively).
4335#Uses ANSI C constructs, advisory file locking on devices, etc.
4336#Warning: -DSTERMIOX enables hardware flow control (RTS/CTS), but reportedly
4337#this does not work with the normal drivers.  However, it might still work
4338#on non-Dell systems, or even Dell systems with different drivers installed.
4339dellsys5r4:
4340	@echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4341	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4342	"CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4343	-DTCPSOCKET -DSTERMIOX -DCK_POLL $(KFLAGS)" \
4344	"LIBS= -lsocket -lnsl" "LNKFLAGS = -s"
4345
4346#As above, curses support added...
4347dellsys5r4c:
4348	@echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4349	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4350	"CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT -DHDBUUCP \
4351	-DTCPSOCKET -DSTERMIOX -DCK_CURSES -DCK_POLL \
4352	$(KFLAGS)" "LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4353
4354#Minimum interactive: As above, but with every conceivable option removed.
4355dellsys5r4mi:
4356	@echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4357	@echo 'Minimum-size interactive'
4358	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4359	"CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4360	-UTCPSOCKET -DNOCMDL -DNOSPL -DNOXMIT -DCK_POLL \
4361	-DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4362	-DNOSCRIPT -DNOCSETS -DNOSHOW -DNOSETKEY -DNOSERVER -DNOUUCP \
4363	-DNOPUSH -DNOMDMHUP -DNOJC -DNOFDZERO -DNOESCSEQ  \
4364	$(KFLAGS)" "LNKFLAGS = -s"
4365
4366#Command-line only version.
4367dellsys5r4m:
4368	@echo 'Making C-Kermit $(CKVER) for DELL UNIX System V R4...'
4369	@echo 'Command-line only'
4370	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4371	"CFLAGS = -O -DSVR4 -DDELL_SVR4 -DDIRENT \
4372	-UTCPSOCKET -DNOICP -DNOFRILLS -DNODIAL -DNODEBUG -DNOTLOG -DNOCSETS \
4373	-DNOSETKEY -DNOESCSEQ -DNOJC -DNOFDZERO -DCK_POLL \
4374	$(KFLAGS)" "LNKFLAGS = -s"
4375
4376#AT&T UNIX System V R4.
4377#Has <sys/termiox.h>.
4378sys5r4sx:
4379	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4380	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4381	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4382	$(KFLAGS)" "LNKFLAGS = -s" "LIBS=$(LIBS)"
4383
4384#AT&T UNIX System V R4.
4385#Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4386#are not misplaced in sys (rather than netinet and arpa, respectively).
4387#Uses ANSI C constructs, <sys/termiox.h>, etc etc.
4388sys5r4sxtcp:
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 -DTCPSOCKET $(KFLAGS)" \
4393	"LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4394
4395#AT&T UNIX System V R4.
4396#As above + curses.
4397sys5r4sxtcpc:
4398	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4399	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4400	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4401	-DSTERMIOX  -DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4402	"LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)" "LNKFLAGS = -s"
4403
4404#AT&T UNIX System V R4.  CONSENSYS SVR4.2-1.
4405#Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4406#are not misplaced in sys (rather than netinet and arpa, respectively).
4407#Uses ANSI C constructs, <sys/termiox.h>, etc.
4408# Fullscreen -DCK_CURSES added (with curses & termcap libs)
4409# Submission by Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu
4410sys5r4sxtcpf:
4411	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4412	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4413	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4414	-DSTERMIOX -DTCPSOCKET -DCK_CURSES $(KFLAGS)" \
4415	"LIBS= -lsocket -lnsl -L/usr/ccs/lib -lcurses -ltermcap" \
4416	"LIBS=$(LIBS)" "LNKFLAGS = -s"
4417
4418#Smallest possible version for System V R4
4419s5r4m:
4420	@echo Minimum size
4421	$(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4422	"KFLAGS=$(KFLAGS) -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
4423	-DNOSCRIPT -DNOCSETS -DNOICP -DNOMSEND -UTCPSOCKET" "LNKFLAGS = -s"
4424
4425#Smallest possible interactive version of above
4426s5r4mi:
4427	@echo Minimum interactive
4428	$(MAKE) "MAKE=$(MAKE)" sys5r4sx \
4429	"KFLAGS=-DNOSPL -DNOXMIT -DNOMSEND -DNOFRILLS -DNOSHOW \
4430	-DNODIAL -DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOSETKEY \
4431	-UTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s"
4432
4433#AT&T UNIX System V R4, has <sys/termiox.h>
4434#ANSI C function prototyping disabled.
4435sys5r4sxna:
4436	@echo No ANSI C prototyping...
4437	$(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4438	"KFLAGS=$(KFLAGS) -DNOANSI"
4439
4440#Stratus FTX.
4441ftx:
4442	@echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4443	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4444	"CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DSTERMIOX \
4445	-DNOGETUSERSHELL -DNOLEARN +DA1.1 $(KFLAGS)" \
4446	"LNKFLAGS = -s" "LIBS=$(LIBS)"
4447
4448#Stratus FTX + TCP/IP.
4449ftxtcp:
4450	@echo 'Making C-Kermit $(CKVER) for Stratus FTX 3.x...'
4451	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4452	"CFLAGS = -O -DSVR4 -DFTX -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4453	-DSTERMIOX -DTCPSOCKET -DNO_DNS_SRV +DA1.1 $(KFLAGS)" \
4454	"LIBS= -lsocket -lnsl $(LIBS)" "LNKFLAGS= -s"
4455
4456#NCR MP-RAS 2.03 or 3.02
4457mpras:
4458	@echo 'Making C-Kermit $(CKVER) for NCR MP-RAS...'
4459	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4460	"CFLAGS = -O -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX \
4461	-DNOGETUSERSHELL -DUSE_FILE__CNT -DNOLEARN -DNO_DNS_SRV $(KFLAGS)" \
4462	"LNKFLAGS = -s" "LIBS=$(LIBS)"
4463
4464#NCR MP-RAS 2.03 or 3.02 with TCP/IP and curses
4465mprastcpc:
4466	@echo 'Making C-Kermit $(CKVER) for NCR MP-RAS + TCP/IP + curses...'
4467	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CFLAGS=-DTCPSOCKET \
4468	-DCK_CURSES -DSVR4 -DNCRMPRAS -DDIRENT -DHDBUUCP -DSTERMIOX -DNOLEARN \
4469	-DNOGETUSERSHELL -DNO_DNS_SRV DUSE_FILE__CNT -O $(KFLAGS)" \
4470	"LNKFLAGS = -s" "LIBS= -lsocket -lnsl -lcurses -ltermcap $(LIBS)"
4471
4472#SINIX-L V5.41 - includes curses, tcp/ip - Use this one for i386.
4473#This version of SINIX doesn't like fdopen() or popen().
4474sinix541:
4475	@echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX V5.41/i386'
4476	$(MAKE) ckcpro.$(EXT) "CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP \
4477	-DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV \
4478	-DSNI541 -DNOGETUSERSHELL -DNONETCMD -DNOPOPEN -kansi -W0 $(KFLAGS)"
4479	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4480	"CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DNOPOPEN \
4481	-DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4482	-DSNI541 -DNOGETUSERSHELL -DNONETCMD -kansi -W0 -O $(KFLAGS)" \
4483	"LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4484
4485sinix541i:
4486	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sinix541
4487
4488#SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for MIPS.
4489# As of C-Kermit 7.1, optimization removed -- takes (literally) forever.
4490sinix542:
4491	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4492	"CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4493	-DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4494	-DSNI542 -DNOGETUSERSHELL -kansi -W0 $(KFLAGS)" \
4495	"LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" "LNKFLAGS = -s"
4496
4497#SINIX V5.42 gcc - includes curses, tcp/ip, everything.
4498#This one was used to build the Pyramid-architecture RM600 version
4499#on SINIX-P 5.42 A10 with gcc but should work for SINIX 5.42 on any other
4500#architecture with gcc.
4501sinix542g:
4502	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4503	"CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DNO_DNS_SRV \
4504	-DFNFLOAT -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC \
4505	-DSNI542 -DNOGETUSERSHELL $(KFLAGS)" \
4506	"LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4507	"LNKFLAGS = -s"
4508
4509#SINIX V5.42 - includes curses, tcp/ip, everything - Use this one for Intel.
4510# (Note: SNI discontinued Intel support after 5.42.)
4511sinix542i:
4512	@echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf SINIX-Z V5.42...'
4513	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4514	"CFLAGS = -DSINIX -DSVR4 -DDIRENT -DHDBUUCP -DFNFLOAT -DSTERMIOX \
4515	-DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DNO_DNS_SRV -kansi \
4516	-DSNI542 $(KFLAGS)" \
4517	"LIBS= -lsocket -lnsl -lcurses -ltermcap -lm" \
4518	"LNKFLAGS = -s"
4519
4520#Siemens Nixdorf Reliant UNIX V5.43 - includes curses, tcp/ip, everything:
4521# . gettimeofday() suddenly has only one arg instead of two (GTODONEARG).
4522# . The syntax of the Olimit specifier changed.
4523# . The name was changed from SINIX to Reliant UNIX in version 5.43C.
4524sni543:
4525	@echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.43'
4526	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4527	"CFLAGS = -DSINIX -DSNI543 -DSVR4 -DDIRENT -DHDBUUCP \
4528	-DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4529	-DNO_DNS_SRV -kansi -W0 -O -F Olimit,3100 $(KFLAGS)" \
4530	"LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4531
4532#Siemens Nixdorf Reliant UNIX V5.44 - Like 5.43 but with different banner.
4533sni544:
4534	@echo 'Making C-Kermit $(CKVER) for Siemens/Nixdorf Reliant UNIX V5.44'
4535	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4536	"CFLAGS = -DSINIX -DSNI544 -DSVR4 -DDIRENT -DHDBUUCP \
4537	-DSTERMIOX -DCK_CURSES -DTCPSOCKET -DSELECT -DCK_ANSIC -DGTODONEARG \
4538	-DNO_DNS_SRV -kansi -W0 -O -K Olimit,3100 $(KFLAGS)" \
4539	"LIBS= -lsocket -lnsl -lcurses -ltermcap" "LNKFLAGS = -s"
4540
4541#Commodore Amiga with AT&T UNIX System V R4 and TCP/IP support.
4542#Has <sys/termiox.h>.
4543svr4amiganet:
4544	@echo 'Making C-Kermit $(CKVER) for Amiga SVR4 + TCP/IP...'
4545	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC=gcc" "CC2=gcc" \
4546	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DSTERMIOX \
4547	-DTCPSOCKET -DCK_CURSES $(KFLAGS)" "LNKFLAGS = -s" \
4548	"LIBS = -lsocket -lnsl -ltermlib"
4549
4550#SCO (Novell (Univel)) UnixWare 1.x or 2.0, no TCP/IP.
4551#This assumes the Novell SDK 1.0, which has <sys/termiox.h>.
4552#UnixWare users with the "Prime Time Freeware" CD-ROM SDK will probably have
4553#to use the sys5r4 entry (no termiox.h file, so no hardware flow control).
4554#Change -DSELECT to -DCK_POLL if -DSELECT causes problems.
4555# NOTE: Unixware 1.x builds have not been tried in C-Kermit 7.0.
4556unixware:
4557	$(MAKE) "MAKE=$(MAKE)" sys5r4sx KTARGET=$${KTARGET:-$(@)} \
4558	"KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4559	-DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt"
4560
4561#UnixWare 1.x or 2.0 with TCP/IP and curses.
4562#fork()-based CONNECT - no high serial speeds.
4563unixwarenetc:
4564	$(MAKE) "MAKE=$(MAKE)" sys5r4sxtcpc KTARGET=$${KTARGET:-$(@)} \
4565	"KFLAGS=-DOLD_UNIXWARE -DCK_NEWTERM -DSELECT -DNOGETUSERSHELL \
4566	-DNOSYSLOG $(KFLAGS)" "LIBS=-lcrypt -lresolv"
4567
4568uw10:
4569	$(MAKE) unixwarenetc KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4570
4571#This is for Unixware 2.0.x only - use unixware21 for UW 2.1.x.
4572#Has special library search and enables special kludge around library
4573#foulup regarding vfork() (which Kermit doesn't use).  Forces POSIX-style
4574#hangup.
4575unixware20:
4576	@echo 'Making C-Kermit $(CKVER) for UnixWare 2.0.x...'
4577	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4578	"CFLAGS = -O -DOLD_UNIXWARE -DUNIXWARE2 -DSELECT -DSVR4 -DDIRENT \
4579	-DHDBUUCP -DBIGBUFOK -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES \
4580	-DTCPSOCKET -DUW200 -DFNFLOAT -DCK_NEWTERM -DNOSYSLOG $(KFLAGS)" \
4581	"LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lgen -lm -lresolv" \
4582	"LNKFLAGS = -s"
4583
4584uw20:
4585	$(MAKE) unixware20 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4586
4587#Adds big buffers ("large memory model") - otherwise the same as UnixWare 1.x.
4588unixware21:
4589	@echo 'Making C-Kermit $(CKVER) for UnixWare 2.1.x...'
4590	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4591	"CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4592	-DNOSYSLOG -DSTERMIOX  -DCK_CURSES -DTCPSOCKET \
4593	-DCK_NEWTERM -DFNFLOAT -DUNIXWARE2 $(KFLAGS)" \
4594	"LIBS= -lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4595	$(LIBS)" "LNKFLAGS = -s"
4596
4597#Unixware 2.1.0
4598uw21:
4599	$(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
4600
4601#Unixware 2.1.3
4602uw213:
4603	$(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4604	"KFLAGS=-DUSE_FILE__CNT $(KFLAGS)"
4605
4606#Unixware 2.1 with IKSD support
4607uw21iksd:
4608	$(MAKE) unixware21 KTARGET=$${KTARGET:-$(@)} \
4609	"KFLAGS=-DCK_SHADOW $(KFLAGS)" "LIBS= -lgen"
4610
4611#UnixWare 7 with tc[gs]etspeed() high serial speeds & select()-based CONNECT
4612#and as of C-Kermit 8.0.212, large file support (LFS).
4613#NOTE: This is the one we use.
4614unixware7t:
4615	@echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4616	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4617	"CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4618	-DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4619	-DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4620	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNEEDMDMDEFS $(KFLAGS)" \
4621	"LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4622	"LNKFLAGS = -s"
4623
4624#UnixWare 7 - select()-based CONNECT - no POSIX i/o - no high serial speeds.
4625#In other words, just like the UnixWare 1 and 2 builds.
4626unixware7x:
4627	@echo 'Making C-Kermit $(CKVER) for UnixWare 7...'
4628	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4629	"CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4630	-DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4631	-DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4632	"LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4633	"LNKFLAGS = -s"
4634
4635#UnixWare 7 with POSIX cfset[oi]speed() to allow high serial speeds.
4636#(but the high speeds don't work)
4637unixware7p:
4638	@echo 'Making C-Kermit $(CKVER) for UnixWare 7 with POSIX i/o...'
4639	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4640	"CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4641	-DUW7 -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4642	-DFNFLOAT -DCK_NEWTERM -DNOLSTAT $(KFLAGS)" \
4643	"LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4644	"LNKFLAGS = -s"
4645
4646# UnixWare 7 built with gcc - This does not work at all...
4647# Reportedly gcc 2.8.1 is broken on Unixware 7.  Try egcs?
4648unixware7g:
4649	@echo 'Making C-Kermit $(CKVER) for UnixWare 7 with gcc...'
4650	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4651	"CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
4652	"CFLAGS = -O -DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4653	-DUW7 -DNOGETUSERSHELL -DSTERMIOX  -DCK_CURSES -DTCPSOCKET -DNOLSTAT \
4654	-DFNFLOAT -DCK_NEWTERM $(KFLAGS)" \
4655	"LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv $(LIBS)" \
4656	"LNKFLAGS = -s"
4657
4658unixware7:
4659	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4660	KTARGET=$${KTARGET:-$(@)}
4661
4662uw7:
4663	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" unixware7t \
4664	KTARGET=$${KTARGET:-$(@)}
4665
4666#SCO OpenUNIX 8.0
4667ou8:
4668	@echo 'Making C-Kermit $(CKVER) for Open UNIX 8...'
4669	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DOU8 $(KFLAGS)" unixware7t \
4670	KTARGET=$${KTARGET:-$(@)}
4671
4672#UnixWare 7 with OpenSSL
4673uw7ssl uw7+ssl:
4674	@echo 'Making C-Kermit $(CKVER) for UnixWare 7 and OpenSSL...'
4675	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4676	"CFLAGS = -O -DCK_AUTHENTICATION -DCK_SSL -DCK_SHADOW \
4677	-DUNIXWARE -DSELECT -DSVR4 -DDIRENT -DHDBUUCP -DBIGBUFOK \
4678	-DFNFLOAT -DNOGETUSERSHELL -DSTERMIOX -DCK_CURSES -DTCPSOCKET -DPOSIX \
4679	-DUW7 -DUSETCSETSPEED -DCK_NEWTERM -DNOLSTAT -DDCLTIMEVAL \
4680	$(SSLINC) $(KFLAGS)" \
4681	"LIBS=-lsocket -lnsl -lcurses -ltermcap -lcrypt -lm -lresolv \
4682	-lgen -lcudk70 $(SSLLIB) -lssl -lcrypto $(LIBS)" \
4683	"LNKFLAGS = -s"
4684
4685#As above but includes Shadow password support needed for IKSD.
4686uw7iksd:
4687	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4688	KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen" unixware7t
4689
4690#As above but links with static API for realpath() so a binary built
4691#with this target on UW7.1 will also work on 7.0.  Requires SCO UDK
4692#rather than the stock compiler.
4693uw7iksdudk:
4694	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=-DCK_SHADOW $(KFLAGS)" \
4695	KTARGET=$${KTARGET:-$(@)} "LIBS= -lgen -lcudk70" unixware7t
4696
4697#ESIX SVR4.0.3 or 4.04 with TCP/IP support.
4698#Has <sys/termiox.h>, ANSI C function prototyping disabled.
4699#Add -m486 to CFLAGS if desired.
4700esixr4:
4701	@echo 'Making C-Kermit $(CKVER) for ESIX SVR4 + TCP/IP...'
4702	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4703	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOANSI \
4704	-DSTERMIOX -DTCPSOCKET $(KFLAGS)" "LNKFLAGS = -s" \
4705	"LIBS = -lsocket -lnsl"
4706
4707#AT&T UNIX System V R4.
4708#Has <sys/termiox.h>, Wollongong WIN/TCP TCP/IP.
4709sys5r4sxnet:
4710	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4711	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4712	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4713	-DSTERMIOX -DWOLLONGONG $(KFLAGS)" "LNKFLAGS = -s"
4714
4715#AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>.
4716sys5r4nx:
4717	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4718	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4719	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS)" \
4720	"LNKFLAGS = -s"
4721
4722#AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, curses, TCP/IP.
4723sys5r4nxnetc:
4724	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4725	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4726	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP \
4727	-DCK_CURSES -DTCPSOCKET $(KFLAGS)" \
4728	"LIBS = -lcurses -lsocket -lnsl -ltcpip" \
4729	"LNKFLAGS = -s"
4730
4731#AT&T UNIX System V R4, no <termio.x> or <sys/termio.x>, Wollongong TCP/IP.
4732sys5r4nxtwg:
4733	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System V R4...'
4734	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4735	"CFLAGS = -O -DSVR4 -DDIRENT -DHDBUUCP -DWOLLONGONG $(KFLAGS)"
4736	"LNKFLAGS = -s"
4737
4738#ICL UNIX System V R4.(DRS N/X) version :-
4739#UNIX System V Release 4.0 ICL DRS 6000 (SPARC)
4740#DRS/NX 6000 SVR4 Version 5  Level 1  Increment 4
4741#Has <sys/termiox.h>, regular Berkeley sockets library, i.e. in.h and inet.h
4742#are not misplaced in sys (rather than netinet and arpa, respectively).
4743#Uses ANSI C constructs, advisory file locking on devices, etc.
4744#Remove -lnsl if it causes trouble.
4745iclsys5r4:
4746	@echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 (DRS N/X)'
4747	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4748	"CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4749	-DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4750	"LIBS= -lsocket -lnsl -lresolv " "LNKFLAGS = -s"
4751
4752#As above but for DRS/NX 4.2MP 7MPlus.
4753iclsys5r4m+:
4754	@echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4755	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4756	"CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOIKSD \
4757	-DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4758	"LIBS= -lsocket -lnsl -lm -lc -g -lgen " "LNKFLAGS = -s"
4759
4760#As above but for DRS/NX 4.2MP 7MPlus with IKSD support.
4761iclsys5r4m+iksd:
4762	@echo 'Making C-Kermit $(CKVER) for ICL UNIX System V R4 DRS/NX 4.2MP+'
4763	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4764	"CFLAGS = -O -DSVR4 -DICL_SVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4765	-DSTERMIOX -DTCPSOCKET $(KFLAGS)" \
4766	"LIBS= -lsocket -lnsl -lm -lc -g -lgen -lresolv " "LNKFLAGS = -s"
4767
4768iclsys5r4_486:
4769	$(MAKE) "MAKE=$(MAKE)" iclsys5r4 KTARGET=$${KTARGET:-$(@)}
4770
4771#Data General DG/UX 4.30 (System V R3) for DG AViiON, with TCP/IP support.
4772dgux430:
4773	@echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4774	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4775	"CFLAGS = -O -DDGUX430 -DSVR3 -DDIRENT -DTCPSOCKET \
4776	-DNOINADDRX -DNOGETUSERSHELL $(KFLAGS)"
4777
4778#Data General DG/UX 4.30 for DG AViiON, with TCP/IP support with BSDisms.
4779dgux430bsd:
4780	@echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 4.30...'
4781	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4782	"CFLAGS = -O -DDGUX430 -D_BSD_SOURCE -DBSD4 \
4783	-DNOINADDRX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)"
4784
4785#Data General DG/UX 5.4 (System V R4) for DG AViiON, with TCP/IP support.
4786#Add -lsocket -lnsl if inet_addr comes up missing...
4787#Hmmm - I really think CK_POLL can be removed from this one in which case
4788#there is no difference between dgux540 and dgux540i.
4789dgux540:
4790	@echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4791	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4792	"CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4793	-DSTERMIOX -DTCPSOCKET -DCK_POLL -DNOGETUSERSHELL $(KFLAGS)"
4794
4795#Data General DG/UX 5.40 (System V R4) for Intel AViiON, with TCP/IP support.
4796dgux540i:
4797	@echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4798	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4799	"CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4800	-DSTERMIOX -DTCPSOCKET -DNOGETUSERSHELL $(KFLAGS)" \
4801	"LIBS = -lsocket -lnsl"
4802
4803dgux54:
4804	make dgux540 KTARGET=$${KTARGET:-$(@)}
4805
4806#Data General DG/UX 5.4 (= System V R4) for DG AViiON, with TCP/IP support.
4807# And curses.
4808dgux540c:
4809	@echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4...'
4810	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4811	"CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4812	-DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4813	$(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4814
4815#As above but for Intel - only difference is name library names.
4816dgux540ic:
4817	@echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.40...'
4818	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4819	"CFLAGS = -O -DDGUX540 -DDIRENT -DHDBUUCP -DNOINADDRX \
4820	-DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4821	$(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4822
4823dgux54c:
4824	make dgux540c KTARGET=$${KTARGET:-$(@)}
4825
4826#DG/UX 5.4R3.10
4827dgux54310:
4828	@echo 'Making C-Kermit $(CKVER) for DG AViiON DG/UX 5.4R3...'
4829	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4830	"CFLAGS = -DDGUX540 -DDGUX54310 -DDIRENT -DHDBUUCP -DSELECT \
4831	-DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM	-DNOGETUSERSHELL \
4832	-DNOINADDRX $(KFLAGS)" "LIBS= -lcurses8 -ltermcap" "LNKFLAGS = -s"
4833
4834#DG/UX 5.4R4.10 - Includes everything.
4835dgux54410:
4836	@echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.10...'
4837	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4838	"CFLAGS = -O -DDGUX540 -DDGUX54410 -DDIRENT -DHDBUUCP -DSELECT \
4839	-DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4840	-DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4841
4842#DG/UX 5.4R4.11 - Includes everything.
4843dgux54411:
4844	@echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.11...'
4845	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4846	"CFLAGS = -O -DDGUX540 -DDGUX54411 -DDIRENT -DHDBUUCP -DSELECT \
4847	-DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4848	-DNOINADDRX $(KFLAGS)" "LIBS = -lsocket -lnsl -lcurses -ltermcap"
4849
4850#DG/UX 5.4R4.20 - Includes everything.
4851dgux54420:
4852	@echo 'Making C-Kermit $(CKVER) for DG/UX 5.4R4.20...'
4853	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4854	"CFLAGS = -O -DDGUX540 -DDGUX54420 -DDIRENT -DHDBUUCP -DSELECT \
4855	-DSTERMIOX -DTCPSOCKET -DCK_CURSES -DCK_NEWTERM -DNOGETUSERSHELL \
4856	-DNOINADDRX $(KFLAGS)" \
4857	"LIBS = -lsocket -lresolv -lnsl -lcurses -ltermcap"
4858
4859#Silicon Graphics System V R3 with BSD file system (IRIS)
4860iris:
4861	@echo Making C-Kermit $(CKVER) for Silicon Graphics IRIX pre-3.3...
4862	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4863	"CFLAGS = -O -DSVR3 -DLONGFN -DNOLEARN $(KFLAGS) -I/usr/include/bsd" \
4864	"LIBS = -lbsd"
4865
4866#Silicon Graphics IRIS System V R3
4867irix33:
4868	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 3.3...'
4869	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
4870	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOLEARN $(KFLAGS) -O" \
4871	"LNKFLAGS = -s"
4872
4873#Silicon Graphics Iris Indigo with IRIX 4.0.0 or 5.0...
4874#Strict ANSI C compilation, TCP/IP support included
4875irix40:
4876	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4877	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4878	"CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4879	-DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O -Olimit 1600 -I/usr/include/bsd" \
4880	"LNKFLAGS = -s"
4881
4882#As above, but with fullscreen display (curses) and Sun Yellow Pages support.
4883#NOTE: IRIX versions prior to 5 run COFF binaries.
4884irix40ypc:
4885	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0.'
4886	@echo 'Includes fullscreen file display and Sun Yellow Pages...'
4887	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4888	"CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DCK_CURSES \
4889	-DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET $(KFLAGS) \
4890	-O -Olimit 1600 -I/usr/include/bsd" \
4891	"LIBS = -lcurses -lsun" "LNKFLAGS = -s"
4892
4893# Silicon Graphics Iris Series 4D/*, IRIX 4.0.x, -O4 ucode optimized.
4894# Huge temporary file space needed for ucode optimizer.  If you get an error
4895# like "ugen: internal error writing to /tmp/ctmca08777: Error 0", define the
4896# the TMPDIR environment variable to point to a file system that has more
4897# space available, e.g. "setenv TMPDIR /usr/tmp".
4898irix40u:
4899	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4900	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4901	"CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4902	-DCK_ANSIC -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4903	"LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u"
4904
4905# As above, with Curses Support added
4906irix40uc:
4907	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 4.0...'
4908	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4909	"CFLAGS = -DIRIX40 -DSVR3 -DDIRENT -DHDBUUCP -DPWID_T=uid_t \
4910	-DCK_ANSIC -DCK_CURSES -DTCPSOCKET $(KFLAGS) -O4 -Olimit 1600" \
4911	"LNKFLAGS=-O4 -Olimit 1600 -s" "EXT=u" "LIBS= -lcurses -ltermcap"
4912
4913#Silicon Graphics IRIX 5.x.
4914#Yellow Pages and Curses support included.
4915#IRIX version 5.x can run COFF or ELF binaries.
4916irix51:
4917	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 5.x'
4918	@echo 'Includes fullscreen file display and Yellow Pages...'
4919	@echo 'Add -mips<n> to CFLAGS specify a particular hardware target.'
4920	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4921	"CFLAGS = -DIRIX51 -DSVR4 -DDIRENT -DHDBUUCP -DCK_CURSES -DCK_NEWTERM \
4922	-DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET -DSELECT -DNOGETUSERSHELL \
4923	-DSYSTIMEH -DDCLPOPEN -DDCLFDOPEN $(KFLAGS) -ansi -O -Olimit 3000" \
4924	"LIBS = -lcurses" "LNKFLAGS = -s"
4925
4926#Use this one if irix51 blows up due to lack of swap space or whatever.
4927irix51x:
4928	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 5.x'
4929	@echo 'Includes fullscreen file display and Yellow Pages...'
4930	@echo 'Add -mips<n> to CFLAGS specify a particular hardware target.'
4931	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4932	"CFLAGS = -DIRIX51 -DSVR4 -DDIRENT -DHDBUUCP -DCK_CURSES -DCK_NEWTERM \
4933	-DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET -DSELECT -DNOGETUSERSHELL \
4934	-DSYSTIMEH -DDCLPOPEN -DDCLFDOPEN $(KFLAGS)" \
4935	"LIBS = -lcurses" "LNKFLAGS = -s"
4936
4937irix51ypc:
4938	$(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4939	"KFLAGS= $(KFLAGS)"
4940
4941#IRIX 5.2 adds RTS/CTS
4942irix52:
4943	$(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4944	"KFLAGS=-DIRIX52 -DCK_RTSCTS $(KFLAGS)"
4945
4946irix53:
4947	$(MAKE) "MAKE=$(MAKE)" irix51 KTARGET=$${KTARGET:-$(@)} \
4948	"KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4949
4950irix53x:
4951	$(MAKE) "MAKE=$(MAKE)" irix51x KTARGET=$${KTARGET:-$(@)} \
4952	"KFLAGS=-DIRIX52 -DIRIX53 -DCK_RTSCTS $(KFLAGS)"
4953
4954#Silicon Graphics IRIX 6.[024] common stuff.
4955#Yellow Pages and Curses support included.
4956#IRIX version 6.0 and later runs only ELF binaries.
4957#Depends on code changes in ckcdeb.h that make -DIRIX6x define all
4958#lower IRIX6x values and IRIX51.
4959irix6x:
4960	@echo 'Includes fullscreen file display and Yellow Pages...'
4961	@echo 'Add -mips<n> to specify a particular hardware target.'
4962	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
4963	"CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
4964	-DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET \
4965	-DSELECT -DCK_RTSCTS -O $(KFLAGS)" \
4966	"LIBS = -lcurses" "LNKFLAGS = -s $(LNKFLAGS)"
4967
4968#Silicon Graphics IRIX 6.0.
4969irix60:
4970	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.0'
4971	@$(MAKE) "MAKE=$(MAKE)" \
4972	"KFLAGS=-DIRIX60 -Olimit 2138 $(KFLAGS)" \
4973	irix6x KTARGET=$${KTARGET:-$(@)}
4974
4975#Silicon Graphics IRIX 6.2.
4976#Serial speeds > 38400 are available in IRIX 6.2 on O-class machines only.
4977#Note: Olimit must be a number > 0.
4978irix62:
4979	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.2'
4980	@$(MAKE) "MAKE=$(MAKE)" \
4981	LNKFLAGS="-Wl,-woff,84" \
4982	"KFLAGS=-DIRIX62 -Olimit 4700 $(KFLAGS)" \
4983	irix6x KTARGET=$${KTARGET:-$(@)}
4984
4985#Silicon Graphics IRIX 6.3.
4986irix63:
4987	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.3'
4988	@$(MAKE) "MAKE=$(MAKE)" irix62 KTARGET=$${KTARGET:-$(@)} \
4989	"KFLAGS=-DIRIX63"
4990
4991#Silicon Graphics IRIX 6.4.
4992# -woff,84 to linker stops complaints about no symbols loaded from
4993# curses, and -woff 1110 stops complaints about unreachable "break;"
4994# statements in ckcpro.c among others.
4995# tested on SGI Octane, running IRIX 6.4 up to 115200 bps.
4996# -Olimit 0 means infinite.
4997irix64:
4998	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4'
4999	@$(MAKE) "MAKE=$(MAKE)" \
5000	LNKFLAGS="-Wl,-woff,84" \
5001	"KFLAGS=-DIRIX64 -DCK_RTSCTS -Olimit 3000 -woff 1110 $(KFLAGS)" \
5002	irix6x KTARGET=$${KTARGET:-$(@)}
5003
5004irix64gcc:
5005	@echo 'Making C-Kermit $(CKVER) for Silicon Graphics IRIX 6.4 gcc'
5006	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
5007	"CFLAGS= -DSVR4 -DIRIX64 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
5008	-DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
5009	-DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
5010	$(KFLAGS) -O" "LIBS= -lcurses -ltermcap -lcrypt"
5011
5012#Note the new Optimization option syntax for MIPSpro CC 7.2.1.2m.
5013#See note on irix65gcc target about Large File Support (LFS).
5014irix65:
5015	@echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
5016	@$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
5017	"KFLAGS=-DIRIX65 -D_LARGEFILE_SOURCE -DCK_RTSCTS -OPT:Olimit=0 \
5018	-woff 1110,1552,1174 $(KFLAGS)" \
5019	irix6x KTARGET=$${KTARGET:-$(@)}
5020
5021#Build for those that have GCC instead of MIPSpro.
5022#
5023# Large File Support note: use the define _LARGEFILE_SOURCE to enable support
5024# for files larger than 2GB.  This may work on releases of Irix prior to
5025# 6.5.xx.  To verify, check the man page for fstat and verify that off_t is a
5026# 64 bit value for an -n32 build.  Also check the manpage for fseek and ftell
5027# to verify that the fseek64 and ftell64 functions are provided.  If so, then
5028# LFS support should work and you can try adding -D_LARGEFILE_SOURCE to CFLAGS
5029# for your selected Irix target.
5030#
5031irix65gcc:
5032	@echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 with gcc'
5033	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5034	"CC = gcc" "CC2 = gcc" \
5035	"CFLAGS= -DSVR4 -DIRIX65 -D_LARGEFILE_SOURCE -DDIRENT -DHDBUUCP \
5036	-DNOGETUSERSHELL -DSELECT -DPWID_T=uid_t -DTCPSOCKET -DNOCOTFMC \
5037	-DCK_ANSIC -DCK_RTSCTS -DCK_NEWTERM -DCK_CURSES \
5038	$(KFLAGS) -O" "LIBS= -lcurses"
5039
5040# The 64-bit IRIX target works but presumably is no longer needed given the
5041# large file support in the more portable and compact 32-bit version.
5042irix65_64:
5043	@echo 'Making C-Kermit $(CKVER) 64-bit for SGI IRIX 6.5'
5044	@$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-Wl,-woff,84" \
5045	"KFLAGS=-DIRIX65 -64 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5046	-DCK_64BIT $(KFLAGS)" \
5047	irix6x KTARGET=$${KTARGET:-$(@)}
5048
5049#Dumb down to MIPS-2 if building on R5000 or higher...
5050irix65mips2:
5051	@echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5 MIPS-2'
5052	@$(MAKE) "MAKE=$(MAKE)" LNKFLAGS="-o32 -mips2 -Wl,-woff,84" \
5053	"KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -o32 -mips2 \
5054	-woff 1110,1552,1174 $(KFLAGS)" \
5055	irix6x KTARGET=$${KTARGET:-$(@)}
5056
5057#Special target that adds srp, ssl, and zlib support.  This requires
5058#that you have pkgsrc installed instead of Irix Freeware.  See
5059#NetBSD.org for pkgsrc for Irix.  You will need to BUILD the srp_client
5060#package yourself.  Install it manually using the directions found
5061#in the netbsds+ssl+srp+zlib target comments.
5062irix65+ssl+srp+zlib:
5063	@echo 'Making C-Kermit $(CKVER) for IRIX 6.5 with gcc and SSL SRP ZLIB'
5064	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5065	"CC = gcc" "CC2 = gcc" \
5066	"CFLAGS= -DIRIX65 -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL -DSELECT \
5067	-DTCPSOCKET -DNOCOTFMC -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC \
5068	-I/usr/pkg/include -DCK_AUTHENTICATION -DCK_SRP -DPRE_SRP_1_4_5 \
5069	-DCK_RTSCTS -DCK_NCURSES -DCK_ENCRYPTION -DCK_CAST -DCK_DES -DCK_SSL \
5070	-DLIBDES -DZLIB -DFNFLOAT -I/usr/pkg/include/openssl $(KFLAGS) -O" \
5071	"LIBS= -L/usr/pkg/lib -rpath /usr/pkg/lib -L/usr/local/lib -lncurses -lsrp -lgmp -ldes \
5072	-lssl -lkrypto -lcrypto -lcrypt -lz -lm"
5073
5074irix6x+krb5:
5075	@echo 'Includes fullscreen file display and Yellow Pages...'
5076	@echo 'Add -mips<n> to specify a particular hardware target.'
5077	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5078	"CFLAGS = -DSVR4 -DDIRENT -DHDBUUCP -DNOGETUSERSHELL \
5079	-DCK_CURSES -DCK_NEWTERM -DPWID_T=uid_t -DCK_ANSIC -DTCPSOCKET\
5080	-DSELECT -DCK_RTSCTS -O \
5081	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DCK_ENCRYPTION -DCK_DES \
5082	$(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
5083	"LIBS = -lcurses $(K5LIB) -ldes425 -lkrb5 \
5084	-lcom_err -lcrypto -lcrypt -lgssapi_krb5" \
5085	"LNKFLAGS = -s $(LNKFLAGS)"
5086
5087irix65+krb5:
5088	@echo 'Making C-Kermit $(CKVER) for SGI IRIX 6.5'
5089	@$(MAKE) "MAKE=$(MAKE)" \
5090	LNKFLAGS="-Wl,-woff,84" \
5091	"KFLAGS=-DIRIX65 -DCK_RTSCTS -OPT:Olimit=0 -woff 1110,1552,1174 \
5092	$(KFLAGS)" \
5093	irix6x+krb5 KTARGET=$${KTARGET:-$(@)}
5094
5095#In case they type "make sys5"...
5096sys5:
5097	$(MAKE) "MAKE=$(MAKE)" sys3 KTARGET=$${KTARGET:-$(@)}
5098
5099#Generic ATT System III or System V (with I&D space)
5100sys3:
5101	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5102	@echo 'or System V R2 or earlier...'
5103	@echo 'add -DNOMKDIR if mkdir is an undefined symbol.'
5104	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5105	"CFLAGS = -DATTSV -DNOUNICODE -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL \
5106	-DNOINITGROUPS -DNOFTRUNCATE -DNOREALPATH -DNOLEARN $(KFLAGS) -i -O" \
5107	"LNKFLAGS = -i"
5108
5109#Generic ATT System III or System V (no I&D space)
5110sys3nid:
5111	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5112	@echo 'or System V R2 or earlier, no I&D space...'
5113	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5114	"CFLAGS = -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOSYMLINK \
5115	-DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE -DNOLEARN $(KFLAGS) -O" \
5116	"LNKFLAGS ="
5117
5118#Generic ATT System III or System V R2 or earlier, "no void":
5119#special entry to remove "Illegal pointer combination" warnings.
5120sys3nv:
5121	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5122	@echo 'or System V R2 or earlier...'
5123	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5124	"CFLAGS= -DATTSV -DNOREALPATH -DNOUNICODE -DNOSYSLOG -DNOGETUSERSHELL \
5125	-DNOSYMLINK -DNOFTRUNCATE -DNOINITGROUPS -DNOLEARN \
5126	-Dvoid=int $(KFLAGS) -i -O" \
5127	"LNKFLAGS = -i"
5128
5129# AT&T 7300 UNIX PC.  As of C-Kermit 6.1, many of these entries don't work
5130# any more due to "Out of memory" or "Too many defines" errors during
5131# compilation, at least not on systems without lots of memory.  The sys3upcgc
5132# entry works (using gcc) with optimization removed, and might also work
5133# with optimization enabled on machines with larger memories.
5134
5135#AT&T 7300/UNIX PC (3B1) systems, sys3 but special handling for internal modem.
5136#Link with the shared library -- the conflict with openi in shared library
5137#is solved with -Dopeni=xopeni.  Note that the xermit target can't be used
5138#for the Unix PC; there is no select().
5139sys3upc:
5140	@echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5141	@echo 'If shared lib causes trouble, use make sys3upcold.'
5142	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5143	"CFLAGS = -O -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOREALPATH -DNOLEARN \
5144	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5145	-DNOREDIRECT -DNOGFTIMER -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5146	"CC2 = ld /lib/crt0s.o /lib/shlib.ifile" "LNKFLAGS = -s"
5147
5148#AT&T 7300/Unix PC systems, minimum kermit for those with smaller amounts
5149#of memory.
5150sys3upcm:
5151	@echo Minimum interactive
5152	$(MAKE) "MAKE=$(MAKE)" sys3upc KTARGET=$${KTARGET:-$(@)} \
5153	"KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5154	-DNOSYSLOG -DNOSETKEY -DNOREALPATH"
5155
5156#AT&T 7300/UNIX PC (3B1) systems, with curses support.
5157#Curses and the shared library don't get along, so we don't use the
5158#shared library.  We need to include CK_NEWTERM to avoid a conflict
5159#with curses and buffering on stdout.  Merged with submission by
5160#Robert Weiner/Programming Plus, rweiner@watsun.cc.columbia.edu.
5161#We don't need -Dopeni=xopeni since we're not using the shared library,
5162#but we keep it to be consistent with the other entries.
5163sys3upcc:
5164	@echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5165	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5166	"CFLAGS = -O -DATT7300 -DNOREALPATH \
5167	-DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DNOLEARN \
5168	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5169	-DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5170	"LIBS = -lcurses" "LNKFLAGS = -s"
5171
5172#Like sys3upcc but for AT&T UNIX 3.51m (released as a patch on Fix Disk 2),
5173#adds hardware flow control.
5174att351m:
5175	$(MAKE) "MAKE=$(MAKE)" sys3upcc KTARGET=$${KTARGET:-$(@)} \
5176	"KFLAGS=-DCK_RTSCTS -DUNIX351M"
5177
5178#As above but with gcc.
5179att351gm:
5180	$(MAKE) "MAKE=$(MAKE)" sys3upcgc KTARGET=$${KTARGET:-$(@)} \
5181	"KFLAGS=-DCK_RTSCTS -DUNIX351M"
5182
5183#AT&T 7300 UNIX PC (3B1), as above, but no newterm().
5184sys3upcx:
5185	@echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5186	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5187	"CFLAGS = -O -DATT7300 -DNOREALPATH -DNOUNICODE -DNOLEARN \
5188	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5189	-DCK_CURSES -DNOMKDIR -DNOREDIRECT -DNOGFTIMER -DUSE_MEMCPY $(KFLAGS) \
5190	-Dopeni=xopeni" "LIBS = -lcurses -ltermcap" "LNKFLAGS = -s"
5191
5192#AT&T 7300/UNIX PC (3B1) systems, with curses and shared library support.
5193sys3upcshcc:
5194	@echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, shared lib...'
5195	@echo 'With curses.  Requires shcc.'
5196	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5197	"CFLAGS = -O -DATT7300 -DNOMKDIR -DNOREALPATH -DNOLEARN \
5198	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5199	-DCK_NEWTERM -DCK_CURSES  -DNOREDIRECT -DNOGFTIMER \
5200	-DUSE_MEMCPY -DNOUNICODE $(KFLAGS) -Dopeni=xopeni" \
5201	"LNKFLAGS = -i -s" "CC = shcc" "CC2 = shcc" "LIBS = -lcurses"
5202
5203#AT&T 7300/UNIX PC (3B1) systems, as above, no curses, but use gcc.
5204sys3upcg:
5205	@echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5206	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5207	"CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5208	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5209	-DNOGFTIMER -DNOMKDIR -DNOREALPATH $(KFLAGS) -Dopeni=xopeni" \
5210	"CC = gcc" "CC2 = gcc" "LNKFLAGS = -s -shlib"
5211
5212#AT&T 7300/UNIX PC (3B1) systems, curses and gcc.
5213#Optimization omitted -- add it back in if your machine has lots of memory.
5214sys3upcgc:
5215	@echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC, curses...'
5216	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5217	"CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOGFTIMER -DNOUNICODE \
5218	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5219	-DCK_CURSES -DCK_NEWTERM -DNOMKDIR -DNOREALPATH -DNOLEARN $(KFLAGS)" \
5220	"CC = gcc" "CC2 = gcc" "LIBS = -lcurses" "LNKFLAGS = -s"
5221
5222#AT&T 7300/UNIX PC (3B1) systems, special handling for internal modem.
5223#No FULLSCREEN file transfer display (curses).
5224sys3upcold:
5225	@echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC...'
5226	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5227	"CFLAGS = -DATT7300 -DNOMKDIR -DUSE_MEMCPY -DNOUNICODE -DNOLEARN \
5228	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5229	-DNOGFTIMER -DNOREDIRECT -DNOREALPATH $(KFLAGS) -O" "LNKFLAGS = -i"
5230
5231#As above, but with gcc. mininum features - fits on a 400K UNIX PC floppy
5232#after compression with room to spare; add -DNOSHOW or other -DNOxxxx items
5233#to reduce size even further.
5234sys3upcgm:
5235	@echo Minimum interactive
5236	$(MAKE) "MAKE=$(MAKE)" sys3upcg KTARGET=$${KTARGET:-$(@)} \
5237	"KFLAGS=-DNOSPL -DNOFRILLS -DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS \
5238	-DNOSETKEY $(KFLAGS)"
5239
5240#This target is designed to create a version with the most features possible
5241#that, after compression, still fits on a 400K UNIX PC floppy.
5242sys3upcgfd:
5243	@echo 'Making C-Kermit $(CKVER) for AT&T 7300 UNIX PC floppy...'
5244	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5245	"CFLAGS = -DATT7300 -DNOREDIRECT -DUSE_MEMCPY -DNOSPL -DNOLEARN \
5246	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5247	-DNOGFTIMER -DNOREALPATH -Dopeni=xopeni \
5248	-DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5249	"CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5250
5251#AT&T 6300 PLUS (warning, -O might make it run out of space).
5252#NOTE: Remove -DHDBUUCP if not using Honey DanBer UUCP.
5253att6300:
5254	@echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5255	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5256	"CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOREALPATH -DNOLEARN \
5257	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5258	-DNOUNICODE $(KFLAGS) -O -Ml -i" "LNKFLAGS = -i -Ml"
5259
5260#As above, but with curses support.  Debugging disabled to prevent thrashing.
5261att6300c:
5262	@echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS...'
5263	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5264	"CFLAGS = -DATT6300 -DHDBUUCP -DNOFILEH -DNOCSETS -DNOREALPATH \
5265	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5266	-DCK_CURSES -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) -O -Ml -i" \
5267	"LNKFLAGS = -i -Ml" "LIBS = -lcurses"
5268
5269#AT&T 6300 PLUS with no curses, no debugging (about 34K smaller)
5270# -Optimization saves about 20K too.
5271att6300nd:
5272	@echo 'Making C-Kermit $(CKVER) for AT&T 6300 PLUS, no debugging...'
5273	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5274	"CFLAGS = -DATT6300 -DHDBUUCP -DNODEBUG -DNOFILEH -DNOREALPATH \
5275	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5276	-DNOUNICODE -DNOLEARN $(KFLAGS) -O -i -Ml" "LNKFLAGS = -i -Ml"
5277
5278#AT&T 3B2 and maybe 3B20-series computers running AT&T UNIX System V R3.
5279#This one was actually used to build C-Kermit 7.0 successfully on a 3B2/300.
5280att3b2:
5281	@echo 'Making C-Kermit $(CKVER) for AT&T 3B2'
5282	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5283	"CFLAGS = -DATTSV -DNOREDIRECT -DUSE_MEMCPY \
5284	-DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5285	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5286	-DNOGFTIMER -DNOREALPATH -Dopeni=xopeni -DNOFRILLS -DNOLEARN \
5287	-DNOHELP -DNODEBUG -DNOTLOG -DNOCSETS -DNOSETKEY -DNOMKDIR $(KFLAGS)" \
5288	"CC = gcc" "CC2 = gcc" "LNKFLAGS = -s"
5289
5290# The next two are likely not to work as-is.
5291
5292#AT&T 3B2, 3B20-series computers running AT&T UNIX System V.
5293#This is just generic System V with Honey DanBer UUCP, so refer to sys3hdb.
5294#Remove -DNONAWS if you can get away with it.
5295att3bx:
5296	$(MAKE) "MAKE=$(MAKE)" sys3hdb KTARGET=$${KTARGET:-$(@)} \
5297	"KFLAGS=$(KFLAGS) -DNONAWS -DNOTIMEVAL"
5298
5299# 3Bx with charsets (except Unicode) but no curses.
5300att3bx1:
5301	@echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5302	@echo 'with Honey DanBer UUCP  no curses...'
5303	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5304	"CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5305	-DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5306	-DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5307	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5308	-DNOREALPATH -DNOUNICODE -i" \
5309	"CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s"
5310
5311#AT&T 3B2, 3B20-series computers running AT&T UNIX System V,
5312#with fullscreen file transfer display.
5313att3bxc:
5314	@echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5315	@echo 'with Honey DanBer UUCP and curses...'
5316	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5317	"CFLAGS = -DATTSV -DHDBUUCP -DNONAWS -DNOTIMEVAL $(KFLAGS) \
5318	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5319	-DNOREALPATH -DCK_CURSES -DCK_NEWTERM -DNOUNICODE -DNOLEARN -i -O" \
5320	"LNKFLAGS = -i" "LIBS=-lcurses"
5321
5322#3bx with curses but no charsets
5323att3bxc3:
5324	@echo 'Making C-Kermit $(CKVER) for AT&T 3B2 or 3B20'
5325	@echo 'with Honey DanBer UUCP with curses...  no CSETS'
5326	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5327	"CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -DNOREDIRECT \
5328	-DNOTIMEVAL -DNOTIMEZONE -DMINIDIAL -DNOCHANNELIO -DNOBIGBUF \
5329	-DNOHELP -DNODEBUG -DNOGFTIMER -DNOLEARN \
5330	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5331	-DNOREALPATH -DNOCSETS -DCK_CURSES -DCK_NEWTERM -i" \
5332	"CC = gcc" "CC2 = gcc" "LNKFLAGS = -i -s" "LIBS = -lcurses"
5333
5334#Any System V R2 or earlier with Honey DanBer UUCP (same as above)
5335sys3hdb:
5336	@echo 'Making C-Kermit $(CKVER) for AT&T UNIX System III'
5337	@echo 'or System V R2 or earlier with Honey DanBer UUCP...'
5338	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5339	"CFLAGS = -DATTSV -DHDBUUCP -DNOREALPATH -DNOUNICODE -DNOLEARN \
5340	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5341	$(KFLAGS) -i -O" "LNKFLAGS = -i"
5342
5343#Sperry/UNISYS 5000 UTS V 5.2 (System V R2), Honey DanBer UUCP
5344unisys5r2:
5345	@echo 'Making C-Kermit $(CKVER) for Sperry/UNISYS 5000 UTS V 5.2...'
5346	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5347	"CFLAGS = -DATTSV -DUNISYS52 -DHDBUUCP -DNOREALPATH -DNOUNICODE \
5348	-DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE \
5349	-DNOLEARN $(KFLAGS) -i -O" "LNKFLAGS = -i"
5350
5351#In case they say "make sys5hdb" instead of "make sys3hdb"...
5352sys5hdb:
5353	$(MAKE) "MAKE=$(MAKE)" sys3hdb
5354
5355#Create the common header line for all hpux[5-11]* entries and above. This
5356#extra entry is here because our header message length may differ for each
5357#C-Kermit version. Don't use 'fold -s' for HP-UX 5.x - 7.x! This option is
5358#available only for HP-UX 8.0 and above!
5359hpux-header:
5360	@HPUX=`uname -r | sed -e 's/^[^1-9]*//' -e 's/\.00$$/.0/'` ; \
5361	[ "$(MESSAGE0)" ] && MESSAGE1="$(MESSAGE0)" ; \
5362	Message0='Making C-Kermit $(CKVER) for HP9000 HP-UX' ; \
5363	Message1=$${MESSAGE1:='without any extra compiler optimization'} ; \
5364	MessageH="$$Message0 $$HPUX" ; \
5365	case $$HPUX in \
5366	  [567].*) echo "$$MessageH\n$$Message1" ;; \
5367	      *.*) echo "$$MessageH $${Message1}$(MESSAGE1A)" | fold -s ;; \
5368	esac | sed -e 's/^ //' -e 's/ *$$//'
5369
5370# Peter E's updated HP-UX 5.xx entries Oct 2001.
5371
5372#HP-9000 500 HP-UX 5.xx, no TCP/IP.
5373# Last known successful build: C-Kermit 8.0.206 2002/20/27.
5374hpux0500:
5375	@MESSAGE0="no TCP/IP and no compiler optimization";\
5376	MESSAGE0=$${MESSAGE1:-$$MESSAGE0} \
5377	$(MAKE) hpux-header
5378	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5379	"CFLAGS = -DHPUX -DHPUX5 -DHPUXPRE65 -DNOREDIRECT -DDCLGETCWD \
5380	-DNOGETUSERSHELL -DNOGFTIMER -DNOSYSLOG -DNOTOMACROS -DNOLSTAT \
5381	-DNOSYMLINK -DNOINITGROUPS -DNOUNICODE -DNOLEARN -DNOLONGLONG \
5382	-DVOID=int -DCKVOID=int $(KFLAGS)" "LIBS = $(LIBS)" "LNKFLAGS = "
5383
5384#HP-9000 500 HP-UX 5.21 with Wollongong WIN/TCP 1.2 TCP/IP.
5385#Requires /usr/wins/usr/include and /usr/lib/libnet.a from Wollongong.
5386#Optimization skipped - takes forever.	Really.
5387# WARNING: this doesn't work if a file called "hpux0500" is on the disk.
5388# Last known successful build: C-Kermit 8.0.206 2002/20/27.
5389hpux0500wintcp:
5390	@MESSAGE1="with WIN/TCP but without any extra compiler optimization" \
5391	$(MAKE) hpux0500 KTARGET=$${KTARGET:-$(@)} \
5392	"KFLAGS = -DTCPSOCKET -DHPUX5WINTCP -DINADDRX -DNO_DNS_SRV \
5393	-DNOMHHOST -DVOID=int -DCKVOID=int -DNOHADDRLIST -DNOLONGLONG \
5394	-I/usr/wins/usr/include $(KFLAGS)" "LIBS = /usr/lib/libnet.a"
5395
5396#HP-UX 6.5, short filenames, no network and no curses support.
5397#ckcpro, ckuusr, ckuus3 and others are broken out because they make the
5398#optimizer run away.  Note that the XERMIT target does not work with HP-UX 6.5!
5399#
5400#If you get compiler warnings like:
5401#'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5402#other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5403#switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5404#needs 257 table entries (C-Kermit Version "9.0.299").
5405#OK: 2010/03/26
5406hpux0650:
5407	@$(MAKE) hpux-header
5408	@MESSAGE2=$${MESSAGE2:-'and NO network'}; \
5409	echo "supporting: NO long filenames $$MESSAGE2."
5410
5411	$(MAKE) KTARGET=$${KTARGET:-$(@)} \
5412		ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \
5413		ckuusr.$(EXT) ckuxla.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5414	"CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5415	-DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5416	$(KFLAGS)"
5417
5418	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
5419	"CFLAGS = -DHPUX -DHPUX6 -DSIG_V -DNOSYSLOG -DNOSELECT -DFNFLOAT \
5420	-DDCLGETCWD -DNOGETUSERSHELL -DNO_DNS_SRV -DNOLEARN -DNOLONGLONG \
5421	$(KFLAGS) -Wc,-Nw260 $(OFLAGS)" "LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5422
5423#Exactly as above, plus curses:
5424#OK: 2009/10/06
5425hpux0650c:
5426	@MESSAGE2="and NO network but with curses" \
5427	$(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5428	"KFLAGS = -DCK_CURSES $(KFLAGS)" \
5429	"LIBS = -lcurses"
5430
5431#Exactly as above, plus curses + network:
5432#OK: 2009/10/02
5433hpux0650tcpc:
5434	@MESSAGE2="but with curses and with TCP/IP" \
5435	$(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5436	"KFLAGS=-DCK_CURSES -DTCPSOCKET -DNOHADDRLIST \
5437	-DINTSELECT -DNOCKGETFQHOST $(KFLAGS)" \
5438	"LIBS=-lcurses"
5439
5440#Exactly as hpux0650 but with compiler optimization:
5441#OK: 2009/10/06
5442hpux0650o:
5443	@MESSAGE1="with compiler optimization" \
5444	$(MAKE) hpux0650 KTARGET=$${KTARGET:-$(@)} \
5445	"KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5446
5447#Exactly as hpux0650c but with compiler optimization:
5448#OK: 2009/10/06
5449hpux0650oc:
5450	@MESSAGE1="with compiler optimization" \
5451	$(MAKE) hpux0650c KTARGET=$${KTARGET:-$(@)} \
5452	"KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5453
5454#Exactly as hpux0650tcpc but with compiler optimization:
5455#OK: 2009/10/06
5456hpux0650otcpc:
5457	@MESSAGE1="with compiler optimization" \
5458	$(MAKE) hpux0650tcpc KTARGET=$${KTARGET:-$(@)} \
5459	"KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5460
5461#Take this as startup entry for all 'non-optimized' files under HP-UX 7.x!
5462#Make sure we don't call it with the '-O' option because this will blow up
5463#the compiler!
5464#OK: 2009/09/30
5465hpux0700noopt:
5466	@case "$(CFLAGS)" in \
5467	*-O*) echo "Don't use CFLAGS= -O here!" ;; \
5468	   *) $(MAKE) KTARGET=$${KTARGET:-$(@)} \
5469	      ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
5470	      ckuus6.$(EXT) ckuus7.$(EXT) ckuxla.$(EXT) \
5471	      ckcuni.$(EXT) ckcftp.$(EXT) ckcpro.$(EXT) \
5472	      ;; \
5473	esac
5474
5475#HP-UX 7.0, no long filenames, no network support, no curses.
5476#If you get compiler warnings like:
5477#'Switch table overflow. Try the -Wc,-Nw option.' (for ckcuni.c, or
5478#other files) increase the '...' value in '-Wc,-Nw...'! The default maximum
5479#switch table stack (-Nw) is 250 table entries. ckcuni.c from Oct 16 2009
5480#needs 257 table entries (C-Kermit Version "9.0.299").
5481#OK: 2010/10/26
5482hpux0700sf:
5483	@$(MAKE) hpux-header
5484	@echo 'supporting: NO long filenames, NO network, NO curses.'
5485	$(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5486	"CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5487	-DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260"
5488
5489	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5490	"CFLAGS = -DHPUX -DHPUX7 -DSIG_V -DNOGETUSERSHELL -DFNFLOAT \
5491	-DNO_DNS_SRV $(KFLAGS) -Wc,-Nw260 $(OFLAGS)" \
5492	"LNKFLAGS = -s" "LIBS = -lm $(LIBS)"
5493
5494#Exactly as hpux0700sf but with compiler optimization:
5495#OK: 2009/09/30
5496hpux0700osf:
5497	@MESSAGE1="with compiler optimization" \
5498	$(MAKE) hpux0700sf KTARGET=$${KTARGET:-$(@)} \
5499	"KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5500
5501#HP-UX 7.0, short filenames, but with tcp/ip and curses.
5502#To use this, you must have bought the ARPA Services Product from HP, and you
5503#must have /usr/lib/libBSD.a.
5504#
5505#If you get compiler warnings like:
5506#'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5507#other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5508#symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5509#needs 2031 table entries (C-Kermit Version "9.0.299").
5510#OK: 2010/03/24
5511hpux0700sftcpc:
5512	@$(MAKE) hpux-header
5513	@echo 'supporting: NO long filenames, \c'
5514	@echo 'but with networking, curses, HDB uucp...'
5515	$(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5516	"CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5517	-DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5518	-DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5519	-DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5520
5521	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5522	"CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V \
5523	-DCK_REDIR -DCK_RTSCTS -DCK_CURSES -DNOGETUSERSHELL -DFNFLOAT \
5524	-DNO_DNS_SRV -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5525	-DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5526	"LNKFLAGS = -s" "LIBS = -lm -lBSD -lcurses"
5527
5528#Exactly as above but with compiler optimization:
5529#OK: 2009/09/30
5530hpux0700osftcpc:
5531	@MESSAGE1="with compiler optimization" \
5532	$(MAKE) hpux0700sftcpc KTARGET=$${KTARGET:-$(@)} \
5533	"KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5534
5535#HP 9000 series 300/800 HP-UX 7.0, long filenames, network support, HDB uucp,
5536#but NO curses. See comments in hpux0700sftcpc about TCP/IP support.
5537#
5538#If you get compiler warnings like:
5539#'Symbol table overflow. Try the -Wc,-Ns option.' (as for ckuus4.c or
5540#other files) increase the '...' value in '-Wc,-Ns...'! The default maximum
5541#symbol table size (-Ns) is 2000 table entries. ckuus4.c from Mar 12 2010
5542#needs 2031 table entries (C-Kermit Version "9.0.299").
5543#OK: 2010/03/24
5544hpux0700lfn:
5545	@$(MAKE) hpux-header
5546	@echo 'supporting: long filenames, networking, HDB uucp$(MESSAGE2)...'
5547	$(MAKE) hpux0700noopt KTARGET=$${KTARGET:-$(@)} \
5548	"CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5549	-DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5550	-DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5551	-DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040"
5552
5553	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5554	"CFLAGS =  -DHPUXDEBUG -DHPUX -DHPUX7 -DTCPSOCKET -DSIG_V -DFNFLOAT \
5555	-DNOGETUSERSHELL -DNOSETBUF -DCK_REDIR -DCK_RTSCTS -DLONGFN \
5556	-DNO_DNS_SRV -DDIRENT -DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" \
5557	-DNOLONGLONG $(KFLAGS) -Wc,-Nw260,-Ns2040 $(OFLAGS)" \
5558	"LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5559
5560#Exactly as above + curses.
5561#OK: 2009/09/30
5562hpux0700lfnc:
5563	@MESSAGE2=', curses' \
5564	$(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5565	"KFLAGS = -DCK_CURSES $(KFLAGS)" \
5566	"LIBS = -lcurses"
5567
5568#Exactly as above hpux0700lfn but with compiler optimization:
5569#OK: 2009/09/30
5570hpux0700olfn:
5571	@MESSAGE1="with compiler optimization" \
5572	$(MAKE) hpux0700lfn KTARGET=$${KTARGET:-$(@)} \
5573	"KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5574
5575#Exactly as above hpux0700lfnc but with compiler optimization:
5576#OK: 2009/09/30
5577hpux0700olfnc:
5578	@MESSAGE1="with compiler optimization" \
5579	$(MAKE) hpux0700lfnc KTARGET=$${KTARGET:-$(@)} \
5580	"KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5581
5582#HP 9000 Series 300 or 400, HP-UX 8.0, long filenames and TCP/IP support.
5583#This one should also work on 700/800, but without PA-specific optimization.
5584#In case -DCK_RTSCTS and -DCK_REDIR make trouble, remove them.
5585#NOTE: ckcpro.c, ckuusr.c and ckuus3.c blow up the optimizer, so don't optimize
5586#them.
5587#For HP-UX 8.0 on Motorola CPUs, you might have to reinstall your kernel with
5588#maxdsiz >= 0x03000000.  But if physical memory is small, that still will not
5589#help much.
5590#OK: 2009/10/01
5591hpux0800:
5592	@$(MAKE) hpux-header
5593	@MESSAGE3=$${MESSAGE3:='TCP/IP'}; \
5594	echo "supporting: long filenames, $$MESSAGE3, HDB UUCP$(MESSAGE2)..."
5595	$(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" KTARGET=$${KTARGET:-$(@)} \
5596	ckcpro.$(EXT) ckuusr.$(EXT) ckuus3.$(EXT) \
5597	"CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5598	-DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5599	-DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5600	-DNOLONGLONG $(KFLAGS)"
5601
5602	$(MAKE) -B "CC=$(CC)" "CC2=$(CC2)" xermit KTARGET=$${KTARGET:-$(@)} \
5603	"CFLAGS =  -DCK_REDIR -DHPUXDEBUG -DHPUX -DHPUX8 -DRENAME -DSIG_V \
5604	-DNOSETBUF -DDIRENT -DCK_RTSCTS -DSTERMIOX -DLONGFN -DTCPSOCKET \
5605	-DHDBUUCP  -DNO_DNS_SRV -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5606	-DNOLONGLONG -DNODCLENDUSERSHELL $(KFLAGS) $(OFLAGS)" \
5607	"LNKFLAGS = -s" "LIBS = -lm -lBSD $(LIBS)"
5608
5609#Exactly as above hpux0800 + curses.
5610#OK: 2009/10/01
5611hpux0800c:
5612	@MESSAGE2=', curses' \
5613	$(MAKE) hpux0800  KTARGET=$${KTARGET:-$(@)} \
5614	"KFLAGS = $(KFLAGS) -DCK_CURSES" "LIBS = -lcurses"
5615
5616#HP 9000 HP-UX 8.0, no TCP/IP because /usr/lib/libBSD.a can't be found,
5617#or TCP/IP header files missing.
5618#OK: 2009/10/01
5619hpux0800notcp:
5620	@MESSAGE3='NO network, NO curses' \
5621	$(MAKE) "MAKE=$(MAKE)" hpux0800 KTARGET=$${KTARGET:-$(@)} \
5622	"KFLAGS = $(KFLAGS) -UTCPSOCKET"
5623
5624#Now the same as above hpux0800 but with compiler optimization
5625#OK: 2009/10/01
5626hpux0800o:
5627	@MESSAGE1="with compiler optimization" \
5628	$(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5629	"KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5630
5631#Exactly as above hpux0800 + curses and with compiler optimization.
5632#OK: 2009/10/01
5633hpux0800oc:
5634	@MESSAGE1="with compiler optimization" \
5635	$(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5636	"KFLAGS = $(KFLAGS)" "OFLAGS = -O" "LIBS = -lcurses"
5637
5638#Exactly as above hpux0800notcp but with compiler optimization
5639#OK: 2009/10/01
5640hpux0800onotcp:
5641	@MESSAGE1="with compiler optimization" \
5642	$(MAKE) "MAKE=$(MAKE)" hpux0800notcp KTARGET=$${KTARGET:-$(@)} \
5643	"KFLAGS = $(KFLAGS)" "OFLAGS = -O"
5644
5645#HP 9000 Series 700 or 800, HP-UX 8.0, long filenames and TCP/IP support.
5646# Like the previous entries, but with PA-RISC-specific optimization.
5647#OK: 2009/10/01
5648hpux0800pa:
5649	@MESSAGE1="with PA-RISC-specific optimization" \
5650	$(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5651	"KFLAGS = $(KFLAGS) +Obb1100"
5652
5653#As above, but with curses.
5654#OK: 2009/10/01
5655hpux0800pac:
5656	@MESSAGE1="with PA-RISC-specific optimization" \
5657	$(MAKE) hpux0800c KTARGET=$${KTARGET:-$(@)} \
5658	"KFLAGS = $(KFLAGS) +Obb1100"
5659
5660#As above, but compiled with GCC 2.3.3.
5661#OK: 2009/10/01
5662hpux0800pagcc:
5663	@MESSAGE1='using the gcc compiler' \
5664	$(MAKE) hpux0800 KTARGET=$${KTARGET:-$(@)} \
5665	"CC=gcc" "CC2=gcc" "KFLAGS = -funsigned-char $(KFLAGS)"
5666
5667#HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5668#configured.  Use this entry with the restricted compiler: no optimization, no
5669#ANSI support.  If you get unresolved sockets library references at link time,
5670#then try adding -lBSD to LIBS, or else remove -DTCPSOCKET to build a version
5671#without TCP/IP support.
5672#
5673#Please note that we have to add the compiler option +DA1.0/+DA1.1 to avoid
5674#core-dumps for large arguments in IF MATCH. The man page says these options
5675#are default but C-Kermit dumps core without them! Therefore keep them
5676#untouched. If you want to overwrite or disable the +DA1.0/+DA1.1 option use
5677#'make hpux0900 OFLAGS=...'. An other possibility would be to create a new
5678#kernel with maxssiz >= 0x01185000 (default maxssiz=0x00800000).
5679#OK: 2009/09/24
5680hpux0900:
5681	@MESSAGE1A='. Read hpux0900 entry comments if you have trouble.' \
5682	$(MAKE) hpux-header
5683	@case `uname -m` in \
5684	  */[34]*) KFLAGS='-DNOLONGLONG $(KFLAGS)' ;; \
5685	  */7*)    AFLAGS='+DA1.1' ;; \
5686	  */8*)    AFLAGS='+DA1.0' ;; \
5687	esac ; \
5688	OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5689	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
5690	"CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT -DUTIMEH \
5691	-DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME -DCK_REDIR -DLONGFN \
5692	-DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT \
5693	-DNODCLENDUSERSHELL $$KFLAGS $$OFLAGS" \
5694	"LNKFLAGS = -s" "LIBS = -lm -lcurses" "CC=$(CC)" "CC2=$(CC2)"
5695
5696#Like hpux0900, but for the "value-added" compiler on all HP 9000 models.
5697#Adds optimization and ANSI compilation:
5698# +O2 makes smaller executable (= -O = Level-1 and global optimization)
5699# +O3 adds interprocedural global optimization, makes bigger executable.
5700# Please note: To support long-long we would need compiler switch '-Ae' but
5701# this one works only on Risc systems. But the equivalant compiler flags
5702# '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5703# If optimization fails on some modules, you can add:
5704#  +Obb<n>, +Olimit <n>, or +Onolimit, depending on your cc version,
5705# where <n> is a number, e.g. +Obb1200.  In other words, if you get optimizer
5706# warnings, add (for example) +Obb1200; if you still get optimizer warnings,
5707# increase the number.  Repeat until warnings go away.  If your compiler
5708# permits it, use +Onolimit. If optimizer blows up on ckcpro.c, see next entry.
5709# Reportedly, on some configurations, such as HP9000/425e or /340, perhaps
5710# depending on the amount of main memory, this entry might fail no matter what
5711# you do ("Out of Memory", "cc: Fatal error in /lib/c.c1", etc).  In that case
5712# use "make hpux0900" (no "o").
5713#OK: 2009/09/24
5714hpux0900o:
5715	@MESSAGE1=$${MESSAGE1:-"with compiler optimization"} \
5716	$(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5717	"KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5718
5719# For HP-UX 9.0 on Motorola CPUs, optimization of ckcpro.c tends to blow up
5720# the compiler.  You might have to reinstall your kernel with maxdsiz >=
5721# 0x03000000.  But if physical memory is small, that still will not help much.
5722# In that case, use this entry to skip optimization of ckcpro.c.  But for
5723# C-Kermit 8.0.208 you need a kernel with maxdsiz >= 0x02000000 to compile an
5724# optimized ckcftp.c.
5725# Please note: To support long-long we would need compiler switch '-Ae' but
5726# this one works only on Risc systems. But the equivalant compiler flags
5727# '-Aa -D_HPUX_SOURCE +e' works for Motorola and Risc.
5728hpux0900m68ko:
5729	@MESSAGE1='without compiler optimization for ckcpro.$(EXT) ...' \
5730	$(MAKE) hpux-header
5731	$(MAKE) ckuusr.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) \
5732	ckcftp.$(EXT) ckcpro.$(EXT) \
5733	"CFLAGS = -DHPUXDEBUG -DHPUX9 -DSTERMIOX -DDIRENT \
5734	-DNOSETBUF -DCK_CURSES -DTCPSOCKET -DRENAME  -DCK_REDIR -DLONGFN \
5735	-DHDBUUCP -DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DFNFLOAT $(KFLAGS)"
5736	@echo
5737	@MESSAGE1="with compiler optimization for the rest" \
5738	$(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} \
5739	"KFLAGS = $(KFLAGS) -Aa -DCK_ANSIC -D_HPUX_SOURCE +O2 +e"
5740
5741# Old name for hpux0900m68ko.
5742hpux0900mot:
5743	$(MAKE) hpux0900m68ko KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS)"
5744
5745#Like hpux0900o but with additional model-700/800-specific optimizations.
5746# +ESlit = consolidate strings in read-only memory.
5747# +ESfsc = inline millicode calls when comparing pointers.
5748hpux0900o700:
5749	@echo 'If you get optimizer warnings \c'
5750	@echo 'try "make hpux0900o700 KFLAGS=+Obb1200"'
5751	@MESSAGE1="with PA-RISC-specific optimizations" \
5752	$(MAKE) hpux0900o KTARGET=$${KTARGET:-$(@)} \
5753	"KFLAGS = $(KFLAGS) +ESlit +ESsfc"
5754
5755#HP-UX 9.0, 9.01, 9.03, 9.04, 9.05, 9.07, 9.10 ..., + TCP/IP + curses, fully
5756#configured, built with gcc, all models except 800 series.
5757#You might need to add the include path for gcc headers, for example:
5758# 'KFLAGS=-I/usr/gnu/lib/gcc-lib/hppa1.1-hp-hpux/2.4.5/include/'
5759hpux0900gcc:
5760	@MESSAGE1='using the gcc compiler' \
5761	$(MAKE) hpux0900 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5762	"KFLAGS = -DCK_ANSIC $(KFLAGS)" \
5763	"OFLAGS = -funsigned-char -O2 $(OFLAGS)"
5764
5765#HP-9000 HP-UX 10.0 + TCP/IP + curses, fully configured.
5766#Use with restricted (bundled) compiler: no optimization, no ANSI support.
5767#libcurses needed for fullscreen file xfer display in HP-UX 10.00 and 10.01.
5768#libHcurses (NOT libcurses!) for fullscreen display, to work around fatal bugs
5769#in HP-UX 10.10 and 10.20 curses. Maybe we could use lcurses for 10.30, since
5770#the 10.10 curses problem is supposedly fixed in 10.30.
5771# +DA1.0 = Generate PA-RISC 1.0 code that runs on both 700 and 800 models.
5772# +DA1.1 = Generate PA-RISC 1.1 code that runs on both 700 and 800 models.
5773# Note that HP-UX 10.20 and upwards do not support PA-RISC 1.0 systems.
5774# And that as of Dec 2001, 11.00 and 11.11 are PA-only and 11.20 is IA64-only.
5775# Later 11.2x releases are expected to be for both.  Architecture can be
5776# determined with the model command, at least in 10.20 and later...
5777#For future releases, we need to include +DA1.1 for PA builds, so that a
5778#binary built on PA 2.0 will still work on PA 1.1 machines, whereas +DA1.1
5779#must NOT be included for IA64 builds.
5780#4 Jan 2006 - Added Large File Support (LFS).  Large files (>2GB) are
5781#possible in HP-UX 10.20 and later.  The only change is to add:
5782# -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
5783#to KFLAGS.  These should be harmless in 10.00 and 10.10, if any of examples
5784#of those still exist, but I have no way to test this hypothesis.
5785#OK: 2009/11/16
5786hpux1000:
5787	@$(MAKE) hpux-header
5788	@LIBS='-lHcurses' ; \
5789	AFLAGS='+DA1.1' ; \
5790	case `uname -r` in \
5791	   [AB].10.0*)  KFLAGS='-DHPUX1000 $(KFLAGS)' ; \
5792	                AFLAGS='+DA1.0' ; LIBS='-lcurses'  ;; \
5793	   [AB].10.1*)  KFLAGS='-DHPUX1010 -D__HP_CURSES $(KFLAGS)' ; \
5794	                ;; \
5795	   [AB].10.2*)  KFLAGS='-DHPUX1020 -D__HP_CURSES $(KFLAGS)' ; \
5796	                ;; \
5797	   [AB].10.3*)  KFLAGS='-DHPUX1030 -D__HP_CURSES $(KFLAGS)' ; \
5798	                ;; \
5799	   [AB].10.?*)  KFLAGS='-DHPUX10XX -D__HP_CURSES $(KFLAGS)' ; \
5800	                ;; \
5801	   [AB].11.0*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5802	                ;; \
5803	   [AB].11.1*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5804	                ;; \
5805	   [AB].11.?*)  KFLAGS='-DHPUX1100 -D__HP_CURSES $(KFLAGS)' ; \
5806	                AFLAGS='' ; LIBS='-lcurses' ;; \
5807	esac ; \
5808	OFLAGS=$${OFLAGS:-$$AFLAGS} ; \
5809	$(MAKE) "SHELL=/usr/bin/sh" xermit KTARGET=$${KTARGET:-$(@)} \
5810	"CC=$(CC)" "CC2=$(CC2)" \
5811	"CFLAGS = -DHPUX10 -DDIRENT -DSTERMIOX -DCK_DSYSINI -DHDBUUCP \
5812	-DCK_CURSES -DCK_WREFRESH -DTCPSOCKET -DCK_REDIR -DRENAME -DFNFLOAT \
5813	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
5814	$$KFLAGS $$OFLAGS" \
5815	"LNKFLAGS=-s $(LNKFLAGS)" "LIBS = -lm $$LIBS $(KLIBS)"
5816
5817# This is a kludge, copying hpux0900gcc and adapting hpux1000
5818# (add CC and CC2, drop the A1.[0||1])
5819# Builds w/ no compiler warnings but minimally tested.
5820#
5821#OK: 2009/09/21
5822hpux1000gcc:
5823	@MESSAGE1="using the gcc compiler $(MESSAGE1)" \
5824	$(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
5825	"KFLAGS = $(KFLAGS)" "OFLAGS = -DCK_ANSIC -funsigned-char -O2"
5826
5827# Trusted HP-UX 10
5828# echo KFLAGS=$(KFLAGS) YTARGET YTARGET=$(YTARGET) $(XTARGET) ;
5829hpux1000t:
5830	@case "$(KTARGET)" in \
5831	   *+openssl | *+ssl) \
5832		KENTRY=hpux1000o+openssl ;; \
5833	   *gcc) \
5834		KENTRY=hpux1000gcc ;; \
5835	   *o+) KENTRY=hpux1000o+ ;; \
5836	   *o)	KENTRY=hpux1000o ;; \
5837	   *)	KENTRY=hpux1000 ;; \
5838	esac ; \
5839	MESSAGE1="and support for 'Trusted HP-UX'" \
5840	$(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5841	"KFLAGS = $(KFLAGS) -DHPUX10_TRUSTED" "KLIBS=-lsec"
5842
5843hpux1000to:
5844	$(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5845
5846hpux1000to+:
5847	$(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5848
5849hpux1000tgcc:
5850	$(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5851
5852hpux1000to+ssl hpux1000to+openssl:
5853	$(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5854
5855hpux1000tgcc+ssl hpux1000tgcc+openssl:
5856	$(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5857
5858#HP-9000 HP-UX 10.00 and higher with ANSI prototyping and optimization.
5859#PA-RISC only, no Motorola or other hardware is support in HP-UX 10.00++.
5860#The unbundled optional compiler is required.
5861#Your path should start with /opt/ansic/bin.
5862# -Wl,-Fw = Remove stack unwind table (info used by debuggers).
5863# +O2 makes a smaller executable (= -O = Level-1 and global optimization).
5864# +O3 adds interprocedural global optimization, makes a bigger executable.
5865# +Onolimit allows all modules to be optimized, no matter how complex.  But:
5866#  (a) +Onolimit does not seem to always be there in HP-UX 10.00, and:
5867#  (b) some modules might take hours on low-memory and/or slow systems.
5868# The following are PA-RISC-specific optimizations:
5869# +ESlit = Consolidate strings in read-only memory.
5870# +ESfsc = Inline millicode calls when comparing pointers.
5871# You might need to configure your kernel for a maxdsiz of 0x0B000000 (176MB)
5872# or greater to prevent the optimizer from running out of space.
5873# December 2001: +ESlit +ESsfc removed because not supported on IA64.
5874# Somebody who cares can use 'model' to see whether it's PA-RISC or IA64
5875# and include the architecture-specific optimization flags.  Also note:
5876# +DA1.1 is PA-only.  If this is included in in HP-UX 11.00 or later,
5877# then +DS2.0 should be included too (but don't use +DS2.0 without +DA1.1,
5878# or else the binary won't run on older PA hardware).
5879#OK: 2009/09/21
5880hpux1000o:
5881	@case `uname -m` in \
5882	  ia64) ;; \
5883	  *) MFLAGS='+ESlit +ESsfc' ;; \
5884	esac ; \
5885	MESSAGE1="with PA-RISC-specific optimizations $(MESSAGE1)" \
5886	$(MAKE) "SHELL=/usr/bin/sh" "PATH=/opt/ansic/bin:$$PATH" hpux1000 \
5887	KTARGET=$${KTARGET:-$(@)} "KFLAGS = $(KFLAGS) \
5888	-Ae -D_HPUX_SOURCE -DCK_ANSIC -DUTIMEH \
5889	+O2 -Wl,-Fw $$MFLAGS"
5890
5891#Like hpux1000o but with "+Onolimit".
5892#On 700 series set kernel parameter maxdsiz >= 0x0D000000 (=208MB).
5893#Takes a long time.
5894hpux1000o+:
5895	@MESSAGE1="and +Onolimit $(MESSAGE1)" KTARGET=$${KTARGET:-$(@)} \
5896	$(MAKE) hpux1000o \
5897	"KFLAGS = $(KFLAGS) +Onolimit"
5898
5899#HP-UX 10.xx + 11.xx with optimizing ANSI compiler and OpenSSL.
5900#Define SSLLIB and SSLINC appropriately for your OpenSSL installation.
5901#To overwrite the default SSLLIB and SSLINC settings you can also use the
5902#command-line variable KSSLLIB and KSSLINC like:
5903#make hpux1000o+openssl KSSLLIB=-L/opt/openssl/lib KSSLINC=-I/...
5904#Ditto for the Zlib location.
5905#This entry works for C-Kermit 8.0.206 on HP-UX 10.20 + 11.11
5906#with OpenSSL 0.9.6 + 0.9.7
5907#NOTE: an ANSI C compiler is required for the SSL interface.  If you don't
5908#have the HP Optimizing ANSI compiler, see the hpux1000gcc+openssl target
5909#below.
5910hpux1000o+ssl hpux1000o+openssl:
5911	@case "$(KTARGET)" in \
5912	   *gcc+*) \
5913	        KENTRY=hpux1000gcc ;; \
5914	   *)   KENTRY=hpux1000o ;; \
5915	esac ; \
5916	case "$(KTARGET)" in \
5917	   *-zlib*) \
5918	        DZLIB= LZLIB= ;; \
5919	   *)   DZLIB=-DZLIB LZLIB='-L/opt/zlib/lib -lz' ;; \
5920	esac ; \
5921	SSLINC=$${KSSLINC:-$(SSLINC)}; \
5922	SSLLIB=$${KSSLLIB:-$(SSLLIB)}; \
5923	MESSAGE1="and with OpenSSL $(MESSAGE1)" \
5924	$(MAKE) $$KENTRY KTARGET=$${KTARGET:-$(@)} \
5925	KFLAGS="-DCK_AUTHENTICATION -DCK_SSL -DOPENSSL_097 $$DZLIB \
5926	$$SSLINC $(KFLAGS)" \
5927	KLIBS="$(KLIBS) \
5928	$$SSLLIB -lssl -lcrypto \
5929	$$LZLIB \
5930	"
5931
5932# Ditto but without Zlib:
5933hpux1000o+ssl-zlib hpux1000o+openssl-zlib:
5934	@MESSAGE1="but without Zlib $(MESSAGE1)" \
5935	$(MAKE) hpux1000o+ssl KTARGET=$${KTARGET:-$(@)}
5936
5937#HP-UX 10.00 or higher with OpenSSL 0.9.7.  Compiled with gcc.
5938#From Chris Chaney, NEC America Inc.  His instructions:
5939# (1) Install gcc version 3.2.3 & binutils version 2.13.2
5940#     (used binary depot from http://hpux.cs.utah.edu/)
5941# (2) Install gcc make version 3.80 from http://hpux.cs.utah.edu/
5942#
5943# or: gcc 2.9.2000-12-1 from "Linux to hp-ux 11.0/11i porting kit version 1.0
5944#     (2CD)" free from:  http://www.software.hp.com
5945#
5946# (3) Install openSSL version 0.9.7b from http://www.software.hp.com
5947# (4) Install flex version 2.5.4 from http://hpux.cs.utah.edu/
5948# (5) Install gmp version 3.1.1 from http://hpux.cs.utah.edu/
5949#
5950#Note from Peter Eichhorn, assyst Munich. It works also without gcc make!
5951hpux1000gcc+ssl hpux1000gcc+openssl:
5952	$(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5953
5954# Ditto but without Zlib:
5955hpux1000gcc+ssl-zlib hpux1000gcc+openssl-zlib:
5956	$(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5957
5958# Same for HP-UX 11
5959hpux1100o+ssl hpux1100o+openssl:
5960	$(MAKE) hpux1000o+openssl KTARGET=$${KTARGET:-$(@)}
5961
5962#OK: 2009/09/26
5963hpux1100gcc+ssl hpux1100gcc+openssl:
5964	$(MAKE) hpux1000gcc+openssl KTARGET=$${KTARGET:-$(@)}
5965
5966hpux1100o+ssl-zlib hpux1100o+openssl-zlib:
5967	$(MAKE) hpux1000o+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5968
5969hpux1100gcc+ssl-zlib hpux1100gcc+openssl-zlib:
5970	$(MAKE) hpux1000gcc+openssl-zlib KTARGET=$${KTARGET:-$(@)}
5971
5972# HP-UX 11
5973# Note: these are 32-bit builds even on IA64.
5974# Adding +DD64 to CFLAGS produces 64-bit object files,
5975# but the linker fails to find the needed 64-bit libs.
5976#OK: 2009/09/26
5977hpux1100:
5978	$(MAKE) hpux1000 KTARGET=$${KTARGET:-$(@)}
5979
5980#OK: 2009/09/26
5981hpux1100o:
5982	$(MAKE) hpux1000o KTARGET=$${KTARGET:-$(@)}
5983
5984hpux1100o+:
5985	$(MAKE) hpux1000o+ KTARGET=$${KTARGET:-$(@)}
5986
5987#OK: 2009/09/26
5988hpux1100gcc:
5989	$(MAKE) hpux1000gcc KTARGET=$${KTARGET:-$(@)}
5990
5991# Trusted HP-UX 11
5992hpux1100t:
5993	$(MAKE) hpux1000t KTARGET=$${KTARGET:-$(@)}
5994
5995hpux1100to:
5996	$(MAKE) hpux1000to KTARGET=$${KTARGET:-$(@)}
5997
5998hpux1100to+:
5999	$(MAKE) hpux1000to+ KTARGET=$${KTARGET:-$(@)}
6000
6001hpux1100tgcc:
6002	$(MAKE) hpux1000tgcc KTARGET=$${KTARGET:-$(@)}
6003
6004hpux1100to+ssl hpux1100to+openssl:
6005	$(MAKE) hpux1000to+openssl KTARGET=$${KTARGET:-$(@)}
6006
6007hpux1100tgcc+ssl hpux1100tgcc+openssl:
6008	$(MAKE) hpux1000tgcc+openssl KTARGET=$${KTARGET:-$(@)}
6009
6010#Regulus on CIE Systems 680/20
6011cie:
6012	@echo 'Making C-Kermit $(CKVER) for CIE Systems 680/20 Regulus...'
6013	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
6014	"CFLAGS = -DATTSV -DNOFILEH -DCIE -DNOLEARN $(KFLAGS) -O" "LNKFLAGS ="
6015
6016# Android.
6017android:
6018	@echo Please use \"make -f android.mk\" to build C-Kermit for Android.
6019
6020# Linux 1.2 or later with gcc, dynamic libraries, ncurses, TCP/IP.
6021#
6022# If your Linux system has curses rather than ncurses, use the linuxc
6023# entry, or if that doesn't work, linuxnc.
6024#
6025# The Kermit "large memory model" is used by default to configure big packet
6026# and script buffers, etc.  For small-memory or limited-resource systems,
6027# "make linux KFLAGS=-DNOBIGBUF".
6028#
6029# -DLINUXFSSTND (Linux File System Standard 1.2) gives UUCP lockfile /var/lock
6030# with string pid.  Remove this to get /usr/spool/uucp with int pid, used in
6031# very early Linux versions.  FSSTND 1.2 also says that the PID string in the
6032# UUCP lock file has leading spaces.  This is a change from FSSTND 1.0, which
6033# used leading zeros.  Add -DFSSTND10 to support FSSTND 1.0 instead of 1.2.
6034# I hope subsequent editions of the file-system standard did not change these
6035# again.
6036#
6037# Add -DOLINUXHISPEED (Old Linux High Speed support) to turn on an ugly kludge
6038# in Linux 1.0 and earlier to support speeds of 57600 and 115200.  Extremely
6039# old Linux systems (pre-0.99pl15) will not support this.  If OLINUXHISPEED is
6040# not defined, then only the standard POSIX termios methods of setting the port
6041# speed will be used, and in this case speeds can be as high as 460800 in most
6042# modern Linux versions.
6043#
6044# -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
6045# least 0.99.14; if it causes trouble for you, remove it from the CFLAGS.
6046#
6047# -pipe removes the need for temp files - remove it if it causes trouble.
6048#
6049# -funsigned-char makes all characters unsigned, as they should have been
6050#  in the first place.
6051#
6052# Add -DCK_DSYSINI if you want a shared system-wide init file.
6053#
6054# See http://www.columbia.edu/kermit/ckubwr.html about -DNOCOTFMC.
6055# Better still, should read the entire Linux section of that document.
6056#
6057# The "linuxa" entry can be referenced directly on LIBC systems, but not
6058# GLIBC, where -lcrypt is required.  The "make linux" entry should normally
6059# be used for all builds on all Linux distributions unless you have special
6060# requirements, in which case keep reading.  CK_NEWTERM added after 7.0b04
6061# due to new complaints about ncurses changing buffering of tty.
6062
6063linuxa:
6064	@echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later...'
6065	@echo 'IMPORTANT: Read the comments in the linux section of the'
6066	@echo 'makefile if you have trouble.'
6067	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6068	"CFLAGS = -O -DLINUX -pipe -funsigned-char -DFNFLOAT -DCK_POSIX_SIG \
6069	-DCK_NEWTERM -DTCPSOCKET -DLINUXFSSTND -DNOCOTFMC -DPOSIX \
6070	-DUSE_STRERROR $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6071	"LIBS = $(LIBS) -lm"
6072
6073# As above but with profiling
6074linuxp:
6075	$(MAKE) linuxa KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS) -pg" \
6076	"LIBS=-pg -lcrypt -lresolv"
6077
6078#Linux.  Completely new target: 18 January 2016.
6079#No more looking in 100 different places for libraries, let ld do it,
6080#since it knows what libraries it's going to use.
6081#If this target fails to work somewhere, use the 'linux-2015' target just
6082#below this one.
6083#
6084#This entry should work for any Linux distribution on any platform,
6085#32-bit or 64-bit, except for extremely ancient ones.  Automatically detects:
6086# . curses, ncurses, or no curses
6087# . Old versus new pty handling (new == glibc 2.1++)
6088# . Presence or absence of libcrypt and <crypt.h>
6089# . Presence or absence of libresolv
6090# . Presence of various serial port locking schemes
6091# . Transitional Long File API for 32-bit platforms (SUS V2 UNIX 98 LFS).
6092#
6093#Long file support for 32-bit builds added in 8.0.212 - if features.h contains
6094#__USE_LARGEFILE64 then we set the flags that must be set before reading any
6095#header files; on 32-bit platforms such as i386, this produces a 32-bit build
6096#capable of accessing, sending, receiving, and managing long (> 2GB) files.
6097#On 64-bit platforms, it does no harm.
6098#
6099# The first clause regarding errno is new to 9.0.305 Alpha.03 and is an
6100# attempt to aid in the decision to include "extern int errno" in the source
6101# files by supplying a symbol DCL_ERRNO if errno is not declared or defined
6102# in any header files in the /usr/include tree.
6103#
6104linux gnu-linux:
6105	@echo "Making C-Kermit for Linux..."; \
6106	# Dummy comment \
6107	DCL_ERRNO='-DDCL_ERRNO';  \
6108	if egrep -r \
6109	  "(int *errno|\#define *errno|\# *define *errno)" /usr/include/* \
6110	  > /dev/null 2> /dev/null; \
6111	then DCL_ERRNO=''; \
6112	fi ; \
6113	if test \
6114	`grep grantpt /usr/include/*.h /usr/include/*.h | wc -l` -gt 0; \
6115	  then if test -c /dev/ptmx; \
6116	    then HAVE_PTMX='-DHAVE_PTMX'; \
6117	    else HAVE_PTMX=''; \
6118	  fi; \
6119	fi ; \
6120        HAVE_OPENPTY=''; \
6121	if test `grep openpty /usr/include/*.h | wc -l` -gt 0; then \
6122          HAVE_OPENPTY='-DHAVE_OPENPTY';  \
6123        fi; \
6124	if test -n '$$HAVE_OPENPTY'; \
6125	  then if ld -lutil > /dev/null 2> /dev/null; then \
6126	    LIB_UTIL='-lutil'; \
6127	  else \
6128	    LIB_UTIL=''; \
6129	  fi; \
6130	fi; \
6131	HAVE_LIBCURSES=''; \
6132	HAVE_CURSES=''; \
6133	if ld -L/usr/local/lib -lncurses > /dev/null 2> /dev/null; then \
6134	  HAVE_LIBCURSES='-L/usr/local/lib -lncurses'; \
6135	  if test -f /usr/include/ncurses.h; then \
6136	    HAVE_CURSES='-DCK_NCURSES  -I/usr/include/ncurses'; \
6137	  else \
6138	    HAVE_LIBCURSES=''; \
6139	  fi; \
6140	fi; \
6141	if test -z '$$HAVE_LIBCURSES'; then \
6142	  if ld -lcurses > /dev/null 2> /dev/null; then \
6143	    HAVE_LIBCURSES='-lcurses'; \
6144	    if test -f /usr/include/curses.h; then \
6145	      HAVE_CURSES='-DCK_CURSES  -I/usr/include/curses'; \
6146	    else \
6147	      HAVE_LIBCURSES=''; \
6148	    fi; \
6149	  fi; \
6150	fi; \
6151	HAVE_RESOLV=''; \
6152	if ld -lresolv > /dev/null 2> /dev/null; then \
6153	  HAVE_RESOLV='-lresolv'; \
6154	fi; \
6155	HAVE_CRYPT=''; \
6156	HAVE_CRYPT_H=''; \
6157	if ld -lcrypt > /dev/null 2> /dev/null; then \
6158	  if test -f /usr/include/crypt.h; then \
6159	    HAVE_CRYPT_H='-DHAVE_CRYPT_H'; \
6160	    HAVE_CRYPT='-lcrypt'; \
6161	  fi; \
6162	fi; \
6163	if test -f /usr/include/baudboy.h ; \
6164	  then HAVE_BAUDBOY='-DHAVE_BAUDBOY' ; \
6165	  else HAVE_BAUDBOY=''; \
6166	fi; \
6167	if test -n '$$HAVE_BAUDBOY' || test -f /usr/include/ttylock.h; \
6168	  then HAVE_LOCKDEV='-DHAVE_LOCKDEV' ; \
6169	  else HAVE_LOCKDEV='' ; \
6170	fi ; \
6171	if test -n '$$HAVE_LOCKDEV'; then \
6172	  if ld -llockdev > /dev/null 2> /dev/null; then \
6173	    HAVE_LIBLOCKDEV='-llockdev'; \
6174	  else \
6175	    HAVE_LOCKDEV=''; \
6176	  fi; \
6177	fi; \
6178        NEEDCURSESPROTOTYPES=''; \
6179        if -f /etc/issue; then \
6180          if egrep "(Ubuntu|Debian)" /etc/issue > /dev/null; then \
6181            NEEDCURSESPROTOTYPES='-DNEEDCURSESPROTOTYPES'; \
6182          fi; \
6183        fi; \
6184	if grep __USE_LARGEFILE64 /usr/include/features.h > /dev/null; \
6185	  then HAVE_LARGEFILES='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'; \
6186	  else HAVE_LARGEFILES=''; \
6187	fi; \
6188	$(MAKE) KTARGET=$${KTARGET:-$(@)} \
6189	"KFLAGS=$$HAVE_CURSES $$HAVE_PTMX $$HAVE_LOCKDEV $$HAVE_CRYPT_H \
6190	$$HAVE_BAUDBOY $$HAVE_OPENPTY $$HAVE_LARGEFILES $(KFLAGS)" \
6191	"LIBS=$(LIBS) $$LIB_UTIL \
6192	  $$HAVE_LIBCURSES $$HAVE_RESOLV $$HAVE_CRYPT $$HAVE_LOCKDEV" \
6193	linuxa
6194
6195#PREVIOUS LINUX TARGET
6196#Use this target if you have trouble with the one just above.
6197#This is the previous target for Linux, retired at the end of 2015.
6198#As you can see the tests for curses/ncurses and other libraries and
6199#header files were getting ridiculous and were only going to get worse
6200#as Linux versions proliferated.
6201#
6202#The HAVE_PTMX test was previously "if test -c /dev/ptmx" but this was
6203#not sufficient for Debian 2.1, because although it had /dev/ptmx, it did not
6204#have grantpt(), unlockpt(), or ptsname(), so has been changed to look for a
6205#grantpt() prototype in the header files.  Modified in 8.0.206 to allow for
6206#libraries that contain .so's but no .a's, e.g. Mandrake 9.0.
6207#HAVE_BAUDBOY added in 8.0.210 for Red Hat -- it's like AIX ttylock().
6208#Modified 17 Aug 2005 to use openpty() if available because the other stuff
6209#dumps core in 64-bit ia64 and x86_64 builds.
6210#
6211#Added HAVE_LOCKDEV on openSuSE >= 11.3, which uses ttylock directly instead
6212#of baudboy 2010/08/23
6213linux-2015:
6214	@if test \
6215	`grep grantpt /usr/include/*.h /usr/include/sys/*.h | wc -l` -gt 0; \
6216	then if test -c /dev/ptmx; then HAVE_PTMX='-DHAVE_PTMX'; \
6217	else HAVE_PTMX=''; fi; fi ; \
6218	if test `grep openpty /usr/include/pty.h | wc -l` -gt 0; \
6219	then HAVE_OPENPTY='-DHAVE_OPENPTY'; \
6220	else HAVE_OPENPTY=''; fi ; \
6221	HAVE_LIBCURSES=''; \
6222	if test -f /lib64/libncurses.so.5 || \
6223	   test -f /lib64/libncurses.so || \
6224	   test -f /lib64/libncurses.a; then \
6225	   HAVE_LIBCURSES='-L/usr/local/lib -lncurses'; \
6226	else if test -f /usr/lib64/libncurses.so || \
6227	   test -f /usr/lib/libncurses.a  || \
6228	   test -f /usr/lib64/libncurses.so.5 || \
6229	   test -f /usr/lib/libncurses.so; then \
6230	   HAVE_LIBCURSES='-L/usr/local/lib -lncurses'; \
6231	else if test -f /usr/lib/$(MULTIARCH)/libncurses.so || \
6232	   test -f /usr/lib/$(MULTIARCH)/libncurses.a  || \
6233	   test -f /usr/lib/$(MULTIARCH)/libncurses.so; then \
6234	   HAVE_LIBCURSES='-L/usr/local/lib -lncurses'; \
6235	else if test -f /usr/lib64/libcurses.so || \
6236	   test -f /usr/lib/libcurses.a || \
6237	   test -f /usr/lib/libcurses.so; then \
6238	   HAVE_LIBCURSES='-lcurses'; fi; fi; fi; fi; \
6239	HAVE_CURSES=''; \
6240	if test -n '$$HAVE_LIBCURSES'; then \
6241	  if test -f /usr/include/ncurses.h; then \
6242	    HAVE_CURSES='-DCK_NCURSES  -I/usr/include/ncurses'; \
6243	  else if test -f /usr/include/curses.h; then \
6244	    HAVE_CURSES='-DCK_CURSES'; \
6245	  else HAVE_LIBCURSES=''; \
6246	fi; fi; fi; \
6247	if test -f /usr/include/baudboy.h || test -f /usr/include/ttylock.h; \
6248	then HAVE_LOCKDEV='-DHAVE_LOCKDEV' ; \
6249	else HAVE_LOCKDEV='' ; fi ; \
6250	if test -f /usr/include/baudboy.h ; \
6251	then HAVE_BAUDBOY='-DHAVE_BAUDBOY' ; \
6252	else HAVE_BAUDBOY='' ; fi ; \
6253	$(MAKE) KTARGET=$${KTARGET:-$(@)} \
6254	"KFLAGS=$$HAVE_CURSES $$HAVE_PTMX $$HAVE_LOCKDEV \
6255	$$HAVE_BAUDBOY $$HAVE_OPENPTY \
6256	`grep __USE_LARGEFILE64 /usr/include/features.h > /dev/null && \
6257	echo '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'` \
6258	`if test -f /usr/include/crypt.h; then echo -DHAVE_CRYPT_H; fi` \
6259	$(KFLAGS)" \
6260	"LIBS=$(LIBS) $$HAVE_LIBCURSES \
6261	`if test -n '$$HAVE_OPENPTY'; then echo -lutil; fi` \
6262	`if test -f /usr/lib64/libresolv.a || test -f /usr/lib64/libresolv.so \
6263	|| test -f /usr/lib/libresolv.a || test -f /usr/lib/libresolv.so \
6264	|| test -f /usr/lib/i386-linux-gnu/libresolv.a \
6265	|| test -f /usr/lib/i386-linux-gnu/libresolv.so \
6266	|| ls /lib/$(MULTIARCH)/libresolv.* > /dev/null 2> /dev/null \
6267	|| ls /lib/x86_64-linux-gnu/libresolv.* > /dev/null 2> /dev/null; \
6268	then echo -lresolv; fi` \
6269	`if test -f /usr/lib64/libcrypt.a || test -f /usr/lib64/libcrypt.so \
6270	|| test -f /usr/lib/libcrypt.a || test -f /usr/lib/libcrypt.so \
6271	|| ls /lib/$(MULTIARCH)/libcrypt.* > /dev/null 2> /dev/null \
6272	|| ls /lib/x86_64-linux-gnu/libcrypt.* > /dev/null 2> /dev/null; \
6273	then echo -lcrypt; fi` \
6274	`if test -f /usr/lib64/liblockdev.a \
6275	|| test -f /usr/lib64/liblockdev.so \
6276	|| test -f /usr/lib/liblockdev.a \
6277	|| test -f /usr/lib/liblockdev.so \
6278	|| ls /usr/lib/$(MULTIARCH)/liblockdev.* > /dev/null 2> /dev/null; \
6279	then echo -llockdev; fi`" \
6280	linuxa
6281
6282# Linux + Shadow passwords + PAM
6283# OK 2011/06/18
6284linux+shadow+pam:
6285	@echo 'Making C-Kermit $(CKVER) for Linux+Shadow+PAM...'
6286	$(MAKE) linux KTARGET=$${KTARGET:-$(@)} \
6287	KFLAGS="-DCK_SHADOW -DCK_PAM $(KFLAGS)" \
6288	"LNKFLAGS = $(LNKFLAGS)" \
6289	"LIBS = -lpam"
6290
6291# Linux systems that have no <sys/select.h>.
6292# (not tested in recent years, perhaps no longer needed)
6293linuxns:
6294	$(MAKE) linux KTARGET=$${KTARGET:-$(@)} KFLAGS=-DNO_SYS_SELECT_H
6295
6296# Linux-script-only:
6297# A minimum-size version for Linux that does only scripting and
6298# serial communication -- no networks, no file transfer, no security.
6299# OK 2011/06/18
6300linuxso:
6301	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6302	"CFLAGS = -O -DLINUX -pipe -funsigned-char -DPOSIX -DCK_POSIX_SIG \
6303	-DLINUXFSSTND -DNOCOTFMC -DNOXFER -DNODEBUG -DNOCSETS -DNOHELP \
6304	-DNONET -DMINIDIAL -DNOSCRIPT -DNOIKSD -DNOPUSH $(KFLAGS)" \
6305	"LNKFLAGS = $(LNKFLAGS)" "LIBS = "
6306
6307# Secure targets for Linux.  These work on RHAS4, RHEL4, and RHEL5,
6308# unlike some of the older targets that follow.  They hook into the main Linux
6309# target so we pick up all the other new stuff - large files, baudboy.h, the
6310# appropriate pty interface, etc.
6311
6312# Linux with Kerberos 5.
6313# Use "make linux+krb5 KFLAGS=-DNO_KRB5_INIT_ETS" if necessary.
6314#OK 2011/06/16 on Fedora 14 with:
6315# make linux+krb5 "LIBS=$LIBS /lib/libk5crypto.so.3 /lib/libcom_err.so.2"
6316# On RHEL5.x: make linux+krb5 -UCK_DES
6317# On RHEL6.6: make linux+krb5 "K5LIB=-L /lib64"
6318linux+krb5:
6319	@echo 'Making C-Kermit $(CKVER) for Linux with Kerberos 5...'
6320	@case `openssl version` in \
6321	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6322	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6323	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6324	  *) OPENSSLOPTION="" ;; \
6325	esac; \
6326	HAVE_DES=''; \
6327	DES_LIB=''; \
6328	if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6329	   ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6330	      DES_LIB='-ldes425'; \
6331	      HAVE_DES='-DCK_DES -DLIBDES'; \
6332	      echo "HAVE DES"; \
6333	else echo "NO DES"; \
6334	fi; \
6335	K5CRYPTO=''; \
6336	if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6337		K5CRYPTO='-lk5crypto'; \
6338	else if ls /usr/lib/libk5crypto* > /dev/null 2> /dev/null; then \
6339		K5CRYPTO='-lk5crypto'; \
6340	else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
6341	K5CRYPTO='-lk5crypto'; \
6342	fi; fi; fi; \
6343	COM_ERR=''; \
6344	if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6345		COM_ERR='-lcom_err'; \
6346	fi; \
6347	GSSAPILIB='-lgssapi'; \
6348	if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6349		GSSAPILIB='-lgssapi_krb5'; \
6350	else if ls /usr/lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6351		GSSAPILIB='-lgssapi_krb5'; \
6352	else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6353		if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6354			GSSAPILIB='-lgssapi_krb5'; \
6355	fi; fi; fi; \
6356	$(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6357	"KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 $$OPENSSLOPTION \
6358	-DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6359	-I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6360	"LIBS = $(K5LIB) $$DES_LIB -lcrypto $$GSSAPILIB -lkrb5 \
6361	$$K5CRYPTO $$COM_ERR $(LIBS)"
6362
6363# Linux with Kerberos 5 and Kerberos 4.
6364# Use "make linux+krb5 KFLAGS=-DNO_KRB5_INIT_ETS" if necessary.
6365# Add "KFLAGS=-UCK_DES" if failure messages look DES-related.
6366# UNTESTED (because I can't find a box with Krb4 and Krb5 installed)
6367linux+krb5+krb4:
6368	@echo 'Making C-Kermit for Linux with Kerberos 4 and Kerberos 5'
6369	$(MAKE) linux+krb5 KTARGET=$${KTARGET:-$(@)} \
6370	"KFLAGS=-DKRB4 -DKRB524 $(KFLAGS)" "LIBS=$(LIBS) -lkrb4"
6371
6372# Linux with OpenSSL
6373# In Linux, SSL libs are often in /lib or /usr/lib and so found by default.
6374# This targets takes into account the DES library might or might not
6375# exist.  If it does exist, however, the target will require some editing
6376# if its basename is not libdes425.  - fdc Tue Sep 21 14:28:00 2010
6377# IMPORTANT: Some Linux platforms have DES libraries but they are missing
6378# functions used by Kermit.  In that case you will get fatal errors at
6379# link time involving routines such as des_ecb3_encrypt, des_random_seed,
6380# and des_set_odd_parity.  In that case, "make linux KFLAGS=-UCK_DES"
6381# There's a new warning at the end that should come out if this happens,
6382# and that should not come out if it didn't.
6383#
6384linux+ssl linux+openssl linux+openssl+zlib+shadow+pam linux+openssl+shadow:
6385	@echo 'Making C-Kermit $(CKVER) for Linux+OpenSSL SSLLIB=$(SSLLIB)'
6386	@case `openssl version` in \
6387	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6388	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6389	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6390	  *) OPENSSLOPTION="" ;; \
6391	esac; \
6392	HAVE_DES=''; \
6393	DES_LIB=''; \
6394	if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6395	   ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6396	      DES_LIB='-ldes425'; \
6397	      HAVE_DES='-DCK_DES -DLIBDES'; \
6398	      echo "HAVE DES"; \
6399	   else echo "NO DES"; \
6400	fi; \
6401	$(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6402	"KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \
6403	-DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6404	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6405	"LIBS = $(SSLLIB) -lssl $$DES_LIB -lcrypto -lpam -ldl -lz $(LIBS)"
6406
6407# Linux with Kerberos 5 and OpenSSL
6408# OK 2011/05/16
6409# Add -UCK_DES if functions like des_ecb3_encrypt, es_random_seed,
6410# come up missing at link time.
6411# NOTE: MULTIARCH is defined externally, e.g. in DEB_HOST_MULTIARCH
6412# On RHEL6.6: make linux+krb5+ssl "K5LIB=-L /lib64"
6413linux+krb5+ssl linux+krb5+openssl:
6414	@echo 'Making C-Kermit $(CKVER) for Linux with Krb5 and OpenSSL...'
6415	@case `openssl version` in \
6416	  *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
6417	  *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
6418	  *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
6419	  *) OPENSSLOPTION="" ;; \
6420	esac; \
6421	HAVE_DES=''; \
6422	DES_LIB=''; \
6423	if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \
6424	   ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
6425	      DES_LIB='-ldes425'; \
6426	      HAVE_DES='-DCK_DES -DLIBDES'; \
6427	      echo "HAVE DES"; \
6428	   else echo "NO DES"; \
6429	fi; \
6430	K5CRYPTO=''; \
6431	if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \
6432		K5CRYPTO='-lk5crypto'; \
6433	else if ls /usr/lib/libk5crypto* > /dev/null 2> /dev/null; then \
6434		K5CRYPTO='-lk5crypto'; \
6435	else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
6436		K5CRYPTO='-lk5crypto'; \
6437	else if ls /usr/lib/$(MULTIARCH)/libk5crypto* > /dev/null 2> /dev/null; then \
6438		K5CRYPTO='-lk5crypto'; \
6439	fi; fi; fi; fi; \
6440	COM_ERR=''; \
6441	if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
6442		COM_ERR='-lcom_err'; \
6443	else if ls /lib/$(MULTIARCH)/libcom_err* > /dev/null 2> /dev/null; then \
6444		COM_ERR='-lcom_err'; \
6445	fi; fi; \
6446	GSSAPILIB='-lgssapi'; \
6447	if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6448		GSSAPILIB='-lgssapi_krb5'; \
6449	else if ls /usr/lib/$(MULTIARCH)/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6450		GSSAPILIB='-lgssapi_krb5'; \
6451	else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
6452		if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
6453			GSSAPILIB='-lgssapi_krb5'; \
6454	fi; fi; fi; \
6455	$(MAKE) linux KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6456	"KFLAGS= -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6457	-DCK_SSL -DCK_PAM -DZLIB -DCK_SHADOW $$OPENSSLOPTION $(SSLINC) \
6458	-DCK_ENCRYPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 \
6459	-I/usr/include/et $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6460	"LIBS = $(K5LIB) $(SSLLIB) -lssl $$DES_LIB -lpam -lz \
6461	-lcrypto $$GSSAPILIB -lkrb5 $$K5CRYPTO $$COM_ERR $(LIBS)"
6462
6463# ::BEGIN_OLD_LINUX_TARGETS::
6464
6465# The remaining Linux entries are for special or customized builds.  They have
6466# not been generalized ("subroutinized") like the ones above.  Ideally, we
6467# should allow for every combination of libc vs glibc, gcc vs egcs, curses vs
6468# ncurses, Kerberos IV vs Kerberos V vs SRP (in any combination), and so on.
6469# The best way to do this is to set KFLAGS and LIBS values and then chain to
6470# the main "linux" target, as in the examples just above.  To skip past all of
6471# these old targets (and there are many) search for ::END_OLD_LINUX_TARGETS::
6472# (after this line).
6473
6474#Sharp Zaurus SL-5500 - Linux based
6475zsl5500:
6476	@echo 'Making C-Kermit $(CKVER) for Sharp Zaurus SL-5500...'
6477	@touch ckcpro.c
6478	@touch wart
6479	$(MAKE) linuxnc KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DZSL5500" \
6480	"CC = gcc" "CC2 = gcc"
6481
6482#Mklinux DR3 has horrible bug in <utmpbits.h> - see ckufio.c.
6483mklinux:
6484	$(MAKE) KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DUTMPBUG" \
6485	"LIBS=-lcrypt -lresolv" linuxa
6486
6487#LinuxPPC 1999
6488linuxppc:
6489	@echo 'Making C-Kermit $(CKVER) for LinuxPPC 1999...'
6490	@if test -f /usr/lib/libcrypt.a; then \
6491	    if test -f /usr/lib/libresolv.a; then \
6492	        $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6493		"KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6494		-DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6495	        "LIBS=-L/usr/local/lib -lncurses -lresolv -lcrypt" linuxa ; \
6496	    else \
6497	        $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6498		"KFLAGS=$(NCURSES_CPP) -DHAVE_CRYPT_H \
6499		-DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6500	        "LIBS=-L/usr/local/lib -lncurses -lcrypt" linuxa ; \
6501	    fi \
6502	else \
6503	    if test -f /usr/lib/libresolv.a; then \
6504	        $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6505		"KFLAGS=$(NCURSES_CPP) \
6506		-DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6507	        "LIBS=-L/usr/local/lib -lncurses -lresolv" linuxa ; \
6508	    else \
6509	        $(MAKE) KTARGET=$${KTARGET:-$(@)} \
6510		"KFLAGS=$(NCURSES_CPP) \
6511		-DLOCK_DIR=\\\\\\"\"/var/lock/modem\\\\\\"\" $(KFLAGS)" \
6512	        "LIBS=-L/usr/local/lib -lncurses" linuxa ; \
6513	    fi \
6514	fi
6515
6516
6517# Like "make linux" but built with egcs rather than gcc.
6518# If you get "Internal compiler error xxx, output pipe has been closed",
6519# try removing -pipe.
6520linuxegcs:
6521	@echo 'Making C-Kermit $(CKVER) for Linux 1.2 or later with egcs...'
6522	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = egcs" "CC2 = egcs" \
6523	"CFLAGS = -O -DLINUX -pipe -funsigned-char \
6524	-DPOSIX -DCK_POSIX_SIG -DCK_NCURSES -DNOCOTFMC \
6525	-DTCPSOCKET -DLINUXFSSTND $(KFLAGS)" \
6526	"LNKFLAGS = $(LNKFLAGS)" "LIBS = -L/usr/local/lib -lncurses -lcrypt -lresolv"
6527
6528#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1 (no K4 compatibility).
6529linux+krb5-old:
6530	@echo 'Making C-Kermit $(CKVER) for Linux on Intel with Kerberos...'
6531	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6532	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6533	-DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 \
6534	-DCK_ENCRYPTION -DCK_DES -DCK_CURSES -DCK_POSIX_SIG \
6535	-DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H $(K5INC) $(K5INC)/krb5 \
6536	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6537	"LIBS = $(K5LIB) -L/usr/local/lib -lncurses -ltermcap -ldes425 -lkrb5 \
6538	-lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6539
6540# Linux on Intel PC with SRP 1.7.4 using GNU MP, Krypto, and Eric Young's
6541# DES library.  Remove the -DCK_DES, -DLIBDES and -ldes if you do not have
6542# Eric Young's# libdes.a installed.
6543#
6544linux+srp+gmp:
6545	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6546	$(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6547	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6548	-DCK_AUTHENTICATION -DCK_SRP \
6549	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6550	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6551	$(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6552	"LIBS = $(SRPLIB) \
6553	-L/usr/local/lib -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto -lcrypt -lresolv"
6554
6555linux+srp+gmp+no-des:
6556	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP ...'
6557	$(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6558	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6559	-DCK_AUTHENTICATION -DCK_SRP \
6560	-DCK_ENCRYPTION -DCK_CAST \
6561	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6562	$(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6563	"LIBS = $(SRPLIB) \
6564	-L/usr/local/lib -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lresolv"
6565
6566linux+srp+gmp-export:
6567	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6568	$(MAKE) srpmit-export KTARGET=$${KTARGET:-$(@)} \
6569	"CC = gcc" "CC2 = gcc" \
6570	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6571	-DCK_AUTHENTICATION -DCK_SRP -DFNFLOAT \
6572	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6573	$(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6574	"LIBS = $(SRPLIB) \
6575	-L/usr/local/lib -lncurses -ltermcap -lsrp -lgmp -lkrypto -lcrypt -lm -lresolv"
6576
6577linux+srp+gmp+pam:
6578	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6579	$(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6580	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6581	-DCK_AUTHENTICATION -DCK_SRP \
6582	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6583	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6584	-DCK_PAM -DFNFLOAT $(SRPINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6585	"LIBS = $(SRPLIB) -L/usr/local/lib -lncurses -ltermcap -lsrp -lgmp -ldes -lkrypto \
6586	-lcrypt -lpam -ldl -lm -lresolv"
6587
6588#Linux on Intel PC with SRP 1.7.4 built with OpenSSL for Big Number Math
6589#and Cryptographic functionality.
6590#
6591linux+srp:
6592	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6593	$(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6594	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6595	-DCK_AUTHENTICATION -DCK_SRP \
6596	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6597	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6598	$(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6599	"LIBS = $(SRPLIB) $(SSLLIB) \
6600	-L/usr/local/lib -lncurses -ltermcap -lsrp -lkrypto -lcrypto -lcrypt -lresolv"
6601
6602linux+srp+pam:
6603	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6604	$(MAKE) srpmit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6605	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6606	-DCK_AUTHENTICATION -DCK_SRP \
6607	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6608	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6609	-DCK_PAM -DFNFLOAT $(SRPINC) $(SSLINC) $(KFLAGS)" \
6610	"LNKFLAGS = $(LNKFLAGS)" \
6611	"LIBS = $(SRPLIB) $(SSLLIB) -L/usr/local/lib -lncurses -ltermcap -lsrp -lkrypto \
6612	-lcrypto -lcrypt -lpam -ldl -lm -lresolv"
6613
6614#Linux on Intel PC with SRP and SSL/TLS.
6615#
6616# libsrp.a should be build with OpenSSL
6617# Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6618#Remove -ltermcap if it causes trouble e.g. in Debian 2.2.
6619#If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6620linux+srp+openssl:
6621	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6622	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6623	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6624	-DCK_AUTHENTICATION -DCK_SRP \
6625	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6626	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6627	$(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6628	"LIBS = $(SRPLIB) $(SSLLIB) \
6629	-L/usr/local/lib -lncurses -ltermcap -lsrp -lssl -lkrypto -lcrypto \
6630	-lcrypt -lresolv"
6631
6632#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2 and SRP.
6633#
6634# libsrp.a should be build with GNU MP (libgmp.a)
6635# instead of AT&T CryptoLib (libcrypt.a) due to naming conflicts with
6636# standard distribution Linux libraries.
6637# Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6638linux+krb5+krb4+srp:
6639	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB54+SRP...'
6640	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6641	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6642	-DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6643	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6644	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6645	$(K5INC) $(K5INC)/krb5 $(SRPINC) \
6646	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6647	"LIBS = $(K5LIB) $(SRPLIB) \
6648	-L/usr/local/lib -lncurses -ltermcap -lsrp -lgmp -lgssapi_krb5 -lkrypto \
6649	-ldes -lkrb4 -ldes425 -lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv"
6650
6651#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6652#
6653# libsrp.a should be build with OpenSSL
6654# Requires the Kerberos 1.2.2 or higher to be compiled with KRB4 compatibility.
6655# Requires OpenSSL 0.9.6a or higher
6656#If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6657linux+krb5+krb4+srp+openssl:
6658	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6659	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6660	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6661	-DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6662	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6663	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6664	$(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6665	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6666	"LIBS = $(K5LIB) $(SRPLIB) $(SSLLIB) \
6667	-L/usr/local/lib -lncurses -ltermcap -lsrp \
6668	-lkrb4 -lssl -lkrypto -lcrypto \
6669	-lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6670
6671#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SSL/TLS.
6672#
6673# libsrp.a should be build with OpenSSL
6674# Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6675#If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6676linux+krb5+krb4+openssl:
6677	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6678	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6679	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6680	-DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6681	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL \
6682	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6683	$(K5INC) $(K5INC)/krb5 $(SSLINC) \
6684	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6685	"LIBS = $(K5LIB) $(SSLLIB) \
6686	-L/usr/local/lib -lncurses -ltermcap \
6687	-lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6688	-lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6689
6690#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SSL/TLS.
6691#
6692# libsrp.a should be build with OpenSSL
6693# Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6694# If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6695linux+krb5+krb4+openssl+shadow:
6696	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6697	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6698	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6699	-DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6700	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6701	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6702	$(K5INC) $(K5INC)/krb5 $(SSLINC) \
6703	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6704	"LIBS = $(K5LIB) $(SSLLIB)  \
6705	-L/usr/local/lib -lncurses -ltermcap \
6706	-lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6707	-lk5crypto -lgssapi_krb5 -lcrypt -lresolv"
6708
6709#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2, SSL/TLS.
6710#
6711# libsrp.a should be build with OpenSSL
6712# Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6713# If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6714linux+krb5+krb4+openssl+zlib+shadow:
6715	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL...'
6716	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6717	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6718	-DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 -DZLIB \
6719	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_SHADOW \
6720	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6721	$(K5INC) $(K5INC)/krb5 $(SSLINC) \
6722	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6723	"LIBS = $(K5LIB) $(SSLLIB) \
6724	-L/usr/local/lib -lncurses -ltermcap \
6725	-lkrb4 -lssl -lcrypto -lkrb5 -lcom_err \
6726	-lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lz"
6727
6728linux+krb5+krb4+srp-export:
6729	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6730	$(MAKE) xermit-export KTARGET=$${KTARGET:-$(@)} \
6731	"CC = gcc" "CC2 = gcc" \
6732	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6733	-DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6734	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6735	$(K5INC) $(K5INC)/krb5 $(SRPINC) \
6736	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6737	"LIBS = $(SRPLIB) $(K5LIB) \
6738	-L/usr/local/lib -lncurses -ltermcap -lsrp -lgmp -lkrb4 -ldes425 -lkrb5 -lgssapi_krb5 \
6739	-lcom_err -lk5crypto -lkrypto -lcrypt -lresolv"
6740
6741linux+krb5+krb4+srp+pam:
6742	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with SRP...'
6743	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6744	"CFLAGS = -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6745	-DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6746	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES \
6747	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6748	-DCK_PAM $(K5INC) $(K5INC)/krb5 $(SRPINC) \
6749	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6750	"LIBS = $(SRPLIB) $(K5LIB) \
6751	-L/usr/local/lib -lncurses -ltermcap -lsrp -lgmp -ldes -lkrb4 -ldes425 -lkrb5 \
6752	-lcom_err -lk5crypto -lgssapi_krb5 -lkrypto -lcrypt -lpam -ldl \
6753	-lresolv"
6754
6755#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP and SSL/TLS.
6756# and PAM.
6757#
6758# libsrp.a should be build with OpenSSL
6759# Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6760# If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6761linux+krb5+krb4+srp+openssl+pam-debug:
6762	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6763	$(MAKE) xermit-debug KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6764	"CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6765	-DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6766	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6767	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6768	-w -Dmalloc=dmalloc -Dfree=dfree -DMDEBUG $(K5INC) $(K5INC)/krb5 \
6769	$(SRPINC) $(SSLINC) $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6770	"LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6771	-L/usr/local/lib -lncurses -ltermcap -lsrp -lkrb4 -lssl -lkrypto -lcrypto \
6772	-lkrb5 -lcom_err -lk5crypto -lgssapi_krb5 -lcrypt -lresolv -lpam -ldl"
6773
6774#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.1, SRP and SSL/TLS.
6775# and PAM.
6776#
6777# libsrp.a should be build with OpenSSL
6778# Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6779# If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6780linux+krb5+krb4+srp+openssl+pam:
6781	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6782	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6783	"CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6784	-DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6785	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6786	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6787	$(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6788	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6789	"LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB)  \
6790	-lm -L/usr/local/lib -lncurses -ltermcap -lsrp \
6791	-lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6792	-lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6793
6794#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6795# with ZLIB and PAM
6796#
6797# libsrp.a should be build with OpenSSL
6798# Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6799# If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6800linux+krb5+krb4+srp+openssl+zlib+pam:
6801	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6802	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6803	"CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6804	-DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6805	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6806	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6807	$(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6808	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6809	"LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6810	-lm -L/usr/local/lib -lncurses -ltermcap -lsrp \
6811	-lkrb4 -lssl -lkrypto  -lcrypto -lgssapi_krb5 \
6812	-lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6813
6814#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, SRP, OpenSSL
6815# with ZLIB, Shadow Passwords, and PAM
6816#
6817# libsrp.a should be build with OpenSSL
6818# Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6819# If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6820linux+krb5+krb4+srp+openssl+zlib+shadow+pam:
6821	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6822	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6823	"CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6824	-DCK_AUTHENTICATION -DCK_SRP -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6825	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6826	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6827	-DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SRPINC) $(SSLINC) \
6828	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6829	"LIBS = $(SRPLIB) $(K5LIB) $(SSLLIB) \
6830	-lm -L/usr/local/lib -lncurses -ltermcap -lsrp -lkrypto \
6831	-lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6832	-lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6833
6834#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6835# with Shadow Passwords, PAM
6836#
6837# Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6838linux+krb5+krb4+openssl+shadow+pam:
6839	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SSL,...'
6840	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6841	"CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6842	-DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6843	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM \
6844	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6845	-DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6846	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6847	"LIBS = $(K5LIB) $(SSLLIB) \
6848	-lm -L/usr/local/lib -lncurses -ltermcap \
6849	-lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6850	-lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl"
6851
6852#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6853# with ZLIB, Shadow Passwords, PAM
6854#
6855# libsrp.a should be build with OpenSSL
6856# Requires the Kerberos 1.2.2 be compiled with KRB4 compatibility.
6857# If you have OpenSSL 0.9.7 or later, add -DOPENSSL_097 to KFLAGS.
6858linux+krb5+krb4+openssl+zlib+shadow+pam:
6859	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB,SRP,SSL...'
6860	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6861	"CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6862	-DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DKRB4 -DKRB524 \
6863	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6864	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6865	-DCK_SHADOW $(K5INC) $(K5INC)/krb5 $(SSLINC) \
6866	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6867	"LIBS = $(K5LIB) $(SSLLIB) \
6868	-lm -L/usr/local/lib -lncurses -ltermcap \
6869	-lkrb4 -lssl -lcrypto -lgssapi_krb5 \
6870	-lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6871
6872#Red Hat 9 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6873#Also works around bug in curses in which terminal goes dead after
6874#returning from file-transfer display.  Assumes OpenSSL 0.9.7 or later.
6875redhat9:
6876	@echo "Building SECURE Kermit for Red Hat 9.0..."
6877	$(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6878	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6879
6880#Ditto plus SRP (which is not normally included with RH Linux).
6881redhat9+srp:
6882	@echo "Building SECURE Kermit for Red Hat 9.0..."
6883	$(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6884	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH90 -DOPENSSL_097 $(KFLAGS)"
6885
6886#For Red Hat AS 2.1 with OpenSSL
6887redhat21+ssl:
6888	@echo "Building SECURE Kermit for Red Hat 2.1..."
6889	$(MAKE) linux+openssl+zlib+shadow+pam \
6890	KTARGET=$${KTARGET:-$(@)} "KFLAGS =  $(KFLAGS)"
6891
6892#Red Hat Linux 8.0 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6893#Also works around bug in curses in which terminal goes dead after
6894#returning from file-transfer display.
6895redhat80:
6896	@echo "Building SECURE Kermit for Red Hat 8.0..."
6897	$(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6898	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6899
6900redhat80+srp:
6901	@echo "Building SECURE Kermit for Red Hat 8.0..."
6902	$(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6903	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH80 $(KFLAGS)"
6904
6905#Red Hat Linux 7.3 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6906#Also works around bug in curses in which terminal goes dead after
6907#returning from file-transfer display.
6908redhat73:
6909	@echo "Building SECURE Kermit for Red Hat 7.3..."
6910	$(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6911	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6912
6913redhat73+srp:
6914	@echo "Building SECURE Kermit for Red Hat 7.3..."
6915	$(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6916	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH73 $(KFLAGS)"
6917
6918#Red Hat Linux 7.2 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6919#Also works around bug in curses in which terminal goes dead after
6920#returning from file-transfer display.
6921redhat72:
6922	@echo "Building SECURE Kermit for Red Hat 7.2..."
6923	$(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6924	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6925
6926redhat72+srp:
6927	@echo "Building SECURE Kermit for Red Hat 7.2..."
6928	$(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6929	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH72 $(KFLAGS)"
6930
6931#Red Hat Linux 7.1 - full install includes Kerberos 5 (4 compat), PAM, SSL.
6932#Also works around bug in curses in which terminal goes dead after
6933#returning from file-transfer display.
6934redhat71:
6935	@echo "Building SECURE Kermit for Red Hat 7.1..."
6936	$(MAKE) linux+krb5+krb4+openssl+zlib+shadow+pam \
6937	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6938
6939redhat71+srp:
6940	@echo "Building SECURE Kermit for Red Hat 7.1..."
6941	$(MAKE) linux+krb5+krb4+srp+openssl+zlib+shadow+pam \
6942	KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DRH71 $(KFLAGS)"
6943
6944#Linux on Intel PC with Cygnus or MIT Kerberos 5 1.2.2, OpenSSL
6945# with ZLIB and PAM and Shadow passwords
6946linux+krb5+openssl+zlib+shadow+pam:
6947	@echo 'Making C-Kermit $(CKVER) for Linux on i386 with KRB5,SSL...'
6948	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
6949	"CFLAGS = -g -O -funsigned-char -pipe -DPOSIX -DLINUX -DNOCOTFMC \
6950	-DCK_AUTHENTICATION -DCK_KERBEROS  -DKRB5 -DCK_SHADOW -DHAVE_PTMX \
6951	-DCK_ENCRYPTION -DCK_CAST -DCK_DES -DLIBDES -DCK_SSL -DCK_PAM -DZLIB \
6952	-DCK_CURSES -DCK_POSIX_SIG -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H \
6953	$(K5INC) $(K5INC)/krb5 $(SSLINC) \
6954	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \
6955	"LIBS = $(K5LIB) $(SSLLIB) \
6956	-lm -L/usr/local/lib -lncurses -ltermcap -lssl -lcrypto -lgssapi_krb5 \
6957	-lkrb5 -lcom_err -lk5crypto -lcrypt -lresolv -lpam -ldl -lz"
6958
6959linuxnotcp:
6960	$(MAKE) linux KTARGET=$${KTARGET:-$(@)} "KFLAGS = -DNONET $(KFLAGS)"
6961
6962# "make linuxnotcp" with lcc (see http://www.cs.princeton.edu/software/lcc)
6963# lcc does not understand various gcc extensions:
6964#  "__inline__" -- can be eliminated by adding "-D__inline__="
6965#  "__asm__ and "long long" -- in header files, should be surrounded by
6966#                              "#ifndef(__STRICT_ANSI__)"/"#endif"
6967#  however, TCP requires some __asm__ functions, so cannot be compiled
6968linuxnotcp-lcc:
6969	@echo 'Making C-Kermit $(CKVER) for Linux with lcc ...'
6970	@echo 'Read comments in makefile for additional information.'
6971	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = lcc" "CC2 = lcc" \
6972	"CFLAGS = -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG \
6973	-UTCPSOCKET -DLINUXFSSTND -DNOLEARN $(KFLAGS)" \
6974	"LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
6975
6976# Linux 0.99.14 thru 1.0 with gcc, dynamic libraries, curses, TCP/IP.
6977# For Linux 1.2 or later, use "make linux" (above).
6978#
6979# -DLINUXFSSTND (Linux File System Standard) gives UUCP lockfile /var/lock with
6980# string pid.  Remove this and get /usr/spool/uucp with int pid, which was used
6981# in early Linux versions.
6982#
6983# If you get compiler errors regarding <linux/serial.h>, add -DNOHISPEED.
6984#
6985# -DCK_POSIX_SIG (POSIX signal handling) is good for Linux releases back to at
6986# least 0.99.14; if it causes trouble for you, just remove it.
6987#
6988# -DCK_CURSES: Here we link with the regular curses library.  But you should
6989# be using ncurses.  Internally, the ckuusx.c module includes <curses.h>, but
6990# this really should be <ncurses.h>.  Thus if you have the new curses
6991# material, you should either install it with the standard names, or else
6992# create symbolic links from the standard names to the new ones.  If you get
6993# compile-time errors complaining about data definitions in termcap.h, it
6994# means you have new kernel material mixed with older libc header files.  To
6995# fix, add "#include <termios.h>" to the <termcap.h> file.  Or if all this is
6996# too confusing, create a new makefile entry based on this one, but with
6997# -DCK_CURSES removed from CFLAGS and the entire LIBS= clause removed.
6998#
6999# But wait, there's more.  On most Linux systems, -ltermcap must be included
7000# in LIBS.  But on others, the linker complains that libtermcap can't be
7001# found.  In that case, try removing -ltermcap from LIBS=.
7002#
7003# But wait, there's more.  The format of the PID string in the UUCP lockfile
7004# changed between Linux FSSTND 1.0 and 1.2.  In the earlier standard, it had
7005# leading zeros; in the second, it has leading spaces.  By default this entry
7006# uses the newer standard.  To force the older one, add -DFSSTND10.
7007#
7008# "The nice thing about the Linux standard is there are so many to choose from"
7009#
7010# NOTE: Remove -DBIGBUFOK for small-memory or limited-resource systems.
7011linux10:
7012	@echo 'Making C-Kermit $(CKVER) for Linux 1.0 or earlier...'
7013	@echo 'IMPORTANT: Read the comments in the linux section of the'
7014	@echo 'makefile if you get compilation or link errors.'
7015	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
7016	"CFLAGS = -O -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DLINUX \
7017	-DTCPSOCKET -DLINUXFSSTND -DOLINUXHISPEED -DNOLEARN $(KFLAGS)" \
7018	"LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
7019
7020#This version was used for Linux prior to C-Kermit 6.0.192.
7021#Now the "Linux File System Standard" is considered standard, ditto TCP/IP.
7022linuxold:
7023	@echo 'Making C-Kermit $(CKVER) for Linux...'
7024	@echo 'For FSSTND-recommended UUCP lockfiles, use:'
7025	@echo '  make linux "KFLAGS=-DLINUXFSSTND".'
7026	@echo 'Read comments in makefile for additional options.'
7027	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
7028	"CFLAGS = -O -DLINUX -DPOSIX -DCK_CURSES -DCK_POSIX_SIG -DNOLEARN \
7029	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" "LIBS = -lcurses -ltermcap"
7030
7031# ::END_OLD_LINUX_TARGETS::
7032
7033# LynxOS 2.2 with GCC compiler, TCP/IP and fullscreen display.
7034# Probably also works with Lynx 2.1, and maybe even Lynx 2.0.
7035# -X means use termios serial drivers rather than BSD4.3-style sgtty drivers.
7036# If you have trouble with this, try "make bsd KFLAGS=-DNOFDZERO".
7037lynx:
7038	@echo 'Making C-Kermit $(CKVER) for LynxOS 2.2 with TCP/IP'
7039	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
7040	"CFLAGS= -O -DPOSIX -DDIRENT -DSETREUID -DCK_CURSES -DTCPSOCKET \
7041	-DCK_ANSIC -DLYNXOS -DNOLEARN" "LNKFLAGS = -X" "LIBS = -lcurses -lbsd"
7042
7043lynx22:
7044	$(MAKE) lynx KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
7045
7046# LynxOS 2.1 with GCC compiler 1.40 and TCP/IP.
7047lynx21:
7048	@echo 'Making C-Kermit $(CKVER) for LynxOS 2.1 with TCP/IP'
7049	$(MAKE) kermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
7050	"CFLAGS= -O -DSETREUID -DTCPSOCKET -DCK_ANSIC -DBSD4 -DLYNXOS" \
7051	"LIBS = -lbsd"
7052
7053#SCO Xenix 2.2.1 for IBM PC, XT, PS2/30, or other 8088 or 8086 machine
7054#Should this not work, try some of the tricks from sco286.
7055#NOTE: -DRENAME is omitted for early SCO Xenix releases because it didn't
7056#exist, or its semantics were different from the later POSIX-compliant
7057#version of rename().
7058sco86:
7059	@echo 'Making C-Kermit $(CKVER) for SCO Xenix/86...'
7060	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7061	"CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOUNICODE -DNOLEARN \
7062	$(KFLAGS) -Dunix -F 3000 -i -M0me" \
7063	"LNKFLAGS = -F 3000 -i -s -M0me" "LIBS = -lx"
7064
7065#SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
7066#Reportedly, this "make" can fail simply because of the size of this
7067#makefile.  If that happens, use "makeL", or edit out some of the
7068#other entries.  No debugging or character-set translation.
7069sco286:
7070	@echo 'Making C-Kermit $(CKVER) for SCO Xenix/286...'
7071	@echo 'If make fails, try using makeL.'
7072	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7073	"CFLAGS= -xenix -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
7074	-DNOIKSD -DNODEBUG -DNOTLOG -DNOCSETS -DNOLEARN \
7075	$(KFLAGS) -F 3000 -i -M2let16" \
7076	"LIBS = -lx" "LNKFLAGS = -xenix -s -O -LARGE -F 3000 -i -M2let16"
7077
7078#SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
7079#As above, but with HDBUUCP (This one might need fixing -- see sco286).
7080sco286hdb:
7081	@echo 'Making C-Kermit $(CKVER) for SCO Xenix/286 with HDB UUCP...'
7082	@echo 'If make fails, try using makeL.'
7083	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7084	"CFLAGS= -s -O -LARGE -DXENIX -DNOFILEH -Dunix -DRDCHK -DNAP \
7085	-DHDBUUCP -DNOIKSD -DNOUNICODE -DNOLEARN \
7086	$(KFLAGS) -F 3000 -i -M2let32" \
7087	"LIBS = -lx" "LNKFLAGS = -s -O -LARGE -F 3000 -i -M2let32"
7088
7089#SCO Xenix/386 2.2.2 and 2.2.3
7090sco386:
7091	@echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.2...'
7092	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7093	"CFLAGS= -DXENIX -DNOFILEH -DNOIKSD -DNOREDIRECT -DNOLEARN \
7094	-Dunix -DRDCHK -DNAP -DNOUNICODE $(KFLAGS) -Otcl -M3e" \
7095	"LNKFLAGS = -s" "LIBS = -lx"
7096
7097#SCO XENIX/386 2.2.3 with Excelan TCP/IP + curses.
7098# NOTE: This one might need some work in C-Kermit 6.0.
7099# You might need to include /usr/include/sys/types.h
7100# containing "typedef char *caddr_t;".  Then at least it compiles.
7101sco386netc:
7102	@echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.2.3 + Excelan TCP'
7103	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7104	"CFLAGS= -I/usr/include/exos -DXENIX -DCK_CURSES -DNOUNICODE \
7105	-Dunix -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC -DNOMKDIR -DNOFILEH \
7106	-DNOLEARN -DNOREDIRECT -DNOIKSD -DNO_DNS_SRV $(KFLAGS) -Otcl -M3e" \
7107	"LNKFLAGS = -s" "LIBS = -lc -lx -lsocket -lcurses -ltermcap"
7108
7109#SCO XENIX/386 2.3.3 with gcc 1.37 or later...
7110sco386gcc:
7111	@echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
7112	@echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
7113	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
7114	"CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
7115	-DNOJC -DNODEBUG -DNOUNICODE -DNOLEARN $(KFLAGS) \
7116	-traditional -fpcc-struct-return -fstrength-reduce \
7117	-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
7118	-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7119	-DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD -DNOREDIRECT \
7120	-DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx"
7121
7122#As above, but with curses...
7123sco386gccc:
7124	@echo 'Making C-Kermit $(CKVER) for SCO Xenix/386 2.3.3, gcc...'
7125	@echo 'Add -D_NO_PROTOTYPE if you have trouble with Xenix header files'
7126	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \
7127	"CFLAGS= -O -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
7128	-DNOJC -DNODEBUG -DCK_CURSES -DNOUNICODE -DNOLEARN $(KFLAGS) \
7129	-traditional -fpcc-struct-return -fstrength-reduce \
7130	-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DNOREDIRECT \
7131	-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7132	-DM_SYSIII -DM_SYSV -DM_WORDSWAP -DM_XENIX -DNOIKSD \
7133	-DPWID_T=int " "LNKFLAGS = -s" "LIBS = -lx -lcurses -ltermlib"
7134
7135#SCO UNIX (and ODT) entries...
7136#
7137#NOTE: All SCO UNIX entry LIBS should have "-lc_s -lc -lx" IN THAT ORDER (if
7138#shared C library is desired), or else "-lc -lx" IN THAT ORDER.  Use shared C
7139#libraries to save memory, but then don't expect to run the resulting binary
7140#on a different machine.  When using -lc_s, you must also use -lc, because the
7141#shared C library does not contain all of libc.a.  And in all cases, -lc must
7142#ALWAYS precede -lx.
7143#
7144#ANOTHER NOTE: -DRENAME is included in all SCO UNIX entries.  Remove it if it
7145#causes trouble.  No harm is done by removing it (see ckuins.txt).
7146#
7147#AND ANOTHER: In theory, it should be possible to run SCO UNIX binaries on
7148#SCO Xenix 2.3 and later.  In practice, this might not work because of the
7149#libraries, etc.  Also, don't add the -link -z switch (which is supposed to
7150#root out references to null pointers) because it makes UNIX binaries core
7151#dump when they are run under Xenix.
7152
7153#NOTE: -Otcl removed and replaced by -O, since -Otcl produced incorrect code.
7154#SCO UNIX/386 3.2.0, 3.2.1, and SCO Xenix 2.3.x
7155sco3r2:
7156	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.0 or 3.2.1 ...'
7157	@echo 'Warning: If make blows up, edit the makefile to join'
7158	@echo 'the following three continued lines into one line.'
7159	@echo 'Also, remove -DRENAME if _rename unresolved at link time.'
7160	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7161	"CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7162	-DRENAME -DNOIKSD -DNOJC $(KFLAGS) -O" \
7163	"LNKFLAGS = -s" "LIBS = -lc -lx"
7164
7165#SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7166#In case of compilation or runtime problems, try adding
7167#"-DUID_T=int -DGID_T=int" to the CFLAGS.  If that doesn't work, try
7168#"-DUID_T=uid_t -DGID_T=gid_t".
7169sco3r2net:
7170	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan...'
7171	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7172	"CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7173	-DHDBUUCP -DRDCHK -DNAP -DRENAME -DTCPSOCKET -DEXCELAN -DNOJC \
7174	-DNOIKSD -DNOREDIRECT $(KFLAGS) -O" \
7175	"LNKFLAGS = -s" "LIBS = -lc -lx -lsocket"
7176
7177#SCO UNIX/386 3.2.0 and SCO Xenix 2.3.x with Excelan TCP/IP support.
7178#As above, with curses added.
7179sco3r2netc:
7180	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Excelan / curses...'
7181	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7182	"CFLAGS= -I/usr/include/exos -DXENIX -DSVR3 -DNOFILEH -DNOLEARN \
7183	-DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DEXCELAN -DNOJC $(KFLAGS) \
7184	-DRENAME -DCK_CURSES -DNOREDIRECT -DNOIKSD -O" "LNKFLAGS = -s" \
7185	"LIBS = -lc -lx -lsocket -lcurses -ltermcap"
7186
7187#SCO UNIX 3.2.x or SCO Xenix 2.3.x with Racal InterLan TCP/IP support
7188# Extra compile flags for other version of Racal InterLan TCP/IP:
7189# Xenix286/NP621-286, use -Ml -DPARAMH -DINTERLAN -Di286 -DSYSV
7190# Xenix386/NP621-386, use -DPARAMH -DINTERLAN -Di386 -DSYSV
7191# ISC386ix/NP622I, use -DSYSV -Di386
7192# SCO Unix3.2/NP622S, use -DSYSV -Di386 -DSCO_UNIX
7193# AT&T SVR3.2/NP622A, use -DSYSV -Di386 -DATT
7194sco3r2netri:
7195	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 / Racal InterLan...'
7196	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7197	"CFLAGS= -I/usr/include/interlan -DXENIX -DNOFILEH -DHDBUUCP \
7198	-DSVR3 -DRDCHK -DNAP -DTCPSOCKET -DPARAMH -DINTERLAN -Di386 -DSYSV \
7199	-DRENAME -DNOREDIRECT -DNOIKSD -DNOJC -DNOLEARN $(KFLAGS) -Otcl -M3e" \
7200	"LNKFLAGS = -s" "LIBS = -lc -lx -ltcp"
7201
7202# SCO XENIX/386 2.3.3 SysV with SCO TCP/IP
7203# System V STREAMS TCP developed by Lachman Associates Inc and
7204# Convergent Technologies.
7205# -DRENAME removed since some reports indicate it is not supported
7206# (whereas others say it is.)
7207sco3r2lai:
7208	@echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7209	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7210	"CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7211	-DNAP -DTCPSOCKET -DPWID_T=int -DNOREDIRECT -DNOIKSD -DNOLEARN \
7212	$(KFLAGS) -Otcl -i -M3e" \
7213	"LNKFLAGS = -i -s" "LIBS = -lc -lx -lsocket"
7214
7215sco3r2laic:
7216	@echo 'Making C-Kermit $(CKVER) for SCO XENIX/386 2.3.3 + TCP/IP...'
7217	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7218	"CFLAGS= -DLAI_TCP -Di386 -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK \
7219	-DNAP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES -DM_TERMINFO -DNOLEARN \
7220	-DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) -Otcl -i -M3e" \
7221	"LNKFLAGS = -i -s" "LIBS = -ltinfo -lc -lx -lsocket"
7222
7223#SCO UNIX/386 3.2v2 (POSIX job control), shared libraries.
7224sco3r22:
7225	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7226	make wermit KTARGET=$${KTARGET:-$(@)} \
7227	"CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7228	-DNAP -DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOIKSD \
7229	-DNOREDIRECT $(KFLAGS) -O" \
7230	"LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7231
7232#SCO UNIX/386 3.2v2, POSIX job control, fullscreen file transfer display,
7233#dynamic memory allocation, shared C library
7234sco3r22c:
7235	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 ...'
7236	@echo 'Warning: If make blows up, edit the makefile to join'
7237	@echo 'the following four continued lines into one line.'
7238	make wermit KTARGET=$${KTARGET:-$(@)} \
7239	"CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DNOLEARN \
7240	-DCK_CURSES -DDIRENT -DRENAME -DNOREDIRECT -DNOIKSD \
7241	-DPID_T=pid_t -DPWID_T=int $(KFLAGS) -O" \
7242	"LNKFLAGS = -s" "LIBS = -lcurses -lc_s -lc -lx"
7243
7244#SCO UNIX/386 3.2v2 with gcc 1.40 or later (POSIX job control)
7245sco3r22gcc:
7246	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2, gcc'
7247	@echo 'Warning: If make blows up, edit the makefile to join'
7248	@echo 'the following seven continued lines into one line.'
7249	make wermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" \
7250	"CFLAGS= -O -DPOSIX -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP \
7251	-DNOLEARN -DRENAME -traditional -fpcc-struct-return -fstrength-reduce \
7252	-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \
7253	-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7254	-DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7255	-DPID_T=pid_t -DPWID_T=int -DNOREDIRECT -DNOIKSD $(KFLAGS) " \
7256	"LNKFLAGS = -s" "LIBS = -lc_s -lc -lx"
7257
7258#SCO UNIX/386 3.2v2 (ODT 1.1) (POSIX job control) with SCO TCP/IP, shared libs
7259#Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7260sco3r22net:
7261	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2.2 + TCP/IP...'
7262	@echo 'Warning: If make blows up, edit the makefile to join'
7263	@echo 'the following three continued lines into one line.'
7264	make xermit KTARGET=$${KTARGET:-$(@)} \
7265	"CFLAGS= -DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET \
7266	-DRENAME -DPID_T=pid_t -DPWID_T=int -DDIRENT -DNOREDIRECT -DNOIKSD \
7267	$(KFLAGS) -O" "LNKFLAGS = -s" "LIBS = -lsocket -lc_s -lc -lx"
7268
7269#As above, but with curses for fullscreen file transfer display.
7270#Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7271sco3r22netc:
7272	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v2 + TCP/IP...'
7273	@echo 'Warning: If make blows up, edit the makefile to join'
7274	@echo 'the following three continued lines into one line.'
7275	make xermit KTARGET=$${KTARGET:-$(@)} "CFLAGS= \
7276	-DXENIX -DSVR3 -DNOFILEH -DHDBUUCP -DRDCHK -DNAP -DTCPSOCKET -DRENAME \
7277	-DCK_CURSES -DDIRENT -DNOIKSD -DNOREDIRECT \
7278	-DPID_T=pid_t -DPWID_T=int -O $(KFLAGS)" \
7279	"LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7280
7281#SCO XENIX 2.3.4, no curses, no TCP/IP, no IKSD.
7282#This one built and tested in C-Kermit 7.0.
7283#lcfp is C library floating-point support.
7284#Use -M3 to generate 32-bit i386 code instead of 16-bit segmented i286 code.
7285#Use -Me to enable MS nonstandard keywords in system headers.
7286#Use -W2 or W3 to increase the warning level.
7287#OK: 2011/06/15
7288sco234:
7289	@echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4...'
7290	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7291	"CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7292	-DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7293	-DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DSCO234 -DDCLGETCWD $(KFLAGS) \
7294	-Otcl" "LNKFLAGS = -s" "LIBS = -lcfp -lc -lx"
7295
7296#SCO XENIX 2.3.4, no TCP/IP, no IKSD, but with curses.
7297# Built and tested in C-Kermit 7.0.
7298# Note: XENIX 2.3.4 does not have newterm() so no point in adding -DCK_NEWTERM.
7299sco234c:
7300	@echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4 + curses...'
7301	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7302	"CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7303	-DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7304	-DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DCK_CURSES -DSCO234 \
7305	-DDCLGETCWD $(KFLAGS) -Otcl" \
7306	"LNKFLAGS = -s" "LIBS = -lcfp -lc -ltinfo -lx"
7307
7308#SCO XENIX 2.3.4 with SCO TCP/IP and curses, no IKSD.
7309# Built and tested in C-Kermit 7.0.  TCP/IP works and curses works.
7310# Previous versions of this target included -lmalloc, but this caused "error:
7311# " _calloc : symbol defined more than once" at link time so I removed it.
7312# Results are likely to vary depending on exactly which version of the SDK
7313# and TCP/IP SDK you have.
7314sco234netc:
7315	@echo 'Making C-Kermit $(CKVER) for SCO XENIX 2.3.4 + TCP + curses...'
7316	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7317	"CFLAGS= -DSCO32 -DXENIX -DNOFILEH -DHDBUUCP -DRDCHK -DNOLEARN \
7318	-DNAP -DNOJC -DNOCOTFMC -DNOIKSD -DNOREDIRECT -DNOTNCODE -DNOGFTIMER \
7319	-DNOTIMEVAL -DNOTIMEZONE -DNOSYMLINK -DCK_CURSES -DSCO234 \
7320	-DDCLGETCWD -DTCPSOCKET -DNO_DNS_SRV $(KFLAGS) -Otcl" \
7321	"LNKFLAGS = -s" "LIBS = -ltinfo -lsocket -lcfp -lc -lx"
7322
7323# SCO 3.2v4.x targets...
7324
7325#  NOTE: Add -DDCLPOPEN and/or -DDCLFDOPEN to anySCO 3.2v4.x non-gcc entries
7326#  that complain about fdopen() or popen() at compile time.  They compile OK
7327#  without these flags as of July 1999.  However, the gcc entries seem to
7328#  need them, at least for gcc 2.7.2.2.
7329
7330#  NOTE 2: To enable IKSD support, add:
7331#  -DCK_LOGIN -DNOGETUSERSHELL -DNOINITGROUPS
7332#  to CFLAGS (not tested).
7333
7334#SCO UNIX/386 3.2v4 (POSIX job control), curses, ANSI C compilation,
7335#<dirent.h> (EAFS) file system.  Remove -lmalloc if it causes trouble.  It was
7336#put there to avoid core dumps caused by regular libc.a malloc.  Add -J to make
7337#all chars unsigned.  This version uses select() for CONNECT and also has
7338#high-precision timers and so might not work on non-TCP systems, in which case
7339#sco32v4ns should be used instead.
7340# If you get _ftime redefinition_ complaint, try adding -DODT30 to CFLAGS.
7341sco32v4:
7342	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7343	make xermit KTARGET=$${KTARGET:-$(@)} \
7344	"CFLAGS= -DCK_SCO32V4 -DNOFILEH -DHDBUUCP -DCK_CURSES -DM_TERMINFO \
7345	-DNOANSI -DSELECT -DNOIKSD -DDCLGETCWD -NOLSTAT \
7346	-DNOLINKBITS -DDCLGETCWD $(KFLAGS) -O" \
7347	"LNKFLAGS = -s" "LIBS = -lcurses -lmalloc -lsocket -lc_s -lc -lx"
7348
7349# As above, but with no dependence on sockets library or select().
7350sco32v4ns:
7351	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7352	@echo 'No select() and no sockets library.'
7353	make wermit KTARGET=$${KTARGET:-$(@)} \
7354	"CFLAGS= -DCK_SCO32V4 -DNOFILEH -DHDBUUCP -DCK_CURSES -DM_TERMINFO \
7355	-DNOANSI -DNOIKSD -DNOGFTIMER -DCK_POLL -DNAP -DDCLGETCWD -DNOLSTAT \
7356	-DNOLINKBITS -DDCLGETCWD -DNOLEARN -O $(KFLAGS)" \
7357	"LNKFLAGS = -s" "LIBS = -lcurses -lmalloc -lc_s -lc -lx"
7358
7359#SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7360#<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7361#Reportedly it's OK to add -DCK_REDIR and -DCK_WREFRESH, and to remove -lc_s.
7362#Requires SCO TCP/IP development system or ODT for telnet.h, etc.
7363#See sco32v4 above for additional comments.
7364#NOTE: No more room for -Dxxx -- 25 seems to be the limit.  Move some to
7365#ckcdeb.h or somewhere...
7366sco32v4net:
7367	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7368	@echo 'If you get _ftime redefinition_ complaint,'
7369	@echo 'use make sco-odt30.'
7370	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7371	"CFLAGS= -DNOFILEH -DHDBUUCP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES \
7372	-DNAP -DCK_WREFRESH -DNOLINKBITS -D_IBCS2 -DSELECT -DNOLSTAT \
7373	-DDCLGETCWD -DCK_SCO32V4 -DNOIKSD -O \
7374	$(KFLAGS)" "LNKFLAGS = $(LNKFLAGS) -s" \
7375	"LIBS = $(LIBS) -lcurses -lsocket -lmalloc -lsocket -lc_s -lc -lx"
7376
7377#SCO UNIX/386 3.2v4 with gcc 1.40 or later, POSIX job control.
7378#Also see comments in sco32r4 entry.
7379sco32v4gcc:
7380	make xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" \
7381	"CFLAGS= -O -DNOFILEH -DHDBUUCP -DNOANSI -DCK_CURSES -DM_TERMINFO \
7382	-traditional -fpcc-struct-return -fstrength-reduce -funsigned-char \
7383	-D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLINKBITS \
7384	-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DSELECT -DNOLSTAT \
7385	-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 -DDCLGETCWD \
7386	-DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7387	-DDCLPOPEN -DDCLFDOPEN $(KFLAGS) " \
7388	"LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7389
7390#SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7391#Requires SCO TCP/IP or ODT development system for telnet.h, etc.
7392#<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7393#gcc 1.40 or later.  Also see comments in sco32r4 entry.
7394sco32v4netgcc:
7395	make xermit KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2=gcc" \
7396	"CFLAGS= -O2 -DNOFILEH -DHDBUUCP -DSELECT -DNOLSTAT \
7397	-DNOANSI -DTCPSOCKET -DCK_CURSES -DM_TERMINFO \
7398	-D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLINKBITS \
7399	-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DDCLGETCWD \
7400	-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \
7401	-DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7402	-DDCLPOPEN -DDCLFDOPEN $(KFLAGS)" \
7403	"LNKFLAGS = -s" "LIBS = -lcurses -lsocket -lc_s -lc -lx"
7404
7405#As above but with bgcc BOUNDS CHECKING (for developers only).  -lcheck has
7406#bounds-checking replacements for malloc, memcpy, bcopy, etc, so must come
7407#before -lsocket and -lc.
7408sco32v4netbgcc:
7409	make xermit KTARGET=$${KTARGET:-$(@)} \
7410	"CC = bgcc -pipe -m386" "CC2=bgcc -pipe -m386" \
7411	"CFLAGS= -O1 -g -DNOFILEH -DHDBUUCP -DSELECT \
7412	-DNOANSI -DTCPSOCKET -DCK_CURSES -DM_TERMINFO \
7413	-D_KR -D_NO_PROTOTYPE -D_SVID -DNOIKSD -DCK_SCO32V4 -DNOLSTAT \
7414	-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM -DNOLINKBITS \
7415	-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 -DDCLGETCWD \
7416	-DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix \
7417	-DDCLPOPEN -DDCLFDOPEN $(KFLAGS) " \
7418	"LNKFLAGS = -g" "LIBS = -lcurses -lcheck -lsocket -lx"
7419
7420sco32v4netnd:
7421	@echo sco32v4net with no debug
7422	$(MAKE) "MAKE=$(MAKE)" sco32v4net KTARGET=$${KTARGET:-$(@)} \
7423	"KFLAGS=$(KFLAGS) -DNODEBUG -DNOTLOG" "LIBS=$(LIBS)"
7424
7425sco3r2netnd:
7426	@echo sco32v4netnd built for SCO XENIX 2.3 under SCO UNIX...
7427	@echo   requires copying /lib/386/Slibc.a to /lib/386/Slibc_s.a and
7428	@echo   getting /lib/386/Slibsocket.a from a XENIX devkit.
7429	@echo   WARNING: poll/CK_POLL supported only on XENIX 2.3.4
7430	echo    For earlier XENIX systems, replace CK_POLL with RDCHK.
7431	$(MAKE) "MAKE=$(MAKE)" sco32v4netnd KTARGET=$${KTARGET:-$(@)} \
7432	"KFLAGS=$(KFLAGS) -x2.3 -DNORENAME -DNOSYMLINK" \
7433	"LNKFLAGS = $(LNKFLAGS) -x2.3" \
7434	"LIBS=-ldir -lcfp $(LIBS)"
7435
7436#SCO UNIX/386 3.2v4 (POSIX job control), TCP/IP, curses, ANSI C compilation,
7437#<dirent.h> (EAFS) file system.  With DIRENT, -lc must come before -lx.
7438#Reportedly it's OK to add -DCK_REDIR and -DCK_WREFRESH, and to remove -lc_s.
7439#Requires SCO TCP/IP development system or ODT for telnet.h, etc.
7440#See sco32v4 above for additional comments.
7441# Note: "xermit" means use the select() version of the CONNECT module.
7442sco32v4netx:
7443	@echo 'Making C-Kermit $(CKVER) for SCO UNIX/386 3.2v4...'
7444	@echo 'If you get _ftime redefinition_ complaint,'
7445	@echo 'use make sco-odt30.'
7446	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7447	"CFLAGS= -DNOFILEH -DHDBUUCP -DTCPSOCKET -DCK_ANSIC -DCK_CURSES -DNAP \
7448	-DCK_WREFRESH -DNOLINKBITS -D_IBCS2 -DSELECT -DDCLGETCWD \
7449	-DCK_SCO32V4 -DNOIKSD -DNOLSTAT -O $(KFLAGS)" \
7450	"LNKFLAGS = $(LNKFLAGS) -s" \
7451	"LIBS = $(LIBS) -lcurses -lsocket -lmalloc -lsocket -lc_s -lc -lx"
7452
7453sco32v4netndx:
7454	@echo sco32v4netx with no debug
7455	$(MAKE) "MAKE=$(MAKE)" sco32v4netx KTARGET=$${KTARGET:-$(@)} \
7456	"KFLAGS=$(KFLAGS) -DNODEBUG -DNOTLOG" "LIBS=$(LIBS)"
7457
7458sco3r2netndx:
7459	@echo sco32v4netndx built for SCO XENIX 2.3 under SCO UNIX...
7460	@echo   requires copying /lib/386/Slibc.a to /lib/386/Slibc_s.a and
7461	@echo   getting /lib/386/Slibsocket.a from a XENIX devkit.
7462	@echo   WARNING: poll/CK_POLL supported only on XENIX 2.3.4
7463	echo    For earlier XENIX systems, replace CK_POLL with RDCHK.
7464	$(MAKE) "MAKE=$(MAKE)" sco32v4netndx KTARGET=$${KTARGET:-$(@)} \
7465	"KFLAGS=$(KFLAGS) -x2.3 -DNORENAME -DNOSYMLINK" \
7466	"LNKFLAGS = $(LNKFLAGS) -x2.3" \
7467	"LIBS=-ldir -lcfp $(LIBS)"
7468
7469sco-odt30:
7470	@echo SCO ODT 3.0
7471	$(MAKE) "MAKE=$(MAKE)" sco32v4net KTARGET=$${KTARGET:-$(@)} \
7472	"KFLAGS=$(KFLAGS) -DODT30"
7473
7474#SCO OpenServer 5.0 (SCO UNIX 3.2v5.0) with SCO development tools, no TCP/IP.
7475#SCO OSR5 is much more like standard System V than previous SCO releases.
7476#The SCO development tools include TCP/IP, so this target is only for creating
7477#artificially limited versions of kermit required by site policy rather than
7478#the operating system.  NOSYSLOG is included because syslog() requires the
7479#sockets library.
7480sco32v500:
7481	@echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5...
7482	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7483	"CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7484	-DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7485	-DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DNOSYSLOG \
7486	$(KFLAGS)" \
7487	"LIBS=-lcurses $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7488
7489sco32v5:
7490	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v500
7491
7492
7493#SCO OpenServer 5.0 with networking, SCO development tools.
7494#Networking libraries are now provided with the OS.
7495sco32v500net:
7496	@echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5...
7497	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7498	"CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7499	-DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7500	-DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7501	-DNO_DNS_SRV $(KFLAGS)" \
7502	"LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7503
7504sco32v5net:
7505	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v500net
7506
7507#SCO OpenServer 5.0 with networking and OpenSSL, SCO development tools.
7508#Networking libraries are now provided with the OS.
7509sco32v500net+ssl:
7510	@echo Making C-Kermit $(CKVER) for SCO OSR5 with OpenSSL...
7511	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7512	"CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7513	-DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7514	-DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7515	-DNO_DNS_SRV -DCK_AUTHENTICATION -DCK_SSL -DCK_TRIGGER \
7516	$(SSLINC) $(SSLLIB) $(KFLAGS)" \
7517	"LIBS=$(SSLLIB) -lcurses -lsocket -lssl -lcrypto $(LIBS)" \
7518	"LNKFLAGS=$(LNKFLAGS)"
7519
7520#SCO OpenServer 5.0 with gcc, no networking.
7521#Note: NOSYSLOG required for non-net entries because it requires <socket.h>
7522sco32v500gcc:
7523	@echo Using gcc...
7524	$(MAKE) "MAKE=$(MAKE)" sco32v500CC=gcc CC2=gcc \
7525	KTARGET=$${KTARGET:-$(@)} "KFLAGS= $(KFLAGS)"
7526
7527#SCO OpenServer 5.0 with networking, gcc.
7528sco32v500netgcc:
7529	@echo TCP/IP networking added - using gcc...
7530	$(MAKE) "MAKE=$(MAKE)" sco32v500net CC=gcc CC2=gcc \
7531	KTARGET=$${KTARGET:-$(@)} "KFLAGS=$(KFLAGS)"
7532
7533#SCO OpenServer 5.0 with networking, gcc, elf.
7534sco32v500netgccelf:
7535	@echo TCP/IP networking added - using gcc, dynamic elf library
7536	$(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7537	KTARGET=$${KTARGET:-$(@)} "KFLAGS=-O3 -belf" "LNKFLAGS=-belf"
7538
7539sco32v502:
7540	$(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7541	"KFLAGS=-DSCO_OSR502 $(KFLAGS)"
7542
7543#SCO OpenServer 5.0.2 with networking, SCO development tools.
7544sco32v502net:
7545	@echo TCP/IP networking added...
7546	$(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7547	"KFLAGS=-b elf -DSCO_OSR502 $(KFLAGS)"
7548
7549#SCO OpenServer 5.0.4 (SCO UNIX 3.2v5.0.4) with SCO development tools.
7550#Like 5.0, but adds high serial speeds.  First POSIX-based SCO version.
7551#Note: the -O flag is deliberately omitted for /bin/cc (= /usr/ccs/bin/cc).
7552sco32v504:
7553	@echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5.0.4...
7554	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7555	"CFLAGS= -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7556	-DSCO_OSR504 -b elf -DPOSIX \
7557	-DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7558	-DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DNOSYSLOG $(KFLAGS)" \
7559	"LIBS=-lcurses $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7560
7561#SCO OpenServer 5.0.4 with gcc, no networking.
7562sco32v504gcc:
7563	@echo Using gcc...
7564	$(MAKE) "MAKE=$(MAKE)" sco32v504 "CC=gcc" "CC2=gcc" \
7565	KTARGET=$${KTARGET:-$(@)} "KFLAGS= $(KFLAGS)"
7566
7567#SCO OpenServer 5.0.4 with networking.
7568#SCO development tools (/bin/cc = /usr/ccs/bin/cc).
7569#Optimization deliberately suppressed.
7570sco32v504net:
7571	@echo Making C-Kermit $(CKVER) for SCO OpenServer Release 5.0.4...
7572	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7573	"CFLAGS= -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7574	-DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7575	-DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7576	-b elf -DSCO_OSR504 -DPOSIX -DNO_DNS_SRV $(KFLAGS)" \
7577	"LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7578
7579#SCO OpenServer 5.0.4 with networking, gcc.
7580sco32v504netgcc:
7581	@echo TCP/IP networking added - using gcc...
7582	@echo If gcc crashes on ckwart.c then build it by hand:
7583	@echo " gcc -o wart -DCK_SCOV5 ckwart.c"
7584	$(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7585	KTARGET=$${KTARGET:-$(@)} "KFLAGS=-DSCO_OSR504 -DPOSIX $(KFLAGS)"
7586
7587#SCO OpenServer 5.0.4 with networking, gcc, elf.
7588sco32v504netgccelf:
7589	@echo TCP/IP networking added - using gcc, dynamic elf library
7590	$(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc"
7591	KTARGET=$${KTARGET:-$(@)} \
7592	"KFLAGS=-DSCO_OSR504 -DPOSIX -O3 -belf $(KFLAGS)" \
7593	LNKFLAGS="-belf"
7594
7595#SCO OpenServer 5.0.5 (SCO UNIX 3.2v5.0.5) with SCO /bin/cc.
7596#Like 5.0, but adds high serial speeds.  First POSIX-based SCO version.
7597#You might have to add "LIBS=-ltinfo" (some do, some don't).
7598sco32v505:
7599	$(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7600	"KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7601
7602#SCO OpenServer 5.0.5 (SCO UNIX 3.2v5.0.5) with SCO UDK.
7603#This one can't see the high serial speeds and anything to do with modem
7604#signals doesn't work because UKD cc has its own alternative universe of
7605#header files.
7606sco32v505udk:
7607	$(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7608	"KFLAGS=-DSCO_OSR505 -DDCLTIMEVAL -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7609
7610#SCO OpenServer 5.0.5 with networking, SCO /bin/cc.
7611#See comments with sco32v505 targets.
7612sco32v505net:
7613	@echo TCP/IP networking added...
7614	$(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7615	"KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7616
7617#SCO OpenServer 5.0.5 with networking and OpenSSL, SCO /bin/cc.
7618#See comments with sco32v505 targets.
7619sco32v505net+ssl:
7620	@echo TCP/IP networking and OpenSSL added...
7621	$(MAKE) "MAKE=$(MAKE)" sco32v500net+ssl KTARGET=$${KTARGET:-$(@)} \
7622	"KFLAGS=-DSCO_OSR505 -DNOSHADOW -b elf -DPOSIX $(KFLAGS) " \
7623	"LIBS=$(SSLLIB) -lcurses -lsocket -lssl -lcrypto $(LIBS)" \
7624	"LNKFLAGS=$(LNKFLAGS)"
7625
7626#SCO OpenServer 5.0.5 with networking, SCO UDK.
7627#See comments with above sco32v505 targets.
7628sco32v505udknet:
7629	@echo TCP/IP networking added...
7630	$(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7631	"KFLAGS=-DSCO_OSR505 -DDCLTIMEVAL -DNOSHADOW -b elf -DPOSIX $(KFLAGS)"
7632
7633#SCO OpenServer 5.0.5 with gcc, no networking.
7634sco32v505gcc:
7635	@echo Using gcc...
7636	$(MAKE) "MAKE=$(MAKE)" sco32v500 "CC=gcc" "CC2=gcc" \
7637	KTARGET=$${KTARGET:-$(@)} \
7638	"KFLAGS=-DSCO_OSR505 -DPOSIX -funsigned-char $(KFLAGS)"
7639
7640#SCO OpenServer 5.0.5 with gcc, no networking, no shadow passwords.
7641sco32v505xgcc:
7642	@echo Using gcc...
7643	$(MAKE) "MAKE=$(MAKE)" sco32v500 "CC=gcc" "CC2=gcc" \
7644	KTARGET=$${KTARGET:-$(@)} \
7645	"KFLAGS=-DSCO_OSR505 -DNOSHADOW -DPOSIX -funsigned-char $(KFLAGS)"
7646
7647#SCO OpenServer 5.0.5 with networking, gcc.
7648sco32v505netgcc:
7649	@echo TCP/IP networking added - using gcc...
7650	@echo If gcc crashes on ckwart.c then build it by hand:
7651	@echo " gcc -o wart -DCK_SCOV5 ckwart.c"
7652	$(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7653	KTARGET=$${KTARGET:-$(@)} \
7654	"KFLAGS=-DSCO_OSR505 -DNOSHADOW -DPOSIX -funsigned-char $(KFLAGS)"
7655
7656#egcs is just like gcc but generates ELF by default.
7657#Or you can include -melf (not -belf) to force it.
7658sco32v505netegcs:
7659	$(MAKE) "MAKE=$(MAKE)" "KFLAGS=$(KFLAGS)" sco32v505netgcc \
7660	KTARGET=$${KTARGET:-$(@)}
7661
7662#SCO OpenServer 5.0.5 with networking, gcc, elf.
7663sco32v505netgccelf:
7664	@echo TCP/IP networking added - using gcc, dynamic elf library
7665	$(MAKE) "MAKE=$(MAKE)" sco32v500net "CC=gcc" "CC2=gcc" \
7666	"KFLAGS=-DSCO_OSR505 -DPOSIX -funsigned-char -O3 -belf $(KFLAGS)" \
7667	KTARGET=$${KTARGET:-$(@)} LNKFLAGS="-belf"
7668
7669#SCO OpenServer 5.0.6 with SCO /bin/cc.
7670# Add -DDCLTIMEVAL when building with UDK.
7671#Like 5.0.5.   IMPORTANT: Use sco32v506a target for 5.0.6a.
7672sco32v506:
7673	$(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7674	"KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -b elf -DPOSIX $(KFLAGS)"
7675
7676#SCO OpenServer 5.0.6 with networking, SCO /bin/cc.
7677# Add -DDCLTIMEVAL when building with UDK.
7678# IMPORTANT: Use sco32v506a target for 5.0.6a.
7679sco32v506net:
7680	@echo TCP/IP networking added...
7681	$(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7682	"KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -b elf -DPOSIX $(KFLAGS)"
7683
7684#SCO OpenServer 5.0.6a, no networking, SCO development tools.
7685#This one has patched sio drivers that, for the first time,
7686#actually handle modem signals correctly.
7687# Add -DDCLTIMEVAL when building with UDK.
7688sco32v506a:
7689	$(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7690	"KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR506A -DNEEDMDMDEFS \
7691	-b elf -DPOSIX $(KFLAGS)"
7692
7693#SCO OpenServer 5.0.6a with networking, SCO development tools.
7694# Add -DDCLTIMEVAL when building with UDK.
7695sco32v506anet:
7696	@echo TCP/IP networking added...
7697	$(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7698	"KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR506A -DNEEDMDMDEFS \
7699	-b elf -DPOSIX $(KFLAGS)"
7700
7701#SCO OpenServer 5.0.7, no networking, SCO development tools.
7702#Adds flags to make PTY and SSH commands work.  These have been tested
7703#only in 5.0.7 but probably they can also be added to earlier OSR5 targets.
7704sco32v507:
7705	$(MAKE) "MAKE=$(MAKE)" sco32v500 KTARGET=$${KTARGET:-$(@)} \
7706	"KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7707	-DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT \
7708	-b elf -DPOSIX $(KFLAGS)"
7709
7710#SCO OpenServer 5.0.7 as above but with networking.
7711sco32v507net:
7712	@echo TCP/IP networking added...
7713	$(MAKE) "MAKE=$(MAKE)" sco32v500net KTARGET=$${KTARGET:-$(@)} \
7714	"KFLAGS=-DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7715	-DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT \
7716	-b elf -DPOSIX $(KFLAGS)"
7717
7718#SCO OpenServer 6 (new target 30 Jan 2006)
7719sco_osr600 sco600:
7720	@echo Making C-Kermit $(CKVER) for SCO OpenServer 6.0.0...
7721	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7722	"CFLAGS= -O -DDIRENT -DHDBUUCP -DSVR4 -DCK_SCOV5 -DCK_RTSCTS \
7723	-DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DSELECT -DSELECT_H \
7724	-DNOGETUSERSHELL -DNOLSTAT -DNOLINKBITS -DTCPSOCKET \
7725	-DNO_DNS_SRV -DSCO_OSR505 -DSCO_OSR506 -DSCO_OSR507 -DNEEDMDMDEFS \
7726	-DHAVE_PTSNAME -DHAVE_PTMX -DHAVE_GRANTPT -DDCLTIMEVAL \
7727	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
7728	-DSOCKOPT_T=socklen_t -DGSOCKNAME_T=size_t -DGPEERNAME_T=size_t \
7729	-DHERALD=\"\\\" SCO OpenServer `uname -v`\\\"\" \
7730	-b elf -DPOSIX $(KFLAGS)" \
7731	"LIBS=-lcurses -lsocket $(LIBS)" "LNKFLAGS=$(LNKFLAGS)"
7732
7733#Tandy 16/6000 with Xenix 3.0 (16 bits)
7734#C-Kermit 7.0 (and later) do not build here; "too many defines".
7735#Add more -DNOxxx options to remove features if program won't load.
7736#Successful operation is a function of program size, physical memory,
7737#available swap space, etc.  The following stripped-down configuration
7738#seems to work on most Tandy 6000s.  NOTE: "-+" means allow long variable
7739#names, needed for C-Kermit 6.0 because some identifiers are not unique
7740#within the first six characters.
7741trs16:
7742	@echo 'Making C-Kermit $(CKVER) for Tandy 16/6000, Xenix 3.0...'
7743	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7744	"CFLAGS = -+ -DATTSV -DTRS16 -DNOMKDIR -DDCLPOPEN -DCK_CURSES \
7745	-DNODEBUG -DNOTLOG -DNOHELP -DNOSCRIPT -DNOCSETS -DNOIKSD \
7746	-DNOREDIRECT -DNOSYSLOG -DNOPUTENV -DNOREALPATH -DNOLEARN \
7747	$(KFLAGS) -O" "LIBS= -lcurses -ltermcap" "LNKFLAGS = -+ -n -s"
7748
7749# QNX 4.21 and above, 32-bit version, Watcom C32 10.6, fully configured,
7750# except no job control because QNX 4.x does not support it.  New NCURSES
7751# library used instead of CURSES.
7752#
7753# -Oatx optimizes to favor speed over size: loop optimization, inline fn's.
7754# -Os favors size over speed.  Saves 30-40K out of about 1.75M.
7755# -3r = generate 386 code with register-based arg passing.
7756# -3s = generate 386 code with stack-based arg passing.
7757# -ms = separate code & data 4GB segments (32-bit builds only).
7758# -mf = flat memory model code+data in one 4GB segment (ditto).
7759# -zc = place literal strings in code segment.
7760# -N4M = Big stack (increase the digit upon SIGSEGVs at runtime).
7761# chars are unsigned by default (-j makes them signed by default).
7762# -NOUUCP is included because QNX doesn't use it.
7763# Add these to the end if you like but they dump core on my QNX 4.25 system:
7764#
7765#	@wermit -h >use.qnx
7766#	@usemsg wermit use.qnx
7767#	@rm use.qnx
7768#
7769# If you get warnings about HEADER or C_IN add -DNO_DNS_SRV.
7770# OK 2011/06/14
7771qnx32:
7772	@echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit...'
7773	$(MAKE) xermit \
7774	"LNKFLAGS = -N4M -3r" \
7775	"CFLAGS = -ms -3r -DQNX -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7776	-DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7777	-DNOINITGROUPS -DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7778	"LIBS= -lsocket -L/usr/local/lib -lncurses -ltermcap"
7779
7780# As above but no networking since some QNX systems do not have TCP/IP
7781# installed, or the TCP/IP developers kit, which includes all the needed
7782# header files.  This entry has not been tested on a QNX system that, in
7783# fact, does not have TCP/IP installed; some adjustments might be necessary,
7784# in particular regarding the use of select(): is -lsocket needed, can we
7785# get the needed definitions from non-TCP/IP header files (FD_SET, etc)?
7786qnx32nonet:
7787	@echo 'Making C-Kermit $(CKVER) for QNX 4.2x, 32-bit, no net...'
7788	$(MAKE) xermit \
7789	"LNKFLAGS = -N4M -3r" \
7790	"CFLAGS = -3r -ms -DQNX -DNONET -DNOIKSD -DCK_CURSES \
7791	-DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS -DNOJC \
7792	-DNOUUCP -DCK_ANSIC -DPID_T=pid_t -Oatx -zc $(KFLAGS)" \
7793	"LIBS= -lsocket -L/usr/local/lib -lncurses -ltermcap"
7794	@wermit -h >use.qnx
7795	@usemsg wermit use.qnx
7796	@rm use.qnx
7797
7798# Synonym for qnx32.
7799qnx:
7800	$(MAKE) qnx32 "KFLAGS=$(KFLAGS)"
7801
7802# QNX 4.21 and above, 16-bit version, Watcom C 8.5 - and higher on i286 PCs
7803# and above.
7804#
7805#	IMPORTANT: Do not use Watcom C 10.6!!!
7806#	If you have it installed, add "-v9.52 to CFLAGS"
7807#
7808# NOTE: QNX 4.23 onward does not work on 286's anyway.
7809# Stacksize 26000, objects larger than 100 bytes in their own segments,
7810# string constants to the codesegment, etc.  Fully configured except job ctrl.
7811# This entry works for building a 16-bit executable on a 32-bit system, but
7812# has not been tested on a 16-bit system.  Uses large memory model, links
7813# explicitly with large-model sockets library.  Correct-model curses library
7814# is chosen automatically.  See comment in qnx32 entry about -DNOUUCP.
7815#
7816# WARNING:
7817#
7818# Watcom C prior to 10.6 never had released curses library. To link against it,
7819# you must obtain ported free curses source from ftp://ftp.qnx.com/usr/free,
7820# then compile and build library (cursesl.lib) and place it in /usr/lib.  You
7821# must also copy curses.h to /usr/include.  Be aware that if you have Watcom
7822# 10.6 installed, you should already have curses.h, which is the new ncurses
7823# library. You must back it up and use free curses.h instead, since ncurses is
7824# only for 32-bit applications and some definitions in these files are
7825# different (e.g., clearok()).  For safety, curses is not defined in build.
7826#
7827# In 7.0 -DNOHELP added to keep ckuus2.c from blowing up; NOCSETS and NOSPL
7828# added because ckuus4 was blowing up, and NOFLOAT just because it seemed
7829# dangerous (remove -DNOFLOAT if you want to try it), The result works OK
7830# except for some mysterious beeps upon termination of the top-level keyword.
7831#
7832# Things to try next time we get in trouble:
7833#  . Change -zt100 to something smaller like -zt25
7834#  . Change -Oatx to -Omilerat (enable stack checking)
7835#  . Maybe get rid of -v9.52 -- it's only there because we were warned.
7836#
7837qnx16:
7838	@echo 'Making C-Kermit $(CKVER) for QNX 4.21, 16-bit...'
7839	$(MAKE) xermit \
7840	"LNKFLAGS = -2 -ml -N 26000" \
7841	"CFLAGS = -2 -Oatx -zc -zt100 -ml -DQNX -DQNX16 -DNOUUCP -DNOHELP \
7842	-DCK_REDIR -DSELECT -DSELECT_H -DNOJC -DNOGETUSERSHELL -DNOCSETS \
7843	-v9.52 -DTCPSOCKET -DCK_RTSCTS -DCK_ANSIC -DNOINITGROUPS -DNOKVERBS \
7844	-DNORANDOM -DNOCSETS -DNOSPL -DNOFLOAT -DPID_T=pid_t $(KFLAGS)"
7845
7846# QNX 4.1, 16-bit version, with Watcom C 8.5 on i286 PCs and above.
7847# stacksize 26000, objects larger than 100 bytes in their own segments,
7848# string constants to the codesegment, etc.  Add -DNOUUCP if desired.
7849qnx16_41:
7850	@echo 'Making C-Kermit $(CKVER) for QNX 4.1, 16-bit...'
7851	$(MAKE) xermit \
7852	"LNKFLAGS = -mh -N 26000" "CFLAGS = -Wc,-fpc -Wc,-j -DNOGETUSERSHELL \
7853	-Wc,-Ols -Wc,-zdf -Wc,-zc -Wc,-zt100 -mh -DPOSIX -DQNX -DDIRENT \
7854	-DNOCYRIL -DNODEBUG -DNOMSEND -DMINIDIAL -DNOXMIT -DNOSCRIPT -DNOSPL \
7855	-DNOSETKEY -DNOINITGROUPS -DQNX16 -DPID_T=pid_t $(KFLAGS)"
7856
7857# QNX Neutrino 2 (pwaechtler@qnx.de) crosscompiled on QNX 4.25.
7858# Gets lots of compiler warnings.
7859qnx_nto2+:
7860	@echo 'Making C-Kermit $(CKVER) for QNX Neutrino 2+ '
7861	cc -o wart ckwart.c
7862	$(MAKE) xermit \
7863	"CC = qcc -Vgcc_ntox86" \
7864	"CC2 = qcc -Vgcc_ntox86" \
7865	"LNKFLAGS = " \
7866	"CFLAGS = -DNEUTRINO -DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL \
7867	-DNOUUCP -DCK_WREFRESH -DCK_REDIR -DSELECT -DSELECT_H -DCK_RTSCTS \
7868	-DNOJC -DNOINITGROUPS -DCK_ANSIC -DPID_T=pid_t -DUNIX -DDIRENT \
7869	-DMYREAD -DBSD44ORPOSIX -DSVORPOSIX -DNDGPWNAM $(KFLAGS)" \
7870	"LIBS= -lsocket -L/usr/local/lib -lncurses "
7871
7872# QNX 6 (= Neutrino 2.xx) native build (kirussel@cisco.com).
7873qnx6:
7874	@echo 'Making C-Kermit $(CKVER) for QNX6'
7875	$(MAKE) xermit KTARGET=QNX6 \
7876	"CFLAGS = -DPOSIX -DCK_POSIX_SIG -DNETPTY -DNOARROWKEYS \
7877	-DUSE_TIOCSDTR -DBIGBUFOK -DCKMAXOPEN=100 -DRLOGCODE -DNOREALPATH \
7878	-DMAXNAMLEN=48 -DQNX6 -DUSE_TERMIO -DINIT_SPTY \
7879	-DCK_CURSES -DCK_WREFRESH -DCK_NEWTERM -DDYNAMIC \
7880	-DTCPSOCKET -DNOGETUSERSHELL -DCK_REDIR -DSELECT -DSELECT_H \
7881	-DCK_RTSCTS -DNOJC -DSVORPOSIX -DBSD44ORPOSIX -DNOUUCP -DCK_ANSIC \
7882	$(KFLAGS) -O" \
7883	"LIBS= -lsocket  -L/usr/local/lib -lncurses"
7884
7885#MINIX/2.0 32 Bit version for intel 386+ running the POSIX-compliant MINIX
7886# version 2.0 (The definition of fatal avoids a conflict with a symbol by
7887# the same name in the curses library.) It is impossible to compile with
7888# network support since Minix does not support Berkeley sockets.
7889# Note: use chmem liberally on the compiler passes, make, and the final
7890# kermit executable. (3 megabytes of memory for each is sufficient.)
7891# From Terry McConnell, Syracuse U, and Will Rose.  Will says:
7892# The stacks for make and some compiler passes needed to be increased
7893# with chmem as follows:
7894#   make 1MB
7895#   /usr/lib/em_cemcom.ansi 3MB
7896#   /usr/lib/em_opt 1MB
7897#   /usr/lib/i386/cg 1MB
7898#   /usr/lib/i386/as 1MB
7899# The compiler temporary directory was set to /usr/tmp via the TMPDIR
7900# environment variable; more than 1MB of temporary space was needed.
7901# Kermit itself needs at least 1MB of stack.
7902minix20:
7903	@echo 'Making C-Kermit $(CKVER) for MINIX 2.0/386...'
7904	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} EXT=o \
7905	"CFLAGS=  -wo -DV7 -DMINIX2 -DMINIX -DSIG_V -D_POSIX_SOURCE \
7906	-DCKCPU=\\\"i-386\\\" -DNOIKSD -Dfatal=myfatal -DCK_CURSES -DNOLEARN \
7907	-DNOSYSLOG -DUSE_MEMCPY -DNOREALPATH $(KFLAGS)" "LIBS= -lcurses"
7908
7909#MINIX/386 (PC Minix modified by Bruce Evans in Australia for 386 addressing)
7910# For MINIX 1.5+ (but < 2.0)
7911minix386:
7912	@echo 'Making C-Kermit $(CKVER) for MINIX/386...'
7913	@echo 'TOTALLY UNTESTED!'
7914	$(MAKE) wermit EXT=s KTARGET=$${KTARGET:-$(@)} \
7915	"CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7916
7917#MINIX/386 Minix modified by Bruce Evans in Australia to use 386 addressing
7918minix386gcc:
7919	@echo 'Making C-Kermit $(CKVER) for MINIX/386 with gcc...'
7920	@echo 'TOTALLY UNTESTED!'
7921	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} "CC=gcc -g -O" "CC2=gcc -g" \
7922	"CFLAGS= -DV7 -DMINIX -D_POSIX_SOURCE -DNOLEARN $(KFLAGS)"
7923
7924#MINIX - 68k version with ACK compiler.
7925# If you have trouble compiling or running wart, "touch wart".
7926# If it still doesn't work, "touch ckcpro.c".
7927# The version configured below has many features removed, including
7928# the TRANSMIT, MSEND, HELP, and SCRIPT commands, international
7929# character set support, and the entire script programming language.
7930# But it does have an interactive command parser.
7931# Make sure make(1) has (at least) 100000 chmemory!
7932# If you are using the Amsterdam C compiler, you might have to add "-D__ACK__".
7933minix68k:
7934	@echo 'Making C-Kermit $(CKVER) for MINIX 68k with ACK...'
7935	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7936	"CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7937	-DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7938	-DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7939	-DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7940
7941#MINIX - 68k version with c68 compiler.
7942# If you have trouble compiling or running wart, "touch wart" or
7943# "touch ckcpro.c". Compiling ckudia.c (no -DNODIAL!) might fail. :-(
7944# Give c68 250000 bytes of stack+heap; make sure make(1) has at least
7945# 100000 chmemory.  On a 1MB Atari ST this means that the recursive
7946# call of make fails due to memory shortage.  Try "make -n minixc68 >makeit",
7947# followed by ". makeit".  Otherwise, as above.
7948minixc68:
7949	@echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7950	$(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7951	"CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE -DNOLEARN \
7952	-DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
7953	-DNOSCRIPT -DNOCSETS -DNOSPL $(KFLAGS) \
7954	-DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7955
7956#MINIX - 68k version with c68 compiler.
7957#A variation on the above that was recently (Sep 95) reported to work.
7958minixc68a:
7959	@echo 'Making C-Kermit $(CKVER) for MINIX 68k with c68...'
7960	$(MAKE) wermit "CC= cc -c68" KTARGET=$${KTARGET:-$(@)} \
7961	"CFLAGS= -DV7 -DMINIX -D_MINIX -D_POSIX_SOURCE \
7962	-DCK_ANSIC -DNODEBUG -DNOTLOG -DMINIDIAL -DEXTEN -DMYCURSES \
7963	-DNOSCRIPT -DNOCSETS -DNOSPL -DNOJC -DDIRENT -DNOLEARN \
7964	-DNOSETKEY -DNOESCSEQ $(KFLAGS) \
7965	-DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V"
7966
7967#MIPS Computer Systems with UMIPS RISC/OS 4.52 = AT&T UNIX System V R3.0.
7968#Remove -DNOJC if job control can be safely used.
7969mips:
7970	@echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7971	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7972	"CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC -DNOLEARN -DPID_T=int \
7973	-DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)"
7974
7975#As above, but with TCP/IP and fullscreen support.
7976mipstcpc:
7977	@echo 'Making C-Kermit $(CKVER) for MIPS RISC/OS...'
7978	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
7979	"CFLAGS = -DMIPS -DDIRENT -DCK_POLL -DNOJC \
7980	-DTCPSOCKET -DCK_CURSES -I/usr/include/bsd \
7981	-DPID_T=int -DGID_T=gid_t -DUID_T=uid_t -i -O1500 $(KFLAGS)" \
7982	"LIBS = -lcurses -lbsd"
7983
7984#Motorola Delta System V/68 R3, signal() is void rather than int.
7985#Uses dirent.h and Honey DanBer uucp.  Supports TCP/IP.
7986#After building, use "mcs -d" to reduce size of the executable program.
7987sv68r3:
7988	@echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3...'
7989	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7990	"CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DTCPSOCKET \
7991	-DNOUNICODE -DNOLEARN -DUSE_MEMCPY $(KFLAGS) -O" "LNKFLAGS ="
7992
7993#Motorola Delta System V/68 R3V5, signal() is void rather than int.
7994#Uses dirent.h and Honey DanBer UUCP.  Supports TCP/IP.
7995#After building, use "mcs -d" to reduce size of the executable program.
7996sv68r3v5:
7997	@echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5'
7998	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
7999	"CFLAGS = -DSVR3 -DSV68 -DDIRENT -DHDBUUCP -DNO_DNS_SRV -DUSE_MEMCPY \
8000	-DTCPSOCKET -DINADDRX -DNOUNICODE -DFNFLOAT -DNOLEARN $(KFLAGS) -O" \
8001	"LNKFLAGS =" "LIBS = -linet -lm"
8002
8003#Motorola MVME147 System V/68 R3 V5.1. Requires gcc 2.1 to compile.
8004#After building, use "mcs -d" to reduce size of the executable program.
8005sv68r3v51:
8006	@echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V5.1'
8007	$(MAKE) wermit "CC=gcc-delta" "CC2=gcc-delta" \
8008	KTARGET=$${KTARGET:-$(@)} \
8009	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNODEBUG -DNO_DNS_SRV -DNOLEARN \
8010	-DNOUNICODE -DFNFLOAT -DSV68 -DUSE_MEMCPY $(KFLAGS) \
8011	-O2 -v -ftraditional" \
8012	"LNKFLAGS = -s -v" "LIBS = -lm881 -lm"
8013
8014#Motorola MVME147 System V/68 R3V6. derived from Motorola Delta System R3V5.
8015#Checked on larger Motorola System V/68 R3V6 (with NSE Network Services Ext.)
8016#After building, use "strip" to reduce size of the executable program.
8017# "LIBS = -lnsl" removed in C-Kermit 6.1 - put back if needed.
8018# "LIBS = lm" added in 7.1/8.0 for floating-point math.
8019# ckuusr.c clobbers the optimizer.
8020sv68r3v6:
8021	@echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/68 R3V6'
8022	$(MAKE) ckuusr.$(EXT) KTARGET=$${KTARGET:-$(@)} \
8023	"CFLAGS = -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
8024	-DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
8025	-DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)"
8026	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
8027	"CFLAGS = -O -DSV68R3V6 -DDIRENT -DHDBUUCP -DNOLOGIN -DNOINITGROUPS \
8028	-DNOSYMLINK -DNOREDIRECT -DNOGFTIMER -DTCPSOCKET -DDCLGETCWD -DSV68 \
8029	-DNO_DNS_SRV -DNOUNICODE -DFNFLOAT -DSELECT -DUSE_MEMCPY $(KFLAGS)" \
8030	"LNKFLAGS =" "LIBS = -lm"
8031
8032#Motorola Delta System V/88 R32, signal() is void rather than int.
8033#Uses dirent.h and Honey DanBer uucp.  Needs <sys/utime.h> for setting
8034#file dates.  Supports TCP/IP.
8035#After building, use "mcs -d" to reduce size of the executable program.
8036sv88r32:
8037	@echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R32...'
8038	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
8039	"CFLAGS = -DSV88R32 -DDIRENT -DHDBUUCP -DTCPSOCKET \
8040	-DSYSUTIMEH -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG $(KFLAGS) -O" \
8041	"LIBS= -lcurses -lresolv" "LNKFLAGS = -s"
8042
8043#Motorola Delta System V/88 R40.  Has <sys/termiox.h>, regular Berkeley
8044#sockets library, i.e. in.h and inet.h are not misplaced in sys (rather than
8045#netinet and arpa, respectively).  Uses ANSI C constructs, advisory file
8046#locking on devices, etc.  curses support added.  Reportedly, the
8047#/usr/include/sys/vnode.h file has a bug which must be fixed before this
8048#makefile entry can work correctly.  The "if DEBUG" directive at about line
8049#320 must be changed to "ifdef DEBUG" (Reportedly, this was fixed in
8050#in System V/88 R4.3).
8051#After building, use "mcs -d" to reduce size of the executable program.
8052sv88r40:
8053	@echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R40...'
8054	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
8055	"CFLAGS = -O -DSVR4 -DMOTSV88R4 -DDIRENT -DHDBUUCP -DSTERMIOX \
8056	-DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG -DFNFLOAT \
8057	$(KFLAGS)" \
8058	"LIBS= -lsocket -lnsl -lcurses -lresolv -lm" "LNKFLAGS = -s"
8059
8060#As above but without the floating-point math library.
8061sv88r40nm:
8062	@echo 'Making C-Kermit $(CKVER) for Motorola UNIX System V/88 R40...'
8063	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
8064	"CFLAGS = -O -DSVR4 -DMOTSV88R4 -DDIRENT -DHDBUUCP -DSTERMIOX \
8065	-DTCPSOCKET -DCK_CURSES -DNOGETUSERSHELL -DGTODONEARG $(KFLAGS)" \
8066	"LIBS= -lsocket -lnsl -lcurses -lresolv" "LNKFLAGS = -s"
8067
8068#As above but with floating-point math library support \ffp...() functions
8069#and S-Expressions.
8070
8071#Olivetti X/OS R2.3, 3.x.
8072#NOTES:
8073# . If you build the executable on 2.x X/OS, it will also run on 3.x.
8074# . If you build it on 3.x X/OS, it will NOT run on 2.x.
8075# . Kermit can run with no privileges unless the uucp lines are protected,
8076#   in which case kermit must be owned by uucp with suid bit set:
8077#   chown uucp kermit ; chmod 4111 kermit.
8078xos23:
8079	@echo 'Making C-Kermit $(CKVER) for Olivetti X/OS...'
8080	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
8081	'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP $(KFLAGS)' \
8082	"LIBS=" "LNKFLAGS="
8083
8084#As above, but with curses.
8085xos23c:
8086	@echo 'Making C-Kermit $(CKVER) for Olivetti X/OS with curses...'
8087	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
8088	'CFLAGS=-OLM -DOXOS -DTCPSOCKET -DHDBUUCP -DCK_CURSES $(KFLAGS)' \
8089	"LIBS=-lcurses" "LNKFLAGS="
8090
8091ckuuid:
8092	@echo 'building C-Kermit $(CKVER) set-UID/set-GID test programs'
8093	$(CC) -DANYBSD -DSAVEDUID -o ckuuid1 ckuuid.c
8094	$(CC) -DANYBSD -o ckuuid2 ckuuid.c
8095	$(CC) -DANYBSD -DNOSETREU -o ckuuid3 ckuuid.c
8096	$(CC) -DANYBSD -DSETEUID -DNOSETREU -o ckuuid4 ckuuid.c
8097	$(CC) -o ckuuid5 ckuuid.c
8098	@echo 'Read the top of ckuuid.c for directions...for testing'
8099	@echo 'you must make these programs setuid and setgid'
8100
8101############################################################################
8102# A N T I Q U I T I E S
8103#
8104# The following are antique targets from C-Kermit 5A or earlier.  They have
8105# not been updated or tested in years.  Most of them will need recent features
8106# disabled, usually with some combination of -DNOUNICODE, -DNOIKSD, -DNOANSI,
8107# -DNOCKGHNLHOST, -DNO_DNS_SRV, -DNOREDIRECT, -DNOREALPATH, -DNOCURSES, etc.
8108# They are also missing the KTARGET=$${KTARGET:-$(@)} business.
8109# For details see ckuins.txt and ckccfg.txt.
8110#
8111############################################################################
8112
8113#Berkeley Unix 2.8, 2.9 for PDP-11s with I&D space, maybe also Ultrix-11???
8114#C-Kermit(5A) is simply too large (even turning off almost every feature
8115#available) to run without both I&D space plus overlays.  The old comment
8116#suggested running 'pcc' but that won't help.  Changing 'cc' to 'ckustr.sed'
8117#will cause a string extraction to be done, saving D space by moving strings
8118#to a file.
8119bsd29:
8120	@echo Making C-Kermit $(CKVER) for 2.8 or 2.9BSD.
8121	@echo Read the makefile if you have trouble with this...
8122	$(MAKE) ovwermit \
8123	"CFLAGS= -DBSD29 -DNODEBUG -DNOTLOG -DNOCSETS -DNOHELP \
8124	-DNOSCRIPT -DNOSPL -DNOXMIT -DNODIAL $(KFLAGS)" \
8125	"LNKFLAGS= -i -lndir" "CC= cc " "CC2= cc"
8126
8127bsd210:
8128	@echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.10BSD.
8129
8130bsd211:
8131	@echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.11BSD.
8132
8133#Charles River Data Systems Universe with UNOS Version 9.2
8134crds:
8135	@echo 'Making C-Kermit $(CKVER) for Charles River Data Systems...'
8136	make xermit \
8137	"CFLAGS = -DATTSV -DNOANSI -DDIRENT -DLONGFN -DTCPSOCKET \
8138	-DLOCK_DIR=\\\"/usr/spool/uucp\\\" -DNOSETREU \
8139	-Dsuspend=ksuspend $(KFLAGS) -O" "LNKFLAGS ="
8140
8141#Microport SV/AT for IBM PC/AT 286 and clones, System V R2.
8142#The -O flag may fail on some modules (like ckuus2.c), in which case you
8143#should compile them by hand, omitting the -O.  If you get "hash table
8144#overflow", try adding -DNODEBUG.
8145#Also, reportedly this compiles better with gcc than with cc.
8146mpsysv:
8147	@echo 'Making C-Kermit $(CKVER) for Microport SV/AT 286...'
8148	$(MAKE) wermit \
8149	"CFLAGS= -DATTSV -DNOLEARN $(KFLAGS) -O -Ml" "LNKFLAGS = -Ml"
8150
8151#Microsoft "Xenix/286" e.g. for IBM PC/AT
8152xenix:
8153	@echo 'Making C-Kermit $(CKVER) for Xenix/286'
8154	$(MAKE) wermit \
8155	"CFLAGS= -DXENIX -DNOFILEH -DNOLEARN $(KFLAGS) -Dunix -F 3000 -i" \
8156	"LNKFLAGS = -F 3000 -i"
8157
8158#PC/IX, Interactive Corp System III for IBM PC/XT
8159pcix:
8160	@echo 'Making C-Kermit $(CKVER) for PC/IX...'
8161	$(MAKE) wermit \
8162	"CFLAGS= -DPCIX -DISIII -DNOLEARN $(KFLAGS) \
8163	-Dsdata=sdatax -O -i" "LNKFLAGS = -i"
8164
8165#Integrated Solutions Inc V8S VME 68020
8166isi:
8167	@echo Making C-Kermit $(CKVER) for 4.2BSD on ISI...
8168	$(MAKE) wermit "CC = cc" \
8169	"CFLAGS= -DBSD4 -DTCPSOCKET -DINADDRX -DDCLPOPEN -DDEBUG -DNOSETREU \
8170	-DCK_CURSES -DNOLEARN $(KFLAGS)" "LIBS = -lcurses -ltermcap"
8171
8172#Interactive Corp version of AT&T System III
8173#is3: (very old, probably not sufficient for 5A or later)
8174#	@echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8175#	make wermit "CFLAGS = -DISIII -Ddata=datax -O -i" "LNKFLAGS = -i"
8176#The following should work, use it if you don't have gcc.
8177#Use is3gcc if you have gcc.
8178is3:
8179	@echo 'Making C-Kermit $(CKVER) for Interactive System III...'
8180	$(MAKE) wermit \
8181	"CFLAGS= -DISIII $(KFLAGS) -Ddata=datax -DNAP -DHDBUUCP
8182	-DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O -i" "LNKFLAGS = -i"
8183
8184#Interactive UNIX System V R3, no network support.  Uses <dirent.h> and Honey
8185#DanBer UUCP.  If this entry does not compile correctly, try any or all of the
8186#following.  These suggestions also apply more or less to the other is5r3xxx
8187#entries that follow this one.
8188# . Remove the UID_T and GID_T definitions, or change them as required.
8189# . Change -DDIRENT to -DSDIRENT.
8190# . Add -DSIGTYP=void.
8191# . Remove -g from LNKFLAGS.
8192# . Add -DNOANSI to remove compiler complaints about ANSI C constructions
8193# . Add other -DNOxxx's to save space (e.g. -DNOCSETS)
8194# See the next few makefile entries for related examples.
8195# Also see sys5r32is for making a portable i386 SVR3 binary.
8196is5r3:
8197	@echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8198	@echo 'If this does not work please read the makefile entry.'
8199	$(MAKE) wermit \
8200	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8201	-DUID_T=ushort -DGID_T=ushort -DI386IX $(KFLAGS)" \
8202	"LNKFLAGS = -g"
8203
8204#Interactive Corp System System V R3 with gcc
8205is3gcc:
8206	@echo 'Making C-Kermit $(CKVER) for Interactive System V R3 / gcc...'
8207	$(MAKE) wermit CC=gcc CC2=gcc \
8208	'CFLAGS = -D_SYSV3 -DISIII -Ddata=datax -DNAP -DHDBUUCP -DNOREALPATH \
8209	-DLOCK_DIR=\"/usr/spool/uucp\" -DSIGTYP=void -O' "LNKFLAGS ="
8210
8211#Interactive UNIX System V R3, POSIX variant.  Untested.
8212#Uses dirent.h and Honey DanBer uucp.  Read comments in is5r3 entry.
8213is5r3p:
8214	@echo 'Making C-Kermit $(CKVER) for Interactive 386/ix or later...'
8215	$(MAKE) wermit \
8216	"CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP -g -DNOCSETS -DNOREALPATH \
8217	-DI386IX -DPOSIX $(KFLAGS)" "LNKFLAGS=" "LIBS=-lcposix"
8218
8219#Interactive UNIX SVR3 2.2.1, job control, curses, no net, gcc.
8220is5r3gcc:
8221	$(MAKE) wermit CC=gcc CC2=gcc \
8222	"CFLAGS=-g -posix -DSVR3 -DDIRENT -DNOREALPATH \
8223	-DHDBUUCP -O -DNOCSETS -DI386IX -DSVR3JC -DCK_CURSES \
8224	$(KFLAGS)" LNKFLAGS="-posix" LIBS="-lcurses -lc_s"
8225
8226#Interactive UNIX System V R3 with TCP/IP network support.
8227#Needs -linet for net functions.  signal() is void rather than int.
8228#Uses dirent.h and Honey DanBer uucp. Read comments in is5r3 entry.
8229#Also see is5r3net2 if you have trouble with this entry.
8230is5r3net:
8231	@echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8232	@echo 'If this does not work please read the makefile entry.'
8233	$(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8234	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOREALPATH \
8235	-DI386IX $(KFLAGS) -O" "LIBS = -linet"
8236
8237is5r3netgcc:
8238	$(MAKE) is5r3net CC=gcc CC2=gcc
8239
8240#Interactive UNIX System V R3, no job control, signal() void rather than int.
8241#Uses dirent.h and Honey DanBer uucp.  Needs -linet for net functions.
8242#Read comments in is5r3 entry.  Use this entry if is5r3net fails.
8243#Saves some space by stripping (-s) and using shared library (-lc_s).
8244is5r3net2:
8245	@echo 'Making C-Kermit $(CKVER) for Interactive 386/ix...'
8246	$(MAKE) wermit \
8247	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DTCPSOCKET -DNOJC -DNOREALPATH \
8248	-DSIGTYP=void -DNOANSI -DI386IX $(KFLAGS) -O" \
8249	"LNKFLAGS= -s" "LIBS = -linet -lc_s"
8250
8251#Interactive UNIX System V R3 (version 2.2 or later) with job control & curses.
8252#Uses dirent.h and Honey DanBer UUCP.
8253is5r3jc:
8254	@echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8255	$(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8256	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8257	-DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8258	-DPOSIX_JC -DCK_REDIR -DCK_POLL -DDCLGETCWD \
8259	$(KFLAGS)" "LIBS=-lcurses -lc_s -linet"
8260
8261is5r3jcgcc:
8262	$(MAKE) is5r3jc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8263	KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8264
8265#Sunsoft/Interactive UNIX System V R3 (version 2.2 or later)
8266#with job control, curses, and TCP/IP networking.
8267#Uses dirent.h and Honey DanBer UUCP.
8268is5r3netjc:
8269	@echo 'Making C-Kermit $(CKVER) for Interactive Unix 2.2 or later...'
8270	$(MAKE) wermit CC="$(CC)" CC2="$(CC2)" \
8271	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -O -DNOCSETS -DNOREALPATH \
8272	-DUID_T=ushort -DGID_T=ushort -DI386IX -DSVR3JC -DCK_CURSES \
8273	-DPOSIX_JC -DCK_REDIR -DTCPSOCKET -DSELECT \
8274	$(KFLAGS)" "LIBS=-linet -lcurses -lc_s"
8275
8276is5r3netjcgcc:
8277	$(MAKE) is5r3netjc CC="gcc -DCK_ANSILIBS -DDCGPWNAM -O4" CC2=gcc \
8278	KFLAGS="$(KFLAGS)" LNKFLAGS="$(LNKFLAGS)"
8279
8280#Masscomp System III
8281rtu:
8282	@echo 'Making C-Kermit $(CKVER) for Masscomp RTU System III...'
8283	$(MAKE) wermit \
8284	"CFLAGS= -UFIONREAD -DATTSV $(KFLAGS) -O" "LNKFLAGS =" "LIBS= -ljobs"
8285
8286#Masscomp/Concurrent RTU 4.0 or later, Berkeley environment.
8287#Includes <ndir.h> = /usr/include/ndir.h
8288#Note "LIBS = -lndir" might not be necessary because of "ucb make".
8289rtubsd:
8290	@echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8291	ucb make wermit \
8292	"CFLAGS= -DBSD4 -DRTU -DNDIR -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
8293	"LIBS = -lndir"
8294
8295#Masscomp/Concurrent RTU 4.0 or later, same as above,
8296#Includes "usr/lib/ndir.h"
8297#Note "LIBS = -lndir" might not be necessary because of "ucb make".
8298rtubsd2:
8299	@echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.1A...'
8300	ucb make wermit \
8301	"CFLAGS= -DBSD4 -DRTU -DXNDIR -DHDBUUCP $(KFLAGS)" \
8302	"LIBS = -lndir"
8303
8304#Masscomp/Concurrent RTU 4.0 or later, same as above,
8305#Includes <sys/ndir.h>
8306#Note "LIBS = -lndir" might not be necessary because of "ucb make".
8307rtubsd3:
8308	@echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x BSD...'
8309	ucb make wermit "CFLAGS= -DBSD4 -DRTU -DHDBUUCP $(KFLAGS)" \
8310	"LIBS = -lndir"
8311
8312#Masscomp/Concurrent RTU 4.0 or later, System V R2, using <dirent.h>.
8313#In case of problems, add back the -DRTU switch.
8314#In case -DTCPSOCKET gives trouble, remove it.
8315rtus5:
8316	@echo 'Making C-Kermit $(CKVER) for Masscomp RTU 4.x...'
8317	$(MAKE) wermit \
8318	"CFLAGS= -DATTSV -DHDBUUCP -DDIRENT -DTCPSOCKET $(KFLAGS)"
8319
8320#Masscomp/Concurrent RTU 4.x, System V R3, using <dirent.h>.
8321#Use this one if rtus5 gives warnings about pointer type mismatches.
8322#In case of problems, add back the -DRTU switch.
8323rtus5r3:
8324	@echo 'Making C-Kermit $(CKVER) for Masscomp RTU Sys V R3...'
8325	$(MAKE) wermit "CFLAGS= -DSVR3 -DHDBUUCP -DDIRENT $(KFLAGS)"
8326
8327#DEC Pro-3xx with Pro/Venix V1.0 or V1.1
8328# Requires code-mapping on non-I&D-space 11/23 processor, plus some
8329# fiddling to get interrupt targets into resident code section.
8330# This almost certainly doesn't work any more.
8331provx1:
8332	@echo 'Making C-Kermit $(CKVER) for DEC Pro-3xx, Pro/Venix 1.x...'
8333	$(MAKE) wart "CFLAGS= -DPROVX1 $(KFLAGS)" "LNKFLAGS= "
8334	$(MAKE) wermit "CFLAGS = -DPROVX1 -DNOFILEH -md780" \
8335		"LNKFLAGS= -u _sleep -lc -md780"
8336
8337#Nixdorf Targon/31.
8338#AT&T UNIX System V R3, signal() is void rather than int.
8339#Uses dirent.h without Honey DanBer uucp.
8340t31tos40x:
8341	@echo 'Making C-Kermit $(CKVER) for Targon/31 with TOS 4.0.xx...'
8342		$(MAKE) wermit \
8343		"CFLAGS= -DSVR3 -DDIRENT $(KFLAGS) -O" \
8344		"LNKFLAGS="
8345
8346#NCR Tower 1632, OS 1.02
8347tower1:
8348	@echo 'Making C-Kermit $(CKVER) for NCR Tower 1632, OS 1.02...'
8349	$(MAKE) wermit "CFLAGS= -DTOWER1 $(KFLAGS)"
8350
8351#NCR Tower 32, OS Release 1.xx.xx
8352tower32-1:
8353	@echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 1 System V R2...'
8354	@echo 'Add KFLAGS=-DISDIRBUG if you get errors about S_ISREG/S_ISDIR.'
8355	$(MAKE) wermit \
8356	"CFLAGS = -DATTSV $(KFLAGS) -O" "LNKFLAGS = -n"
8357
8358#NCR Tower 32, OS Release 2.xx.xx
8359tower32-2:
8360	@echo 'Making C-Kermit $(CKVER) for NCR Tower 32 Rel 2 System V R2...'
8361	$(MAKE) wermit \
8362	"CFLAGS = -DATTSV -DHDBUUCP $(KFLAGS) -O2" \
8363	"LNKFLAGS = -n"
8364
8365#NCR Tower 32, OS Releases based on System V R3
8366#Don't add -DNAP (doesn't work right) or -DRDCHK (not available in libc).
8367tower32:
8368	@echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3...'
8369	$(MAKE) wermit \
8370	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8371	-DUID_T=ushort -DGID_T=ushort -O1"
8372
8373#NCR Tower 32, OS Releases based on System V R3
8374tower32g:
8375	@echo 'Making C-Kermit $(CKVER) for NCR Tower 32 System V R3, gcc...'
8376	$(MAKE) wermit "CC = gcc" \
8377	"CFLAGS = -DSVR3 -DDIRENT -DHDBUUCP -DNOSYSIOCTLH $(KFLAGS) \
8378	DUID_T=ushort -DGID_T=ushort -O -fstrength-reduce -fomit-frame-pointer"
8379
8380#Fortune 32:16, For:Pro 1.8 (mostly like 4.1bsd)
8381ft18:
8382	@echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 1.8...'
8383	$(MAKE) wermit \
8384	"CFLAGS= -DNODEBUG -DBSD4 -DFT18 -DNOFILEH $(KFLAGS) \
8385	-DPID_T=short"
8386
8387#Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd).
8388#The modules that break the optimizer are compiled separately.
8389ft21:
8390	@echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'
8391	$(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8392	-SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8393	"LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8394	$(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8395	-SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8396	"LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8397	$(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
8398	-SYM 800  -DCK_CURSES $(KFLAGS) -DPID_T=short" \
8399	"LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8400	$(MAKE) wermit \
8401	"CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \
8402	-DCK_CURSES $(KFLAGS) -DPID_T=short" \
8403	"LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
8404
8405#Valid Scaldstar
8406#Berkeleyish, but need to change some variable names.
8407valid:
8408	@echo 'Making C-Kermit $(CKVER) for Valid Scaldstar...'
8409	$(MAKE) wermit \
8410	"CFLAGS= -DBSD4 -DNODEBUG -DNOTLOG -Dcc=ccx -DFREAD=1 $(KFLAGS)"
8411
8412#IBM IX/370 on IBM 370 Series mainframes
8413#Mostly like sys3, but should buffer packets.
8414ix370:
8415	@echo 'Making C-Kermit $(CKVER) for IBM IX/370...'
8416	$(MAKE) wermit "CFLAGS = -DIX370 -DATTSV $(KFLAGS) -i -O" \
8417	"LNKFLAGS = -i"
8418
8419#Amdahl UTS 2.4 on IBM 370 series compatible mainframes.
8420#Mostly like V7, but can't do initrawq() buffer peeking.
8421uts24:
8422	@echo 'Making C-Kermit $(CKVER) for Amdahl UTS 2.4...'
8423	$(MAKE) wermit "CFLAGS=-DV7 -DPROCNAME=\\\"$(PROC)\\\" \
8424	-DUTS24 -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
8425	-DNPTYPE=$(NPTYPE) $(DIRECT) $(KFLAGS)"
8426
8427#Amdahl UTSV UNIX System V = System V R2 or earlier.
8428utsv:
8429	@echo 'Making C-Kermit $(CKVER) for Amdahl UTSV...'
8430	$(MAKE) wermit \
8431	"CFLAGS = -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i"
8432
8433#Amdahl UTSV UNIX System V = System V R2 or earlier, with TCP sockets library.
8434utsvtcp:
8435	@echo 'Making C-Kermit $(CKVER) for Amdahl UTSV w/tcp...'
8436	$(MAKE) wermit "CFLAGS = \
8437	-DTCPSOCKET -DUTSV $(KFLAGS) -i -O" "LNKFLAGS = -i" \
8438	"LIBS = -lsocket"
8439
8440#BBN C/70 with IOS 2.0
8441#Mostly Berkeley-like, but with some ATTisms
8442c70:
8443	@echo 'Making C-Kermit $(CKVER) for BBN C/70 IOS 2.0...'
8444	$(MAKE) wermit "CFLAGS= -DBSD4 -DC70 $(KFLAGS)"
8445
8446#Zilog ZEUS 3.21
8447zilog:
8448	@echo 'Making C-Kermit $(CKVER) for Zilog Zeus 3.21...'
8449	$(MAKE) wermit \
8450	"CFLAGS = -DATTSV -DZILOG -DNODEBUG $(KFLAGS) -i -O" \
8451	"LNKFLAGS = -i -lpw"
8452
8453#Whitechapel MG-1 Genix 1.3
8454white:
8455	@echo 'Making C-Kermit $(CKVER) for Whitechapel MG-1 Genix 1.3...'
8456	@touch ckcpro.c
8457	$(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0  $(KFLAGS)"
8458
8459#Pixel 1000
8460pixel:
8461	@echo 'Making C-Kermit $(CKVER) for Pixel 1000...'
8462	$(MAKE) wermit "CFLAGS= -DBSD4 -Dzkself()=0 $(KFLAGS)"
8463
8464ptx:
8465	$(MAKE) "MAKE=$(MAKE)" dynixptx12
8466
8467#CDC VX/VE 5.2.1
8468vxve:
8469	@echo 'Making C-Kermit $(CKVER) for CDC VX/VE 5.2.1...'
8470	$(MAKE) wermit \
8471	"CFLAGS = -DATTSV -DVXVE -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8472	"LNKFLAGS = -i"
8473
8474#DIAB DS90 or LUXOR ABC-9000 with pre-5.2 DNIX.  Sys V with nap() and rdchk().
8475# nd = no opendir(), readdir(), closedir(), etc.
8476# Some of the modules fail to compile with -O.
8477dnixnd:
8478	@echo 'Making C-Kermit $(CKVER) for DIAB DS90 with very old DNIX 5.2.'
8479	$(MAKE) wermit \
8480	"CFLAGS = -DATTSV -DNAP -DRDCHK -DDCLPOPEN \
8481	-U__STDC__ $(KFLAGS)"
8482
8483#DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8484# This one has opendir(), readdir(), closedir(), etc.
8485# Some of the modules fail to compile with -O.
8486dnix:
8487	@echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8488	$(MAKE) wermit \
8489	"CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8490	-U__STDC__ $(KFLAGS)"
8491
8492#DIAB DS90 with DNIX 5.2.  Sys V with nap() and rdchk().
8493# As above, but with curses and TCP/IP.
8494# You might get complaints about redefinition of O_RDONLY, etc, because
8495# of bugs in the DNIX header files, which can be fixed by adding #ifndef...
8496# around the offending definitions in the header files.
8497dnixnetc:
8498	@echo 'Making C-Kermit $(CKVER) for DIAB DS90 with old DNIX 5.2...'
8499	$(MAKE) wermit \
8500	"CFLAGS = -DATTSV -DNAP -DRDCHK -DDIRENT  \
8501	-DTCPSOCKET -DCK_CURSES -I/usr/include/bsd -U__STDC__ $(KFLAGS)" \
8502	"LIBS = -ln -lcurses"
8503
8504#DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk().
8505dnix5r3:
8506	@echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8507	@echo 'with Honey DanBer UUCP'
8508	$(MAKE) wermit \
8509	"CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8510	-DCK_CURSES -DRENAME $(KFLAGS) -O" "LIBS= -lcurses"
8511
8512#DIAB DS90 with DNIX 5.3 or later, with HDB UUCP, nap() and rdchk() + TCP/IP
8513dnix5r3net:
8514	@echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8515	@echo 'with Honey DanBer UUCP and TCP/IP'
8516	$(MAKE) wermit \
8517	"CFLAGS = -DSVR3 -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8518	-DTCPSOCKET -DCK_CURSES -DRENAME $(KFLAGS) -O \
8519	-I/usr/include/bsd" "LIBS = -ln -lcurses"
8520
8521#DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8522#ANSI C compilation and libraries.
8523#Note that for DNIX 5.3 2.2 you have to correct a bug in /usr/include/stdlib.h:
8524#change "extern	void free(char *str);"
8525#to     "extern void free(void *str);"
8526#NOTE: This bug is reportedly fixed in DNIX 5.3 2.2.1.
8527#Should you get fatal errors caused by harmless pointer-type mismatches,
8528#like between signed and unsigned char, just remove -X7.
8529dnix5r3ansi:
8530	@echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8531	@echo 'with ANSI C Honey DanBer UUCP'
8532	$(MAKE) wermit \
8533	"CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8534	-DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS)" \
8535	"LIBS= -lcurses"
8536
8537#DIAB DS90 with DNIX 5.3 2.2 or later, with HDB UUCP, nap() and rdchk(),
8538# + TCP/IP, ANSI C compilation and libraries.
8539#Should you get fatal errors caused by harmless pointer-type mismatches,
8540#like between signed and unsigned char, just remove -X7.
8541dnix5r3ansinet:
8542	@echo 'Making C-Kermit $(CKVER) for DIAB DS90 with DNIX 5.3...'
8543	@echo 'with ANSI C Honey DanBer UUCP'
8544	$(MAKE) wermit \
8545	"CFLAGS = -DSVR3 -DDIAB -DHDBUUCP -DNAP -DRDCHK -DDIRENT \
8546	-DTCPSOCKET -DCK_ANSILIBS -DCK_CURSES -DRENAME -O -X7 -X9 $(KFLAGS) \
8547	-I/usr/include/bsd" "LIBS= -ln -lcurses"
8548
8549#Ridge 32 with ROS 3.2
8550ridge32:
8551	@echo 'Making C-Kermit $(CKVER) Ridge 32 ROS 3.2'
8552	$(MAKE) wermit \
8553	"CFLAGS = -DATTSV -DNOFILEH -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8554	"LNKFLAGS = -i"
8555
8556#Altos 486, 586, or 986 with Xenix 3.0
8557altos:
8558	@echo 'Making C-Kermit $(CKVER) for Altos x86 with Xenix 3.0...'
8559	$(MAKE) wermit \
8560	"CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG $(KFLAGS) -i -O" \
8561	"LNKFLAGS= -i"
8562
8563#Altos 986 with Xenix 3.0, as above, but command-line only, minimal size.
8564#For systems with small memories.  It might also be necessary to chop certain
8565#modules up into smaller pieces, e.g. ckuus3-6, because of symbol table
8566#overflow.   If this makefile is too big or complex for the Altos, compile
8567#and link by hand or write shell scripts.
8568altosc:
8569	@echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, remote...'
8570	$(MAKE) wermit \
8571	"CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8572	-DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOICP $(KFLAGS) -Mm -O" \
8573	"LNKFLAGS= -Mm -s"
8574
8575#Altos 986 with Xenix 3.0, as above, but interactive only, minimal size.
8576altosi:
8577	@echo 'Making C-Kermit $(CKVER) for Altos x86 Xenix 3.0, local...'
8578	$(MAKE) wermit \
8579	"CFLAGS= -DATTSV -DA986 -DNODEBUG -DNOTLOG -DNOSCRIPT -DNODIAL \
8580	-DNOCSETS -DNOANSI -DNOMSEND -DNOSPL -DNOCMDL -DNOFRILLS -DNOHELP \
8581	-DNOSETKEY $(KFLAGS) -Mm -O" "LNKFLAGS= -Mm -s"
8582
8583# Altos ACS68000 68000 System, UNIX System 3 Release 2, 512k memory.
8584# also needs getcwd() external function; see ckuins.txt file.
8585# also, sys/types.h needed modifying:
8586#   #ifdef __SYS_TYPES_H__, #define ..., #endif
8587# also, ckuus2.c MUST be compiled NOOPT else symbol table is destroyed!
8588# Submission by Robert Weiner/Programming Plus, rweiner@progplus.com.
8589#
8590altos3:
8591	@echo 'Making C-Kermit $(CKVER) for Altos ACS68k UNIX System III'
8592	$(MAKE) ckuus2.$(EXT) "CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8593	-DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i"
8594	$(MAKE) wermit \
8595	"CFLAGS = -DATTSV -DNOCSETS -DNOSETKEY -DNOJC \
8596	-DNODIAL -DDCLPOPEN -DNOSCRIPT -DNOHELP $(KFLAGS) -i -O" \
8597	"LNKFLAGS = -i" "LIBS = getcwd.$(EXT)"
8598
8599#MINIX - Original PC version with 64K+64K limit.
8600# Reportedly, the linker (asld) can run out of space while linking.  The only
8601# way around this is to make a copy of libc.a from which all modules that are
8602# not used by Kermit are removed.  If you have trouble compiling or running
8603# wart, "touch wart".  If that doesn't help, "touch ckcpro.c".
8604# The version configured below has no interactive command parser.
8605# If you can build this version successfully, maybe there will be room for
8606# a minimal interactive command parser too; try replacing -DNOICP with
8607# -DNOSPL, plus every other -DNOxxx flag there is, except for -DNOICP
8608# (see ckccfg.txt).
8609minix:
8610	@echo 'Making C-Kermit $(CKVER) for MINIX, no command parser...'
8611	@echo 'TOTALLY UNTESTED!'
8612	$(MAKE) wermit EXT=s \
8613	"CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8614	-DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V \
8615	-DNOXMIT -DNOMSEND -DNOFRILLS -DNODIAL -DNOHELP -DNODEBUG -DNOTLOG \
8616	-DNOSCRIPT -DNOCSETS -DNOICP -DNOSETKEY $(KFLAGS)" \
8617	"LNKFLAGS= -i -T"
8618
8619#MINIX - PC version with 64K+64K limit, new (as yet unreleased) ACK 2.0 beta C
8620#compiler, which outputs .o object files, rather than .s.  But 'make' still
8621#expects .s files, so must be patched to use .o.  Tested on Minix 1.5.10.
8622minix15:
8623	@echo 'Making C-Kermit $(CKVER) for MINIX (new ACK 2.0 compiler),'
8624	@echo 'no command parser...  TOTALLY UNTESTED!'
8625	$(MAKE) wermit \
8626	"CFLAGS= -DV7 -DMINIX -i -D_MINIX -D_POSIX_SOURCE \
8627	-DPID_T=pid_t -DUID_T=uid_t -DGID_T=gid_t -DSIG_V -DNODIAL \
8628	-DNOHELP -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOICP $(KFLAGS)" \
8629	"LNKFLAGS= -i -T"
8630
8631#MINIX3 - MINIX 3.0 (no VM) - May-Aug 2005 (not sure if this ever worked...)
8632minix3:
8633	@echo 'Making C-Kermit $(CKVER) for MINIX3...'
8634	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8635	"CFLAGS= -DPOSIX -DNOUUCP -DNOLEARN $(KFLAGS) -DMINIX2 \
8636	-DMINIX3 -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8637	-DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DDNOREALPATH \
8638	-DTCPSOCKET -DNOTIMEZONE -DNOFTP -DNO_DNS_SRV -O"
8639
8640#MINIX315 - MINIX 3 1.5 - January 2010
8641minix315:
8642	@echo 'Making C-Kermit $(CKVER) for Minix 3 1.5...'
8643	$(MAKE) wermit KTARGET=$${KTARGET:-$(@)} \
8644	"CFLAGS= -DMINIX315 -DPOSIX -DNOUUCP -DNOJC -DNOLEARN $(KFLAGS) \
8645	-DHAVE_OPENPTY -DNO_PARAM_H -DNOSYSLOG -DNOGETUSERSHELL \
8646	-DSYSTIMEH -DNOINITGROUPS -DNOFTRUNCATE -DNOARROWKEYS -DNOREALPATH \
8647	-DTCPSOCKET -DNOTIMEZONE -DNO_DNS_SRV -DNOFTP -O"
8648
8649#PFU Compact A Series UNIX System V R3, SX/A TISP V10/L50 (Japan)
8650#Maybe the -i link option should be removed?
8651sxae50:
8652	@echo 'Making C-Kermit $(CKVER) for PFU SX/A V10/L50...'
8653	$(MAKE) xermit \
8654	"CFLAGS= -DSVR3 -DDIRENT -DsxaE50 -DTCPSOCKET $(KFLAGS) -i -O" \
8655	"LNKFLAGS= "
8656
8657#Tektronix 6130, 4319, 4301, etc, with UTek OS, /usr/spool/uucp/LCK./...
8658#The models that support hardware flow control.
8659utek:
8660	@echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, hardware flow control'
8661	$(MAKE) wermit \
8662	"CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8663	-DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8664	-DTRMBUFL=2048 -DCK_DTRCTS $(KFLAGS)"
8665
8666#Tektronix 4315, 4316, 4317 with UTek OS, /usr/spool/uucp/LCK./...
8667#The models that do not fully support hardware flow control.
8668uteknohwfc:
8669	@echo 'Making C-Kermit $(CKVER) for 4.2BSD/UTek, no h/w flow control'
8670	$(MAKE) wermit \
8671	"CFLAGS= -O -DLCKDIR -DBSD4 -DTCPSOCKET \
8672	-DUTEK -DDCLPOPEN -DLOCK_DIR=\\\"/usr/spool/uucp/LCK.\\\" \
8673	-DTRMBUFL=2048 $(KFLAGS)"
8674
8675#Tektronix XD88 with  UTekV OS
8676utekvr3:
8677	@echo 'Making C-Kermit $(CKVER) for Tektronix XD88 UTekV R3...'
8678	$(MAKE) wermit \
8679	"CFLAGS= -DSVR3 -DDIRENT -DHDBUUCP \
8680	-DTCPSOCKET -DSYSUTIMEH -DCK_CURSES $(KFLAGS) -O" \
8681	"LIBS= -lcurses" "LNKFLAGS= -s"
8682
8683#Perkin-Elmer 3200 Xelos R02 or earlier
8684ccop1:
8685	@echo 'Making C-Kermit $(CKVER) for Xelos & Public Domain Dirent calls'
8686	@echo 'or System V R2 or earlier...'
8687	$(MAKE) wermit \
8688	"CFLAGS = -DATTSV -Dvoid=int -DDIRENT -DCK_CURSES \
8689	$(KFLAGS) -O" "LNKFLAGS =" "LIBS= -lcurses -ltermlib"
8690
8691#Encore, UMAX 4.3 (BSD) but without acucntrl program.
8692encore:
8693	$(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=$(KFLAGS)"
8694
8695#Encore, as above, but with curses file transfer display included.
8696encorec:
8697	$(MAKE) "MAKE=$(MAKE)" umax43 "KFLAGS=-DCK_CURSES $(KFLAGS)" \
8698	"LIBS= -lcurses -ltermcap"
8699
8700#Encore, UMAX 4.3 (BSD) but without acucntrl program.
8701umax43:
8702	@echo Making C-Kermit $(CKVER) for Encore UMAX 4.3...
8703	$(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8704	"CFLAGS= -DBSD43 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8705
8706#Encore, UMAX 4.2 (BSD)
8707umax42:
8708	@echo Making C-Kermit $(CKVER) for Encore UMAX 4.2...
8709	$(MAKE) "MAKE=$(MAKE)" PARALLEL=4 xermit \
8710	"CFLAGS= -DBSD4 -DENCORE -DTCPSOCKET $(KFLAGS) -O"
8711
8712#Encore 88K UMAX 5.3 with TCP/IP support
8713encore88k:
8714	@echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP...'
8715	$(MAKE) xermit \
8716	"CFLAGS = -q ext=pcc -DSVR3 -DTCPSOCKET -DDIRENT \
8717	-DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8718
8719#Encore 88K UMAX 5.3 with TCP/IP support
8720encore88kgcc:
8721	@echo 'Making C-Kermit $(CKVER) for Encore 88K UMAX V, TCP/IP, gcc...'
8722	$(MAKE) xermit CC=gcc CC2=gcc \
8723	"CFLAGS = -DSVR3 -DTCPSOCKET -DDIRENT \
8724	-DNOGETID_PROTOS -DHDBUUCP $(KFLAGS) -O" "LNKFLAGS ="
8725
8726#SONY NEWS, NEWS-OS 4.01C
8727sonynews:
8728	@echo Making C-Kermit $(CKVER) for SONY NEWS-OS 4.01C...
8729	$(MAKE) xermit "CFLAGS= -DBSD43 -DACUCNTRL -DTCPSOCKET -O"
8730
8731#Run Lint on this mess for selected versions.
8732#These are pretty much obsolete since ANSI C / gcc.
8733lintsun:
8734	@echo 'Running Lint on C-Kermit $(CKVER) sources for SunOS version...'
8735	lint -x -DSUNOS4 -DDIRENT -DTCPSOCKET -DSAVEDUID \
8736	ck[cu]*.c > ckuker.lint.sun
8737
8738lintbsd:
8739	@echo 'Running Lint on C-Kermit $(CKVER) sources for BSD 4.2 version..'
8740	lint -x -DBSD4 -DTCPSOCKET ck[cu]*.c > ckuker.lint.bsd42
8741
8742lints5:
8743	@echo 'Running Lint on C-Kermit $(CKVER) sources for Sys V version...'
8744	lint -x -DATTSV ck[cu]*.c > ckuker.lint.s5
8745
8746#Who remembers TECO?
8747love:
8748	@echo 'Not war?'
8749