Mail Archives: djgpp/2000/05/15/03:22:22
Josh Haglund wrote:
>I need to know how to compile Crafty (a chess program).
>Does anyone know how?
You need to edit the Makefile, that comes with crafty. IIRC, the
Makefile is set up for Linux by default. You have to comment the
linux lines and look for Dos lines. (There are instructions at the
start of the Makefile.)
I used the following (with an older crafty version).
target = DOS
CC = gcc
ASM = as
# add -march=p5 or similiar and
# -fomit-frame-pointer, to possibly get a faster crafty
CFLAGS = -Wall -g -O2
LDFLAGS = -g
opt = -DCOMPACT_ATTACKS -DUSE_SPLIT_SHIFTS -DUSE_ATTACK_FUNCTIONS \
-DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B
asm = X86.o
Comment the similar lines for Linux. Then run make in the crafty
directory.
IIRC, I had to add the following line to the Makefile, at the end.
X86.o: X86.S
$(CC) -c $(CFLAGS) $(opts) X86.S
If you need crafty for a windows DOS-shell, you can download a
precompiled binary from Robert Hyatt's site.
--
Regards, Dieter Buerssner
- Raw text -