home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3650 / Makefile < prev    next >
Encoding:
Makefile  |  1991-07-17  |  5.0 KB  |  125 lines

  1. # This is the makefile for shop. 
  2. # Note that the random function, long my_rand() in my_rand.c, is only 
  3. # suitable if the size of a long on your system is 32 bits or more.
  4. # If not, just write a my_rand() in terms of whatever random-number 
  5. # generation facility your environment offers.
  6. #
  7. # Note also that if you wish to update shop's database of phrases
  8. # and words, you may do so by editing the raw files (note the
  9. # noun file's format: in each pair of lines, the first is the
  10. # singular and the second is the plural) then giving the command
  11. #
  12. #        make lists
  13.  
  14. # Brian Rice  rice@dg-rtp.dg.com  $Date: 91/07/01 18:45:56 $
  15.  
  16. INSTALL_DIR=/usr/local/bin
  17.                          # Set to be the directory into which you would
  18.                          # like the shop executable to be copied.
  19. SHOPLIB_DIR=/usr/local/lib/shop
  20.                          # Set to be the directory where indexed data files 
  21.                          # should live.  This must be an absolute pathname--
  22.                          # that is, it must have the same interpretation
  23.                          # regardless of what your current working directory
  24.                          # is.  (Under UNIX, this would mean that the
  25.                          # pathname must begin with a slash.)
  26. PINDEX_DIR=/usr/local/bin
  27.                          # Set to be the directory in which you have
  28.                          # installed pindex (also posted to alt.sources).
  29.                          # If you haven't installed pindex yet, go do
  30.                          # it now!
  31. RAW_FILES_DIR=.
  32.                          # Set to be the directory where source data
  33.                          # files live.
  34. CFLAGS=
  35.                          # Compilation flags.
  36. LFLAGS=
  37.                          # Link editor flags.
  38. CC=/usr/bin/cc
  39.                          # Your C compiler.
  40. PWD_SUPPORTED=1
  41.                          # Set to 1 if your system supports uids,
  42.                          # delivered through the getpwent facility.
  43.                          # Otherwise, set to 0.
  44. DEFAULT_NAME="Mark McAuliffe"
  45.                          # Set this to a name to use for the -m
  46.                          # option if your system does not support getpwent.
  47.                          # (It is ignored if PWD_SUPPORTED is 1.)
  48. VERBOSE_GECOS=1
  49.                          # Set to 1 if the comment field of usernames at your
  50.                          # site has fields other than the user's real name--
  51.                          # for instance...
  52.                          #         Brian Rice,,2486328,
  53.                          # If the comment field has nothing but names in
  54.                          # it, set VERBOSE_GECOS to 0.
  55.                          # Why is it called GECOS?  Those pesky historical 
  56.                          # reasons.
  57. GECOS_DELIMITERS=","
  58.                          # A list of all characters which serve to mark the
  59.                          # end of users' real names in the comment field at 
  60.                          # your site.
  61. PATHNAME_SEP=/
  62.                          # The character which separates pathname components
  63.                          # at your site.
  64. COPY=cp
  65.                          # Your command for copying a file.
  66. EXECABLE=chmod 755
  67.                          # Your command for making a file executable.
  68. TOUCH=touch
  69.                          # Your command for touching a file.
  70. MKDIR=mkdir
  71.                          # Your command for creating a directory.
  72.  
  73. # That's all the defines.
  74.  
  75. NOUNFILE=$(SHOPLIB_DIR)$(PATHNAME_SEP)nouns.dat
  76. PLURALFILE=$(SHOPLIB_DIR)$(PATHNAME_SEP)plurals.dat
  77. ADJFILE=$(SHOPLIB_DIR)$(PATHNAME_SEP)adjs.dat
  78.  
  79. RAWNOUNFILE=$(RAW_FILES_DIR)$(PATHNAME_SEP)nouns.raw
  80. RAWADJFILE=$(RAW_FILES_DIR)$(PATHNAME_SEP)adjs.raw
  81.  
  82. install: makedirs lists shop 
  83. makedirs:
  84.     -$(MKDIR) $(INSTALL_DIR) 
  85.     -$(MKDIR) $(SHOPLIB_DIR)
  86.     -$(TOUCH) makedirs
  87. lists: $(RAWNOUNFILE) $(RAWADJFILE)
  88.     $(PINDEX_DIR)$(PATHNAME_SEP)pindex $(RAWADJFILE) $(ADJFILE)
  89.     $(PINDEX_DIR)$(PATHNAME_SEP)pindex -2 $(RAWNOUNFILE) \
  90.                                        $(NOUNFILE) $(PLURALFILE)
  91.     -$(TOUCH) lists
  92. shop: shop.o capwords.o getcount.o getnth.o \
  93.       getitem.o my_rand.o axatchar.o
  94.     $(CC) $(LFLAGS) -o shop shop.o capwords.o getcount.o \
  95.         getnth.o getitem.o axatchar.o my_rand.o
  96.     -$(COPY) shop $(INSTALL_DIR)
  97.     -$(EXECABLE) $(INSTALL_DIR)$(PATHNAME_SEP)shop
  98. shop.o: shop.c shop.h
  99.     $(CC) $(CFLAGS) -c shop.c -DVERBOSE_GECOS=$(VERBOSE_GECOS) \
  100.     -DPWD_SUPPORTED=$(PWD_SUPPORTED) -DDEFAULT_NAME=\"$(DEFAULT_NAME)\" 
  101. capwords.o: capwords.c shop.h
  102.     $(CC) $(CFLAGS) -c capwords.c \
  103.     -DPWD_SUPPORTED=$(PWD_SUPPORTED)
  104. axatchar.o: axatchar.c
  105.     $(CC) $(CFLAGS) -c axatchar.c \
  106.     -DGECOS_DELIMITERS=\"$(GECOS_DELIMITERS)\" \
  107.     -DPWD_SUPPORTED=$(PWD_SUPPORTED)
  108. getcount.o: getcount.c
  109.     $(CC) $(CFLAGS) -c getcount.c
  110. getnth.o: getnth.c 
  111.     $(CC) $(CFLAGS) -c getnth.c \
  112.     -DNOUN_FILE=\"$(NOUNFILE)\" \
  113.     -DPLURAL_FILE=\"$(PLURALFILE)\" \
  114.     -DADJ_FILE=\"$(ADJFILE)\" 
  115. getitem.o: getitem.c shop.h 
  116.     $(CC) $(CFLAGS) -c getitem.c \
  117.     -DNOUN_FILE=\"$(NOUNFILE)\" \
  118.     -DPLURAL_FILE=\"$(PLURALFILE)\" \
  119.     -DADJ_FILE=\"$(ADJFILE)\" 
  120. my_rand.o: my_rand.c
  121.     $(CC) $(CFLAGS) -c my_rand.c
  122.  
  123. # RCS id of this makefile is $What: <@(#) Makefile,v    2.1> $.
  124.  
  125.