~ubuntu-branches/debian/stretch/alpine/stretch

« back to all changes in this revision

Viewing changes to imap/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2007-02-17 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070217131742-99x5c6cpg1pbkdhw
Tags: upstream-0.82+dfsg
ImportĀ upstreamĀ versionĀ 0.82+dfsg

Show diffs side-by-side

added added

removed removed

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