home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lynx2.8.1dev.10.tar.gz / lynx2.8.1dev.10.tar / lynx2-8 / makefile.in < prev    next >
Makefile  |  1998-04-18  |  9KB  |  287 lines

  1. ##makefile for lynx
  2.  
  3. SHELL        = /bin/sh
  4.  
  5. x        = @PROG_EXT@
  6.  
  7. .SUFFIXES:
  8. @SET_MAKE@
  9. prefix        = @prefix@
  10. exec_prefix    = @exec_prefix@
  11. srcdir        = @srcdir@
  12. VPATH        = $(srcdir)
  13.  
  14. CC        = @CC@
  15. CFLAGS        = @CFLAGS@
  16. DEFS        = @DEFS@
  17. CPPFLAGS    = @CPPFLAGS@
  18.  
  19. LIBS        = @LIBS@
  20.  
  21. INSTALL        = @INSTALL@
  22. INSTALL_PROGRAM    = @INSTALL_PROGRAM@
  23. INSTALL_DATA    = @INSTALL_DATA@
  24.  
  25. ##this is the name of the directory the lynx source code is in.
  26. ##(e.g. lynx2-8, not the full path)
  27. lynxdir= lynx2-8
  28. lynxname= lynx2-8
  29.  
  30. ## Where you want lynx installed
  31. bindir= @bindir@
  32.  
  33. ## Where you want the lynx man file installed
  34. mandir= @mandir@/man1
  35.  
  36. ## Where you want the lynx.cfg file installed
  37. libdir= @libdir@
  38.  
  39. ## Where you want the help-files installed
  40. helpdir= @libdir@/lynx_help
  41.  
  42. ##set the relative location of the WWW library Implementation directory,
  43. ##from this directory
  44. ##do not set this to be an absolute path!!!
  45. WWWINC= WWW/Library/Implementation
  46.  
  47. # !!!!!!!!!!! SUN resolv LIBRARY !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  48. # To include resolv in the LIBS="" list for SUN 3, 4 or Solaris OS,
  49. # point RESOLVLIB to that library.  You need this if you get the message
  50. # "Alert!:  Unable to connect to remote host" whenever you try to
  51. # access a host other than localhost and have made Lynx without it.
  52. # See the PROBLEMS file for more information.
  53. #RESOLVLIB= -lresolv
  54.  
  55. # !!!!!!!!!!! Alternate socket functions for SOCKS !!!!!!!!!!!!!!!!!!
  56. # To make a SOCKSified lynx, include -DSOCKS in your SITE_LYDEFS and
  57. # SITE_DEFS, below, and point SOCKSLIB to your SOCKS library.  Note
  58. # that you may have problems accessing FTP servers.  Also, instead of
  59. # SOCKSifying lynx for use behind a firewall, you are better off if
  60. # you make it normally, and set it up to use a proxy server.  You can
  61. # SOCKSify the proxy server, and it will handle all clients, not just
  62. # Lynx (see the INSTALLATION file in this distribution).  If your SOCKS
  63. # server was compiled to use the short version of Rbind, also include
  64. # -DSHORTENED_RBIND in your SITE_LYDEFS and SITE_DEFS.  If you do
  65. # SOCKSify lynx, you can turn off SOCKS proxy usage via a -nosocks
  66. # command line switch.
  67. #SOCKSLIB= /usr/local/lib/libsocks.a
  68.  
  69. # !!!!!!!!!!!!!  DIRECT WAIS ACCESS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  70. # If you are adding direct wais access you must fill in the
  71. # location of wais.a, client.a and the standard math library, libm.a.
  72. # You can pick up the most current freeWAIS sources from
  73. #    ftp://ftp.cnidr.org/pub/NIDR.tools/freewais
  74. # If you are using freeWAIS-0.202 or older, include -DDECLARE_WAIS_LOGFILES
  75. # in your SITE_DEFS.
  76. # Please put an ABSOLUTE address here if you want it to work!
  77. #WAISLIB= ../../freeWAIS-0.202/bin/client.a ../../freeWAIS-0.202/bin/wais.a /usr/lib/libm.a
  78.  
  79. # !!!!!!!!!!!!! SLANG Support (For color version of Lynx). !!!!!!!!!!!!!!!!
  80. # The slang library is an alternative to curses, developed by John E. Davis
  81. # (davis@space.mit.edu).  Version 0.99-27 or higher is available from
  82. #    ftp://space.mit.edu/pub/davis
  83. # It provides color support for Lynx.
  84.  
  85. # !!!!!!!!!!!!! NCURSES Support (For color version of Lynx). !!!!!!!!!!!!!!
  86. # If you need ncurses, the latest version can always be found
  87. # in ftp://ftp.clark.net/pub/dickey/ncurses/
  88. # or ftp://ftp.gnu.org/pub/gnu/
  89.  
  90. # Also be sure to check out the compilation symbols in userdefs.h
  91. # before building Lynx!
  92.  
  93. # If you apply patches which require linking to site-specific libraries, set
  94. # SITE_LIBS to those libraries.
  95. SITE_LIBS= # Your libraries here
  96.  
  97. # Set SITE_LYDEFS to one or more of the defines for the WWW Library:
  98. SITE_LYDEFS = # Your defines here
  99.  
  100. # Set SITE_DEFS to one or more of the defines for lynx below:
  101. SITE_DEFS = # Your defines here
  102.  
  103. # defines for which there are no configure options:
  104. # -DHP_TERMINAL    For DIM workaround to REVERSE problems on HP terminals.
  105. # -DIGNORE_CTRL_C  Define if Control-C shouldn't exit lynx.
  106. # -DNOPORT         if you must use PASV instead of PORT for FTP
  107. # -DNO_CPU_LIMIT   Disables Max CPU timeout (includes CLOCKS_PER_SECOND)
  108. # -DSHORTENED_RBIND  For a SOCKSified lynx with the short version of Rbind.
  109. # -DSLANG_MBCS_HACK prevent cutoff lines when using UTF8 console (slang only)
  110. # -DSOCKS          For making a SOCKSified lynx.
  111. #
  112. # if you are linking to freeWAIS-0.202 or older, you should define this
  113. # in SITE_DEFS
  114. #
  115. # -DDECLARE_WAIS_LOGFILES
  116. #
  117. # if you have the reverse clear screen problem of some SUN4 systems you
  118. # should define this in SITE_DEFS
  119. #
  120. # -DREVERSE_CLEAR_SCREEN_PROBLEM
  121. #
  122. # if you have an SVR4 system with the "type any key" problem, try defining
  123. # this in LYFLAGS (SITE_LYDEFS) and SITE_DEFS
  124. #
  125. # -DSVR4_BSDSELECT
  126. #
  127. # Old Data General systems may need this in their SITE_LYDEFS
  128. # for their inet_addr(host) calls.
  129. #
  130. # -DDGUX_OLD
  131. #
  132. # if you would like logging of client requests via syslog(), you should
  133. # define this in SITE_DEFS
  134. #
  135. # -DSYSLOG_REQUESTED_URLS
  136.  
  137. # defines which have configure options   (see INSTALLATION, Section II-1c.):
  138. # -DARCHIVE_ONLY
  139. # -DDIRED_SUPPORT
  140. # -DEXP_CHARTRANS_AUTOSWITCH
  141. # -DLINKEDSTYLES
  142. # -DLONG_LIST
  143. # -DLY_FIND_LEAKS
  144. # -DNCURSES
  145. # -DNO_CHANGE_EXECUTE_PERMS
  146. # -DNO_PARENT_DIR_REFERENCE
  147. # -DNSL_FORK
  148. # -DOK_GZIP
  149. # -DOK_OVERRIDE
  150. # -DOK_PERMIT
  151. # -DOK_TAR
  152. # -DOK_UUDECODE
  153. # -DOK_ZIP
  154. # -DUNDERLINE_LINKS
  155. # -DUSE_COLOR_STYLE
  156. # -DUSE_HASH
  157. # -DUSE_SLANG
  158. # -DUSE_ZLIB
  159. #
  160. # for installation of local execution links, please see the file userdefs.h
  161.  
  162. # TESTED: Linux FreeBSD SunOS Solaris IRIX CLIX HP-UX AIX SCO
  163. all lynx$x:
  164.     cd WWW/Library/unix && $(MAKE) CC="$(CC)" \
  165.         LY_CFLAGS="$(CFLAGS)" \
  166.         CPPFLAGS="$(CPPFLAGS)" \
  167.         LYFLAGS="$(SITE_LYDEFS)"
  168.     cd src && $(MAKE) all CC="$(CC)" \
  169.         CFLAGS="$(CFLAGS)" \
  170.         CPPFLAGS="$(CPPFLAGS)" \
  171.         LIBS="$(LIBS) $(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
  172.         SITE_DEFS="$(SITE_DEFS)" \
  173.         WWWINC=$(WWWINC) \
  174.         WWWLIB="../WWW/Library/unix/libwww.a"
  175.  
  176. help:
  177.     @echo
  178.     @echo "Please run make with one of the following arguments"
  179.     @echo "all        -- to make the executable, put it in this directory"
  180.     @echo "clean      -- removes all '.o' and 'core' files"
  181.     @echo "depend     -- use makedepend to generate header-dependencies"
  182.     @echo "tar        -- runs clean, removes executable, and tars the whole directory"
  183.     @echo "compress   -- runs tar, then compresses the result"
  184.     @echo "zip        -- runs clean, removes executable, and zips the whole directory"
  185.     @echo
  186.  
  187. ##Miscellaneous actions
  188. clean:
  189.     rm -f WWW/Library/*/*.[aob]
  190.     rm -f WWW/Library/*/.created
  191.     cd src && $(MAKE) clean
  192.     rm -f *.b src/lynx$x core Lynx.leaks
  193.  
  194. depend:
  195.     cd WWW/Library/unix && $(MAKE) $@
  196.     cd src && $(MAKE) $@
  197.  
  198. distclean: clean
  199.     -rm -f WWW/Library/*/*~
  200.     -rm -f WWW/Library/*/*.bak
  201.     -rm -rf src/obsolete
  202.     -cd src && $(MAKE) $@
  203.     -cd src/chrtrans && $(MAKE) $@
  204.     -rm -f *~ *.bak *.sav
  205.     -rm -f WWW/Library/unix/makefile src/makefile src/chrtrans/makefile
  206.     @SRCDIR_CLEAN@-find . -type f -name '*.rej' -exec -rm -f {} \;
  207.     @SRCDIR_CLEAN@-find . -type f -name '*.orig' -exec -rm -f {} \;
  208.     @SRCDIR_CLEAN@-rmdir WWW/Library/unix && rmdir WWW/Library && rmdir WWW
  209.     @SRCDIR_CLEAN@-rmdir src/chrtrans && rmdir src
  210.     -rm -f makefile lynx_cfg.h config.status config.log config.cache
  211.     -rm -f lynx$x install-*
  212.  
  213. maintainer-clean: distclean
  214.     -rm -rf WWW/Library/*/obsolete
  215.     -rm -f Lynx.prj .*_aux
  216.  
  217. tar:  clean
  218.     rm -f lynx$x
  219.     $(MAKE) save
  220.  
  221. turnover:    clean
  222.     $(MAKE) save
  223.  
  224. zipcompress: compress zip
  225.     echo "done!"
  226.  
  227. zip:  clean
  228.     rm -f src/lynx$x
  229.     rm -f lynx$x
  230.     rm -f src/a.out
  231.     rm -f ../$(lynxname).zip
  232.     cd ..; rm -f $(lynxname).zip; zip -r $(lynxname).zip $(lynxdir)
  233.  
  234. save:
  235.     cd ..; rm -f $(lynxname).tar; tar -cf - $(lynxdir) > $(lynxname).tar
  236.  
  237. compress: tar
  238.     cd ..; rm -f $(lynxname).tar.Z; compress -f -v $(lynxname).tar
  239.  
  240. install: lynx$x install-bin install-man install-cfg @INSTALL_LSS@
  241.     @echo
  242.     @echo "Use $(MAKE) install-help to install the help-files"
  243.     @echo
  244.  
  245. install-bin: $(bindir)
  246.     -mv -f $(bindir)/lynx$x $(bindir)/lynx.old
  247.     $(INSTALL_PROGRAM) lynx$x $(bindir)/
  248.  
  249. install-man : $(mandir) 
  250.     $(INSTALL_DATA) $(srcdir)/lynx.man $(mandir)/lynx.1
  251.  
  252. install-help : $(helpdir)
  253.     (cd $(helpdir) && rm -rf *)
  254.     (cd $(srcdir)/lynx_help && tar cf - . ) | ( cd $(helpdir) && tar xf - )
  255.     (cd $(srcdir) && tar cf - C[HO]* PROBLEMS README samples test ) | \
  256.                    ( cd $(helpdir) && tar xf - )
  257.     -rm -f $(libdir)/lynx.tmp
  258.     sh -c 'if test -f $(libdir)/lynx.cfg ; then \
  259.         mv $(libdir)/lynx.cfg $(libdir)/lynx.tmp ; \
  260.     else \
  261.         cp $(srcdir)/lynx.cfg $(libdir)/lynx.tmp ; \
  262.     fi'
  263.     sed    -e '/^HELPFILE:http/s@^@#@' \
  264.         -e '/^#HELPFILE:file/s@#@@' \
  265.         -e '/^HELPFILE:file/s@/PATH_TO/lynx_help@$(helpdir)@' \
  266.         $(libdir)/lynx.tmp >$(libdir)/lynx.cfg
  267.     chmod 644 $(libdir)/lynx.cfg
  268.     -rm -f $(libdir)/lynx.tmp
  269.  
  270. install-cfg : $(libdir)
  271.     -mv -f $(libdir)/lynx.cfg $(libdir)/lynx.oldcfg
  272.     $(INSTALL_DATA) $(srcdir)/lynx.cfg $(libdir)/lynx.cfg
  273.  
  274. install-lss : $(libdir)
  275.     -mv -f $(libdir)/lynx.lss $(libdir)/lynx.oldlss
  276.     $(INSTALL_DATA) $(srcdir)/samples/lynx.lss $(libdir)/lynx.lss
  277.  
  278. uninstall:
  279.     -rm -f $(bindir)/lynx$x
  280.     -rm -f $(mandir)/lynx.1
  281.     -rm -f $(libdir)/lynx.cfg
  282.     -rm -f $(libdir)/lynx.lss
  283.     -rm -rf $(libdir)/lynx_help
  284.  
  285. $(bindir) $(mandir) $(libdir) $(helpdir) :
  286.     $(srcdir)/mkdirs.sh $@
  287.