imapext-2007

annotate Makefile @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children 28a55bc1110c 5cecc027b845
rev   line source
yuuji@0 1 # ========================================================================
yuuji@0 2 # Copyright 1988-2008 University of Washington
yuuji@0 3 #
yuuji@0 4 # Licensed under the Apache License, Version 2.0 (the "License");
yuuji@0 5 # you may not use this file except in compliance with the License.
yuuji@0 6 # You may obtain a copy of the License at
yuuji@0 7 #
yuuji@0 8 # http://www.apache.org/licenses/LICENSE-2.0
yuuji@0 9 #
yuuji@0 10 #
yuuji@0 11 # ========================================================================
yuuji@0 12
yuuji@0 13 # Program: IMAP Toolkit Makefile
yuuji@0 14 #
yuuji@0 15 # Author: Mark Crispin
yuuji@0 16 # UW Technology
yuuji@0 17 # Seattle, WA 98195
yuuji@0 18 # Internet: MRC@Washington.EDU
yuuji@0 19 #
yuuji@0 20 # Date: 7 December 1989
yuuji@0 21 # Last Edited: 12 May 2008
yuuji@0 22
yuuji@0 23
yuuji@0 24 # Normal command to build IMAP toolkit:
yuuji@0 25 # make <port> [EXTRAAUTHENTICATORS=xxx] [EXTRADRIVERS=xxx] [EXTRACFLAGS=xxx]
yuuji@0 26 # [PASSWDTYPE=xxx] [SSLTYPE=xxx] [IP=n]
yuuji@0 27
yuuji@0 28
yuuji@0 29 # Port name. These refer to the *standard* compiler on the given system.
yuuji@0 30 # This means, for example, that the hpx port is for HP's compiler and not for
yuuji@0 31 # a non-standard compiler such as gcc.
yuuji@0 32 #
yuuji@0 33 # If you are using gcc and it is not the standard compiler on your system, try
yuuji@0 34 # using an ANSI port that is close to what you have. For example, if your
yuuji@0 35 # system is SVR4ish, try a32 or lnx; if it's more BSDish, try nxt, mct, or bsi.
yuuji@0 36 #
yuuji@0 37 # The following ports are bundled:
yuuji@0 38 # a32 AIX 3.2 for RS/6000
yuuji@0 39 # a41 AIX 4.1 for RS/6000
yuuji@0 40 # aix AIX/370 (not RS/6000!!)
yuuji@0 41 # ami AmigaDOS
yuuji@0 42 # am2 AmigaDOS with a 68020+
yuuji@0 43 # ama AmigaDOS using AS225R2
yuuji@0 44 # amn AmigaDOS with a 680x0 using "new" socket library
yuuji@0 45 # aos AOS for RT
yuuji@0 46 # art AIX 2.2.1 for RT
yuuji@0 47 # asv Altos SVR4
yuuji@0 48 # aux A/UX
yuuji@0 49 # bs3 BSD/i386 3.0 and higher
yuuji@0 50 # bsd generic BSD 4.3 (as in ancient 1980s version)
yuuji@0 51 # bsf FreeBSD
yuuji@0 52 # bsi BSD/i386
yuuji@0 53 # bso OpenBSD (yes, yet another one...)
yuuji@0 54 # cvx Convex
yuuji@0 55 # cyg Cygwin
yuuji@0 56 # d-g Data General DG/UX prior to 5.4 (d41 port no longer exists)
yuuji@0 57 # d54 Data General DG/UX 5.4
yuuji@0 58 # do4 Apollo Domain/OS sr10.4
yuuji@0 59 # dpx Bull DPX/2 B.O.S.
yuuji@0 60 # drs ICL DRS/NX
yuuji@0 61 # dyn Dynix
yuuji@0 62 # epx EP/IX
yuuji@0 63 # ga4 GCC AIX 4.x for RS/6000
yuuji@0 64 # gas GCC Altos SVR4
yuuji@0 65 # gcs GCC Solaris with Blastwave Community Open Source Software
yuuji@0 66 # gh9 GCC HP-UX 9.x
yuuji@0 67 # ghp GCC HP-UX 10.x
yuuji@0 68 # ghs GCC HP-UX 10.x with Trusted Computer Base
yuuji@0 69 # go5 GCC 2.7.1 (95q4 from Skunkware _not_ 98q2!) SCO Open Server 5.0.x
yuuji@0 70 # gsc GCC Santa Cruz Operation
yuuji@0 71 # gsg GCC SGI
yuuji@0 72 # gso GCC Solaris
yuuji@0 73 # gsu GCC SUN-OS
yuuji@0 74 # gul GCC RISC Ultrix (DEC-5000)
yuuji@0 75 # h11 HP-UX 11i
yuuji@0 76 # hpp HP-UX 9.x (see gh9)
yuuji@0 77 # hpx HP-UX 10.x (see ghp, ghs, hxd, and shp)
yuuji@0 78 # hxd HP-UX 10.x with DCE security (see shp)
yuuji@0 79 # isc Interactive Systems
yuuji@0 80 # ldb Debian Linux
yuuji@0 81 # lfd Fedora Core 4
yuuji@0 82 # ln8 Linux for Nokia N800
yuuji@0 83 # lnx Linux with traditional passwords and crypt() in the C library
yuuji@0 84 # (see lnp, sl4, sl5, and slx)
yuuji@0 85 # lnp Linux with Pluggable Authentication Modules (PAM)
yuuji@0 86 # lmd Mandrake Linux
yuuji@0 87 # lr5 RedHat Enterprise 5 and later (same as lfd)
yuuji@0 88 # lrh RedHat Linux 7.2 and later
yuuji@0 89 # lsu SuSE Linux (same as lrh)
yuuji@0 90 # lyn LynxOS
yuuji@0 91 # mct MachTen
yuuji@0 92 # mnt Atari ST Mint (not MacMint)
yuuji@0 93 # neb NetBSD
yuuji@0 94 # nec NEC UX
yuuji@0 95 # nto QNX Neutrine RTP
yuuji@0 96 # nxt NEXTSTEP
yuuji@0 97 # nx3 NEXTSTEP 3.x
yuuji@0 98 # osf OSF/1 (see sos, os4)
yuuji@0 99 # os4 OSF/1 (Digital UNIX) 4
yuuji@0 100 # osi Apple iPhone and iPod Touch
yuuji@0 101 # osx Mac OS X
yuuji@0 102 # oxp Mac OS X with Pluggable Authentication Modules (PAM)
yuuji@0 103 # ptx PTX
yuuji@0 104 # pyr Pyramid
yuuji@0 105 # qnx QNX 4
yuuji@0 106 # s40 SUN-OS 4.0 (*not* Solaris)
yuuji@0 107 # sc5 SCO Open Server 5.0.x (see go5)
yuuji@0 108 # sco Santa Cruz Operation (see sc5, go5)
yuuji@0 109 # shp HP-UX with Trusted Computer Base
yuuji@0 110 # sgi Silicon Graphics IRIX
yuuji@0 111 # sg6 Silicon Graphics IRIX 6.5
yuuji@0 112 # sl4 Linux using -lshadow to get the crypt() function
yuuji@0 113 # sl5 Linux with shadow passwords, no extra libraries
yuuji@0 114 # slx Linux using -lcrypt to get the crypt() function
yuuji@0 115 # snx Siemens Nixdorf SININX or Reliant UNIX
yuuji@0 116 # soc Solaris with /opt/SUNWspro/bin/cc
yuuji@0 117 # sol Solaris (won't work unless "ucbcc" works -- use gso instead)
yuuji@0 118 # sos OSF/1 with SecureWare
yuuji@0 119 # ssn SUN-OS with shadow password security
yuuji@0 120 # sua Windows Vista (Enterprise or Ultima) Subsystem for Unix Applications
yuuji@0 121 # sun SUN-OS 4.1 or better (*not* Solaris) (see ssn)
yuuji@0 122 # sv2 SVR2 on AT&T PC-7300 (incomplete port)
yuuji@0 123 # sv4 generic SVR4
yuuji@0 124 # ult RISC Ultrix (DEC-5000)
yuuji@0 125 # uw2 UnixWare SVR4.2
yuuji@0 126 # vul VAX Ultrix
yuuji@0 127 # vu2 VAX Ultrix 2.3 (e.g. for VAXstation-2000 or similar old version)
yuuji@0 128
yuuji@0 129
yuuji@0 130 # Extra authenticators (e.g. OTP, Kerberos, etc.). Adds linkage for
yuuji@0 131 # auth_xxx.c and executes Makefile.xxx, where xxx is the name of the
yuuji@0 132 # authenticator. Some authenticators are only available from third parties.
yuuji@0 133 #
yuuji@0 134 # The following extra authenticators are bundled:
yuuji@0 135 # gss Kerberos V
yuuji@0 136
yuuji@0 137 EXTRAAUTHENTICATORS=
yuuji@0 138
yuuji@0 139
yuuji@0 140 # Additional mailbox drivers. Add linkage for xxxdriver. Some drivers are
yuuji@0 141 # only available from third parties.
yuuji@0 142 #
yuuji@0 143 # The following extra drivers are bundled:
yuuji@0 144 # mbox if file "mbox" exists on the home directory, automatically moves mail
yuuji@0 145 # from the spool directory to "mbox" and uses "mbox" as INBOX.
yuuji@0 146
yuuji@0 147 EXTRADRIVERS=mbox
yuuji@0 148
yuuji@0 149
yuuji@0 150 # Plaintext password type. Defines how plaintext password authentication is
yuuji@0 151 # done on this system.
yuuji@0 152 #
yuuji@0 153 # The following plaintext login types are bundled:
yuuji@0 154 # afs AFS authentication database
yuuji@0 155 # dce DCE authentication database
yuuji@0 156 # gss Kerberos V
yuuji@0 157 # nul plaintext authentication never permitted
yuuji@0 158 # pam PAM authentication (note: for Linux, you should use the "lnp" port
yuuji@0 159 # instead of setting this...also, you may have to modify PAMLDFLAGS
yuuji@0 160 # in the imap-[]/src/osdep/unix/Makefile
yuuji@0 161 # pmb PAM authentication for broken implementations such as Solaris.
yuuji@0 162 # you may have to modify PAMLDFLAGS
yuuji@0 163 # std system standard (typically passwd file), determined by port
yuuji@0 164 # two try alternative (defined by CHECKPWALT), then std
yuuji@0 165
yuuji@0 166 PASSWDTYPE=std
yuuji@0 167
yuuji@0 168
yuuji@0 169 # SSL type. Defines whether or not SSL support is on this system
yuuji@0 170 #
yuuji@0 171 # The following SSL types are bundled:
yuuji@0 172 # none no SSL support
yuuji@0 173 # unix SSL support using OpenSSL
yuuji@0 174 # nopwd SSL support using OpenSSL, and plaintext authentication permitted only
yuuji@0 175 # in SSL/TLS sessions
yuuji@0 176 # sco link SSL before other libraries (for SCO systems)
yuuji@0 177 # unix.nopwd same as nopwd
yuuji@0 178 # sco.nopwd same as nopwd, plaintext authentication in SSL/TLS only
yuuji@0 179 #
yuuji@0 180 # SSLTYPE=nopwd is now the default as required by RFC 3501
yuuji@0 181
yuuji@0 182 SSLTYPE=nopwd
yuuji@0 183
yuuji@0 184
yuuji@0 185 # IP protocol version
yuuji@0 186 #
yuuji@0 187 # The following IP protocol versions are defined:
yuuji@0 188 # o IPv4 support, no DNS (truly ancient systems)
yuuji@0 189 # 4 (default) IPv4 support only
yuuji@0 190 # 6 IPv6 and IPv4 support
yuuji@0 191
yuuji@0 192 IP=4
yuuji@0 193 IP6=6
yuuji@0 194
yuuji@0 195
yuuji@0 196 # The following extra compilation flags are defined. None of these flags are
yuuji@0 197 # recommended. If you use these, include them in the EXTRACFLAGS.
yuuji@0 198 #
yuuji@0 199 # -DDISABLE_POP_PROXY
yuuji@0 200 # By default, the ipop[23]d servers offer POP->IMAP proxy access,
yuuji@0 201 # which allow a POP client to access mail on an IMAP server by using the
yuuji@0 202 # POP server as a go-between. Setting this option disables this
yuuji@0 203 # facility.
yuuji@0 204 #
yuuji@0 205 # -DOLDFILESUFFIX=\"xxx\"
yuuji@0 206 # Change the default suffix appended to the backup .newsrc file from
yuuji@0 207 # "old".
yuuji@0 208 #
yuuji@0 209 # -DSTRICT_RFC822_TIMEZONES
yuuji@0 210 # Disable recognition of the non-standard UTC (0000), MET (+0100),
yuuji@0 211 # EET (+0200), JST (+0900), ADT (-0300), AST (-0400), YDT (-0800),
yuuji@0 212 # YST (-0900), and HST (-1000) symbolic timezones.
yuuji@0 213 #
yuuji@0 214 # -DBRITISH_SUMMER_TIME
yuuji@0 215 # Enables recognition of non-standard symbolic timezone BST as +0100.
yuuji@0 216 #
yuuji@0 217 # -DBERING_STANDARD_TIME
yuuji@0 218 # Enables recognition of non-standard symbolic timezone BST as -1100.
yuuji@0 219 #
yuuji@0 220 # -DNEWFOUNDLAND_STANDARD_TIME
yuuji@0 221 # Enables recognition of non-standard symbolic timezone NST as -0330.
yuuji@0 222 #
yuuji@0 223 # -DNOME_STANDARD_TIME
yuuji@0 224 # Enables recognition of non-standard symbolic timezone NST as -1100.
yuuji@0 225 #
yuuji@0 226 # -DSAMOA_STANDARD_TIME
yuuji@0 227 # Enables recognition of non-standard symbolic timezone SST as -1100.
yuuji@0 228 #
yuuji@0 229 # -DY4KBUGFIX
yuuji@0 230 # Turn on the Y4K bugfix (yes, that's year 4000). It isn't well-known,
yuuji@0 231 # but century years evenly divisible by 4000 are *not* leap years in the
yuuji@0 232 # Gregorian calendar. A lot of "Y2K compilant" software does not know
yuuji@0 233 # about this rule. Remember to turn this on sometime in the next 2000
yuuji@0 234 # years.
yuuji@0 235 #
yuuji@0 236 # -DUSEORTHODOXCALENDAR
yuuji@0 237 # Use the more accurate Eastern Orthodox calendar instead of the
yuuji@0 238 # Gregorian calendar. The century years which are leap years happen
yuuji@0 239 # at alternating 400 and 500 year intervals without shifts every 4000
yuuji@0 240 # years. The Orthodox and Gregorian calendars diverge by 1 day for
yuuji@0 241 # gradually-increasing intervals, starting at 2800-2900, and becoming
yuuji@0 242 # permanent at 48,300.
yuuji@0 243 #
yuuji@0 244 # -DUSEJULIANCALENDAR
yuuji@0 245 # Use the less accurate Julian calendar instead of the Gregorian
yuuji@0 246 # calendar. Leap years are every 4 years, including century years.
yuuji@0 247 # My apologies to those in the English-speaking world who object to
yuuji@0 248 # the reform of September 2, 1752 -> September 14, 1752, since this
yuuji@0 249 # code still uses January 1 (which Julius Ceasar decreed as the start
yuuji@0 250 # of the year, which since 153 BCE was the day that Roman consuls
yuuji@0 251 # took office), rather than the traditional March 25 used by the
yuuji@0 252 # British. As of 2005, the Julian calendar and the Gregorian calendar
yuuji@0 253 # diverge by 15 days.
yuuji@0 254
yuuji@0 255 EXTRACFLAGS=
yuuji@0 256
yuuji@0 257
yuuji@0 258 # Extra linker flags (additional/alternative libraries, etc.)
yuuji@0 259
yuuji@0 260 EXTRALDFLAGS=
yuuji@0 261
yuuji@0 262
yuuji@0 263 # Special make flags (e.g. to override make environment variables)
yuuji@0 264
yuuji@0 265 EXTRASPECIALS=
yuuji@0 266 SPECIALS=
yuuji@0 267
yuuji@0 268
yuuji@0 269 # Normal commands
yuuji@0 270
yuuji@0 271 CAT=cat
yuuji@0 272 CD=cd
yuuji@0 273 LN=ln -s
yuuji@0 274 MAKE=make
yuuji@0 275 MKDIR=mkdir
yuuji@0 276 BUILDTYPE=rebuild
yuuji@0 277 RM=rm -rf
yuuji@0 278 SH=sh
yuuji@0 279 SYSTEM=unix
yuuji@0 280 TOOLS=tools
yuuji@0 281 TOUCH=touch
yuuji@0 282
yuuji@0 283
yuuji@0 284 # Primary build command
yuuji@0 285
yuuji@0 286 BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRACFLAGS)'\
yuuji@0 287 EXTRALDFLAGS='$(EXTRALDFLAGS)'\
yuuji@0 288 EXTRADRIVERS='$(EXTRADRIVERS)'\
yuuji@0 289 EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)'\
yuuji@0 290 PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)\
yuuji@0 291 EXTRASPECIALS='$(EXTRASPECIALS)'
yuuji@0 292
yuuji@0 293
yuuji@0 294 # Make the IMAP Toolkit
yuuji@0 295
yuuji@0 296 all: c-client SPECIALS rebuild bundled
yuuji@0 297
yuuji@0 298 c-client:
yuuji@0 299 @echo Not processed yet. In a first-time build, you must specify
yuuji@0 300 @echo the system type so that the sources are properly processed.
yuuji@0 301 @false
yuuji@0 302
yuuji@0 303
yuuji@0 304 SPECIALS:
yuuji@0 305 echo $(SPECIALS) > SPECIALS
yuuji@0 306
yuuji@0 307 # Note on SCO you may have to set LN to "ln".
yuuji@0 308
yuuji@0 309 a32 a41 aix bs3 bsi d-g d54 do4 drs epx ga4 gas gh9 ghp ghs go5 gsc gsg gso gul h11 hpp hpx lnp lyn mct mnt nec nto nxt nx3 osf os4 ptx qnx sc5 sco sgi sg6 shp sl4 sl5 slx snx soc sol sos uw2: an
yuuji@0 310 $(BUILD) BUILDTYPE=$@
yuuji@0 311
yuuji@0 312 # If you use sv4, you may find that it works to move it to use the an process.
yuuji@0 313 # If so, you probably will want to delete the "-Dconst=" from the sv4 CFLAGS in
yuuji@0 314 # the c-client Makefile.
yuuji@0 315
yuuji@0 316 aos art asv aux bsd cvx dpx dyn isc pyr sv4 ult vul vu2: ua
yuuji@0 317 $(BUILD) BUILDTYPE=$@
yuuji@0 318
yuuji@0 319
yuuji@0 320 # Knotheads moved Kerberos and SSL locations on these platforms
yuuji@0 321
yuuji@0 322 # Paul Vixie claims that all FreeBSD versions have working IPv6
yuuji@0 323
yuuji@0 324 bsf: an
yuuji@0 325 $(TOUCH) ip6
yuuji@0 326 $(BUILD) BUILDTYPE=$@ IP=$(IP6) \
yuuji@0 327 PASSWDTYPE=pam \
yuuji@0 328 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/ssl/certs SSLKEYS=/etc/ssl/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib PAMLDFLAGS=-lpam"
yuuji@0 329
yuuji@0 330 # I assume that Theo did the right thing for IPv6. OpenBSD does not have PAM.
yuuji@0 331
yuuji@0 332 bso: an
yuuji@0 333 $(TOUCH) ip6
yuuji@0 334 $(BUILD) BUILDTYPE=$@ IP=$(IP6) \
yuuji@0 335 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/ssl SSLKEYS=/etc/ssl/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib"
yuuji@0 336
yuuji@0 337 # Info from Joel Reicher about NetBSD SSL paths. I assume it has PAM because pam is in NetBSD sources...
yuuji@0 338
yuuji@0 339 neb: an
yuuji@0 340 $(TOUCH) ip6
yuuji@0 341 $(BUILD) BUILDTYPE=$@ IP=$(IP6) \
yuuji@0 342 PASSWDTYPE=pam \
yuuji@0 343 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/openssl/certs SSLKEYS=/etc/openssl/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib PAMLDFLAGS=-lpam"
yuuji@0 344
yuuji@0 345 cyg: an
yuuji@0 346 $(BUILD) BUILDTYPE=cyg \
yuuji@0 347 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/usr/ssl/certs SSLKEYS=/usr/ssl/certs"
yuuji@0 348
yuuji@0 349 gcs: an
yuuji@0 350 $(BUILD) BUILDTYPE=gso \
yuuji@0 351 SPECIALS="SSLINCLUDE=/opt/csw/include/openssl SSLLIB=/opt/csw/lib SSLCERTS=/opt/csw/ssl/certs SSLKEYS=/opt/csw/ssl/certs"
yuuji@0 352
yuuji@0 353 ldb: an
yuuji@0 354 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
yuuji@0 355 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/ssl/certs SSLKEYS=/etc/ssl/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib MAILSPOOL=/var/mail"
yuuji@0 356
yuuji@0 357 lfd: an
yuuji@0 358 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
yuuji@0 359 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/pki/tls/certs SSLKEYS=/etc/pki/tls/private GSSDIR=/usr/kerberos"
yuuji@0 360
yuuji@0 361 ln8: an
yuuji@0 362 $(TOUCH) ip6
yuuji@0 363 $(BUILD) BUILDTYPE=slx IP=$(IP6) \
yuuji@0 364 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/usr/lib/ssl/certs MAILSPOOL=/var/mail"
yuuji@0 365
yuuji@0 366
yuuji@0 367 # RHE5 does not have the IPv6 bug
yuuji@0 368
yuuji@0 369 lr5: an
yuuji@0 370 $(TOUCH) ip6
yuuji@0 371 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
yuuji@0 372 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/pki/tls/certs SSLKEYS=/etc/pki/tls/private GSSDIR=/usr/kerberos"
yuuji@0 373
yuuji@0 374 lmd: an
yuuji@0 375 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
yuuji@0 376 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/usr/lib/ssl/certs SSLKEYS=/usr/lib/ssl/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib"
yuuji@0 377
yuuji@0 378 # RHE3 definitely has the IPv6 bug
yuuji@0 379
yuuji@0 380 lrh: lrhok an
yuuji@0 381 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
yuuji@0 382 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/usr/share/ssl/certs SSLKEYS=/usr/share/ssl/private GSSDIR=/usr/kerberos"
yuuji@0 383
yuuji@0 384 lrhok:
yuuji@0 385 @$(SH) -c '(test ! -d /etc/pki/tls ) || make lrhwarn'
yuuji@0 386 @$(TOUCH) lrhok
yuuji@0 387
yuuji@0 388 lrhwarn:
yuuji@0 389 @echo You are building for OLD versions of RedHat Linux. This build
yuuji@0 390 @echo is NOT suitable for RedHat Enterprise 5, which stores SSL/TLS
yuuji@0 391 @echo certificates and keys in /etc/pki/tls rather than /usr/share/ssl.
yuuji@0 392 @echo If you want to build for modern RedHat Linux, you should use
yuuji@0 393 @echo make lr5 instead.
yuuji@0 394 @echo Do you want to continue this build? Type y or n please:
yuuji@0 395 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
yuuji@0 396 @echo OK, I will remember that you really want to build for old
yuuji@0 397 @echo RedHat Linux. You will not see this message again.
yuuji@0 398 @echo If you realize that you really wanted to build for modern
yuuji@0 399 @echo RedHat Linux, then do the following commands:
yuuji@0 400 @echo % rm lrhok
yuuji@0 401 @echo % make clean
yuuji@0 402 @echo % make lr5
yuuji@0 403
yuuji@0 404 lsu: an
yuuji@0 405 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
yuuji@0 406 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/usr/share/ssl/certs SSLKEYS=/usr/share/ssl/private GSSDIR=/usr/kerberos"
yuuji@0 407
yuuji@0 408 # iToy does not have Kerberos or PAM. It doesn't have a
yuuji@0 409 # /System/Library/OpenSSL directory either, but the libcrypto shared library
yuuji@0 410 # has these locations so this is what we will use.
yuuji@0 411
yuuji@0 412 osi: an
yuuji@0 413 $(TOUCH) ip6
yuuji@0 414 $(BUILD) BUILDTYPE=osx IP=$(IP6) CC=arm-apple-darwin-gcc \
yuuji@0 415 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/System/Library/OpenSSL/certs SSLKEYS=/System/Library/OpenSSL/private"
yuuji@0 416
yuuji@0 417 oxp: an
yuuji@0 418 $(TOUCH) ip6
yuuji@0 419 $(BUILD) BUILDTYPE=osx IP=$(IP6) EXTRAAUTHENTICATORS="$(EXTRAAUTHENTICATORS) gss" \
yuuji@0 420 PASSWDTYPE=pam \
yuuji@0 421 EXTRACFLAGS="$(EXTRACFLAGS) -DMAC_OSX_KLUDGE=1" \
yuuji@0 422 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/System/Library/OpenSSL/certs SSLKEYS=/System/Library/OpenSSL/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib PAMDLFLAGS=-lpam"
yuuji@0 423
yuuji@0 424 osx: osxok an
yuuji@0 425 $(TOUCH) ip6
yuuji@0 426 $(BUILD) BUILDTYPE=$@ IP=$(IP6) EXTRAAUTHENTICATORS="$(EXTRAAUTHENTICATORS) gss" \
yuuji@0 427 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/System/Library/OpenSSL/certs SSLKEYS=/System/Library/OpenSSL/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib"
yuuji@0 428
yuuji@0 429 osxok:
yuuji@0 430 @$(SH) -c '(test ! -f /usr/include/pam/pam_appl.h ) || make osxwarn'
yuuji@0 431 @$(TOUCH) osxok
yuuji@0 432
yuuji@0 433 osxwarn:
yuuji@0 434 @echo You are building for OLD versions of Mac OS X. This build is
yuuji@0 435 @echo NOT suitable for modern versions of Mac OS X, such as Tiger,
yuuji@0 436 @echo which use PAM-based authentication. If you want to build for
yuuji@0 437 @echo modern Mac OS X, you should use make oxp instead.
yuuji@0 438 @echo Do you want to continue this build? Type y or n please:
yuuji@0 439 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
yuuji@0 440 @echo OK, I will remember that you really want to build for old
yuuji@0 441 @echo Mac OS X. You will not see this message again.
yuuji@0 442 @echo If you realize that you really wanted to build for modern
yuuji@0 443 @echo Mac OS X, then do the following commands:
yuuji@0 444 @echo % rm osxok
yuuji@0 445 @echo % make clean
yuuji@0 446 @echo % make oxp
yuuji@0 447
yuuji@0 448
yuuji@0 449 # Linux shadow password support doesn't build on traditional systems, but most
yuuji@0 450 # Linux systems are shadow these days.
yuuji@0 451
yuuji@0 452 lnx: lnxnul an
yuuji@0 453 $(BUILD) BUILDTYPE=$@
yuuji@0 454
yuuji@0 455 lnxnul:
yuuji@0 456 @$(SH) -c '(test $(PASSWDTYPE) = nul) || make lnxok'
yuuji@0 457
yuuji@0 458 lnxok:
yuuji@0 459 @echo You are building for traditional Linux. Most modern Linux
yuuji@0 460 @echo systems require that you build using make slx.
yuuji@0 461 @echo Do you want to continue this build? Type y or n please:
yuuji@0 462 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
yuuji@0 463 @echo OK, I will remember that you really want to build for
yuuji@0 464 @echo traditional Linux. You will not see this message again.
yuuji@0 465 @echo If you discover that you can not log in to the POP and IMAP
yuuji@0 466 @echo servers, then do the following commands:
yuuji@0 467 @echo % rm lnxok
yuuji@0 468 @echo % make clean
yuuji@0 469 @echo % make slx
yuuji@0 470 @echo If slx does not work, try sl4 or sl5. Be sure to do a
yuuji@0 471 @echo make clean between each try!
yuuji@0 472 @$(TOUCH) lnxok
yuuji@0 473
yuuji@0 474
yuuji@0 475 # SUN-OS C compiler makes you load libdl by hand...
yuuji@0 476
yuuji@0 477 ssn sun: sunok suntools ua
yuuji@0 478 $(BUILD) BUILDTYPE=$@
yuuji@0 479
yuuji@0 480 suntools:
yuuji@0 481 $(CD) tools;$(MAKE) LDFLAGS=-ldl
yuuji@0 482
yuuji@0 483 gsu: sunok an
yuuji@0 484 $(BUILD) BUILDTYPE=$@
yuuji@0 485
yuuji@0 486 s40: sunok ua
yuuji@0 487 $(BUILD) BUILDTYPE=$@
yuuji@0 488
yuuji@0 489 sunok:
yuuji@0 490 @echo You are building for the old BSD-based SUN-OS. This is NOT
yuuji@0 491 @echo the modern SVR4-based Solaris. If you want to build for
yuuji@0 492 @echo Solaris, you should use make gso or make sol or make soc. Do
yuuji@0 493 @echo you want to continue this build? Type y or n please:
yuuji@0 494 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
yuuji@0 495 @echo OK, I will remember that you really want to build for the old
yuuji@0 496 @echo BSD-based SUN-OS. You will not see this message again.
yuuji@0 497 @echo If the build fails and you realize that you really wanted to
yuuji@0 498 @echo build for Solaris, then do the following commands:
yuuji@0 499 @echo % rm sunok
yuuji@0 500 @echo % make clean
yuuji@0 501 @echo % make gso
yuuji@0 502 @echo If gso does not work, try sol. Be sure to do a make clean
yuuji@0 503 @echo between each try!
yuuji@0 504 @$(TOUCH) sunok
yuuji@0 505
yuuji@0 506
yuuji@0 507 # SVR2 doesn't have symbolic links (at least my SVR2 system doesn't)
yuuji@0 508
yuuji@0 509 sv2:
yuuji@0 510 $(MAKE) ua LN=ln
yuuji@0 511 $(BUILD) BUILDTYPE=$@ LN=ln
yuuji@0 512
yuuji@0 513 # Hard links don't quite work right in SUA, and there don't seem to be any
yuuji@0 514 # SSL includes. However, IPv6 works.
yuuji@0 515
yuuji@0 516 sua:
yuuji@0 517 $(TOUCH) ip6 sslnone
yuuji@0 518 $(MAKE) an LN=cp SSLTYPE=none
yuuji@0 519 $(BUILD) BUILDTYPE=$@ LN=cp IP=$(IP6) SSLTYPE=none
yuuji@0 520
yuuji@0 521
yuuji@0 522 # Pine port names, not distinguished in c-client
yuuji@0 523
yuuji@0 524 bs2: an
yuuji@0 525 $(BUILD) BUILDTYPE=bsi
yuuji@0 526
yuuji@0 527 pt1: an
yuuji@0 528 $(BUILD) BUILDTYPE=ptx
yuuji@0 529
yuuji@0 530
yuuji@0 531 # Compatibility
yuuji@0 532
yuuji@0 533 hxd:
yuuji@0 534 $(BUILD) BUILDTYPE=hpx PASSWDTYPE=dce
yuuji@0 535
yuuji@0 536 # Amiga
yuuji@0 537
yuuji@0 538 ami am2 ama amn:
yuuji@0 539 $(MAKE) an LN=cp SYSTEM=amiga
yuuji@0 540 $(BUILD) BUILDTYPE=$@ LN=cp
yuuji@0 541
yuuji@0 542
yuuji@0 543 # Courtesy entries for Microsoft systems
yuuji@0 544
yuuji@0 545 nt:
yuuji@0 546 nmake /nologo /f makefile.nt
yuuji@0 547
yuuji@0 548 ntk:
yuuji@0 549 nmake /nologo /f makefile.ntk
yuuji@0 550
yuuji@0 551 w2k:
yuuji@0 552 nmake /nologo /f makefile.w2k
yuuji@0 553
yuuji@0 554 wce:
yuuji@0 555 nmake /nologo /f makefile.wce
yuuji@0 556
yuuji@0 557
yuuji@0 558 # SSL build choices
yuuji@0 559
yuuji@0 560 sslnopwd sslunix.nopwd sslsco.nopwd:
yuuji@0 561 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 562 @echo + Building in full compliance with RFC 3501 security
yuuji@0 563 @echo + requirements:
yuuji@0 564 @echo ++ TLS/SSL encryption is supported
yuuji@0 565 @echo ++ Unencrypted plaintext passwords are prohibited
yuuji@0 566 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 567
yuuji@0 568 sslunix sslsco:
yuuji@0 569 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 570 @echo + Building in PARTIAL compliance with RFC 3501 security
yuuji@0 571 @echo + requirements:
yuuji@0 572 @echo + Compliant:
yuuji@0 573 @echo ++ TLS/SSL encryption is supported
yuuji@0 574 @echo + Non-compliant:
yuuji@0 575 @echo ++ Unencrypted plaintext passwords are permitted
yuuji@0 576 @echo +
yuuji@0 577 @echo + In order to rectify this problem, you MUST build with:
yuuji@0 578 @echo ++ SSLTYPE=$(SSLTYPE).nopwd
yuuji@0 579 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 580 @echo
yuuji@0 581 @echo Do you want to continue this build anyway? Type y or n please:
yuuji@0 582 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac'
yuuji@0 583
yuuji@0 584 nounenc:
yuuji@0 585 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 586 @echo + At your request, this build with unencrypted authentication has
yuuji@0 587 @echo + been CANCELLED.
yuuji@0 588 @echo + You must start over with a new make command.
yuuji@0 589 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 590
yuuji@0 591
yuuji@0 592 sslnone:
yuuji@0 593 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 594 @echo + Building in NON-COMPLIANCE with RFC 3501 security requirements:
yuuji@0 595 @echo + Non-compliant:
yuuji@0 596 @echo ++ TLS/SSL encryption is NOT supported
yuuji@0 597 @echo ++ Unencrypted plaintext passwords are permitted
yuuji@0 598 @echo +
yuuji@0 599 @echo + In order to rectify this problem, you MUST build with:
yuuji@0 600 @echo ++ SSLTYPE=nopwd
yuuji@0 601 @echo + You must also have OpenSSL or equivalent installed.
yuuji@0 602 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 603 @echo
yuuji@0 604 @echo Do you want to continue this build anyway? Type y or n please:
yuuji@0 605 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac'
yuuji@0 606
yuuji@0 607 nonossl:
yuuji@0 608 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 609 @echo + At your request, this build with no TLS/SSL support has been
yuuji@0 610 @echo + CANCELLED.
yuuji@0 611 @echo + You must start over with a new make command.
yuuji@0 612 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 613
yuuji@0 614
yuuji@0 615 # IP build choices
yuuji@0 616
yuuji@0 617 ip4:
yuuji@0 618 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 619 @echo + Building with IPv4 support
yuuji@0 620 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 621
yuuji@0 622 ip6:
yuuji@0 623 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 624 @echo + Building with IPv6 support
yuuji@0 625 @echo +
yuuji@0 626 @echo + NOTE: Some versions of glibc have a bug in the getaddrinfo
yuuji@0 627 @echo + call which does DNS name resolution. This bug causes host
yuuji@0 628 @echo + names to be canonicalized incorrectly, as well as doing an
yuuji@0 629 @echo + unnecessary and performance-sapping reverse DNS call. This
yuuji@0 630 @echo + problem does not affect the IPv4 gethostbyname call.
yuuji@0 631 @echo +
yuuji@0 632 @echo + getaddrinfo works properly on Mac OS X and Windows. However,
yuuji@0 633 @echo + the problem has been observed on some Linux systems.
yuuji@0 634 @echo +
yuuji@0 635 @echo + If you answer n to the following question the build will be
yuuji@0 636 @echo + cancelled and you must rebuild. If you did not specify IPv6
yuuji@0 637 @echo + yourself, try adding IP6=4 to the make command line.
yuuji@0 638 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 639 @echo
yuuji@0 640 @echo Do you want to build with IPv6 anyway? Type y or n please:
yuuji@0 641 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make noip6;exit 1);; esac'
yuuji@0 642 @echo OK, I will remember that you really want to build with IPv6.
yuuji@0 643 @echo You will not see this message again.
yuuji@0 644 @$(TOUCH) ip6
yuuji@0 645
yuuji@0 646 noip6:
yuuji@0 647 $(MAKE) clean
yuuji@0 648 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 649 @echo + At your request, this build with IPv6 has been CANCELLED.
yuuji@0 650 @echo + You must start over with a new make command.
yuuji@0 651 @echo +
yuuji@0 652 @echo + If you wish to rebuild without IPv6 support, do one of the
yuuji@0 653 @echo + following:
yuuji@0 654 @echo +
yuuji@0 655 @echo + 1. If you specified IP=6 on the make command line, omit it.
yuuji@0 656 @echo +
yuuji@0 657 @echo + 2. Some of the Linux builds automatically select IPv6. If
yuuji@0 658 @echo + you choose one of those builds, add IP6=4 to the make command
yuuji@0 659 @echo + line. Note that this is IP6=4, not IP=4.
yuuji@0 660 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 661
yuuji@0 662 # C compiler types
yuuji@0 663
yuuji@0 664 an ua:
yuuji@0 665 @$(MAKE) ssl$(SSLTYPE)
yuuji@0 666 @echo Applying $@ process to sources...
yuuji@0 667 $(TOOLS)/$@ "$(LN)" src/c-client c-client
yuuji@0 668 $(TOOLS)/$@ "$(LN)" src/ansilib c-client
yuuji@0 669 $(TOOLS)/$@ "$(LN)" src/charset c-client
yuuji@0 670 $(TOOLS)/$@ "$(LN)" src/osdep/$(SYSTEM) c-client
yuuji@0 671 $(TOOLS)/$@ "$(LN)" src/mtest mtest
yuuji@0 672 $(TOOLS)/$@ "$(LN)" src/ipopd ipopd
yuuji@0 673 $(TOOLS)/$@ "$(LN)" src/imapd imapd
yuuji@0 674 $(TOOLS)/$@ "$(LN)" src/mailutil mailutil
yuuji@0 675 $(TOOLS)/$@ "$(LN)" src/mlock mlock
yuuji@0 676 $(TOOLS)/$@ "$(LN)" src/dmail dmail
yuuji@0 677 $(TOOLS)/$@ "$(LN)" src/tmail tmail
yuuji@0 678 $(LN) $(TOOLS)/$@ .
yuuji@0 679
yuuji@0 680 build: OSTYPE rebuild rebuildclean bundled
yuuji@0 681
yuuji@0 682 OSTYPE:
yuuji@0 683 @$(MAKE) ip$(IP)
yuuji@0 684 @echo Building c-client for $(BUILDTYPE)...
yuuji@0 685 @$(TOUCH) SPECIALS
yuuji@0 686 echo `$(CAT) SPECIALS` $(EXTRASPECIALS) > c-client/SPECIALS
yuuji@0 687 $(CD) c-client;$(MAKE) $(BUILDTYPE) EXTRACFLAGS='$(EXTRACFLAGS)'\
yuuji@0 688 EXTRALDFLAGS='$(EXTRALDFLAGS)'\
yuuji@0 689 EXTRADRIVERS='$(EXTRADRIVERS)'\
yuuji@0 690 EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)'\
yuuji@0 691 PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)\
yuuji@0 692 $(SPECIALS) $(EXTRASPECIALS)
yuuji@0 693 echo $(BUILDTYPE) > OSTYPE
yuuji@0 694 $(TOUCH) rebuild
yuuji@0 695
yuuji@0 696 rebuild:
yuuji@0 697 @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)'
yuuji@0 698 @echo Rebuilding c-client for `$(CAT) OSTYPE`...
yuuji@0 699 @$(TOUCH) SPECIALS
yuuji@0 700 $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \
yuuji@0 701 CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS`
yuuji@0 702
yuuji@0 703 rebuildclean:
yuuji@0 704 $(SH) -c '$(RM) rebuild || true'
yuuji@0 705
yuuji@0 706 bundled:
yuuji@0 707 @echo Building bundled tools...
yuuji@0 708 $(CD) mtest;$(MAKE)
yuuji@0 709 $(CD) ipopd;$(MAKE)
yuuji@0 710 $(CD) imapd;$(MAKE)
yuuji@0 711 $(CD) mailutil;$(MAKE)
yuuji@0 712 @$(SH) -c '(test -f /usr/include/sysexits.h ) || make sysexitwarn'
yuuji@0 713 $(CD) mlock;$(MAKE) || true
yuuji@0 714 $(CD) dmail;$(MAKE) || true
yuuji@0 715 $(CD) tmail;$(MAKE) || true
yuuji@0 716
yuuji@0 717
yuuji@0 718 sysexitwarn:
yuuji@0 719 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 720 @echo + Hmm...it does not look like /usr/include/sysexits.h exists.
yuuji@0 721 @echo + Either your system is too ancient to have the sysexits.h
yuuji@0 722 @echo + include, or your C compiler gets it from some other location
yuuji@0 723 @echo + than /usr/include. If your system is too old to have the
yuuji@0 724 @echo + sysexits.h include, you will not be able to build the
yuuji@0 725 @echo + following programs.
yuuji@0 726 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
yuuji@0 727
yuuji@0 728 clean:
yuuji@0 729 @echo Removing old processed sources and binaries...
yuuji@0 730 $(SH) -c '$(RM) an ua OSTYPE SPECIALS c-client mtest imapd ipopd mailutil mlock dmail tmail || true'
yuuji@0 731 $(CD) tools;$(MAKE) clean
yuuji@0 732
yuuji@0 733
yuuji@0 734 # A monument to a hack of long ago and far away...
yuuji@0 735 love:
yuuji@0 736 @echo not war?

UW-IMAP'd extensions by yuuji