home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume14 / vn.nntp.pch / Makefile < prev    next >
Makefile  |  1988-04-19  |  4KB  |  94 lines

  1. # CFLAGS:
  2. #    set -DJOBCONTROL if you have job control (BSD).
  3. #    set -DSYSV -Dindex=strchr -Drindex=strrchr on Sytem V systems
  4. #    set -Dregfree=free if you DON'T include reg.o (SYSV + some BSD)
  5. #
  6. # JOBCONTROL could be done as #ifndef SYSV, I suppose, but this clearly
  7. # marks that particular difference.
  8. #
  9. # LIBS:
  10. # should point to any extra libraries needed, such as termcap.  You
  11. # may want to change this to use the curses termcap cover.  If you need
  12. # to pull in another library to get regex / regcmp or strtok on non-SYSV
  13. # systems, you may want to put that here.  I understand that -lPW is now
  14. # required on many SYSV systems to pick up regex/regcmp, hence that is
  15. # reflected here.
  16. #
  17. # EXTRAOBJS:
  18. # may be used to include tmpnam.o, strtok.o, reg.o in the list.
  19. #
  20. # These objects implement SYSV utilities for BSD machines.
  21. #
  22. # strtok.o implements strtok() / strpbrk().  reg.o implements regex()/regcmp()
  23. # on top of the BSD regular expression library (regex() allows multiple
  24. # regular expressions).  tmpnam.o implements tmpnam() of course.
  25. #
  26. # If you have them, use your own regex/regcmp, because:
  27. #
  28. #    i) They should be faster than the reg.c code, which
  29. #    recompiles the "current" ucb string every time you
  30. #    switch regular expressions.
  31. #
  32. #    ii) I'm using reg.c myself on a couple systems, and it seems to
  33. #    work.  But implementing one set of system calls on top of a
  34. #    different set is always a bit suspect, and why add code when
  35. #    you don't need to.
  36. #
  37. # if you DON'T include reg.o, be sure you set -Dregfree=free in CFLAGS.
  38. #
  39. # As with regex, if you have a system strtok(), it is likely more efficient -
  40. # string routines will often be done in assembler on a given machine.
  41. #
  42. # Even if you have it, you can use tmpnam.o anyhow.  This version will tailor
  43. # the temp file name to vnXXXXXX, instead of a generic tmpXXXXXX.
  44. #
  45. # "vanilla" BSD.  This has been used locally on Pyramids / CCI / Sun.
  46. #LIBS = -ltermcap
  47. #EXTRAOBJS = tmpnam.o strtok.o reg.o
  48. #CFLAGS = -O -DJOBCONTROL
  49. #
  50. # "vanilla" SYSV:
  51. #LIBS = -ltermcap -lPW
  52. #EXTRAOBJS = tmpnam.o
  53. #CFLAGS = -O -DSYSV -Dregfree=free -Dindex=strchr -Drindex=strrchr
  54. #
  55. # BSD with strtok() / regex(), such as ULTRIX.  These are the rules
  56. # used for our non-NNTP installation (rtech is a microvax running ULTRIX):
  57. #LIBS = -ltermcap
  58. #EXTRAOBJS = tmpnam.o
  59. #CFLAGS = -O -DJOBCONTROL -Dregfree=free
  60.  
  61. # SERVEROBJS defines the object(s) for the vns_xxxx "server" interface.
  62. #
  63. #    std.o is the version for "standard" news, making use of the
  64. #    users .newsrc file, and  resident articles / active file.
  65. #    If you compile std.c with NNTP defined you get the version
  66. #    of vn which will talk to an NNTP server.  You will also have
  67. #    to define where to pick up the response_codes.h header file,
  68. #    and where the server library is (server_init, etc.).  It is also
  69. #    99.9% certain that you will want to change DEF_MACHINE in
  70. #    config_std.h.  For this reason, config_std.h has the definition
  71. #    commented out, which will cause a syntax error until you fix it.
  72. #    See the special NNTP version rule for std.o following the vn rule
  73. #
  74. SERVEROBJS = std.o
  75. SERVERLIBS = 
  76.  
  77. # normal vn objects
  78. #
  79. VNOBJS=    hash.o envir_set.o pagefile.o reader.o storage.o sig_set.o term_set.o tty_set.o userlist.o vn.o vnglob.o digest.o strings.o session.o printex.o getch.o help.o newdisp.o stat.o svart.o
  80.  
  81. # This is to force you to read the makefile.  Once you have, comment this rule,
  82. # and uncomment the "real" rule.  At the minimum, you will also have to
  83. # uncomment one of the three sets of LIBS / EXTRAOBJS & CFLAGS definitions
  84. # above.  For the NNTP version you will also have to uncomment and modify
  85. # the std.o special rule, and pick up server_init, etc. from somewhere.
  86. #
  87. vn:
  88.     @echo "PLEASE READ THE MAKEFILE"
  89. #vn:    $(VNOBJS) $(EXTRAOBJS) $(SERVEROBJS)
  90. #    cc -o vn $(VNOBJS) $(EXTRAOBJS) $(SERVEROBJS) $(SERVERLIBS) $(LIBS)
  91. #
  92. #std.o    :
  93. #    cc -c $(CFLAGS) -DNNTP -I. std.c
  94.