home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume9 / othello2 / part03 / Makefile < prev    next >
Encoding:
Makefile  |  1990-04-27  |  5.8 KB  |  168 lines

  1. #
  2. #  Makefile for the othello game.
  3. #
  4. #  Graphics versions for SunView, X11, XView and dumb terminals.
  5. #
  6. #  @(#)Makefile 1.9 90/04/10
  7. #
  8. #  Othello routines originally written by Chris Miller.
  9. #  Original SunView graphics by
  10. #           Ed Falk - Sun Microsystems (Mountain View CA.)
  11. #
  12. #  New SunView, X11, XView and tty versions and consolidation by
  13. #           Rich Burridge - Sun Microsystems, Australia.
  14. #
  15. #  Permission is given to distribute these sources, as long as the
  16. #  introductory messages are not removed, and no monies are exchanged.
  17. #
  18. #  No responsibility is taken for any errors inherent either
  19. #  to the comments or the code of this program, but if reported
  20. #  to me then an attempt will be made to fix them.
  21. #
  22. #========================================================================
  23. #
  24. #  There are various small changes needed when compiling othello on
  25. #  different systems. These have been isolated here, and should be
  26. #  uncommented if needed.
  27. #
  28. #=======================================================================
  29. #  Full pathname of the othello remarks file. This can also be overridden
  30. #  with a command line option.
  31. #
  32. #REMNAMEFILE    = $(LIBDIR)/othello.remarks
  33. #REMNAME    = -DREMNAME=\"$(REMNAMEFILE)\"
  34. #-----------------------------------------------------------------------
  35. #  If you are not running under a BSD4.3 derived system, then the
  36. #  second parameter to a select call is a pointer to an integer function,
  37. #  and this definition needs to be uncommented. You need to uncomment this
  38. #  for SunOS v3.x.
  39. #
  40. #SIGRET         = -DNO_4_3SIGNAL
  41. #-----------------------------------------------------------------------
  42. #  If you are compiling the X11 version and the X11 include and
  43. #  library files are not in a standard place, then the following
  44. #  two lines should be uncommented, and set appropriately.
  45. #
  46. #X11INCDIR         = -I$(OPENWINHOME)/include
  47. #X11LIBDIR         = -L$(OPENWINHOME)/lib
  48. #------------------------------------------------------------------------
  49. #  If you are compiling the XView version, then the following two lines
  50. #  should be uncommented, and set appropriately.
  51. #
  52. #XVIEWINCDIR      = -I$(OPENWINHOME)/include
  53. #XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
  54. #
  55. #===========================================================================
  56. #
  57. #  Default locations where Othello files will be installed.
  58. #  You might wish to alter these values.
  59. #
  60. BINDIR          = /usr/local/games
  61. LIBDIR          = /usr/local/lib
  62. MANDIR          = /usr/man/man$(MANSECT)
  63. MANSECT         = l
  64. #
  65. #  Compilation flags and standard macro definitions.
  66. #
  67. CFLAGS          = -g $(REMNAME) $(SIGRET) $(X11INCDIR) $(XVIEWINCDIR)
  68. #
  69. #==========================================================================
  70.  
  71. BINARIES        = sv_othello tty_othello xothello xv_othello
  72.  
  73. CC        = cc
  74.  
  75. STDSRCS         = boardstuff.c events.c items.c makemove.c othello.c \
  76.           procs.c remark.c
  77. STDOBJS         = boardstuff.o events.o items.o makemove.o othello.o \
  78.           procs.o remark.o
  79.  
  80. GSRCS           = sunview.c tty.c x11.c xview.c
  81. HDRS            = color.h extern.h images.h othello.h patchlevel.h
  82. IMAGES          = black.icon othello.icon othello.color.icon white.icon \
  83.           button.invert.icon button.normal.icon button.stencil.icon \
  84.           cycle.glyph.icon cycle.linvert.icon cycle.rinvert.icon \
  85.           cycle.stencil.icon hglass.cursor nocur.cursor
  86. OTHERS          = CHANGES README TODO othello.1 othello.remarks Makefile
  87.  
  88. SFILES1         = $(STDSRCS)
  89. SFILES2         = $(HDRS) $(OTHERS)
  90. SFILES3         = $(GSRCS)
  91. SFILES4        = $(IMAGES)
  92.  
  93. SVIEWLIBS       = -lsuntool -lsunwindow -lpixrect
  94. TTYLIBS         = -ltermcap
  95. X11LIBS         = -lX11
  96. XVIEWLIBS       = -lxview -lolgx -lX11
  97.  
  98. help:
  99.         @echo
  100.         @echo "You need to specify one of the following options:"
  101.         @echo
  102.         @echo "  make sunview    - to make the SunView version."
  103.         @echo "  make tty        - to make the dumb tty version."
  104.         @echo "  make x11        - to make the X11 version."
  105.         @echo "  make xview      - to make the XView version."
  106.         @echo
  107.         @echo "This should be followed by:"
  108.         @echo
  109.         @echo "  make install"
  110.         @echo "  make clean"
  111.         @echo
  112.  
  113. all:            $(BINARIES)
  114.  
  115. sunview:        $(STDOBJS) sunview.o
  116.         $(CC) -o sv_othello $(CFLAGS) $(STDOBJS) sunview.o $(SVIEWLIBS)
  117.         -cp sv_othello othello
  118.  
  119. tty:            $(STDOBJS) tty.o
  120.         $(CC) -o tty_othello $(CFLAGS) $(STDOBJS) tty.o $(TTYLIBS)
  121.         -cp tty_othello othello
  122.  
  123. x11:            $(STDOBJS) x11.o
  124.         $(CC) -o xothello $(X11LIBDIR) $(CFLAGS) $(STDOBJS) x11.o \
  125.                    $(X11LIBS)
  126.         -cp xothello othello
  127.  
  128. xview:          $(STDOBJS) xview.o
  129.         $(CC) -o xv_othello $(XVIEWLIBDIR) $(CFLAGS) $(STDOBJS) \
  130.                 xview.o $(XVIEWLIBS)
  131.         -cp xv_othello othello
  132.  
  133. install:
  134.         install -s -m 751 othello $(BINDIR)
  135.         install -c -m 644 othello.remarks $(LIBDIR)
  136.         install -c -m 644 othello.1 $(MANDIR)/othello.$(MANSECT)
  137.  
  138. clean:;         rm -f *.o Part* *~ $(BINARIES) core
  139.  
  140. lint:;          lint $(STDSRCS) sunview.c $(SVIEWLIBS)
  141.         lint $(STDSRCS) tty.c $(TTYLIBS)
  142.         lint $(STDSRCS) xview.c $(XVIEWLIBS) 
  143.         lint $(STDSRCS) x11.c $(X11LIBS) 
  144.  
  145. shar:;          shar.script $(SFILES1) > Part1
  146.         shar.script $(SFILES2) > Part2
  147.         shar.script $(SFILES3) > Part3
  148.         shar.script $(SFILES4) > Part4
  149.  
  150. create:         SCCS
  151.         -sccs create $(STDSRCS) $(GSRCS) $(HDRS) $(IMAGES) $(OTHERS)
  152.  
  153. SCCS:
  154.         mkdir SCCS
  155.         chmod 755 SCCS
  156.  
  157. boardstuff.o:   boardstuff.c color.h othello.h extern.h
  158. events.o:       events.c othello.h color.h extern.h
  159. items.o:        items.c color.h othello.h extern.h
  160. makemove.o:     makemove.c othello.h extern.h
  161. othello.o:      othello.c othello.h color.h patchlevel.h
  162. procs.o:        procs.c color.h othello.h extern.h
  163. remark.o:       remark.c othello.h extern.h
  164. sunview.o:      sunview.c othello.h color.h extern.h images.h $(IMAGES)
  165. tty.o:          tty.c othello.h color.h extern.h
  166. x11.o:          x11.c othello.h color.h extern.h images.h $(IMAGES)
  167. xview.o:        xview.c othello.h color.h extern.h images.h $(IMAGES)
  168.