home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / szachy / gnu / gnu_4_0_74 / gnuchess-4.0.pl74 / src / makefile < prev    next >
Makefile  |  1995-02-21  |  18KB  |  470 lines

  1. #
  2. # Makefile for GNU Chess
  3. #
  4. # Copyright (c) 1992, 1995 Free Software Foundation
  5. #
  6. # This file is part of GNU CHESS.
  7. #
  8. # GNU Chess is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2, or (at your option)
  11. # any later version.
  12. #
  13. # GNU Chess is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with GNU Chess; see the file COPYING.  If not, write to
  20. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21. #
  22.  
  23. #
  24. # gnuchess  is a curses-based chess.
  25. # gnuchessn is a fancy-display-curses-based chess.
  26. # gnuchessr is a plain dumb-terminal chess (but with full variation output)
  27. # gnuchessc is suitable for chesstool use (mimics /usr/games/chess output)
  28. # gnuchessx is the xchess based chess.
  29. #
  30.  
  31. # The version number of this GNU release
  32. VERS=    4.0
  33.  
  34. # Relevant file areas.
  35. DIST=    ../README ../README.lang ../doc ../misc ../src ../test
  36.  
  37. # size of book to make
  38. # Listed below are the book options and the size of the resulting book,
  39. # the default is small. Uncomment/comment the BOOKOPTS corresponding to
  40. # the size you want.
  41. #
  42. #huge             1,450K
  43. #BOOKOPTS=-S 188000 -P 26
  44. #big            540K
  45. #BOOKOPTS=-S 45000 -P 16
  46. #med            240K
  47. #BOOKOPTS=-S 20000 -P 12
  48. #small          144K
  49. BOOKOPTS=-S 12000 -P 10
  50. #tiny           78K
  51. #BOOKOPTS=-S 9000 -P 8
  52.  
  53. # Distribution directory
  54. DISTDIR= ../..
  55.  
  56. # Programs being distributed
  57. PROGS=gnuchess-4.0.pl74/src gnuchess-4.0.pl74/misc gnuchess-4.0.pl74/doc
  58.  
  59. LIBS = -lm
  60. #LIBS = -lm /usr/ucblib/libucb.a  #Solaris 2.3
  61.  
  62. BOOK=../book/gnuchess.bk3.gz
  63.  
  64. # Change these to something less transitory, like /usr/games, and then
  65. # compile. Ask your system admin / unix guru to put gnuchess.{hash,lang,book}
  66. # in $(LIBDIR).
  67. # Where the binaries live.
  68. #BINDIR= /usr/local/bin
  69. BINDIR=.
  70.  
  71. # Where language description, our book, and the persistent hash live.
  72. #LIBDIR= /usr/local/lib
  73. LIBDIR=.
  74.  
  75. # Display routines.
  76. LCURSES=-lcurses -ltermcap
  77.  
  78. # Table limits from gnuchess.h. These are given default values if not
  79. # set here. The default values are given below, but you may want to
  80. # check gnuchess.h to make sure.
  81. # -Dttblsz=150001 Transposition table size. Small address space computers
  82. #                 might try 8001. Setting ttblsz to 0 removes the transposition
  83. #                 table
  84. # -DBOOKSIZE=250000 Number of unique position/move combinations allowed.
  85. #                   For MSDOS 10000 is used.
  86.  
  87. #compile options for gnuchess
  88. #    Search options
  89. # -DHISTORY use history hueristic 
  90. # -DKILLT use killt killer hueristic 
  91. # -DNULLMOVE include null move heuristic
  92. # -DDEEPNULL include deepnull move heuristic
  93. # -DUNLIMITEDCAPS allow unlimited depth captures.
  94. # -DPRUNE enable marginal forward pruning
  95. # -DNOMATERIAL don't call it a draw when no pawns and both sides < rook
  96. # -DNODYNALPHA don't dynamically adjust alpha
  97. # -DOLDTIME use old ply time estimating function
  98. # -DLEGAL generate only legal moves instead of psuedo-legal
  99. # -DCACHE  Cache static evaluations 
  100. # -DNODITHER no random element to evaluations
  101. #
  102. #    Verbosity options
  103. # -DBAREBONES compile for max speed no statistics etc kept
  104. # -DQUIETBACKGROUND don't print post information in background ( easy OFF)
  105. # -DHASHSTATS keep hash table statistics
  106. # -DMORESTATS print more hash table stats
  107. # -DQUIETBOOKGEN Don't print errors while loading a book or generating a binbook
  108. # -DSEMIQUIETBOOKGEN Print less verbose errors while reading book or generating binbook
  109. #
  110. #    Miscellaneous options
  111. # -DHAVE_TIME_H have <time.h> header
  112. # -DHASSTRTOUL if your machine supports strtoul() else strtol()
  113. # -DHASGETTIMEOFDAY use gettimeofday for more accurate timing
  114. # -DNOMEMSET if your machine does not support memset
  115. # -DECO if you want support for eco database
  116. # -DCLIENT create client version for use with ICS
  117. # -DLONG64 if you have 64bit longs
  118. # -DSYSV   if you are using SYSV
  119. # -DE4OPENING always open e4 if white and respond to e4 with e5 if black
  120. #
  121. #    Some debug options
  122. # -DDEBUG8 dump board,movelist,input move to /tmp/DEBUG if illegal move
  123. # -DDEBUG9 dump move list from test command
  124. # -DDEBUG10 dump board and move after search before !easy begins
  125. # -DDEBUG11 dump board when the move is output
  126. # -DDEBUG12 dump boards between moves
  127. # -DDEBUG13 dump search control information for each move to /tmp/DEBUG
  128. # -DDEBUG33 dump book moves as read from book
  129. # -DDEBUG40 include extra values of variables for debugging  in game list
  130. # -DDEBUG41 dump post output to /tmp/DEBUG
  131. # the rest of the debug options are tied to the debuglevel command
  132. # -DDEBUG sets up code for debuglevel command
  133. #          debuglevel
  134. #               1 always force evaluation in evaluate
  135. #               4 print move list after search
  136. #               8 print move list after book before search
  137. #              16 print move list after each ply of search
  138. #              32 print adds to transposition table
  139. #              64 print returns from transposition table lookups
  140. #          128 print evals
  141. #          256 print search tree as it is generated
  142. #          512 debug trace of search tree
  143. #         1024 interactive tree print
  144. #     prints:
  145. # move goal-depth depth ply tree-index flags node-score score alpha beta best movegen-score
  146. #
  147. #example:
  148. #
  149. #debug?p3
  150. #debug?e2e3
  151. #debug?g2e3
  152. #debug?
  153. #
  154. #Move# 1    Target= 0    Clock: 0
  155. #        f2e3 S2 d0 p3 71 200 n->s176 s-179 a343 b512 best-179 x369
  156. #        a6h6 S2 d0 p3 72 200 n->s-802 s-179 a343 b512 best176 x369
  157. #    g2e3 S2 d1 p2 34 200 n->s-176 s-410 a-512 b-343 best-12000 x369
  158. #e2e3 S2 d2 p1 17 0 n->s175 s422 a343 b512 best343 x369
  159. #
  160. #        debug? p#  where # is no. of plys to print 
  161. #                from top of tree (default all plys)
  162. #               XXXX moves specifying branch of tree to print 
  163. #                (default all branches)
  164. #                   return terminates input
  165. #         2048 non-interactive trace print
  166. # gnufour ICS client
  167. #
  168. #OPT= -DUSEINT -DCACHE -DCLIENT -DGDX -DHASGETTIMEOFDAY -DNULLMOVE -DQUIETBACKGROUND -DWAY4PL64 -DHISTORY -DAGING -DKILLT -DSHOWLINE -DUNLIMITEDCAPS -DPRUNE -DOLDTIME
  169. ## normal
  170. OPT=  -DUSEINT -DCACHE -DGDX -DHASGETTIMEOFDAY -DNULLMOVE -DQUIETBACKGROUND -DWAY4PL64 -DHISTORY -DHASHSTATS -DAGING -DKILLT -DECO -DUNLIMITEDCAPS -DPRUNE -DOLDTIME
  171.  
  172. # The hashfile is a record of positions seen. It is used by
  173. # GNU Chess to avoid making the same mistakes, a form of learning.
  174. HASH=    -DHASHFILE=\"$(LIBDIR)/gnuchess.hash\"
  175.  
  176. # The "book" is a record of the first few moves, for playing good
  177. # moves easily and quickly, saving time, and irritating the human
  178. # opponent.
  179. BINBOOK = -DBINBOOK=\"$(LIBDIR)/gnuchess.data\"
  180. BINECO = -DBINECO=\"$(LIBDIR)/gnuchess.eco\"
  181. PGNECO = -D\PGNECO=\"$(LIBDIR)/eco.pgn\"
  182.  
  183. # The language file describes capabilities of the program. Perhaps
  184. # it is useful for non-English speaking countries and customizing
  185. # for their convenience and chess happiness.
  186. LANGF= -DLANGFILE=\"$(LIBDIR)/gnuchess.lang\"
  187.  
  188. INSTALL=cp
  189. #INSTALL=install -s
  190.  
  191. # The compiler used for compiling this software.
  192. # Use this for a plain C compiler 
  193. #CC= cc $(OPT)
  194. # Use this for DEC's ANSI C compiler on Ultrix
  195. #CC= c89 $(OPT)
  196. # Use this if you are lucky enough to have GNU CC.
  197. CC= gcc $(OPT)
  198.  
  199. # Miscellaneous CFLAGS. Uncomment the one you need and comment 
  200. # the other.
  201. CFLAGS= -O2 -funroll-loops # gnu cc  
  202. #CFLAGS=  -O -Dinline="" -traditional-cpp
  203. #CFLAGS= -O4 -Dconst="" -Qpath .  # SunOS cc using unprotoize
  204. #CFLAGS= -O4 # Sun acc
  205. #CFLAGS= -O2 # DEC ANSI C (c89) on Ultrix.
  206. #CFLAGS= +O3 -Aa -D_HPUX_SOURCE -DSYSV # HPUX cc 
  207. #CFLAGS= -O   -finline-functions -fstrength-reduce -D__mips -D__LANGUAGE_C # gnu cc 1.40 on DS5000
  208. #CFLAGS= -O   -finline-functions -fstrength-reduce  # gnu cc 1.40 on others
  209. #CFLAGS= -O2 -funroll-loops -D__mips -D__LANGUAGE_C # gnu cc 2.00 on DS5000
  210. #CFLAGS= -O2 -D__alpha -D__LANGUAGE_C # gnu cc 2.00 on Flamingo
  211. #CFLAGS= -O2 -acpp -signed -Wp,-traditional # IRIX 5.1.*?
  212. #CFLAGS= -g -cckr -DNOMACROS -Dhuge=""  #Correct flags for gnuchess 4.0 with IRIX cc.
  213.  
  214. all : gnuchess gnuchessr gnuchessn gnuchessx gnuchessc postprint gnuan game gnuchess.eco
  215.  
  216. gnuchess: mainN.o bookN.o genmovesN.o ataks.o utilN.o evalN.o init.o searchN.o dspcomN.o uxdsp.o
  217.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -o gnuchess mainN.o bookN.o genmovesN.o ataks.o utilN.o evalN.o init.o searchN.o dspcomN.o uxdsp.o $(LCURSES) $(LIBS)
  218.  
  219. gnuan: mainN.o bookG.o genmovesN.o ataks.o utilN.o evalN.o init.o searchG.o gnuan.o
  220.     $(CC) $(CFLAGS) $(HASH) $(LANGF) -DIGNUAN  -o gnuan mainN.o bookG.o genmovesN.o ataks.o utilN.o evalN.o init.o searchG.o gnuan.o $(LIBS)
  221.  
  222. gnuchessc: mainC.o bookC.o genmovesC.o ataks.o utilC.o evalC.o init.o searchC.o dspcomC.o nondspC.o
  223.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -o gnuchessc mainC.o bookC.o genmovesC.o ataks.o utilC.o evalC.o init.o searchC.o dspcomC.o nondspC.o $(LIBS)
  224.  
  225. Dgnuchessr: mainDR.o bookN.o genmovesN.o ataks.o utilDR.o evalDR.o init.o searchDR.o dspcomDR.o nondspDR.o
  226.     $(CC)  -DDEBUG  -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF)  -o gnuchessr mainDR.o bookN.o genmovesN.o ataks.o utilDR.o evalDR.o init.o searchDR.o dspcomDR.o nondspDR.o $(LIBS) $(LIBS)
  227.  
  228. gnuchessx: mainX.o bookX.o genmovesX.o ataks.o utilX.o evalX.o init.o searchX.o dspcomX.o nondspX.o
  229.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -o gnuchessx mainX.o bookX.o genmovesX.o ataks.o utilX.o evalX.o init.o searchX.o dspcomX.o nondspX.o $(LIBS)
  230.  
  231. ecor: mainN.o eco.o genmovesN.o ataks.o utilN.o evalN.o init.o searchN.o dspcomR.o nondspR.o
  232.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -o ecor mainN.o eco.o genmovesN.o ataks.o utilN.o evalN.o init.o searchN.o dspcomR.o nondspR.o $(LIBS)
  233.  
  234. gnuchessr: mainN.o bookN.o genmovesN.o ataks.o utilN.o evalN.o init.o searchN.o dspcomR.o nondspR.o
  235.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -o gnuchessr mainN.o bookN.o genmovesN.o ataks.o utilN.o evalN.o init.o searchN.o dspcomR.o nondspR.o $(LIBS)
  236.  
  237. gnuchessn: mainN.o bookN.o genmovesN.o ataks.o utilN.o evalN.o init.o searchN.o dspcomN.o nuxdsp.o
  238.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -o gnuchessn mainN.o bookN.o genmovesN.o ataks.o utilN.o evalN.o init.o searchN.o dspcomN.o nuxdsp.o $(LCURSES) $(LIBS)
  239.  
  240. game: game.c gnuchess.h
  241.     $(CC) $(CFLAGS) -o game game.c
  242.     
  243. postprint: postprint.o
  244.     $(CC) $(CFLAGS) $(HASH) -o postprint postprint.o
  245.     
  246. gnuan.o: gnuan.c gnuchess.h version.h
  247.     $(CC) $(CFLAGS) $(HASH) $(LANGF) -DIGNUAN $(BINBOOK) -c gnuan.c
  248.  
  249. mainN.o: main.c gnuchess.h version.h ttable.h
  250.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) -c main.c
  251.     mv main.o mainN.o
  252. mainC.o: main.c gnuchess.h version.h ttable.h
  253.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) -DNONDSP -DCHESSTOOL \
  254.         -c main.c
  255.     mv main.o mainC.o
  256. mainX.o: main.c gnuchess.h version.h ttable.h
  257.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) -DXBOARD  -c main.c
  258.     mv main.o mainX.o
  259. mainDR.o: main.c gnuchess.h version.h ttable.h
  260.     $(CC)  -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) \
  261.         -c main.c
  262.     mv main.o mainDR.o
  263.  
  264. genmovesN.o: genmoves.c gnuchess.h version.h ttable.h
  265.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c genmoves.c
  266.     mv genmoves.o genmovesN.o
  267. genmovesC.o: genmoves.c gnuchess.h version.h ttable.h
  268.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  269.         -c genmoves.c 
  270.     mv genmoves.o genmovesC.o
  271. genmovesX.o: genmoves.c gnuchess.h version.h ttable.h
  272.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DXBOARD \
  273.         -c genmoves.c
  274.     mv genmoves.o  genmovesX.o
  275.  
  276. eco.o: eco.c gnuchess.h version.h ataks.h ttable.h
  277.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) $(BINECO)  $(PGNECO) -c eco.c 
  278.  
  279. bookN.o: book.c gnuchess.h version.h ataks.h ttable.h
  280.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) $(PGNECO) $(BINECO) -c book.c 
  281.     mv book.o bookN.o
  282. bookG.o: book.c gnuchess.h version.h ataks.h ttable.h
  283.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) $(PGNECO) $(BINECO) -DIGNUAN  -c book.c 
  284.     mv book.o bookG.o
  285. bookC.o: book.c gnuchess.h version.h ataks.h ttable.h
  286.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  287.           $(BINBOOK) \
  288.         $(PGNECO) $(BINECO) -c book.c 
  289.     mv book.o bookC.o
  290. bookX.o: book.c gnuchess.h version.h ataks.h ttable.h
  291.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DXBOARD  $(BINBOOK) \
  292.         $(PGNECO) $(BINECO) -c book.c
  293.     mv book.o  bookX.o
  294.  
  295. ataks.o: ataks.h ataks.c gnuchess.h version.h ttable.h
  296.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c ataks.c
  297.  
  298. utilN.o: util.c gnuchess.h version.h
  299.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c util.c
  300.     mv util.o utilN.o
  301.  
  302. utilX.o: util.c gnuchess.h version.h
  303.     $(CC) $(CFLAGS) $(HASH) $(LANGF)   \
  304.          -c util.c
  305.     mv util.o  utilX.o
  306.  
  307. utilC.o: util.c gnuchess.h version.h
  308.     $(CC) $(CFLAGS) $(HASH) $(LANGF)   \
  309.          -c util.c
  310.     mv util.o  utilC.o
  311.  
  312. evalC.o: eval.c gnuchess.h version.h ttable.h
  313.     $(CC) $(CFLAGS) $(HASH) $(LANGF)   -c eval.c
  314.     mv eval.o evalC.o
  315.  
  316. evalX.o: eval.c gnuchess.h version.h ttable.h
  317.     $(CC) $(CFLAGS) $(HASH) $(LANGF)   -c eval.c
  318.     mv eval.o evalX.o
  319.  
  320. evalN.o: eval.c gnuchess.h version.h ttable.h
  321.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c eval.c
  322.     mv eval.o evalN.o
  323.  
  324. evalDR.o: eval.c gnuchess.h version.h ttable.h
  325.     $(CC)  -DDEBUG4 -DDEBUG $(CFLAGS) $(HASH) $(LANGF)  \
  326.         -c eval.c 
  327.     mv eval.o evalDR.o
  328. utilDR.o: util.c gnuchess.h version.h
  329.     $(CC)  -DDEBUG4 -DDEBUG $(CFLAGS) $(HASH) $(LANGF)  \
  330.         -c util.c 
  331.     mv util.o utilDR.o
  332.  
  333. init.o: init.c gnuchess.h version.h ttable.h
  334.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c init.c
  335.  
  336. searchN.o: search.c gnuchess.h version.h debug512.h debug10.h debug13.h debug16.h debug256.h debug4.h debug40.h debug41.h debug64.h debug8.h ttable.h ttable.c
  337.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c search.c
  338.     mv search.o searchN.o
  339. searchG.o: search.c gnuchess.h version.h debug512.h debug10.h debug13.h debug16.h debug256.h debug4.h debug40.h debug41.h debug64.h debug8.h ttable.h ttable.c
  340.     $(CC) $(CFLAGS) $(HASH) $(LANGF) -DIGNUAN  -c search.c
  341.     mv search.o searchG.o
  342. searchC.o: search.c gnuchess.h version.h debug512.h debug10.h debug13.h debug16.h debug256.h debug4.h debug40.h debug41.h debug64.h debug8.h ttable.h ttable.c
  343.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  344.         -c search.c 
  345.     mv search.o searchC.o
  346. searchX.o: search.c gnuchess.h version.h debug512.h debug10.h debug13.h debug16.h debug256.h debug4.h debug40.h debug41.h debug64.h debug8.h ttable.h ttable.c
  347.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DXBOARD \
  348.         -c search.c 
  349.     mv search.o searchX.o
  350. searchDR.o: search.c gnuchess.h version.h debug512.h debug10.h debug13.h debug16.h debug256.h debug4.h debug40.h debug41.h debug64.h debug8.h ttable.h ttable.c
  351.     $(CC)  -DDEBUG4 -DDEBUG $(CFLAGS) $(HASH) $(LANGF)  \
  352.         -c search.c 
  353.     mv search.o searchDR.o
  354.  
  355. uxdsp.o: uxdsp.c gnuchess.h version.h
  356.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c uxdsp.c
  357.  
  358. nuxdsp.o: nuxdsp.c gnuchess.h version.h
  359.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c nuxdsp.c
  360.  
  361. nondspC.o: nondsp.c gnuchess.h version.h
  362.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  363.         -c nondsp.c 
  364.     mv nondsp.o nondspC.o
  365. nondspX.o: nondsp.c gnuchess.h version.h
  366.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DXBOARD \
  367.         -c nondsp.c 
  368.     mv nondsp.o nondspX.o
  369. nondspR.o: nondsp.c gnuchess.h version.h
  370.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP \
  371.         -c nondsp.c 
  372.     mv nondsp.o nondspR.o
  373. nondspDR.o: nondsp.c gnuchess.h version.h
  374.     $(CC)  -DDEBUG4 -DDEBUG $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP \
  375.          -c nondsp.c 
  376.     mv nondsp.o nondspDR.o
  377.  
  378. dspcomN.o: dspcom.c gnuchess.h version.h
  379.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c dspcom.c
  380.     mv dspcom.o dspcomN.o
  381. dspcomC.o: dspcom.c gnuchess.h version.h
  382.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  383.         -c dspcom.c 
  384.     mv dspcom.o dspcomC.o
  385. dspcomX.o: dspcom.c gnuchess.h version.h
  386.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DXBOARD \
  387.         -c dspcom.c 
  388.     mv dspcom.o dspcomX.o
  389. dspcomR.o: dspcom.c gnuchess.h version.h
  390.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP \
  391.         -c dspcom.c 
  392.     mv dspcom.o dspcomR.o
  393. dspcomDR.o: dspcom.c gnuchess.h version.h
  394.     $(CC)  -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP \
  395.         -c dspcom.c 
  396.     mv dspcom.o dspcomDR.o
  397.  
  398. postprint.o: postprint.c gnuchess.h version.h
  399.     $(CC) $(CFLAGS) $(HASH) -c postprint.c
  400.  
  401. binsort:    binsort.c binsort.h
  402.     $(CC) $(CFLAGS) -o binsort binsort.c
  403.  
  404. ecosort:    ecosort.c gnuchess.h
  405.     $(CC) $(CFLAGS) -o ecosort ecosort.c
  406.  
  407. ecocvt:    ecocvt.c
  408.     $(CC) $(CFLAGS) -o ecocvt ecocvt.c
  409.  
  410. distribution:
  411.     -patchlevel=`cat $(DISTDIR)/gnuchess-$(VERS)/src/version.h|grep patchlevel|sed -e 's/[^0-9]//g'` ;\
  412.     echo "GNU patchlevel is $$patchlevel" ;\
  413.     cd $(DISTDIR) ;\
  414.     rm -f gnuchess.tar.$(VERS).Z* gnuchess.tar.$(VERS).Z.uu* ;\
  415.     tar cf - $(PROGS) | compress > $(DISTDIR)/gnuchess-$(VERS).pl$$patchlevel.tar.Z ;\
  416.     uuencode gnuchess-$(VERS).pl$$patchlevel.tar.Z gnuchess-$(VERS).pl$$patchlevel.tar.Z > gnuchess-$(VERS).pl$$patchlevel.tar.Z.uu ;\
  417.     rm -f x?? ;\
  418.     split -2500 gnuchess-$(VERS).pl$$patchlevel.tar.Z.uu ;\
  419.     for i in x??; do \
  420.       mv $$i $(DISTDIR)/GNU_Chess_$$i; \
  421.     done
  422.  
  423. gnuchess.data: $(BOOK)
  424.     -rm /tmp/gnuchess.data
  425.     echo 3 0 >test;echo quit >>test
  426.     gzip -d -c  $(BOOK)     > ./t
  427.     cat test| ./gnuchessr -b ./t  -B /tmp/gnuchess.data $(BOOKOPTS)
  428.     cp /tmp/gnuchess.data .
  429.     rm test ./t
  430.  
  431. gnuchess.eco:    ecor binsort ecocvt ecosort
  432.     -rm -f gnuchess.eco /tmp/step1.eco /tmp/step2.eco
  433.     - echo 0 0>/tmp/step0.eco
  434.     -./ecor -b ../book/eco.pgn -B /tmp/step1.eco</tmp/step0.eco
  435.     ./ecosort 
  436.     -./ecocvt /tmp/step2.eco gnuchess.eco
  437.     
  438.  
  439. install: install1 
  440.     -$(INSTALL) ./gnuchess.data $(LIBDIR)/gnuchess.data
  441.     -$(INSTALL) ./gnuchess.eco $(LIBDIR)/gnuchess.eco
  442.     -$(INSTALL) ../book/eco.pgn $(LIBDIR)/eco.pgn
  443.  
  444.  
  445. install1: 
  446.     -$(INSTALL) gnuchessx $(BINDIR)/gnuchessx
  447.     -$(INSTALL) gnuchessc $(BINDIR)/gnuchessc
  448.     -$(INSTALL) gnuchessr $(BINDIR)/gnuchessr
  449.     -$(INSTALL) gnuchessn $(BINDIR)/gnuchessn
  450.     -$(INSTALL) postprint $(BINDIR)/postprint
  451.     -$(INSTALL) gnuan $(BINDIR)/gnuan
  452.     -$(INSTALL) gnuchess $(BINDIR)/gnuchess
  453.     -$(INSTALL) ../misc/gnuchess.lang $(LIBDIR)/gnuchess.lang
  454.  
  455. test:     check
  456.  
  457. check:        gnuchessr ../test/testall
  458.      cat ../test/testall|gnuchessr > test.out 2>&1
  459.  
  460. ../test/testall:
  461.      (cd ../test; zcat test.tar.z | tar -xvf -)
  462.  
  463. bigcheck:     gnuchessr ../test/testall
  464.     cat ../test/gnutest.run|gnuchessr > gnutest.out 2>&1
  465.  
  466. clean:
  467.     -rm -f binsort gnuchessx gnuchessc gnuchess gnuchessr gnuchessn ecor ecocvt ecosort postprint gnuan game stamp-*
  468.     -echo $(DISTDIR)
  469.     -find $(DISTDIR) \( -name '*.o' -o -name '*~' -o -name 'CL*' -o -name 'PATCH*' -o -name '#*#' -o -name '%*%' -o -name '*orig' \) -exec rm -f {} \;
  470.