home *** CD-ROM | disk | FTP | other *** search
/ Dream 44 / Amiga_Dream_44.iso / RiscPc / jeux / ArcBoard004.arc / !GNUChessX / src / misc / Makefile_n < prev    next >
Makefile  |  1995-07-02  |  14KB  |  355 lines

  1. #
  2. # Makefile for GNU Chess
  3. #
  4. # Copyright (c) 1992, 1994 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. # *** This makefile is for use with "nmake" and the C compiler in  ***
  25. # *** the Windows NT SDK from Microsoft.  It builds a version of   ***
  26. # *** GNU Chess that runs under Windows NT or Windows 95 (beta 2), ***
  27. # *** and works with the WinBoard front end (version 3.2.pl2 and   ***
  28. # *** later ONLY).                                                 ***
  29. # ********************************************************************
  30. #
  31. # gnuchessr is a plain dumb-terminal chess (but with full variation output)
  32. # gnuchessx is the same, but suitable for use with WinBoard
  33. # The other versions of gnuchess have not been ported.
  34. # The other gnuchess tools (such as gnuan) have not been ported.
  35. # The gnuchess book is built, but the eco database is not.
  36.  
  37. # The version number of this GNU release
  38. VERS=    4.0
  39.  
  40. # size of book to make
  41. # Listed below are the book options and the size of the resulting book,
  42. # the default is small. Uncomment/comment the BOOKOPTS corresponding to
  43. # the size you want.
  44. #
  45. #huge         1,450K
  46. #BOOKOPTS=-S 188000 -P 26
  47. #big            540K
  48. #BOOKOPTS=-S 45000 -P 16
  49. #med            240K
  50. BOOKOPTS=-S 20000 -P 12
  51. #small          144K
  52. BOOKOPTS=-S 12000 -P 10
  53. #tiny            78K
  54. #BOOKOPTS=-S 9000 -P 8
  55.  
  56. BOOK=..\book\gnuchess.bk3.gz
  57.  
  58. # Where the binaries live.
  59. BINDIR= .
  60.  
  61. # Where language description, our book, and the persistent hash live.
  62. LIBDIR= .
  63.  
  64. # Table limits from gnuchess.h. These are given default values if not
  65. # set here. The default values are given below, but you may want to
  66. # check gnuchess.h to make sure.
  67. # -Dttblsz=150001 Transposition table size. Small address space computers
  68. #                 might try 8001. Setting ttblsz to 0 removes the transposition
  69. #                 table
  70. # -DBOOKSIZE=250000 Number of unique position/move combinations allowed.
  71. #                   For MSDOS 10000 is used.
  72.  
  73. #compile options for gnuchess
  74. # -DBAREBONES compile for max speed no statistics etc kept
  75. # -DECO if you want support for eco database
  76. # -DQUIETBACKGROUND don't print post information in background ( easy OFF)
  77. # -DHAVE_MEMSET if your machine have memset
  78. # -DNOMATERIAL don't call it a draw when no pawns and both sides < rook
  79. # -DNODYNALPHA don't dynamically adjust alpha
  80. # -DHASHSTATS keep hash table statistics
  81. # -DMORESTATS print more hash table stats
  82. # -DHISTORY use history killer hueristic 
  83. # -DKILLT use killt killer hueristic 
  84. # -DHAVE_GETTIMEOFDAY use gettimeofday for more accurate timing
  85. # -DHAVE_TIME_H have <time.h> header
  86. # -DHAVE_STRTOUL if your machine supports strtoul() else strtol()
  87. # -DOLDTIME use old ply time estimating function
  88. # -DCLIENT create client version for use with ICS
  89. # -DOLDXBOARD don't generate underpromote moves
  90. # -DLONG64 if you have 64bit longs
  91. # -DSYSV   if you are using SYSV
  92. # -DCACHE  Cache static evaluations 
  93. # -DQUIETBOOKGEN Don't print errors while loading a book or generating a binbook
  94. # -DSEMIQUIETBOOKGEN Print less verbose errors while reading book or generating binbook
  95. # -DNULLMOVE include null move heuristic
  96. # -DDEEPNULL include deepnull move heuristic
  97. # -DNODITHER no random element to evalustions
  98. # some debug options
  99. # -DDEBUG8 dump board,movelist,input move to /tmp/DEBUG if illegal move
  100. # -DDEBUG9 dump move list from test command
  101. # -DDEBUG10 dump board and move after search before !easy begins
  102. # -DDEBUG11 dump board when the move is output
  103. # -DDEBUG12 dump boards between moves
  104. # -DDEBUG13 dump search control information for each move to /tmp/DEBUG
  105. # -DDEBUG33 dump book moves as read from book
  106. # -DDEBUG40 include extra values of variables for debugging  in game list
  107. # -DDEBUG41 dump post output to /tmp/DEBUG
  108. # the rest of the debug options are tied to the debuglevel command
  109. # -DDEBUG sets up code for debuglevel command
  110. #          debuglevel
  111. #               1 always force evaluation in evaluate
  112. #               4 print move list after search
  113. #               8 print move list after book before search
  114. #              16 print move list after each ply of search
  115. #              32 print adds to transposition table
  116. #              64 print returns from transposition table lookups
  117. #          128 print evals
  118. #          256 print search tree as it is generated
  119. #          512 debug trace of search tree
  120. #         1024 interactive tree print
  121. #     prints:
  122. # move goal-depth depth ply tree-index flags node-score score alpha beta best movegen-score
  123. #
  124. #example:
  125. #
  126. #debug?p3
  127. #debug?e2e3
  128. #debug?g2e3
  129. #debug?
  130. #
  131. #Move# 1    Target= 0    Clock: 0
  132. #        f2e3 S2 d0 p3 71 200 n->s176 s-179 a343 b512 best-179 x369
  133. #        a6h6 S2 d0 p3 72 200 n->s-802 s-179 a343 b512 best176 x369
  134. #    g2e3 S2 d1 p2 34 200 n->s-176 s-410 a-512 b-343 best-12000 x369
  135. #e2e3 S2 d2 p1 17 0 n->s175 s422 a343 b512 best343 x369
  136. #
  137. #        debug? p#  where # is no. of plys to print 
  138. #                from top of tree (default all plys)
  139. #               XXXX moves specifying branch of tree to print 
  140. #                (default all branches)
  141. #                   return terminates input
  142. #         2048 non-interactive trace print
  143.  
  144. OPT=  -DUSEINT -DCACHE -DGDX -DNULLMOVE -DQUIETBACKGROUND -DWAY4PL64 -DHISTORY -DHASHSTATS -DAGING -DKILLT -DHAVE_MEMSET -DBOOKSIZE=30000 -Dttblsz=8001
  145.  
  146. # The compiler used for compiling this software.
  147. CC= cl386 -DWIN32 -D_POSIX_ -D__STDC__ -c -W3 -D_X86=1 -Zi -Od $(OPT)
  148. LINK= link32 -debug:full -debugtype:cv -align:0x1000 -subsystem:console
  149. LIBS= libc.lib kernel32.lib
  150.  
  151. all: gnuchessx.exe gnuchessr.exe gnuchess.data
  152.  
  153. gnuan.exe: mainN.obj bookG.obj genmovesN.obj ataks.obj utilN.obj evalN.obj init.obj searchG.obj gnuan.obj
  154.     $(LINK) -out:gnuan.exe mainN.obj bookG.obj genmovesN.obj ataks.obj utilN.obj evalN.obj init.obj searchG.obj gnuan.obj $(LIBS)
  155.  
  156. gnuchessx.exe: mainX.obj bookX.obj genmovesX.obj ataks.obj utilX.obj evalX.obj init.obj searchX.obj dspcomX.obj nondspX.obj
  157.     $(LINK) -out:gnuchessx.exe mainX.obj bookX.obj genmovesX.obj ataks.obj utilX.obj evalX.obj init.obj searchX.obj dspcomX.obj nondspX.obj $(LIBS)
  158.  
  159. ecor.exe: mainN.obj eco.obj genmovesN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomR.obj nondspR.obj
  160.     $(LINK) -out:ecor.exe mainN.obj eco.obj genmovesN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomR.obj nondspR.obj $(LIBS)
  161.  
  162. gnuchessr.exe: mainN.obj bookN.obj genmovesN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomR.obj nondspR.obj
  163.     $(LINK) -out:gnuchessr.exe mainN.obj bookN.obj genmovesN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomR.obj nondspR.obj $(LIBS)
  164.  
  165. gnuan.obj: gnuan.c gnuchess.h version.h
  166.     $(CC) $(CFLAGS) $(HASH) $(LANGF) -DIGNUAN $(BINBOOK) -c gnuan.c
  167.  
  168. mainN.obj: main.c gnuchess.h version.h ttable.h
  169.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) -c main.c
  170.     mv main.obj mainN.obj
  171. mainC.obj: main.c gnuchess.h version.h ttable.h
  172.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) -DNONDSP -DCHESSTOOL \
  173.         -c main.c
  174.     mv main.obj mainC.obj
  175. mainX.obj: main.c gnuchess.h version.h ttable.h
  176.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) -DXBOARD  -c main.c
  177.     mv main.obj mainX.obj
  178. mainDR.obj: main.c gnuchess.h version.h ttable.h
  179.     $(CC)  -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) \
  180.         -c main.c
  181.     mv main.obj mainDR.obj
  182.  
  183. genmovesN.obj: genmoves.c gnuchess.h version.h ttable.h
  184.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c genmoves.c
  185.     mv genmoves.obj genmovesN.obj
  186. genmovesC.obj: genmoves.c gnuchess.h version.h ttable.h
  187.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  188.         -c genmoves.c 
  189.     mv genmoves.obj genmovesC.obj
  190. genmovesX.obj: genmoves.c gnuchess.h version.h ttable.h
  191.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DXBOARD \
  192.         -c genmoves.c
  193.     mv genmoves.obj  genmovesX.obj
  194.  
  195. eco.obj: eco.c gnuchess.h version.h ataks.h ttable.h
  196.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) $(BINECO)  $(PGNECO) -c eco.c 
  197.  
  198. bookN.obj: book.c gnuchess.h version.h ataks.h ttable.h
  199.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) $(PGNECO) $(BINECO) -c book.c 
  200.     mv book.obj bookN.obj
  201. bookG.obj: book.c gnuchess.h version.h ataks.h ttable.h
  202.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  $(BINBOOK) $(PGNECO) $(BINECO) -DIGNUAN  -c book.c 
  203.     mv book.obj bookG.obj
  204. bookC.obj: book.c gnuchess.h version.h ataks.h ttable.h
  205.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  206.           $(BINBOOK) \
  207.         $(PGNECO) $(BINECO) -c book.c 
  208.     mv book.obj bookC.obj
  209. bookX.obj: book.c gnuchess.h version.h ataks.h ttable.h
  210.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DXBOARD  $(BINBOOK) \
  211.         $(PGNECO) $(BINECO) -c book.c
  212.     mv book.obj  bookX.obj
  213.  
  214. ataks.obj: ataks.h ataks.c gnuchess.h version.h ttable.h
  215.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c ataks.c
  216.  
  217. utilN.obj: util.c gnuchess.h version.h
  218.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c util.c
  219.     mv util.obj utilN.obj
  220.  
  221. utilX.obj: util.c gnuchess.h version.h
  222.     $(CC) $(CFLAGS) $(HASH) $(LANGF)   \
  223.          -c util.c
  224.     mv util.obj  utilX.obj
  225.  
  226. utilC.obj: util.c gnuchess.h version.h
  227.     $(CC) $(CFLAGS) $(HASH) $(LANGF)   \
  228.          -c util.c
  229.     mv util.obj  utilC.obj
  230.  
  231. evalC.obj: eval.c gnuchess.h version.h ttable.h
  232.     $(CC) $(CFLAGS) $(HASH) $(LANGF)   -c eval.c
  233.     mv eval.obj evalC.obj
  234.  
  235. evalX.obj: eval.c gnuchess.h version.h ttable.h
  236.     $(CC) $(CFLAGS) $(HASH) $(LANGF)   -c eval.c
  237.     mv eval.obj evalX.obj
  238.  
  239. evalN.obj: eval.c gnuchess.h version.h ttable.h
  240.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c eval.c
  241.     mv eval.obj evalN.obj
  242.  
  243. evalDR.obj: eval.c gnuchess.h version.h ttable.h
  244.     $(CC)  -DDEBUG4 -DDEBUG $(CFLAGS) $(HASH) $(LANGF)  \
  245.         -c eval.c 
  246.     mv eval.obj evalDR.obj
  247. utilDR.obj: util.c gnuchess.h version.h
  248.     $(CC)  -DDEBUG4 -DDEBUG $(CFLAGS) $(HASH) $(LANGF)  \
  249.         -c util.c 
  250.     mv util.obj utilDR.obj
  251.  
  252. init.obj: init.c gnuchess.h version.h ttable.h
  253.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c init.c
  254.  
  255. searchN.obj: 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
  256.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c search.c
  257.     mv search.obj searchN.obj
  258. searchG.obj: 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
  259.     $(CC) $(CFLAGS) $(HASH) $(LANGF) -DIGNUAN  -c search.c
  260.     mv search.obj searchG.obj
  261. searchC.obj: 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
  262.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  263.         -c search.c 
  264.     mv search.obj searchC.obj
  265. searchX.obj: 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
  266.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DXBOARD \
  267.         -c search.c 
  268.     mv search.obj searchX.obj
  269. searchDR.obj: 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
  270.     $(CC)  -DDEBUG4 -DDEBUG $(CFLAGS) $(HASH) $(LANGF)  \
  271.         -c search.c 
  272.     mv search.obj searchDR.obj
  273.  
  274. uxdsp.obj: uxdsp.c gnuchess.h version.h
  275.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c uxdsp.c
  276.  
  277. nuxdsp.obj: nuxdsp.c gnuchess.h version.h
  278.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c nuxdsp.c
  279.  
  280. nondspC.obj: nondsp.c gnuchess.h version.h
  281.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  282.         -c nondsp.c 
  283.     mv nondsp.obj nondspC.obj
  284. nondspX.obj: nondsp.c gnuchess.h version.h
  285.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DXBOARD \
  286.         -c nondsp.c 
  287.     mv nondsp.obj nondspX.obj
  288. nondspR.obj: nondsp.c gnuchess.h version.h
  289.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP \
  290.         -c nondsp.c 
  291.     mv nondsp.obj nondspR.obj
  292. nondspDR.obj: nondsp.c gnuchess.h version.h
  293.     $(CC)  -DDEBUG4 -DDEBUG $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP \
  294.          -c nondsp.c 
  295.     mv nondsp.obj nondspDR.obj
  296.  
  297. dspcomN.obj: dspcom.c gnuchess.h version.h
  298.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -c dspcom.c
  299.     mv dspcom.obj dspcomN.obj
  300. dspcomC.obj: dspcom.c gnuchess.h version.h
  301.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DCHESSTOOL \
  302.         -c dspcom.c 
  303.     mv dspcom.obj dspcomC.obj
  304. dspcomX.obj: dspcom.c gnuchess.h version.h
  305.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP -DXBOARD \
  306.         -c dspcom.c 
  307.     mv dspcom.obj dspcomX.obj
  308. dspcomR.obj: dspcom.c gnuchess.h version.h
  309.     $(CC) $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP \
  310.         -c dspcom.c 
  311.     mv dspcom.obj dspcomR.obj
  312. dspcomDR.obj: dspcom.c gnuchess.h version.h
  313.     $(CC)  -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF)  -DNONDSP \
  314.         -c dspcom.c 
  315.     mv dspcom.obj dspcomDR.obj
  316.  
  317. postprint.obj: postprint.c gnuchess.h version.h
  318.     $(CC) $(CFLAGS) $(HASH) -c postprint.c
  319.  
  320. binsort.exe: binsort.obj
  321.     $(LINK) -out:binsort.exe binsort.obj $(LIBS)
  322.  
  323. binsort.obj: binsort.c binsort.h
  324.     $(CC) $(CFLAGS) -c binsort.c
  325.  
  326. ecosort.exe: ecosort.obj
  327.     $(LINK) -out:ecosort.exe ecosort.obj $(LIBS)
  328.  
  329. ecosort.obj: ecosort.c gnuchess.h
  330.     $(CC) $(CFLAGS) -c ecosort.c
  331.  
  332. ecocvt.exe: ecocvt.obj
  333.     $(LINK) -out:ecocvt.exe ecocvt.obj $(LIBS)
  334.  
  335. ecocvt.obj: ecocvt.c
  336.     $(CC) $(CFLAGS) -c ecocvt.c
  337.  
  338. gnuchess.data: $(BOOK)
  339.     del input.tmp textbook.tmp gnuchess.data
  340.     echo 3 0 >input.tmp
  341.         echo quit >input.tmp
  342.     gzip -d -c $(BOOK) > textbook.tmp
  343.     gnuchessr < input.tmp -b textbook.tmp -B gnuchess.data $(BOOKOPTS)
  344.     del input.tmp textbook.tmp
  345.  
  346. # The following doesn't work because binsort isn't ported
  347. gnuchess.eco: ecor.exe binsort.exe ecocvt.exe ecosort.exe
  348.     del gnuchess.eco step0.eco step1.eco step2.eco
  349.     echo 0 0 > step0.eco
  350.     ecor -b ..\book\eco.pgn -B step1.eco < step0.eco
  351.     ecosort 
  352.     ecocvt step2.eco gnuchess.eco
  353.     del step0.eco step1.eco step2.eco
  354.  
  355.