Makefile 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. # Makefile for dungeon
  2. # Where to install the program
  3. BINDIR = /usr/games
  4. # Where to install the data file
  5. DATADIR = /usr/games/lib
  6. # Where to install the man page
  7. MANDIR = /usr/share/man
  8. # The dungeon program provides a ``more'' facility which tries to
  9. # figure out how many rows the terminal has. Several mechanisms are
  10. # supported for determining this; the most common one has been left
  11. # uncommented. If you have trouble, especially when linking, you may
  12. # have to select a different option.
  13. # more option 1: use the termcap routines. On some systems the LIBS
  14. # variable may need to be set to -lcurses. On some it may need to
  15. # be /usr/lib/termcap.o. These options are commented out below.
  16. LIBS = -ltermcap
  17. TERMFLAG =
  18. # LIBS = -lcurses
  19. # LIBS = /usr/lib/termcap.o
  20. # more option 2: use the terminfo routines. On some systems the LIBS
  21. # variable needs to be -lcursesX, but probably all such systems support
  22. # the termcap routines (option 1) anyhow.
  23. # LIBS = -lcurses
  24. # TERMFLAG = -DMORE_TERMINFO
  25. # more option 3: assume all terminals have 24 rows
  26. # LIBS =
  27. # TERMFLAG = -DMORE_24
  28. # more option 4: don't use the more facility at all
  29. # LIBS =
  30. # TERMFLAG = -DMORE_NONE
  31. # End of more options
  32. # Uncomment the following line if you want to have access to the game
  33. # debugging tool. This is invoked by typing "gdt". It is not much
  34. # use except for debugging.
  35. GDTFLAG = -DALLOW_GDT
  36. # Compilation flags
  37. CFLAGS = -g #-static
  38. # On SCO Unix Development System 3.2.2a, the const type qualifier does
  39. # not work correctly when using cc. The following line will cause it
  40. # to not be used and should be uncommented.
  41. # CFLAGS= -O -Dconst=
  42. ##################################################################
  43. # Source files
  44. CSRC = actors.c ballop.c clockr.c demons.c dgame.c dinit.c dmain.c\
  45. dso1.c dso2.c dso3.c dso4.c dso5.c dso6.c dso7.c dsub.c dverb1.c\
  46. dverb2.c gdt.c lightp.c local.c nobjs.c np.c np1.c np2.c np3.c\
  47. nrooms.c objcts.c rooms.c sobjs.c supp.c sverbs.c verbs.c villns.c
  48. # Object files
  49. OBJS = actors.o ballop.o clockr.o demons.o dgame.o dinit.o dmain.o\
  50. dso1.o dso2.o dso3.o dso4.o dso5.o dso6.o dso7.o dsub.o dverb1.o\
  51. dverb2.o gdt.o lightp.o local.o nobjs.o np.o np1.o np2.o np3.o\
  52. nrooms.o objcts.o rooms.o sobjs.o supp.o sverbs.o verbs.o villns.o
  53. dungeon: $(OBJS) dtextc.dat
  54. $(CC) $(CFLAGS) -o zork $(OBJS) $(LIBS)
  55. install: zork dtextc.dat
  56. mkdir -p $(BINDIR) $(LIBDIR) $(MANDIR)/man6
  57. cp zork $(BINDIR)
  58. cp dtextc.dat $(DATADIR)
  59. cp dungeon.6 $(MANDIR)/man6/
  60. clean:
  61. rm -f $(OBJS) zork core dsave.dat *~
  62. dtextc.dat:
  63. cat dtextc.uu1 dtextc.uu2 dtextc.uu3 dtextc.uu4 | uudecode
  64. dinit.o: dinit.c funcs.h vars.h
  65. $(CC) $(CFLAGS) $(GDTFLAG) -DTEXTFILE=\"$(DATADIR)/dtextc.dat\" -c dinit.c
  66. dgame.o: dgame.c funcs.h vars.h
  67. $(CC) $(CFLAGS) $(GDTFLAG) -c dgame.c
  68. gdt.o: gdt.c funcs.h vars.h
  69. $(CC) $(CFLAGS) $(GDTFLAG) -c gdt.c
  70. local.o: local.c funcs.h vars.h
  71. $(CC) $(CFLAGS) $(GDTFLAG) -c local.c
  72. supp.o: supp.c funcs.h vars.h
  73. $(CC) $(CFLAGS) $(TERMFLAG) -c supp.c
  74. actors.o: funcs.h vars.h
  75. ballop.o: funcs.h vars.h
  76. clockr.o: funcs.h vars.h
  77. demons.o: funcs.h vars.h
  78. dmain.o: funcs.h vars.h
  79. dso1.o: funcs.h vars.h
  80. dso2.o: funcs.h vars.h
  81. dso3.o: funcs.h vars.h
  82. dso4.o: funcs.h vars.h
  83. dso5.o: funcs.h vars.h
  84. dso6.o: funcs.h vars.h
  85. dso7.o: funcs.h vars.h
  86. dsub.o: funcs.h vars.h
  87. dverb1.o: funcs.h vars.h
  88. dverb2.o: funcs.h vars.h
  89. lightp.o: funcs.h vars.h
  90. nobjs.o: funcs.h vars.h
  91. np.o: funcs.h vars.h
  92. np1.o: funcs.h vars.h parse.h
  93. np2.o: funcs.h vars.h parse.h
  94. np3.o: funcs.h vars.h parse.h
  95. nrooms.o: funcs.h vars.h
  96. objcts.o: funcs.h vars.h
  97. rooms.o: funcs.h vars.h
  98. sobjs.o: funcs.h vars.h
  99. sverbs.o: funcs.h vars.h
  100. verbs.o: funcs.h vars.h
  101. villns.o: funcs.h vars.h