imapext-2007

annotate src/osdep/amiga/Makefile @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
rev   line source
yuuji@0 1 # ========================================================================
yuuji@0 2 # Copyright 1988-2006 University of Washington
yuuji@0 3 #
yuuji@0 4 # Licensed under the Apache License, Version 2.0 (the "License");
yuuji@0 5 # you may not use this file except in compliance with the License.
yuuji@0 6 # You may obtain a copy of the License at
yuuji@0 7 #
yuuji@0 8 # http://www.apache.org/licenses/LICENSE-2.0
yuuji@0 9 #
yuuji@0 10 #
yuuji@0 11 # ========================================================================
yuuji@0 12
yuuji@0 13
yuuji@0 14 # Program: C client makefile for Amiga
yuuji@0 15 #
yuuji@0 16 # Author: Mark Crispin
yuuji@0 17 # Networks and Distributed Computing
yuuji@0 18 # Computing & Communications
yuuji@0 19 # University of Washington
yuuji@0 20 # Administration Building, AG-44
yuuji@0 21 # Seattle, WA 98195
yuuji@0 22 # Internet: MRC@CAC.Washington.EDU
yuuji@0 23 #
yuuji@0 24 # Date: 11 May 1989
yuuji@0 25 # Last Edited: 5 November 2006
yuuji@0 26
yuuji@0 27
yuuji@0 28 # Command line build parameters
yuuji@0 29
yuuji@0 30 EXTRAAUTHENTICATORS=
yuuji@0 31 EXTRADRIVERS=mbox
yuuji@0 32 PASSWDTYPE=std
yuuji@0 33
yuuji@0 34
yuuji@0 35 # Build parameters normally set by the individual port
yuuji@0 36
yuuji@0 37 AMICFLAGS=-O -DNO_INLINE_STDARG -Dunix
yuuji@0 38 AMILDFLAGS=/pine/libc.a -lamiga -lauto
yuuji@0 39 CHECKPW=std
yuuji@0 40 LOGINPW=std
yuuji@0 41 ACTIVEFILE=/UULib/News/Active
yuuji@0 42 SPOOLDIR=/usr/spool
yuuji@0 43 MAILSPOOL=/AmiTCP/Mail
yuuji@0 44 NEWSSPOOL=/UUNews
yuuji@0 45 MD5PWD="/etc/cram-md5.pwd"
yuuji@0 46
yuuji@0 47
yuuji@0 48 # Default formats for creating new mailboxes and for empty mailboxes in the
yuuji@0 49 # default namespace; must be set to the associated driver's prototype.
yuuji@0 50 #
yuuji@0 51 # The CREATEPROTO is the default format for new mailbox creation.
yuuji@0 52 # The EMPTYPROTO is the default format for handling zero-byte files.
yuuji@0 53 #
yuuji@0 54 # Normally, this is set by the individual port.
yuuji@0 55 #
yuuji@0 56 # NOTE: namespace formats (e.g. mh and news) can not be set as a default format
yuuji@0 57 # since they do not exist in the default namespace. Also, it is meaningless to
yuuji@0 58 # set certain other formats (e.g. mbx, mx, and mix) as the EMPTYPROTO since
yuuji@0 59 # these formats can never be empty files.
yuuji@0 60
yuuji@0 61 CREATEPROTO=unixproto
yuuji@0 62 EMPTYPROTO=unixproto
yuuji@0 63
yuuji@0 64
yuuji@0 65 # Commands possibly overriden by the individual port
yuuji@0 66
yuuji@0 67 ARRC=ar rc
yuuji@0 68 CC=cc
yuuji@0 69 LN=cp
yuuji@0 70 RANLIB=ranlib
yuuji@0 71 RM=rm -f
yuuji@0 72
yuuji@0 73
yuuji@0 74 # Standard distribution build parameters
yuuji@0 75
yuuji@0 76 DEFAULTAUTHENTICATORS=ext md5 pla log
yuuji@0 77 DEFAULTDRIVERS=imap nntp pop3 mix mx mbx tenex mtx mh mmdf unix news phile
yuuji@0 78 CHUNKSIZE=65536
yuuji@0 79
yuuji@0 80
yuuji@0 81 # Normally no need to change any of these
yuuji@0 82
yuuji@0 83 ARCHIVE=c-client.a
yuuji@0 84 BINARIES=mail.o misc.o newsrc.o smanager.o osdep.o utf8.o utf8aux.o \
yuuji@0 85 dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
yuuji@0 86 rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
yuuji@0 87 unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o
yuuji@0 88 CFLAGS=$(BASECFLAGS) $(EXTRACFLAGS)
yuuji@0 89 MAKE=make
yuuji@0 90 MV=mv
yuuji@0 91 SHELL=/bin/sh
yuuji@0 92
yuuji@0 93
yuuji@0 94 # Primary build command
yuuji@0 95
yuuji@0 96 BUILDOPTIONS= EXTRACFLAGS=$(EXTRACFLAGS) EXTRALDFLAGS=$(EXTRALDFLAGS)\
yuuji@0 97 EXTRADRIVERS=$(EXTRADRIVERS) EXTRAAUTHENTICATORS=$(EXTRAAUTHENTICATORS)\
yuuji@0 98 PASSWDTYPE=$(PASSWDTYPE)
yuuji@0 99 BUILD=$(MAKE) build $(BUILDOPTIONS) $(SPECIALS)
yuuji@0 100
yuuji@0 101
yuuji@0 102 # Here if no make argument established
yuuji@0 103
yuuji@0 104 missing: osdep.h
yuuji@0 105 $(MAKE) $(ARCHIVE) CC=`cat CCTYPE` CFLAGS="`cat CFLAGS`"
yuuji@0 106
yuuji@0 107 osdep.h:
yuuji@0 108 @echo You must specify what type of system
yuuji@0 109 @false
yuuji@0 110
yuuji@0 111
yuuji@0 112 # Current ports
yuuji@0 113
yuuji@0 114 ami: # AmigaDOS
yuuji@0 115 $(BUILD) OS=$@ \
yuuji@0 116 BASECFLAGS="-DOLD $(AMICFLAGS)" \
yuuji@0 117 BASELDFLAGS="$(AMILDFLAGS) -lamitcp000" \
yuuji@0 118 CC=gcc
yuuji@0 119
yuuji@0 120 am2: # AmigaDOS with a 68020+
yuuji@0 121 $(BUILD) OS=ami \
yuuji@0 122 BASECFLAGS="-DOLD -m68020 $(AMICFLAGS)" \
yuuji@0 123 BASELDFLAGS="$(AMILDFLAGS) -lamitcp" \
yuuji@0 124 CC=gcc
yuuji@0 125
yuuji@0 126 amn: # AmigaDOS with a 680x0 using "new" socket library
yuuji@0 127 $(BUILD) OS=ami \
yuuji@0 128 BASELDFLAGS="$(AMILDFLAGS) -lnewamitcp000" \
yuuji@0 129 CC=gcc
yuuji@0 130
yuuji@0 131 ama: # AmigaDOS using AS225R2
yuuji@0 132 $(BUILD) OS=ami \
yuuji@0 133 MAILSPOOL=/INet/Mail \
yuuji@0 134 BASECFLAGS="-m68020 $(AMICFLAGS)" \
yuuji@0 135 BASELDFLAGS="$(AMILDFLAGS) -las225r2" \
yuuji@0 136 CC=gcc
yuuji@0 137
yuuji@0 138 # Build it!
yuuji@0 139
yuuji@0 140 build: clean once ckp$(PASSWDTYPE) $(EXTRAAUTHENTICATORS) $(ARCHIVE)
yuuji@0 141
yuuji@0 142 $(ARCHIVE): $(BINARIES)
yuuji@0 143 $(RM) $(ARCHIVE) || true
yuuji@0 144 $(ARRC) $(ARCHIVE) $(BINARIES)
yuuji@0 145 $(RANLIB) $(ARCHIVE)
yuuji@0 146
yuuji@0 147 # Cleanup
yuuji@0 148
yuuji@0 149 clean:
yuuji@0 150 $(RM) *.o linkage.[ch] auths.c $(ARCHIVE) osdep.* *TYPE *FLAGS || true
yuuji@0 151
yuuji@0 152
yuuji@0 153 # Dependencies
yuuji@0 154
yuuji@0 155 dummy.o: mail.h misc.h osdep.h dummy.h
yuuji@0 156 fdstring.o: mail.h misc.h osdep.h fdstring.h
yuuji@0 157 flstring.o: mail.h misc.h osdep.h flstring.h
yuuji@0 158 imap4r1.o: mail.h misc.h osdep.h imap4r1.h rfc822.h
yuuji@0 159 mail.o: mail.h misc.h osdep.h rfc822.h linkage.h
yuuji@0 160 mbx.o: mail.h misc.h osdep.h dummy.h
yuuji@0 161 mh.o: mail.h misc.h osdep.h mh.h dummy.h
yuuji@0 162 mix.o: mail.h misc.h osdep.h dummy.h
yuuji@0 163 mx.o: mail.h misc.h osdep.h mx.h dummy.h
yuuji@0 164 misc.o: mail.h misc.h osdep.h
yuuji@0 165 mmdf.o: mail.h misc.h osdep.h pseudo.h dummy.h
yuuji@0 166 mtx.o: mail.h misc.h osdep.h dummy.h
yuuji@0 167 netmsg.o: mail.h misc.h osdep.h netmsg.h
yuuji@0 168 news.o: mail.h misc.h osdep.h
yuuji@0 169 newsrc.o: mail.h misc.h osdep.h newsrc.h
yuuji@0 170 nntp.o: mail.h misc.h osdep.h netmsg.h smtp.h nntp.h rfc822.h
yuuji@0 171 phile.o: mail.h misc.h osdep.h rfc822.h dummy.h
yuuji@0 172 pseudo.o: pseudo.h
yuuji@0 173 pop3.o: mail.h misc.h osdep.h pop3.h rfc822.h
yuuji@0 174 smanager.o: mail.h misc.h osdep.h
yuuji@0 175 smtp.o: mail.h misc.h osdep.h smtp.h rfc822.h
yuuji@0 176 rfc822.o: mail.h misc.h osdep.h rfc822.h
yuuji@0 177 tenex.o: mail.h misc.h osdep.h dummy.h
yuuji@0 178 unix.o: mail.h misc.h osdep.h unix.h pseudo.h dummy.h
yuuji@0 179 utf8.o: mail.h misc.h osdep.h utf8.h
yuuji@0 180 utf8aux.o: mail.h misc.h osdep.h utf8.h
yuuji@0 181
yuuji@0 182
yuuji@0 183 # OS-dependent
yuuji@0 184
yuuji@0 185 osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
yuuji@0 186 osdep.h env_ami.h tcp_ami.h \
yuuji@0 187 osdep.c env_ami.c fs_ami.c ftl_ami.c nl_ami.c tcp_ami.c \
yuuji@0 188 auths.c gethstid.c \
yuuji@0 189 gr_waitp.c \
yuuji@0 190 auth_log.c auth_md5.c auth_pla.c \
yuuji@0 191 pmatch.c scandir.c \
yuuji@0 192 tz_bsd.c \
yuuji@0 193 write.c \
yuuji@0 194 strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
yuuji@0 195 OSCFLAGS
yuuji@0 196 $(CC) $(CFLAGS) `cat OSCFLAGS` -c osdep.c
yuuji@0 197
yuuji@0 198 osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
yuuji@0 199 $(RM) osdep.c || true
yuuji@0 200 cat osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
yuuji@0 201
yuuji@0 202
yuuji@0 203 # Once-only environment setup
yuuji@0 204
yuuji@0 205 once:
yuuji@0 206 @echo Once-only environment setup...
yuuji@0 207 ./drivers $(EXTRADRIVERS) $(DEFAULTDRIVERS) dummy
yuuji@0 208 ./mkauths $(EXTRAAUTHENTICATORS) $(DEFAULTAUTHENTICATORS)
yuuji@0 209 echo $(CC) > CCTYPE
yuuji@0 210 echo $(CFLAGS) -DCHUNKSIZE=$(CHUNKSIZE) > CFLAGS
yuuji@0 211 echo -DCREATEPROTO=$(CREATEPROTO) -DEMPTYPROTO=$(EMPTYPROTO) \
yuuji@0 212 -DMD5ENABLE=\"$(MD5PWD)\" -DMAILSPOOL=\"$(MAILSPOOL)\" \
yuuji@0 213 -DACTIVEFILE=\"$(ACTIVEFILE)\" -DNEWSSPOOL=\"$(NEWSSPOOL)\" \
yuuji@0 214 -DANONYMOUSHOME=\"$(MAILSPOOL)/anonymous\" > OSCFLAGS
yuuji@0 215 echo $(BASELDFLAGS) $(EXTRALDFLAGS) > LDFLAGS
yuuji@0 216 $(LN) os_$(OS).h osdep.h
yuuji@0 217 $(LN) os_$(OS).c osdepbas.c
yuuji@0 218 $(LN) log_$(LOGINPW).c osdeplog.c
yuuji@0 219 $(LN) ssl_none.c osdepssl.c
yuuji@0 220
yuuji@0 221
yuuji@0 222 # Password checkers
yuuji@0 223
yuuji@0 224 ckpstd: # Port standard
yuuji@0 225 $(LN) ckp_$(CHECKPW).c osdepckp.c
yuuji@0 226
yuuji@0 227
yuuji@0 228 # A monument to a hack of long ago and far away...
yuuji@0 229
yuuji@0 230 love:
yuuji@0 231 @echo not war?

UW-IMAP'd extensions by yuuji