home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / games / volume14 / okbridge2 / part12 / Makefile < prev    next >
Makefile  |  1993-01-27  |  8KB  |  235 lines

  1. # makefile for Okbridge 1.7
  2. #
  3. # Copyright (C) 1990-1992 by Matthew Clegg.  All Rights Reserved
  4. # OKbridge is made available as a free service to the Internet.
  5. # Accordingly, the following restrictions are placed on its use:
  6. # 1.  OKbridge may not be modified in any way without the explicit 
  7. #     permission of Matthew Clegg.  
  8. # 2.  OKbridge may not be used in any way for commercial advantage.
  9. #     It may not be placed on for-profit networks or on for-profit
  10. #     computer systems.  It may not be bundled as part of a package
  11. #     or service provided by a for-profit organization.
  12. # If you have questions about restrictions on the use of OKbridge,
  13. # write to mclegg@cs.ucsd.edu.
  14. # DISCLAIMER:  The user of OKbridge accepts full responsibility for any
  15. # damage which may be caused by OKbridge.
  16.  
  17.  
  18. # In general the okbridge program can be compiled simply by
  19. # typing 'make'.  If you are planning to install okbridge in
  20. # a public directory, then you may want to first change the
  21. # values of the variables OKBRIDGE_DIR and OKBRIDGE_HELPFILE.
  22. # Then, type 'make install'.
  23.  
  24. OKBRIDGE_DIR = /usr/local/games
  25. OKBRIDGE_HELPFILE = /usr/local/games/okbridge.help
  26. INSTALL = /usr/bin/install
  27.  
  28. # Thanks to George Ferguson of the University of Rochester, we now have
  29. # a set of manual pages for okbridge.  To install these, change the
  30. # following definitions as appropriate and type "make install.man"
  31. MANDIR = /usr/local/man/man6
  32. MANEXT = 6
  33.  
  34. # MACHINE SPECIFIC INFORMATION:
  35. #
  36. # Okbridge has been compiled and run successfully on the following systems:
  37. #
  38. #   Machine              OS                 Changes to Makefile
  39. #   -------              --                 -------------------
  40. #   Decstation 3100,5000 ULTRIX V4.0 & 4.2  none
  41. #   HP 400 apollo        4.3 bsd            PWCOMMENT = -DNO_PWCOMMENT
  42. #   IBM RS/6000          AIX 3.1            MACHINE_FLAGS = -DAIX
  43. #   IBM RT               Modified BSD       none
  44. #   NeXTStation          NextStep 2.1       none
  45. #   Sun Sparcstation     SunOS 4.1.x        none
  46. #   Vax 2000 & 3100      BSD UNIX 4.3       none
  47. #
  48. #
  49. # If you are compiling with SunOS (version 4.0 or later), then you may wish
  50. # to uncomment the following two lines.  This slightly alters the behavior
  51. # of the curses interface.
  52. #MACHINE_FLAGS = -DSUNOS
  53. #CC = /usr/5bin/cc
  54. #
  55. # If you are compiling this program on a machine which is
  56. # running IBM's AIX operating system, then uncomment the
  57. # next line:
  58. #MACHINE_FLAGS = -DAIX
  59. #
  60. # If you are running on an HP/UX system, you may need to uncomment
  61. # the following line:
  62. #MACHINE_FLAGS = -DHPUX
  63. #
  64. # If you are compiling this program on a machine which does not
  65. # have strcasecmp and strncasecmp, then you will need to uncomment
  66. # the following line (this is not necessary if you are using
  67. # SunOS or a recent version of Ultrix):
  68. #STRCASECMP = -DNO_STRCASECMP
  69. #
  70. # A few machines do not provide the name of the time zone when returning
  71. # the system time through the localtime() call.  Typically, this will
  72. # cause a compile time error in network.c near line 600.  If you have such 
  73. # a machine, then you will want to uncomment the following line:
  74. #TIMEZONE = -DNO_TM_ZONE
  75. #
  76. # Some other machines do not store the 'gecos' field in the password file
  77. # file entry.  If the player has not specified his/her name using the
  78. # FULLNAME field in the .okbridgerc file, then we try to extract his
  79. # name from the gecos field.  This is used in listing the current bridge
  80. # players in the GPS.  If your machine cannot compile this code, then
  81. # you will get a compile time error in network.c near line 500.  You
  82. # should then uncomment the following line:
  83. #PWCOMMENT = -DNO_PWCOMMENT
  84. #
  85.  
  86. FLAGS = $(STRCASECMP) $(TIMEZONE) $(MACHINE_FLAGS) $(PW_COMMENT)
  87.  
  88. # The following flags may be useful if you have modified the okbridge
  89. # program and you need assistance debugging it:
  90. #
  91. # CFLAGS = -g -DDEBUG -DLOGFILE -DMDEBUG
  92. # MFLAGS = /usr/lib/debug/malloc.o
  93. #
  94. # CFLAGS = $(FLAGS) -g -DDEBUG -DLOGFILE
  95. # CFLAGS = $(FLAGS) -g -DDEBUG
  96. # CFLAGS = -g
  97. # CC = gcc
  98. CFLAGS = -O $(FLAGS)
  99.  
  100. # Sun people might like to define this to get pure executables.
  101. #  pure = all code is in the binary
  102. #  non-pure = code may use shared libs, and be demand-paged
  103. # The advatages about pure code, is that you needn't worry about having the
  104. # right version of the shared libs (important if run different versions 
  105. # of the os), and if you store the binary on NFS, you aren't swapping
  106. # code over the network.  Disadvantages is that the size of pure code is
  107. # bigger, and might use more virtual mem (not using shared libs).
  108. #
  109. # For gcc on SunOS
  110. # LDFLAGS= -static -n
  111. # For cc on SunOS
  112. # LDFLAGS= -Bstatic -n
  113.  
  114. OBJ =     bridge.o input.o display.o terminal.o network.o help.o scoring.o\
  115.      boards.o cipher.o rc.o protocol.o parser.o nonstd.o socket.o\
  116.     gps.o ccdef.o commands.o conversation.o cs.o log.o
  117.  
  118. SHUFFLEOBJ = okshuffle.o nonstd.o boards.o cipher.o scoring.o
  119.  
  120. TALLYOBJ = oktally.o nonstd.o boards.o cipher.o scoring.o log.o
  121.  
  122. GPSOBJ = gps_server.o socket.o boards.o nonstd.o cipher.o scoring.o
  123. GPSSRC = ../gps-1.1/gps_server.c
  124. GPS    = ../gps-1.1/gps_server
  125.  
  126. all:    okbridge okshuffle oktally
  127.  
  128. okbridge:    $(OBJ)
  129.     $(CC) $(LDFLAGS) -o okbridge $(OBJ) -lcurses -ltermcap $(MFLAGS)
  130.  
  131. okshuffle:    $(SHUFFLEOBJ) types.h boards.h
  132.     $(CC) $(LDFLAGS) -o okshuffle $(SHUFFLEOBJ)
  133.  
  134. oktally:    $(TALLYOBJ) types.h
  135.     $(CC) $(LDFLAGS) -o oktally $(TALLYOBJ)
  136.  
  137. gps_server:    $(GPSOBJ) $(GPSSRC)
  138.     $(CC) $(LDFLAGS) -o gps_server $(GPSOBJ) 
  139.     cp gps_server $(GPS)
  140.  
  141. install: install.bin install.help
  142.  
  143. install.bin:    okbridge okshuffle oktally
  144.     strip okbridge
  145.     strip okshuffle
  146.     strip oktally
  147.     $(INSTALL) okbridge $(OKBRIDGE_DIR)/okbridge
  148.     $(INSTALL) okshuffle $(OKBRIDGE_DIR)
  149.     $(INSTALL) oktally $(OKBRIDGE_DIR)
  150.  
  151. install.help:
  152.     $(INSTALL) -c -m 644 okbridge.help $(OKBRIDGE_HELPFILE)
  153.  
  154. install.man:
  155.     install -c -m 0644 okbridge.man $(MANDIR)/okbridge.$(MANEXT)
  156.     install -c -m 0644 okshuffle.man $(MANDIR)/okshuffle.$(MANEXT)
  157.     install -c -m 0644 oktally.man $(MANDIR)/oktally.$(MANEXT)
  158.  
  159. clean:
  160.     rm -f *.o 
  161.     rm -f *~
  162.     rm -f tmp*
  163.     rm -f *.log
  164.     rm -f *.zlog
  165.     rm -f *.orig
  166.  
  167. veryclean:    clean
  168.     rm -f okbridge okshuffle oktally gps_server helpfile.h core tags TAGS
  169.  
  170. distrib:    veryclean
  171.         csh -f < MkDistrib
  172.  
  173. bridge.o:    bridge.c state.h types.h network.h protocol.h\
  174.                 display.h input.h terminal.h help.h scoring.h parser.h\
  175.         conversation.h
  176.  
  177. boards.o:    boards.c boards.h types.h cipher.h boards.h socket.h\
  178.         parser.h protocol.h network.h scoring.h
  179.  
  180. ccdef.o:    ccdef.c
  181.  
  182. cipher.o:    cipher.h cipher.c
  183.  
  184. commands.o:    commands.h commands.c types.h parser.h state.h terminal.h \
  185.         display.h input.h gps.h network.h
  186.  
  187. conversation.o:    conversation.h conversation.c types.h protocol.h network.h
  188.  
  189. cs.o:        cs.h cs.c socket.h state.h types.h network.h protocol.h gps.h
  190.  
  191. display.o:    display.h display.c terminal.h types.h state.h
  192.  
  193. gps.o:        gps.h gps_info.h parser.h gps.c conversation.h
  194.  
  195. gps_server.o:   $(GPSSRC) types.h boards.h gps_info.h socket.h
  196.             cp $(GPSSRC) gps_server.c
  197.             $(CC) -c $(CFLAGS) gps_server.c
  198.             rm gps_server.c
  199.  
  200. help.o:        help.h help.c types.h input.h terminal.h helpfile.h
  201.  
  202. input.o:    input.h input.c network.h terminal.h display.h\
  203.         help.h input.h protocol.h state.h types.h conversation.h
  204.  
  205. log.o:        log.h log.c boards.h
  206.  
  207. network.o:    network.h network.c state.h types.h protocol.h socket.h
  208.  
  209. nonstd.o:    nonstd.c
  210.  
  211. parser.o:    parser.h parser.c
  212.  
  213. protocol.o:     protocol.h parser.h protocol.c types.h
  214.  
  215. rc.o:        rc.h rc.c types.h parser.h state.h network.h
  216.  
  217. scoring.o:    scoring.h scoring.c state.h types.h
  218.  
  219. socket.o:    socket.h socket.c
  220.  
  221. startup.o:    state.h types.h parser.h
  222.  
  223. terminal.o:    terminal.h terminal.c
  224.  
  225. helpfile.h:
  226.         echo 'char *help_file_name="'$(OKBRIDGE_HELPFILE)'";' \
  227.         > helpfile.h
  228.  
  229.