File: Makefile

package info (click to toggle)
imap 4.2-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,308 kB
  • ctags: 4,686
  • sloc: ansic: 52,610; makefile: 824; sh: 78
file content (288 lines) | stat: -rw-r--r-- 7,546 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# Program:	IMAP Toolkit Makefile
#
# Author:	Mark Crispin
#		Networks and Distributed Computing
#		Computing & Communications
#		University of Washington
#		Administration Building, AG-44
#		Seattle, WA  98195
#		Internet: MRC@CAC.Washington.EDU
#
# Date:		7 December 1989
# Last Edited:	14 July 1998
#
# Copyright 1998 by the University of Washington
#
#  Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
# that the above copyright notice appears in all copies and that both the
# above copyright notice and this permission notice appear in supporting
# documentation, and that the name of the University of Washington not be
# used in advertising or publicity pertaining to distribution of the software
# without specific, written prior permission.  This software is made
# available "as is", and
# THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
# WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
# NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
# INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
# (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


# Normal command to build IMAP toolkit:
#  make <port> [EXTRAAUTHENTICATORS=xxx] [EXTRADRIVERS=xxx] [PASSWDTYPE=xxx]
#
# For example:
#	make os4 EXTRAAUTHENTICATORS=gss
# builds for Digital Unix (OSF/1) version 4 with GSSAPI/Kerberos V additional
# authentication.


# The following extra authenticators are defined:
# krb	Kerberos IV (client-only)
# gss	GSSAPI/Kerberos V

EXTRAAUTHENTICATORS=


# The following extra drivers are defined:
# mbox	if file "mbox" exists on the home directory, automatically moves mail
#	 from the spool directory to "mbox" and uses "mbox" as INBOX.

EXTRADRIVERS=mbox


# The following plaintext login types are defined:
# afs	AFS authentication
# dce	DCE authentication
# krb	Kerberos IV (must also have krb as an extra authentication)
# std	system standard

PASSWDTYPE=std


# Directory locations.  I didn't want to put this stuff here, but the Pine
# guys insisted...

AFSDIR=/usr/afsws
GSSDIR=/usr/local


# Miscellaneous command line options passed down to the c-client Makefile

EXTRACFLAGS=
EXTRALDFLAGS=

# Normal commands

CAT=cat
CD=cd
LN=ln -s
MAKE=make
MKDIR=mkdir
RM=rm -rf
SH=sh
SYSTEM=unix
TOOLS=tools
TOUCH=touch


# Primary build command

BUILDOPTIONS= EXTRACFLAGS="$(EXTRACFLAGS)"\
 EXTRALDFLAGS="$(EXTRALDFLAGS)"\
 EXTRADRIVERS="$(EXTRADRIVERS)" EXTRAAUTHENTICATORS="$(EXTRAAUTHENTICATORS)"\
 PASSWDTYPE=$(PASSWDTYPE) AFSDIR=$(AFSDIR) GSSDIR=$(GSSDIR)
BUILD=$(MAKE) build $(BUILDOPTIONS) EXTRASPECIALS="$(EXTRASPECIALS)"


# Make the IMAP Toolkit

all:	c-client rebuild bundled


#  The following ports are defined.  These refer to the *standard* compiler
# on the given system.  This means, for example, that the sol port is for SUN's
# compiler and not for a non-standard compiler such as gcc.
#  If you are using gcc and it is not the standard compiler on your system, try
# using an ANSI port that is close to what you have.  For example, if your
# system is SVR4ish, try a32 or lnx; if it's more BSDish, try nxt, mct, or bsi.
#
# a32	AIX 3.2 for RS/6000
# a41	AIX 4.1 for RS/6000
# aix	AIX/370
# ami	AmigaDOS
# am2	AmigaDOS with a 68020+
# ama	AmigaDOS using AS225R2
# amn	AmigaDOS with a 680x0 using "new" socket library
# aos	AOS for RT
# art	AIX 2.2.1 for RT
# asv	Altos SVR4
# aux	A/UX
# bs3	BSD/i386 3.0 and higher
# bsd	generic BSD
# bsf	FreeBSD
# bsi	BSD/i386
# cvx	Convex
# d-g	Data General DG/UX prior to 5.4 (d41 port no longer exists)
# d54	Data General DG/UX 5.4
# dpx	Bull DPX/2 B.O.S.
# drs	ICL DRS/NX
# dyn	Dynix
# epx	EP/IX
# gas	GCC Altos SVR4
# gh9   GCC HP-UX 9.x
# ghp	GCC HP-UX 10.x
# gso	GCC Solaris
# gsu	GCC SUN-OS
# gul	GCC RISC Ultrix (DEC-5000)
# hpp	HP-UX 9.x
# hpx	HP-UX 10.x
# hxd	HP-UX 10.x with DCE security
# isc	Interactive Systems
# lnx	Linux with crypt() in the C library (see slx and sl5)
# lyn	LynxOS
# mct	MachTen
# mnt	Atari ST Mint (not MacMint)
# neb	NetBSD/FreeBSD
# nxt	NEXTSTEP
# osf	OSF/1
# os4	OSF/1 (Digital UNIX) 4
# ptx	PTX
# pyr	Pyramid
# qnx	QNX 4
# s40	SUN-OS 4.0
# sc5	SCO Open Server 5.0.x
# sco	Santa Cruz Operation
# shp	HP-UX with Trusted Computer Base
# sgi	Silicon Graphics IRIX
# sl5	Linux using -lcrypt to get the crypt() function
# slx	Linux using -lshadow to get the crypt() function
# snx	Siemens Nixdorf SININX or Reliant UNIX
# sol	Solaris (won't work unless "ucbcc" works -- use gso instead)
# sos	OSF/1 with SecureWare
# ssn	SUN-OS with shadow password security
# sun	SUN-OS 4.1 or better
# sv2	SVR2 on AT&T PC-7300 (incomplete port)
# sv4	generic SVR4
# ult	RISC Ultrix (DEC-5000)
# uw2	UnixWare SVR4.2
# vul	VAX Ultrix
# vu2	VAX Ultrix 2.3 (e.g. for VAXstation-2000 or similar old version)

