imapext-2007

view Makefile @ 1:28a55bc1110c

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

UW-IMAP'd extensions by yuuji