home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / pine4.10.tar.gz / pine4.10.tar / pine4.10 / imap / src / osdep / amiga / Makefile < prev    next >
Makefile  |  1998-12-01  |  7KB  |  237 lines

  1. # Program:    C client makefile for Amiga
  2. #
  3. # Author:    Mark Crispin
  4. #        Networks and Distributed Computing
  5. #        Computing & Communications
  6. #        University of Washington
  7. #        Administration Building, AG-44
  8. #        Seattle, WA  98195
  9. #        Internet: MRC@CAC.Washington.EDU
  10. #
  11. # Date:        11 May 1989
  12. # Last Edited:    29 November 1998
  13. #
  14. # Copyright 1998 by the University of Washington
  15. #
  16. #  Permission to use, copy, modify, and distribute this software and its
  17. # documentation for any purpose and without fee is hereby granted, provided
  18. # that the above copyright notice appears in all copies and that both the
  19. # above copyright notice and this permission notice appear in supporting
  20. # documentation, and that the name of the University of Washington not be
  21. # used in advertising or publicity pertaining to distribution of the software
  22. # without specific, written prior permission.  This software is made
  23. # available "as is", and
  24. # THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  25. # WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  26. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  27. # NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  28. # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  29. # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  30. # (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  31. # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  32.  
  33.  
  34. # Command line build parameters
  35.  
  36. EXTRAAUTHENTICATORS=
  37. EXTRADRIVERS=mbox
  38. PASSWDTYPE=std
  39.  
  40.  
  41. # Build parameters normally set by the individual port
  42.  
  43. AMICFLAGS=-O -DNO_INLINE_STDARG -Dunix
  44. AMILDFLAGS=/pine/libc.a -lamiga -lauto
  45. CHECKPW=std
  46. LOGINPW=std
  47. ACTIVEFILE=/UULib/News/Active
  48. SPOOLDIR=/usr/spool
  49. MAILSPOOL=/AmiTCP/Mail
  50. NEWSSPOOL=/UUNews
  51.  
  52.  
  53. # Default formats for creating new mailboxes and for empty mailboxes in the
  54. # default namespace; must be set to the associated driver's prototype.
  55. #
  56. # The CREATEPROTO is the default format for new mailbox creation.
  57. # The EMPTYPROTO is the default format for handling zero-byte files.
  58. #
  59. # Normally, this is set by the individual port.
  60. #
  61. # NOTE: namespace formats (e.g. mh and news) can not be set as a default format
  62. # since they do not exist in the default namespace.  Also, it is meaningless to
  63. # set certain other formats (e.g. mbx and mx) as the EMPTYPROTO since these
  64. # formats can never be empty files.
  65.  
  66. CREATEPROTO=unixproto
  67. EMPTYPROTO=unixproto
  68.  
  69.  
  70. # Commands possibly overriden by the individual port
  71.  
  72. ARRC=ar rc
  73. CC=cc
  74. LN=cp
  75. RANLIB=ranlib
  76. RM=rm -f
  77.  
  78.  
  79. # Standard distribution build parameters
  80.  
  81. DEFAULTAUTHENTICATORS=md5 log
  82. DEFAULTDRIVERS=imap nntp pop3 mh mx mbx tenex mtx mmdf unix news phile
  83.  
  84.  
  85. # Normally no need to change any of these
  86.  
  87. ARCHIVE=c-client.a
  88. BINARIES=mail.o misc.o newsrc.o smanager.o osdep.o utf8.o \
  89.  dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
  90.  rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
  91.  unix.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o
  92. CFLAGS=$(BASECFLAGS) $(EXTRACFLAGS)
  93. MAKE=make
  94. MV=mv
  95. SHELL=/bin/sh
  96.  
  97.  
  98. # Primary build command
  99.  
  100. BUILDOPTIONS= EXTRACFLAGS=$(EXTRACFLAGS) EXTRALDFLAGS=$(EXTRALDFLAGS)\
  101.  EXTRADRIVERS=$(EXTRADRIVERS) EXTRAAUTHENTICATORS=$(EXTRAAUTHENTICATORS)\
  102.  PASSWDTYPE=$(PASSWDTYPE)
  103. BUILD=$(MAKE) build $(BUILDOPTIONS) $(EXTRASPECIALS)
  104.  
  105.  
  106. # Here if no make argument established
  107.  
  108. missing: osdep.h
  109.     $(MAKE) $(ARCHIVE) CC=`cat CCTYPE` CFLAGS="`cat CFLAGS`"
  110.  
  111. osdep.h:
  112.     @echo You must specify what type of system
  113.     @false
  114.  
  115.  
  116. # Current ports
  117.  
  118. ami:    # AmigaDOS
  119.     $(BUILD) OS=$@ \
  120.      BASECFLAGS="-DOLD $(AMICFLAGS)" \
  121.      BASELDFLAGS="$(AMILDFLAGS) -lamitcp000" \
  122.      CC=gcc
  123.  
  124. am2:    # AmigaDOS with a 68020+
  125.     $(BUILD) OS=ami \
  126.      BASECFLAGS="-DOLD -m68020 $(AMICFLAGS)" \
  127.      BASELDFLAGS="$(AMILDFLAGS) -lamitcp" \
  128.      CC=gcc
  129.  
  130. amn:    # AmigaDOS with a 680x0 using "new" socket library
  131.     $(BUILD) OS=ami \
  132.      BASELDFLAGS="$(AMILDFLAGS) -lnewamitcp000" \
  133.      CC=gcc
  134.  
  135. ama:    # AmigaDOS using AS225R2
  136.     $(BUILD) OS=ami \
  137.      MAILSPOOL=/INet/Mail \
  138.      BASECFLAGS="-m68020 $(AMICFLAGS)" \
  139.      BASELDFLAGS="$(AMILDFLAGS) -las225r2" \
  140.      CC=gcc
  141.  
  142. # Build it!
  143.  
  144. build:    clean once ckp$(PASSWDTYPE) $(EXTRAAUTHENTICATORS) $(ARCHIVE)
  145.  
  146. $(ARCHIVE): $(BINARIES)
  147.     $(RM) $(ARCHIVE) || true
  148.     $(ARRC) $(ARCHIVE) $(BINARIES)
  149.     $(RANLIB) $(ARCHIVE)
  150.  
  151. # Cleanup
  152.  
  153. clean:
  154.     $(RM) *.o linkage.[ch] auths.c $(ARCHIVE) osdep.* *TYPE *FLAGS || true
  155.  
  156.  
  157. # Dependencies
  158.  
  159. dummy.o: mail.h misc.h osdep.h dummy.h
  160. fdstring.o: mail.h misc.h osdep.h fdstring.h
  161. flstring.o: mail.h misc.h osdep.h flstring.h
  162. imap4r1.o: mail.h misc.h osdep.h imap4r1.h rfc822.h
  163. mail.o: mail.h misc.h osdep.h rfc822.h linkage.h
  164. mbox.o: mail.h misc.h osdep.h mbox.h unix.h
  165. mbx.o: mail.h misc.h osdep.h mbx.h dummy.h
  166. mh.o: mail.h misc.h osdep.h mh.h dummy.h
  167. mx.o: mail.h misc.h osdep.h mx.h dummy.h
  168. misc.o: mail.h misc.h osdep.h
  169. mmdf.o: mail.h misc.h osdep.h mmdf.h pseudo.h dummy.h
  170. mtx.o: mail.h misc.h osdep.h mtx.h dummy.h
  171. netmsg.o: mail.h misc.h osdep.h netmsg.h
  172. news.o: mail.h misc.h osdep.h news.h
  173. newsrc.o: mail.h misc.h osdep.h newsrc.h
  174. nntp.o: mail.h misc.h osdep.h netmsg.h smtp.h nntp.h rfc822.h
  175. phile.o: mail.h misc.h osdep.h phile.h rfc822.h dummy.h
  176. pseudo.o: pseudo.h
  177. pop3.o: mail.h misc.h osdep.h pop3.h
  178. smanager.o: mail.h misc.h osdep.h
  179. smtp.o: mail.h misc.h osdep.h smtp.h rfc822.h
  180. rfc822.o: mail.h misc.h osdep.h rfc822.h
  181. tenex.o: mail.h misc.h osdep.h tenex.h dummy.h
  182. unix.o: mail.h misc.h osdep.h unix.h pseudo.h dummy.h
  183. utf8.o: mail.h misc.h osdep.h utf8.h
  184.  
  185.  
  186. # OS-dependent
  187.  
  188. osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
  189.     osdep.h env_ami.h tcp_ami.h \
  190.     osdep.c env_ami.c fs_ami.c ftl_ami.c nl_ami.c tcp_ami.c \
  191.     auths.c gethstid.c \
  192.     gr_waitp.c \
  193.     auth_log.c \
  194.     scandir.c \
  195.     tz_bsd.c \
  196.     write.c \
  197.     strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
  198.     OSCFLAGS
  199.     $(CC) $(CFLAGS) `cat OSCFLAGS` -c osdep.c
  200.  
  201. osdep.c: osdepbas.c osdepckp.c osdeplog.c
  202.     $(RM) osdep.c || true
  203.     cat osdepbas.c osdepckp.c osdeplog.c > osdep.c
  204.  
  205.  
  206. # Once-only environment setup
  207.  
  208. once:
  209.     @echo Once-only environment setup...
  210.     ./drivers $(EXTRADRIVERS) $(DEFAULTDRIVERS) dummy
  211.     ./mkauths $(EXTRAAUTHENTICATORS) $(DEFAULTAUTHENTICATORS)
  212.     echo $(CC) > CCTYPE
  213.     echo $(CFLAGS) > CFLAGS
  214.     echo -DCREATEPROTO=$(CREATEPROTO) -DEMPTYPROTO=$(EMPTYPROTO) \
  215.      -DMAILSPOOL=\"$(MAILSPOOL)\" \
  216.      -DACTIVEFILE=\"$(ACTIVEFILE)\" -DNEWSSPOOL=\"$(NEWSSPOOL)\" \
  217.      -DANONYMOUSHOME=\"$(MAILSPOOL)/anonymous\" > OSCFLAGS
  218.     echo $(BASELDFLAGS) $(EXTRALDFLAGS) > LDFLAGS
  219.     $(LN) os_$(OS).h osdep.h
  220.     $(LN) os_$(OS).c osdepbas.c
  221.     $(LN) log_$(LOGINPW).c osdeplog.c
  222.  
  223.  
  224. # Password checkers
  225.  
  226. ckpmd5:    # MD5 database (must have md5 AUTHENTICATOR as well)
  227.     $(LN) ckp_md5.c osdepckp.c
  228.  
  229. ckpstd:    # Port standard
  230.     $(LN) ckp_$(CHECKPW).c osdepckp.c
  231.  
  232.  
  233. # A monument to a hack of long ago and far away...
  234.  
  235. love:
  236.     @echo not war?
  237.