c-client:
	@echo Not processed yet.  In a first-time build, you must specify
	@echo the system type so that the sources are properly processed.
	@false


# Note on SCO you may have to set LN to "ln".

a32 a41 aix bs3 bsf bsi d-g d54 drs epx gas gh9 ghp gso gsu gul hpp hpx lnx lyn mct mnt neb nxt osf os4 ptx qnx sc5 sco sgi shp sl5 slx snx sol sos uw2: an
	$(BUILD) OS=$@

# If you use sv4, you may find that it works to move it to use the an process.
# If so, you probably will want to delete the "-Dconst=" from the sv4 CFLAGS in
# the c-client Makefile.

aos art asv aux bsd cvx dpx dyn isc pyr s40 sv4 ult vul vu2: ua
	$(BUILD) OS=$@

# SUN-OS makes you load libdl by hand...

ssn sun: suntools ua
	$(BUILD) OS=$@

suntools:
	$(CD) tools;$(MAKE) LDFLAGS=-ldl


# SVR2 doesn't have symbolic links (at least my SVR2 system doesn't)

sv2:
	$(MAKE) ua LN=ln
	$(BUILD) OS=$@ LN=ln


# Pine port names, not distinguished in c-client

bs2:	an
	$(BUILD) OS=bsi

pt1:	an
	$(BUILD) OS=ptx


# Compatibility

hxd:	# Gotta do this one the hard way
	$(MAKE) hpx PASSWDTYPE=dce

# Amiga

ami am2 ama amn:
	$(MAKE) an LN=cp SYSTEM=amiga
	$(BUILD) OS=$@ LN=cp


# Courtesy entry for NT

nt:
	nmake /nologo -f makefile.nt

ntk:
	nmake /nologo -f makefile.ntk

# Courtesy entry for WCE

wce:
	nmake /nologo -f makefile.wce


# C compiler types

an ua:
	@echo Applying $@ process to sources...
	$(TOOLS)/$@ "$(LN)" src/c-client c-client
	$(TOOLS)/$@ "$(LN)" src/ansilib c-client
	$(TOOLS)/$@ "$(LN)" src/charset c-client
	$(LN) `pwd`/src/kerberos/* c-client
	$(TOOLS)/$@ "$(LN)" src/osdep/$(SYSTEM) c-client
	$(TOOLS)/$@ "$(LN)" src/mtest mtest
	$(TOOLS)/$@ "$(LN)" src/ipopd ipopd
	$(TOOLS)/$@ "$(LN)" src/imapd imapd
	$(LN) $(TOOLS)/$@ .

build:	OSTYPE rebuild rebuildclean bundled

OSTYPE:
	@echo Building c-client for $(OS)...
	$(CD) c-client;$(MAKE) $(OS) BUILDOPTIONS='$(BUILDOPTIONS)' \
	 EXTRASPECIALS="$(EXTRASPECIALS)"
	echo $(OS) > OSTYPE
	$(TOUCH) rebuild

rebuild:
	@echo Rebuilding c-client for `cat OSTYPE`...
	$(CD) c-client;$(MAKE) all CC=`cat CCTYPE` CFLAGS="`cat CFLAGS`"

rebuildclean:
	sh -c '$(RM) rebuild || true'

bundled:
	@echo Building bundled tools...
	$(CD) mtest;$(MAKE)
	$(CD) ipopd;$(MAKE)
	$(CD) imapd;$(MAKE)

clean:
	@echo Removing old processed sources and binaries...
	sh -c '$(RM) an ua OSTYPE c-client mtest imapd ipopd || true'
	$(CD) tools;$(MAKE) clean


# A monument to a hack of long ago and far away...
love:
	@echo not war?