home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume18 / vtree / Makefile < prev    next >
Encoding:
Makefile  |  1989-04-19  |  2.4 KB  |  109 lines

  1. #    Build VTREE
  2. #
  3. #    Define the type of system we're working with.  Three
  4. # choices:
  5. #
  6. #   1.    BSD Unix 4.2 or 4.3.  Directory read support in the
  7. # standard library, so we don't have to do much.  Select BSD.
  8. #
  9. #   2.    System V.  I depend on Doug Gwyn's directory reading
  10. # routines.  They were posted to Usenet "comp.sources" early in
  11. # May 1987.  They're worth the effort to get, if you don't have
  12. # them already.  Select SYS_V.  Be sure to define NLIB to be the
  13. # 'cc' option to include the directory library.
  14. #
  15. #   3.  System III, or machines without any directory read
  16. # packages.  I have a minimal kludge.  Select SYS_III.
  17. #
  18. #   4.  SCO Xenix 386.  See the comments for System V.
  19. #
  20. #   5.  SCO Xenix 286.  See the comments for System V.
  21. #
  22.  
  23. # Case 1:
  24. #VTREE=vtree
  25. #SYS=    -DBSD
  26. #NLIB=    -lgetopt
  27.  
  28. # Case 2:
  29. #VTREE=vtree
  30. #SYS=    -DSYS_V
  31. #NLIB=    -lndir
  32.  
  33. # Case 3:
  34. #VTREE=vtree
  35. #SYS=    -DSYS_III
  36. #NLIB=
  37.  
  38. # Case 4: sco Xenix-386
  39. VTREE=vtree
  40. SYS=    -Ox -CSON -DSCO_XENIX 
  41. NLIB=    -lmalloc -lx
  42.  
  43. # Case 5: sco Xenix-286
  44. #VTREE=vtreeL
  45. #SYS=    -Ox -CSON -DSCO_XENIX  -DMEMORY_BASED -Ml2 -F 8000
  46. #NLIB=    -lmalloc -lx
  47.  
  48.  
  49. #    Standard things you may wish to change:
  50. #
  51. #    INSTALL        directory to install vtree in
  52.  
  53. INSTALL    =    /usr/local/bin
  54.  
  55. #    MANDIR        manual page directoryr
  56. #            (the .L is used on Xenix systems.  Other systems will
  57. #            be different)
  58.  
  59. MANDIR =    /u/man/man.L
  60.  
  61. #    MANEND        end of man page file name
  62.  
  63. MANEND =    L
  64.  
  65. #    The following OPTIONS may be defined:
  66. #
  67. #    LSTAT        we have the lstat(2) system call (BSD only)
  68. #    HSTATS        print hashing statistics at end of run
  69. #    ONEPERLINE    On the first line only, if there are more than
  70. #            one directory listed, print it on a line by itself
  71. #            and print the last subdirectory on the first line
  72. #            of the tree
  73. #    MEMORY_BASED    Keep the tree structure in memory for added speed.
  74. #
  75. #    Compile time options:
  76.  
  77. OPTIONS    = -DMEMORY_BASED
  78.  
  79. #  END OF USER-DEFINED OPTIONS
  80.  
  81.  
  82. CFLAGS=    -O $(SYS) $(OPTIONS)
  83. SRCS=        vtree.c    hash.c    direct.c    \
  84.         hash.h    customize.h    patchlevel.h
  85. OBJS=        vtree.o    hash.o
  86.  
  87. $(VTREE):        $(OBJS)
  88.         $(CC) -o $(VTREE) $(CFLAGS) $(OBJS) $(NLIB)
  89.  
  90. install:    $(VTREE)
  91.         cp $(VTREE) $(INSTALL)
  92.         cp vtree.1 $(MANDIR)/vtree.$(MANEND)
  93. #        chown local $(INSTALL)/$(VTREE)
  94. #        chgrp pd $(INSTALL)/$(VTREE)
  95. #        chmod 755 $(INSTALL)/$(VTREE)
  96.  
  97. clean:
  98.         rm -f $(OBJS) $(VTREE)
  99.  
  100. vtree.o:    vtree.c direct.c hash.h customize.h patchlevel.h
  101.  
  102. hash.o:        hash.c hash.h customize.h patchlevel.h
  103.  
  104. shar:        ;
  105.         rm -f *.o vtree *- vtree.shr
  106.         shar * >/tmp/vtree.shr
  107.         mv /tmp/vtree.shr .
  108.  
  109.