home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume15 / gtetris2 / part02 / Makefile.std < prev    next >
Makefile  |  1993-01-27  |  2KB  |  114 lines

  1. # GENERIC X-WINDOW-BASED TETRIS
  2. #
  3. #    Makefile
  4. #
  5. ###
  6. #
  7. #  Copyright (C) 1992    Qiang Alex Zhao
  8. #            Computer Science Dept, University of Arizona
  9. #            azhao@cs.arizona.edu
  10. #
  11. #            All Rights Reserved
  12. #
  13. #  Permission to use, copy, modify, and distribute this software and
  14. #  its documentation for any purpose and without fee is hereby granted,
  15. #  provided that the above copyright notice appear in all copies and
  16. #  that both that copyright notice and this permission notice appear in
  17. #  supporting documentation, and that the name of the author not be
  18. #  used in advertising or publicity pertaining to distribution of the
  19. #  software without specific, written prior permission.
  20. #
  21. #  This program is distributed in the hope that it will be "playable",
  22. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  24. #
  25.  
  26.  
  27. ###########################################################################
  28. ### Configurable Settings
  29.  
  30. # destination directory
  31. DEST        = /r/cas/usr/azhao/pub
  32.  
  33. # score file
  34. SCOREFILE    = $(DEST)/.tetris.scores
  35.  
  36. # path to X header files
  37. XINCLUDE    = /usr/include/X11
  38.  
  39. # path to X library files
  40. XLIBS        = /usr/lib/X11
  41.  
  42. # the C compiler, used as linker ;o)
  43. CC        = cc
  44.  
  45. # local settings (blank means no change)
  46. #    System:        LOCAL_DEFS    LOCAL_LIBS    LINK_LIBS
  47. #--------------------------------------------------------------------------
  48. #
  49. #    HP-UX        -DHPUX                -L $(XLIBS)
  50. #
  51. #    AIX        -DAIX        -lbsd
  52. #
  53.  
  54. LOCAL_DEFS    =
  55. LOCAL_LIBS    =
  56. LINK_LIBS    = -L$(XLIBS)
  57.  
  58. ###########################################################################
  59. ### Fixed settings
  60.  
  61. MAKEFILE    = Makefile
  62.  
  63. PROGT        = tetris
  64. PROGS        = tscores
  65.  
  66. HDRS        = tetris.h \
  67.           data.h
  68.  
  69. CFLAGS        = -O -I$(XINCLUDE) -DSCOREFILE='"$(SCOREFILE)"' $(LOCAL_DEFS)
  70. LDFLAGS        = -O $(LINK_LIBS) $(LOCAL_LIBS)
  71.  
  72. LDLIBS        = -lX11 -lm
  73.  
  74. SRCS        = tetris.c \
  75.           die.c \
  76.           utils.c
  77.  
  78. OBJT        = tetris.o \
  79.           utils.o \
  80.           die.o
  81.  
  82. PRINT        = enscript -2rG
  83.  
  84.  
  85. ### Dependencies/Actions
  86.  
  87. all:        $(PROGT) $(PROGS)
  88.  
  89. $(PROGT):    $(OBJT)
  90.     @echo -n "Linking $(PROGT) ... "
  91.     @$(CC) $(LDFLAGS) $(OBJT) $(LDLIBS) -o $(PROGT)
  92.     @echo "Done."
  93.  
  94. $(PROGS):    $(OBJS)
  95.     @echo -n "Linking $(PROGS) ... "
  96.     ln -s $(PROGT) $(PROGS)
  97.     @echo "Done."
  98.  
  99. clean:
  100.     rm -rf *.o $(PROGT) $(PROGS)
  101.  
  102. install:    $(PROGT) $(PROGS)
  103.     @echo Installing $(PROGT) and $(PROGS) in $(DEST)
  104.     install -s $(PROGT) $(PROGS) $(DEST)
  105.  
  106. print:
  107.     $(PRINT) $(HDRS) $(SRCS)
  108.  
  109. ### dependencies for each object
  110. tetris.o:    tetris.c tetris.h
  111. utils.o:    utils.c tetris.h data.h
  112. die.o:        die.c tetris.h
  113.  
  114.