home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / XAP / XGAMES / XHEXTRIS.TAR / Imakefile < prev    next >
Encoding:
Makefile  |  1990-04-27  |  4.3 KB  |  121 lines

  1. #  hextris Copyright 1990 David Markley, dm3e@+andrew.cmu.edu, dam@cs.cmu.edu
  2. #
  3. #  Permission to use, copy, modify, and distribute, this software and its
  4. #  documentation for any purpose is hereby granted without fee, provided that
  5. #  the above copyright notice appear in all copies and that both that
  6. #  copyright notice and this permission notice appear in supporting
  7. #  documentation, and that the name of the copyright holders be used in
  8. #  advertising or publicity pertaining to distribution of the software with
  9. #  specific, written prior permission, and that no fee is charged for further
  10. #  distribution of this software, or any modifications thereof.  The copyright
  11. #  holder make no representations about the suitability of this software for
  12. #  any purpose.  It is provided "as is" without express or implied warranty.
  13. #  THE COPYRIGHT HOLDER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  14. #  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  15. #  EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  16. #  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  17. #  DATA, PROFITS, QPA OR GPA, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 
  18. #  OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. #  PERFORMANCE OF THIS SOFTWARE.
  20.  
  21. CC=cc
  22. #ifdef AFS
  23. INCLDS=-I/usr/andrew/include -I/usr/local/include
  24. LIBS= -L/usr/contributed/lib -L/usr/local/lib -L/usr/andrew/lib
  25. LOGGING = -lloguse
  26. #ifdef GAMES
  27. CFLAGS= -DAFS -DLOG -O
  28. AUTHLIBS+{sun4_40}= /usr/local/lib/afs/libkauth.a \
  29.     /usr/local/lib/libr.a /usr/local/lib/liblwp.a \
  30.     /usr/local/lib/afs/libsys.a /usr/local/lib/libscrypt.a
  31. AUTHLIBS+{mac2_51}= /usr/local/lib/afs/libkauth.a \
  32.     /usr/local/lib/libr.a /usr/local/lib/liblwp.a \
  33.     /usr/local/lib/afs/libsys.a /usr/local/lib/libscrypt.a
  34. HEXFONTDIR=/afs/andrew/usr0/games/fonts/x11
  35. HIGHSCOREDIR=/afs/andrew/usr0/games/lib/xhextris
  36. HIGHSCOREEXT=xhextris.scores
  37. #else
  38. CFLAGS= -DLOG -O
  39. CFLAGS+{sun4_40}= -DLOG -Dsun4_40 -g
  40. CFLAGS+{mac2_51}= -DLOG -Dmac2_51 -g
  41. AUTHLIBS=
  42. HEXFONTDIR=/afs/andrew/usr10/dm3e/.fonts/X11
  43. HIGHSCOREDIR=/afs/andrew/usr10/dm3e/stuff/games
  44. HIGHSCOREEXT=xhextris.scores
  45. BIN=/afs/andrew/usr10/dm3e/bin
  46. SECURE=${BIN}
  47. UNPRIV=${BIN}
  48. #endif
  49. #else
  50. CFLAGS= -O
  51. # Make sure INCLDS has the correct area(s) for the needed #includes
  52. INCLDS= -I.
  53. # Make sure LIBS has the correct area(s) for the needed libraries (-lX11).
  54. LIBS= -L.
  55. LOGGING=
  56.  
  57. # Make sure to change these same three variables in header.h
  58.  
  59. # Make this point to where you want the xhextris font placed.
  60. HEXFONTDIR=./
  61. # Make this point to where you want the high score file placed.
  62. # Remember: This directory must be writable be another user, if you
  63. # plan on keeping a common high score file.
  64. HIGHSCOREDIR=./
  65. # Make this the name of the high score file.
  66. HIGHSCOREEXT=xhextris.scores
  67.  
  68. # This is where you want the binaries to be placed.
  69. # Don't bother with the SECURE and UNPRIV, unless you have a setup where
  70. # the game has to switch tokens to write the high scores. Send me mail if you
  71. # do. The games maintainers at CMU have a good setup for this.
  72. BIN=/tmp
  73. SECURE=${BIN}
  74. UNPRIV=${BIN}
  75. #endif
  76. DEFS= -DHEXFONTDIR="\"${HEXFONTDIR}/\"" -DHIGHSCOREDIR="\"${HIGHSCOREDIR}/\"" \
  77.     -DHIGHSCOREEXT="\"${HIGHSCOREEXT}\""
  78. .c.o:
  79.     ${CC} ${CFLAGS} ${DEFS} ${INCLDS} -c $*.c
  80.  
  81. all: installx installtop
  82.     bdftosnf < hex10.bdf > ${HEXFONTDIR}/xhextris.snf
  83.     mkfontdir ${HEXFONTDIR}
  84.     echo "foo" > ${HIGHSCOREDIR}/${HIGHSCOREEXT}
  85.  
  86. xhextris : stdsys.o xio.o hextris.o header.h
  87.     ${CC} ${CFLAGS} ${DEFS} -o xhextris stdsys.o xio.o hextris.o \
  88.     ${INCLDS} ${AUTHLIBS} ${LIBS} -lX11 ${LOGGING}
  89.  
  90. # This is only usefull if you use the Andrew Window Manager
  91. wmhextris: stdsys.o wmio.o hextris.o header.h
  92.     ${CC} ${CFLAGS} ${DEFS} -o wmhextris stdsys.o wmio.o hextris.o \
  93.     ${INCLDS} ${AUTHLIBS} ${LIBS} -lwm ${LOGGING}
  94.  
  95. tophextris: stdsys.o tophextris.o header.h
  96.     ${CC} -O ${DEFS} ${INCLDS} -o tophextris stdsys.o tophextris.o \
  97.     ${AUTHLIBS} ${LIBS}
  98.  
  99. installx: xhextris
  100.     install -s xhextris ${SECURE}/xhextris
  101.  
  102. # This is only usefull if you use the Andrew Window Manager
  103. installwm: wmhextris
  104.     install -s wmhextris ${SECURE}/hextris
  105.  
  106. installtop: tophextris
  107.     install -s tophextris ${UNPRIV}/tophextris
  108.  
  109. clean:
  110.     -    rm *.o xhextris wmhextris hextris
  111.  
  112.  
  113. xio.o: header.h
  114. hextris.o: header.h
  115. stdsys.o: header.h 
  116. tophextris.o: header.h
  117.  
  118.