imapext-2007

view Makefile @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children 28a55bc1110c 5cecc027b845
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=
258 # Extra linker flags (additional/alternative libraries, etc.)
260 EXTRALDFLAGS=
263 # Special make flags (e.g. to override make environment variables)
265 EXTRASPECIALS=
266 SPECIALS=
269 # Normal commands
271 CAT=cat
272 CD=cd
273 LN=ln -s
274 MAKE=make
275 MKDIR=mkdir
276 BUILDTYPE=rebuild
277 RM=rm -rf
278 SH=sh
279 SYSTEM=unix
280 TOOLS=tools
281 TOUCH=touch
284 # Primary build command
286 BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRACFLAGS)'\
287 EXTRALDFLAGS='$(EXTRALDFLAGS)'\
288 EXTRADRIVERS='$(EXTRADRIVERS)'\
289 EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)'\
290 PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)\
291 EXTRASPECIALS='$(EXTRASPECIALS)'
294 # Make the IMAP Toolkit
296 all: c-client SPECIALS rebuild bundled
298 c-client:
299 @echo Not processed yet. In a first-time build, you must specify
300 @echo the system type so that the sources are properly processed.
301 @false
304 SPECIALS:
305 echo $(SPECIALS) > SPECIALS
307 # Note on SCO you may have to set LN to "ln".
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
310 $(BUILD) BUILDTYPE=$@
312 # If you use sv4, you may find that it works to move it to use the an process.
313 # If so, you probably will want to delete the "-Dconst=" from the sv4 CFLAGS in
314 # the c-client Makefile.
316 aos art asv aux bsd cvx dpx dyn isc pyr sv4 ult vul vu2: ua
317 $(BUILD) BUILDTYPE=$@
320 # Knotheads moved Kerberos and SSL locations on these platforms
322 # Paul Vixie claims that all FreeBSD versions have working IPv6
324 bsf: an
325 $(TOUCH) ip6
326 $(BUILD) BUILDTYPE=$@ IP=$(IP6) \
327 PASSWDTYPE=pam \
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"
330 # I assume that Theo did the right thing for IPv6. OpenBSD does not have PAM.
332 bso: an
333 $(TOUCH) ip6
334 $(BUILD) BUILDTYPE=$@ IP=$(IP6) \
335 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/ssl SSLKEYS=/etc/ssl/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib"
337 # Info from Joel Reicher about NetBSD SSL paths. I assume it has PAM because pam is in NetBSD sources...
339 neb: an
340 $(TOUCH) ip6
341 $(BUILD) BUILDTYPE=$@ IP=$(IP6) \
342 PASSWDTYPE=pam \
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"
345 cyg: an
346 $(BUILD) BUILDTYPE=cyg \
347 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/usr/ssl/certs SSLKEYS=/usr/ssl/certs"
349 gcs: an
350 $(BUILD) BUILDTYPE=gso \
351 SPECIALS="SSLINCLUDE=/opt/csw/include/openssl SSLLIB=/opt/csw/lib SSLCERTS=/opt/csw/ssl/certs SSLKEYS=/opt/csw/ssl/certs"
353 ldb: an
354 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
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"
357 lfd: an
358 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
359 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/pki/tls/certs SSLKEYS=/etc/pki/tls/private GSSDIR=/usr/kerberos"
361 ln8: an
362 $(TOUCH) ip6
363 $(BUILD) BUILDTYPE=slx IP=$(IP6) \
364 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/usr/lib/ssl/certs MAILSPOOL=/var/mail"
367 # RHE5 does not have the IPv6 bug
369 lr5: an
370 $(TOUCH) ip6
371 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
372 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/pki/tls/certs SSLKEYS=/etc/pki/tls/private GSSDIR=/usr/kerberos"
374 lmd: an
375 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
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"
378 # RHE3 definitely has the IPv6 bug
380 lrh: lrhok an
381 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
382 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/usr/share/ssl/certs SSLKEYS=/usr/share/ssl/private GSSDIR=/usr/kerberos"
384 lrhok:
385 @$(SH) -c '(test ! -d /etc/pki/tls ) || make lrhwarn'
386 @$(TOUCH) lrhok
388 lrhwarn:
389 @echo You are building for OLD versions of RedHat Linux. This build
390 @echo is NOT suitable for RedHat Enterprise 5, which stores SSL/TLS
391 @echo certificates and keys in /etc/pki/tls rather than /usr/share/ssl.
392 @echo If you want to build for modern RedHat Linux, you should use
393 @echo make lr5 instead.
394 @echo Do you want to continue this build? Type y or n please:
395 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
396 @echo OK, I will remember that you really want to build for old
397 @echo RedHat Linux. You will not see this message again.
398 @echo If you realize that you really wanted to build for modern
399 @echo RedHat Linux, then do the following commands:
400 @echo % rm lrhok
401 @echo % make clean
402 @echo % make lr5
404 lsu: an
405 $(BUILD) BUILDTYPE=lnp IP=$(IP6) \
406 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/usr/share/ssl/certs SSLKEYS=/usr/share/ssl/private GSSDIR=/usr/kerberos"
408 # iToy does not have Kerberos or PAM. It doesn't have a
409 # /System/Library/OpenSSL directory either, but the libcrypto shared library
410 # has these locations so this is what we will use.
412 osi: an
413 $(TOUCH) ip6
414 $(BUILD) BUILDTYPE=osx IP=$(IP6) CC=arm-apple-darwin-gcc \
415 SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/System/Library/OpenSSL/certs SSLKEYS=/System/Library/OpenSSL/private"
417 oxp: an
418 $(TOUCH) ip6
419 $(BUILD) BUILDTYPE=osx IP=$(IP6) EXTRAAUTHENTICATORS="$(EXTRAAUTHENTICATORS) gss" \
420 PASSWDTYPE=pam \
421 EXTRACFLAGS="$(EXTRACFLAGS) -DMAC_OSX_KLUDGE=1" \
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"
424 osx: osxok an
425 $(TOUCH) ip6
426 $(BUILD) BUILDTYPE=$@ IP=$(IP6) EXTRAAUTHENTICATORS="$(EXTRAAUTHENTICATORS) gss" \
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"
429 osxok:
430 @$(SH) -c '(test ! -f /usr/include/pam/pam_appl.h ) || make osxwarn'
431 @$(TOUCH) osxok
433 osxwarn:
434 @echo You are building for OLD versions of Mac OS X. This build is
435 @echo NOT suitable for modern versions of Mac OS X, such as Tiger,
436 @echo which use PAM-based authentication. If you want to build for
437 @echo modern Mac OS X, you should use make oxp instead.
438 @echo Do you want to continue this build? Type y or n please:
439 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
440 @echo OK, I will remember that you really want to build for old
441 @echo Mac OS X. You will not see this message again.
442 @echo If you realize that you really wanted to build for modern
443 @echo Mac OS X, then do the following commands:
444 @echo % rm osxok
445 @echo % make clean
446 @echo % make oxp
449 # Linux shadow password support doesn't build on traditional systems, but most
450 # Linux systems are shadow these days.
452 lnx: lnxnul an
453 $(BUILD) BUILDTYPE=$@
455 lnxnul:
456 @$(SH) -c '(test $(PASSWDTYPE) = nul) || make lnxok'
458 lnxok:
459 @echo You are building for traditional Linux. Most modern Linux
460 @echo systems require that you build using make slx.
461 @echo Do you want to continue this build? Type y or n please:
462 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
463 @echo OK, I will remember that you really want to build for
464 @echo traditional Linux. You will not see this message again.
465 @echo If you discover that you can not log in to the POP and IMAP
466 @echo servers, then do the following commands:
467 @echo % rm lnxok
468 @echo % make clean
469 @echo % make slx
470 @echo If slx does not work, try sl4 or sl5. Be sure to do a
471 @echo make clean between each try!
472 @$(TOUCH) lnxok
475 # SUN-OS C compiler makes you load libdl by hand...
477 ssn sun: sunok suntools ua
478 $(BUILD) BUILDTYPE=$@
480 suntools:
481 $(CD) tools;$(MAKE) LDFLAGS=-ldl
483 gsu: sunok an
484 $(BUILD) BUILDTYPE=$@
486 s40: sunok ua
487 $(BUILD) BUILDTYPE=$@
489 sunok:
490 @echo You are building for the old BSD-based SUN-OS. This is NOT
491 @echo the modern SVR4-based Solaris. If you want to build for
492 @echo Solaris, you should use make gso or make sol or make soc. Do
493 @echo you want to continue this build? Type y or n please:
494 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
495 @echo OK, I will remember that you really want to build for the old
496 @echo BSD-based SUN-OS. You will not see this message again.
497 @echo If the build fails and you realize that you really wanted to
498 @echo build for Solaris, then do the following commands:
499 @echo % rm sunok
500 @echo % make clean
501 @echo % make gso
502 @echo If gso does not work, try sol. Be sure to do a make clean
503 @echo between each try!
504 @$(TOUCH) sunok
507 # SVR2 doesn't have symbolic links (at least my SVR2 system doesn't)
509 sv2:
510 $(MAKE) ua LN=ln
511 $(BUILD) BUILDTYPE=$@ LN=ln
513 # Hard links don't quite work right in SUA, and there don't seem to be any
514 # SSL includes. However, IPv6 works.
516 sua:
517 $(TOUCH) ip6 sslnone
518 $(MAKE) an LN=cp SSLTYPE=none
519 $(BUILD) BUILDTYPE=$@ LN=cp IP=$(IP6) SSLTYPE=none
522 # Pine port names, not distinguished in c-client
524 bs2: an
525 $(BUILD) BUILDTYPE=bsi
527 pt1: an
528 $(BUILD) BUILDTYPE=ptx
531 # Compatibility
533 hxd:
534 $(BUILD) BUILDTYPE=hpx PASSWDTYPE=dce
536 # Amiga
538 ami am2 ama amn:
539 $(MAKE) an LN=cp SYSTEM=amiga
540 $(BUILD) BUILDTYPE=$@ LN=cp
543 # Courtesy entries for Microsoft systems
545 nt:
546 nmake /nologo /f makefile.nt
548 ntk:
549 nmake /nologo /f makefile.ntk
551 w2k:
552 nmake /nologo /f makefile.w2k
554 wce:
555 nmake /nologo /f makefile.wce
558 # SSL build choices
560 sslnopwd sslunix.nopwd sslsco.nopwd:
561 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
562 @echo + Building in full compliance with RFC 3501 security
563 @echo + requirements:
564 @echo ++ TLS/SSL encryption is supported
565 @echo ++ Unencrypted plaintext passwords are prohibited
566 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
568 sslunix sslsco:
569 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
570 @echo + Building in PARTIAL compliance with RFC 3501 security
571 @echo + requirements:
572 @echo + Compliant:
573 @echo ++ TLS/SSL encryption is supported
574 @echo + Non-compliant:
575 @echo ++ Unencrypted plaintext passwords are permitted
576 @echo +
577 @echo + In order to rectify this problem, you MUST build with:
578 @echo ++ SSLTYPE=$(SSLTYPE).nopwd
579 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
580 @echo
581 @echo Do you want to continue this build anyway? Type y or n please:
582 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac'
584 nounenc:
585 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
586 @echo + At your request, this build with unencrypted authentication has
587 @echo + been CANCELLED.
588 @echo + You must start over with a new make command.
589 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
592 sslnone:
593 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
594 @echo + Building in NON-COMPLIANCE with RFC 3501 security requirements:
595 @echo + Non-compliant:
596 @echo ++ TLS/SSL encryption is NOT supported
597 @echo ++ Unencrypted plaintext passwords are permitted
598 @echo +
599 @echo + In order to rectify this problem, you MUST build with:
600 @echo ++ SSLTYPE=nopwd
601 @echo + You must also have OpenSSL or equivalent installed.
602 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
603 @echo
604 @echo Do you want to continue this build anyway? Type y or n please:
605 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac'
607 nonossl:
608 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
609 @echo + At your request, this build with no TLS/SSL support has been
610 @echo + CANCELLED.
611 @echo + You must start over with a new make command.
612 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
615 # IP build choices
617 ip4:
618 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
619 @echo + Building with IPv4 support
620 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
622 ip6:
623 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
624 @echo + Building with IPv6 support
625 @echo +
626 @echo + NOTE: Some versions of glibc have a bug in the getaddrinfo
627 @echo + call which does DNS name resolution. This bug causes host
628 @echo + names to be canonicalized incorrectly, as well as doing an
629 @echo + unnecessary and performance-sapping reverse DNS call. This
630 @echo + problem does not affect the IPv4 gethostbyname call.
631 @echo +
632 @echo + getaddrinfo works properly on Mac OS X and Windows. However,
633 @echo + the problem has been observed on some Linux systems.
634 @echo +
635 @echo + If you answer n to the following question the build will be
636 @echo + cancelled and you must rebuild. If you did not specify IPv6
637 @echo + yourself, try adding IP6=4 to the make command line.
638 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
639 @echo
640 @echo Do you want to build with IPv6 anyway? Type y or n please:
641 @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make noip6;exit 1);; esac'
642 @echo OK, I will remember that you really want to build with IPv6.
643 @echo You will not see this message again.
644 @$(TOUCH) ip6
646 noip6:
647 $(MAKE) clean
648 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
649 @echo + At your request, this build with IPv6 has been CANCELLED.
650 @echo + You must start over with a new make command.
651 @echo +
652 @echo + If you wish to rebuild without IPv6 support, do one of the
653 @echo + following:
654 @echo +
655 @echo + 1. If you specified IP=6 on the make command line, omit it.
656 @echo +
657 @echo + 2. Some of the Linux builds automatically select IPv6. If
658 @echo + you choose one of those builds, add IP6=4 to the make command
659 @echo + line. Note that this is IP6=4, not IP=4.
660 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
662 # C compiler types
664 an ua:
665 @$(MAKE) ssl$(SSLTYPE)
666 @echo Applying $@ process to sources...
667 $(TOOLS)/$@ "$(LN)" src/c-client c-client
668 $(TOOLS)/$@ "$(LN)" src/ansilib c-client
669 $(TOOLS)/$@ "$(LN)" src/charset c-client
670 $(TOOLS)/$@ "$(LN)" src/osdep/$(SYSTEM) c-client
671 $(TOOLS)/$@ "$(LN)" src/mtest mtest
672 $(TOOLS)/$@ "$(LN)" src/ipopd ipopd
673 $(TOOLS)/$@ "$(LN)" src/imapd imapd
674 $(TOOLS)/$@ "$(LN)" src/mailutil mailutil
675 $(TOOLS)/$@ "$(LN)" src/mlock mlock
676 $(TOOLS)/$@ "$(LN)" src/dmail dmail
677 $(TOOLS)/$@ "$(LN)" src/tmail tmail
678 $(LN) $(TOOLS)/$@ .
680 build: OSTYPE rebuild rebuildclean bundled
682 OSTYPE:
683 @$(MAKE) ip$(IP)
684 @echo Building c-client for $(BUILDTYPE)...
685 @$(TOUCH) SPECIALS
686 echo `$(CAT) SPECIALS` $(EXTRASPECIALS) > c-client/SPECIALS
687 $(CD) c-client;$(MAKE) $(BUILDTYPE) EXTRACFLAGS='$(EXTRACFLAGS)'\
688 EXTRALDFLAGS='$(EXTRALDFLAGS)'\
689 EXTRADRIVERS='$(EXTRADRIVERS)'\
690 EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)'\
691 PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)\
692 $(SPECIALS) $(EXTRASPECIALS)
693 echo $(BUILDTYPE) > OSTYPE
694 $(TOUCH) rebuild
696 rebuild:
697 @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)'
698 @echo Rebuilding c-client for `$(CAT) OSTYPE`...
699 @$(TOUCH) SPECIALS
700 $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \
701 CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS`
703 rebuildclean:
704 $(SH) -c '$(RM) rebuild || true'
706 bundled:
707 @echo Building bundled tools...
708 $(CD) mtest;$(MAKE)
709 $(CD) ipopd;$(MAKE)
710 $(CD) imapd;$(MAKE)
711 $(CD) mailutil;$(MAKE)
712 @$(SH) -c '(test -f /usr/include/sysexits.h ) || make sysexitwarn'
713 $(CD) mlock;$(MAKE) || true
714 $(CD) dmail;$(MAKE) || true
715 $(CD) tmail;$(MAKE) || true
718 sysexitwarn:
719 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
720 @echo + Hmm...it does not look like /usr/include/sysexits.h exists.
721 @echo + Either your system is too ancient to have the sysexits.h
722 @echo + include, or your C compiler gets it from some other location
723 @echo + than /usr/include. If your system is too old to have the
724 @echo + sysexits.h include, you will not be able to build the
725 @echo + following programs.
726 @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
728 clean:
729 @echo Removing old processed sources and binaries...
730 $(SH) -c '$(RM) an ua OSTYPE SPECIALS c-client mtest imapd ipopd mailutil mlock dmail tmail || true'
731 $(CD) tools;$(MAKE) clean
734 # A monument to a hack of long ago and far away...
735 love:
736 @echo not war?

UW-IMAP'd extensions by yuuji