Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. # RCS Info: $Revision: 1.5 $ on $Date: 86/11/26 12:09:19 $
  2. # $Source: /users/faustus/xchess/RCS/Makefile,v $
  3. # Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
  4. #
  5. # Makefile for xchess.
  6. CC = cc
  7. CFILES =\
  8. board.c\
  9. button.c\
  10. clock.c\
  11. control.c\
  12. jail.c\
  13. message.c\
  14. parse.c\
  15. popup.c\
  16. program.c\
  17. record.c\
  18. std.c\
  19. valid.c\
  20. window.c\
  21. XCircle.c
  22. COBJS =\
  23. board.o\
  24. button.o\
  25. clock.o\
  26. control.o\
  27. jail.o\
  28. message.o\
  29. parse.o\
  30. popup.o\
  31. program.o\
  32. record.o\
  33. std.o\
  34. valid.o\
  35. window.o\
  36. XCircle.o
  37. HFILES =\
  38. std.h\
  39. xchess.h
  40. SOURCE = $(CFILES)
  41. ALLFILES = $(SOURCE) $(HFILES)
  42. INCLUDE = -I.
  43. DEFINES = -DDEF_PROGRAM=\"/usr/public/gnuchess\"
  44. CFLAGS = $(DEFINES) $(INCLUDE) -g -pg
  45. LINTFLAGS = -u -z -lc -DLINT $(DEFINES) $(INCLUDE)
  46. LINTLIB = ../lib/llib-lX.ln
  47. LDFLAGS = -z -lXMenu -lX -lm -g
  48. GPLDFLAGS = -z -lXMenu_p -lX -lm_p -g -pg
  49. .c.o: $*.c
  50. $(CC) $(CFLAGS) -pg -c $*.c
  51. .s.o: $*.s
  52. $(CC) $(CFLAGS) -pg -c $*.s
  53. all: xchess scrollText/scrollText.a
  54. @echo "All done."
  55. everything: all tags depend lint wc
  56. @echo "All done."
  57. xchess: xchess.o $(COBJS) scrollText/scrollText.a
  58. $(CC) -o xchess xchess.o $(COBJS) scrollText/libScroll.a \
  59. $(LDFLAGS)
  60. scrollText/scrollText.a:
  61. cd scrollText; make; cd ..
  62. gpxchess: xchess.o $(COBJS)
  63. $(CC) -o gpxchess xchess.o $(COBJS) scrollText/libScroll.a \
  64. $(GPLDFLAGS)
  65. lint: $(SOURCE)
  66. lint $(LINTFLAGS) $(SOURCE) $(LINTLIB) | \
  67. grep -v "multiply declared"
  68. qgrind: $(ALLFILES)
  69. qgrind -lc $(ALLFILES)
  70. vgrind: $(ALLFILES)
  71. vgrind -lc $(ALLFILES)
  72. opt: all
  73. reopt: all
  74. install: all
  75. source: $(SOURCE)
  76. tags: $(ALLFILES)
  77. ctags -w -t *.c *.h > /dev/null 2>&1
  78. wc: $(ALLFILES)
  79. @wc $(ALLFILES)
  80. print: $(ALLFILES)
  81. @pr $(ALLFILES)
  82. clean:
  83. rm -f *.o *.a *.out xchess tags foo tmp
  84. tar:
  85. tar -cvf xchess.tar Makefile *.h *.c *.bitmap *.icon *.cur *.1\
  86. scrollText/Makefile scrollText/*.h scrollText/*.c scrollText/*.1\
  87. scrollText/*.3
  88. $(ALLFILES):
  89. co $@
  90. depend: $(SOURCE)
  91. cc -M $(CFLAGS) $(CFILES) > makedep
  92. echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
  93. echo '$$r makedep' >>eddep
  94. echo 'w' >>eddep
  95. ed - Makefile < eddep
  96. rm eddep makedep
  97. echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
  98. echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
  99. echo '# see make depend above' >> Makefile
  100. #-----------------------------------------------------------------
  101. # DO NOT DELETE THIS LINE -- make depend uses it
  102. # DEPENDENCIES MUST END AT END OF FILE
  103. xchess.o $(COBJS): $(HFILES)