Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: [OS X] How to compile Crafty with Project Builder?

Author: Andreas Guettinger

Date: 14:10:27 07/21/02

Go up one level in this thread


On July 21, 2002 at 15:28:15, Manfred Schubert wrote:

>Is it possible to compile Crafty with Project Builder on OS X? If so, could
>somebody give me some kind of walk-through, please.
>
>Alternatively I guess it might be possible to compile it with GCC in the
>Terminal. That would be fine either.
>
>Thanks a lot!
>
>
>Manfred

Ok. I hope you are used to the terminal and have Projectbuilder, because there
are a few fixes to make in the Makefile an the header files. (Mr. Hyatt, when
you are reading this, it would be nice to have the fixes and a make darwin
opportunity in the next release. :) )

1. Get Crafty from ftp://ftp.cis.uab.edu/pub/hyatt/v18/crafty-18.15.tar.gz

2. make a new directory (i.e. src) in your home directory, move the
crafty-18.15.tar.gz there

4. Open terminal, type:
	cd src
	tar -zxvf crafty-18.15.tar.gz

5. There should be the crafty files now in the src/ directory. Open the file
Makefile in Projectbuilder. (Just drag it on the PB icon)

6. Scroll down until you see the following lines:

next:
	$(MAKE) target=NEXT \
		CC=/bin/cc CXX='$$(CC)' \
		CFLAGS='$(CFLAGS) -O2' \
		CXFLAGS='$(CFLAGS)' \
		LDFLAGS='$(LDFLAGS) $(CFLAGS)'
		opt='$(opt) -DCOMPACT_ATTACKS' \
		crafty-make

7. replace them with this:

next:
	$(MAKE) target=NEXT \
		CC=cc CXX='$$(CC)' \
		CFLAGS='$(CFLAGS) -O2' \
		CXFLAGS='$(CFLAGS)' \
		LDFLAGS='$(LDFLAGS) $(CFLAGS)' \
		opt='$(opt) -DCOMPACT_ATTACKS' \
		crafty-make

8. go to the file menu and save

9. now open the file utility.c in Projectbuilder. Scroll to line 36. Replace

#        include <bsd/termios.h>
with this:
#        include <sys/termios.h>

10. go to the file menu and save
11. go back to the terminal. type:
	make next

12. Now crafty should compile. There are some warnings in the egtb.cpp file.
Just ignore them. Done.

13. Type ./crafty.

Andreas Guettinger



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.