home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 22 gnu
/
22-gnu.zip
/
gnuch40.zip
/
gnuchess-4.0.pl79
/
src
/
Makefile.os2
< prev
next >
Wrap
Makefile
|
1999-01-16
|
14KB
|
344 lines
#
# Makefile for GNU Chess
#
# (Use this makefile when compiling under OS/2 using emx 0.9c + gcc 2.7.2.1)
# (Also use GNU make 3.71 or later)
#
# Copyright (c) 1992, 1995 Free Software Foundation
#
# This file is part of GNU CHESS.
#
# GNU Chess is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Chess is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Chess; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# gnuchess is a curses-based chess.
# gnuchessn is a fancy-display-curses-based chess.
# gnuchessr is a plain dumb-terminal chess (but with full variation output)
#
# The version number of this GNU release
VERS= 4.0
# Relevant file areas.
DIST= ../README ../README.lang ../doc ../misc ../src ../test
# size of book to make
# Listed below are the book options and the size of the resulting book,
# the default is small. Uncomment/comment the BOOKOPTS corresponding to
# the size you want.
#
BOOKOPTS = -S 188000 -P 26 #huge 1450k
#BOOKOPTS = -S 45000 -P 16 #big 540k
#BOOKOPTS = -S 20000 -P 12 #med 240k
#BOOKOPTS = -S 12000 -P 10 #small 144K
#BOOKOPTS = -S 9000 -P 8 #tiny 78K
# Distribution directory
DISTDIR= ../..
# Programs being distributed
PROGS=gnuchess-4.0.pl74/src gnuchess-4.0.pl74/misc gnuchess-4.0.pl74/doc
LIBS = $(DEFFILE) $(LCURSES)
BOOK=../book/gnuchess.bk3.gz
#BOOK=../book/gnuchess.gz
# Change these if desired, then compile.
# Where the binaries live.
#BINDIR= /gnuchess
#BINDIR1= \gnuchess
BINDIR= .
BINDIR1= .
# Where language description, our book, and the persistent hash live.
#LIBDIR= /gnuchess
#LIBDIR1= \gnuchess
LIBDIR= .
LIBDIR1= .
# Directory to install
INSTDIR=.. #
# Display routines.
#LCURSES=-lcurses -ltermcap # If you want to work via termcap
LCURSES= # If you have default ANSI screen support
# Definitions for LINK386
DEFFILE=gnuchess.def
# Table limits from gnuchess.h. These are given default values if not
# set here. The default values are given below, but you may want to
# check gnuchess.h to make sure.
# -Dttblsz=150001 Transposition table size. Small address space computers
# might try 8001. Setting ttblsz to 0 removes the transposition
# table
# -DBOOKSIZE=250000 Number of unique position/move combinations allowed.
# For MSDOS 10000 is used.
TABOPT=-DBOOKSIZE=250000 -Dttblsz=150001
#compile options for gnuchess
# Search options
# -DHISTORY use history killer hueristic
# -DKILLT use killt killer hueristic
# -DNULLMOVE include null move heuristic
# -DDEEPNULL include deepnull move heuristic
# -DUNLIMITEDCAPS allow unlimited depth captures
# -DPRUNE enable marginal forward pruning
# -DNOMATERIAL don't call it a draw when no pawns and both sides < rook
# -DNODYNALPHA don't dynamically adjust alpha
# -DOLDTIME use old ply time estimating function
# -DCACHE Cache static evaluations
# -DNODITHER no random element to evaluations
#
# Verbosity options
# -DBAREBONES compile for max speed no statictics etc kept
# -DQUIETBACKGROUND don't print post information in background ( easy OFF)
# -DHASHSTATS keep hash table statistics
# -DMORESTATS print more hash table stats
# -DQUIETBOOKGEN Don't print errors while loading a book or generating a binbook
# -DSEMIQUIETBOOKGEN Print less verbose errors while reading book or generating binbook
#
# Miscellaneous options
# -DHAVE_TIME_H have <time.h> header
# -DHAVE_STRTOUL if your machine supports strtoul() else strtol()
# -DHAVE_GETTIMEOFDAY use gettimeofday for more accurate timing
# -DHAVE_MEMSET if your machine supports memset
# -DECO if you want support for eco database
# -DCLIENT create client version for use with ICS
# -DLONG64 if you have 64bit longs
#
# -DDOSLIKE_ANSI_DISPLAY if you want not to use termcap,
# you have no curses library or curses display
# seems starnge
#
# Some debug options
# -DDEBUG8 dump board,movelist,input move to /tmp/DEBUG if illegal move
# -DDEBUG9 dump move list from test command
# -DDEBUG10 dump board and move after search before !easy begins
# -DDEBUG11 dump board when the move is output
# -DDEBUG12 dump boards between moves
# -DDEBUG13 dump search control information for each move to /tmp/DEBUG
# -DDEBUG33 dump book moves as read from book
# -DDEBUG40 include extra values of variables for debugging in game list
# -DDEBUG41 dump post output to /tmp/DEBUG
# the rest of the debug options are tied to the debuglevel command
# -DDEBUG -DDEBUG4 set up code for debuglevel command
# debuglevel
# 1 always force evaluation in evaluate
# 4 print move list after search
# 8 print move list after book before search
# 16 print move list after each ply of search
# 32 print adds to transposition table
# 64 print returns from transposition table lookups
# 128 print evals
# 256 print search tree as it is generated
# 512 debug trace of search tree
# 1024 interactive tree print
# 2048 non-interactive trace print
#
#
## normal
OPT= -DUSEINT -DCACHE -DGDX -DNULLMOVE -DWAY4PL64 -DHISTORY \
-DAGING -DKILLT -DUNLIMITEDCAPS -DPRUNE -DOLDTIME -DHASHSTATS \
-DHAVE_STRTOUL -DHAVE_MEMSET -DHAVE_GETTIMEOFDAY -DDOSLIKE_ANSI_DISPLAY \
$(TABOPT)
# The hashfile is a record of positions seen. It is used by
# GNU Chess to avoid making the same mistakes, a form of learning.
HASH= -DHASHFILE=\"$(LIBDIR)/gnuchess.hash\"
# The "book" is a record of the first few moves, for playing good
# moves easily and quickly, saving time, and irritating the human
# opponent.
BINBOOK = -DBINBOOK=\"$(LIBDIR)/gnuchess.dat\"
BINECO = -DBINECO=\"$(LIBDIR)/gnuchess.eco\"
PGNECO = -DPGNECO=\"$(LIBDIR)/eco.pgn\"
# The language file describes capabilities of the program. Perhaps
# it is useful for non-English speaking countries and customizing
# for their convenience and chess happiness.
LANGF= -DLANGFILE=\"$(LIBDIR)/gnuchess.lang\" \
-DSRCLANGFILE=\"../misc/gnuchess.lang\"
INSTALL=copy
#INSTALL=install -s
# The compiler used for compiling this software.
# Use this for a plain C compiler
#CC= cc $(OPT)
# Use this for DEC's ANSI C compiler on Ultrix
#CC= c89 $(OPT)
# Use this if you are lucky enough to have GNU CC.
CC= gcc $(OPT)
# Miscellaneous CFLAGS. Uncomment the one you need and comment
# the other.
CFLAGS= -O3 -fomit-frame-pointer -funroll-all-loops -Zmtd -Zomf -pipe -s
#CFLAGS= -O2 -funroll-loops # gnu cc
#CFLAGS= -O2 -p -Dinline="" -traditional-cpp
#CFLAGS= -O4 -Qpath . # SunOS cc using unprotoize
#CFLAGS= -O4 # Sun acc
#CFLAGS= -O2 # DEC ANSI C (c89) on Ultrix.
#CFLAGS= +O3 -Aa -D_HPUX_SOURCE # HPUX cc
#CFLAGS= -O -finline-functions -fstrength-reduce -D__mips -D__LANGUAGE_C # gnu cc 1.40 on DS5000
#CFLAGS= -O -finline-functions -fstrength-reduce # gnu cc 1.40 on others
#CFLAGS= -O2 -funroll-loops -D__mips -D__LANGUAGE_C # gnu cc 2.00 on DS5000
#CFLAGS= -O2 -D__alpha -D__LANGUAGE_C # gnu cc 2.00 on Flamingo
#CFLAGS= -O2 -funroll-loops -traditional-cpp # gnu cc 2.00 on SunOS
#CFLAGS= -O2 -acpp -signed -Wp,-traditional # IRIX 5.1.*?
#CFLAGS= -g -cckr -DNOMACROS -Dhuge="" #Correct flags for gnuchess 4.0 with IRIX cc.
all : gnuchess.exe gnuchesr.exe gnuchesn.exe postprint.exe gnuan.exe game.exe gnuchess.dat
gnuchess.exe: mainN.obj bookN.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomN.obj uxdsp.obj
$(CC) $(CFLAGS) $(HASH) $(LANGF) -o gnuchess.exe mainN.obj bookN.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomN.obj uxdsp.obj $(LIBS)
gnuan.exe: mainN.obj bookG.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchG.obj gnuan.obj
$(CC) $(CFLAGS) $(HASH) $(LANGF) -DIGNUAN -o gnuan.exe mainN.obj bookG.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchG.obj gnuan.obj $(LIBS)
Dgnuchesr.exe: mainDR.obj bookN.obj genmoveN.obj ataks.obj utilDR.obj evalDR.obj init.obj searchDR.obj dspcomDR.obj nondspDR.obj
$(CC) -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF) -o gnuchesr.exe mainDR.obj bookN.obj genmoveN.obj ataks.obj utilDR.obj evalDR.obj init.obj searchDR.obj dspcomDR.obj nondspDR.obj $(LIBS)
ecor.exe: mainN.obj eco.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomR.obj nondspR.obj
$(CC) $(CFLAGS) $(HASH) $(LANGF) -o ecor.exe mainN.obj eco.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomR.obj nondspR.obj $(LIBS)
gnuchesr.exe: mainN.obj bookN.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomR.obj nondspR.obj
$(CC) $(CFLAGS) $(HASH) $(LANGF) -o gnuchesr.exe mainN.obj bookN.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomR.obj nondspR.obj $(LIBS)
gnuchesn.exe: mainN.obj bookN.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomN.obj nuxdsp.obj
$(CC) $(CFLAGS) $(HASH) $(LANGF) -o gnuchesn.exe mainN.obj bookN.obj genmoveN.obj ataks.obj utilN.obj evalN.obj init.obj searchN.obj dspcomN.obj nuxdsp.obj $(LIBS)
game.exe: game.c gnuchess.h
$(CC) $(CFLAGS) -o game.exe game.c $(DEFFILE)
postprint.exe: postprint.obj
$(CC) $(CFLAGS) $(HASH) -o postprint.exe postprint.obj $(DEFFILE)
gnuan.obj: gnuan.c gnuchess.h version.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -DIGNUAN $(BINBOOK) -c gnuan.c
mainN.obj: main.c gnuchess.h version.h ttable.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) $(BINBOOK) -c -o mainN.obj main.c
mainDR.obj: main.c gnuchess.h version.h ttable.h
$(CC) -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF) $(BINBOOK) -c -o mainDR.obj main.c
genmoveN.obj: genmoves.c gnuchess.h version.h ttable.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -o genmoveN.obj -c genmoves.c
eco.obj: eco.c gnuchess.h version.h ataks.h ttable.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) $(BINBOOK) $(BINECO) $(PGNECO) -c eco.c
bookN.obj: book.c gnuchess.h version.h ataks.h ttable.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) $(BINBOOK) $(PGNECO) $(BINECO) -c -o bookN.obj book.c
bookG.obj: book.c gnuchess.h version.h ataks.h ttable.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) $(BINBOOK) $(PGNECO) $(BINECO) -DIGNUAN -c -o bookG.obj book.c
ataks.obj: ataks.h ataks.c gnuchess.h version.h ttable.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -c ataks.c
utilN.obj: util.c gnuchess.h version.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -c -o utilN.obj util.c
evalN.obj: eval.c gnuchess.h version.h ttable.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -c -o evalN.obj eval.c
evalDR.obj: eval.c gnuchess.h version.h ttable.h
$(CC) -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF) -c -o evalDR.obj eval.c
init.obj: init.c gnuchess.h version.h ttable.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -c init.c
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
$(CC) $(CFLAGS) $(HASH) $(LANGF) -c -o searchN.obj search.c
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
$(CC) $(CFLAGS) $(HASH) $(LANGF) -DIGUAN -c -o searchG.obj search.c
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
$(CC) -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF) -c -o searchDR.obj search.c
uxdsp.obj: uxdsp.c gnuchess.h version.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -c uxdsp.c
nuxdsp.obj: nuxdsp.c gnuchess.h version.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -c nuxdsp.c
nondspR.obj: nondsp.c gnuchess.h version.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -DNONDSP -c -o nondspR.obj nondsp.c
nondspDR.obj: nondsp.c gnuchess.h version.h
$(CC) -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF) -DNONDSP -c -o nondspDR.obj nondsp.c
dspcomN.obj: dspcom.c gnuchess.h version.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -c -o dspcomN.obj dspcom.c
dspcomR.obj: dspcom.c gnuchess.h version.h
$(CC) $(CFLAGS) $(HASH) $(LANGF) -DNONDSP -c -o dspcomR.obj dspcom.c
dspcomDR.obj: dspcom.c gnuchess.h version.h
$(CC) -DDEBUG -DDEBUG4 $(CFLAGS) $(HASH) $(LANGF) -DNONDSP -c -o dspcomDR.obj dspcom.c
postprint.obj: postprint.c gnuchess.h version.h
$(CC) $(CFLAGS) $(HASH) -c postprint.c
binsort.exe: binsort.c binsort.h
$(CC) $(CFLAGS) -o binsort.exe binsort.c
ecosort.exe: ecosort.c gnuchess.h
$(CC) $(CFLAGS) -o ecosort.exe ecosort.c
ecocvt.exe: ecocvt.c
$(CC) $(CFLAGS) -o ecocvt.exe ecocvt.c
gnuchess.dat: $(BOOK)
-del input.tmp
-del textbook.tmp
-del gnuchess.dat
echo 3 0 > input.tmp
echo quit >> input.tmp
gzip -d -c $(BOOK) > textbook.tmp
gnuchesr < input.tmp -b textbook.tmp -B gnuchess.dat $(BOOKOPTS)
del input.tmp
del textbook.tmp
# Currently eco support does not work on MSDOS, so this is not built:
gnuchess.eco: ecor.exe binsort.exe ecocvt.exe ecosort.exe
-del step0.eco
-del step1.eco
-del step2.eco
-del gnuchess.eco
echo 0 0 > step0.eco
ecor -b ../book/eco.pgn -B step1.eco < step0.eco
ecosort
ecocvt step2.eco gnuchess.eco
del step0.eco
del step1.eco
del step2.eco
install: inst
inst: all
copy *.exe $(INSTDIR)
copy *.dat $(INSTDIR)
copy ..\misc\gnuchess.lang $(INSTDIR)
clean:
-del *.obj
-del *.exe