Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Crafty Makefile help

Author: Robert Hyatt

Date: 08:54:41 02/10/03

Go up one level in this thread


On February 09, 2003 at 01:35:16, Jeff White wrote:

>I'm really new to C++ programming and I'm JUST getting compiling. I just
>compiled  Crafty v17.2 for DOS and I wanted to try and do the same for Crafty
>18.15. The makefiles are obviously different. I am using DJGPP for Dos as my
>compiler. I need to know a few things: Here is a part of the makefile:
>
>#help:
>#	@echo "You must specify the system which you want to compile for:"
>#	@echo ""
>#	@echo "make aix              IBM AIX"
>#	@echo "make alpha            DEC Alpha with OSF/1-Digital UNIX"
>#	@echo "make alpha-host       Alpha DECstation optimized for host"
>#	@echo "make alpha-host-nocix Alpha DECstation optimezed for host, no
>CIX insn"
>#	@echo "make cygwin           Cygwin under Win32"
>#	@echo "make dos              DOS on i386 with DJGPP"
>#	@echo "make hpux             HP/UX 9/10, /7xx"
>#	@echo "make linux            Linux optimized for i386"
>#	@echo "make linux-elf        Linux optimized for i386, ELF format"
>#	@echo "make linux-i686       Linux optimized for i686"
>#	@echo "make linux-i686-elf   Linux optimized for i686, ELF format"
>#	@echo "make linux-alpha      Linux optimized for alpha"
>#	@echo "make freebsd          FreeBSD"
>#	@echo "make freebsd-pgcc     FreeBSD using Pentium GNU cc"
>#	@echo "make netbsd           NetBSD"
>#	@echo "make netbsd-i386      NetBSD optimized for i386"
>#	@echo "make netbsd-i386-elf  NetBSD optimized for i386, ELF format"
>#	@echo "make netbsd-sparc     NetBSD optimized for sparc"
>#	@echo "make next             NeXTSTEP"
>#	@echo "make os2              IBM OS/2 Warp"
>#	@echo "make sgi              SGI running IRIX"
>#	@echo "make solaris          Solaris 2.x"
>#	@echo "make solaris-gcc      Solaris 2.x using GNU cc"
>#	@echo ""
>#	@echo "make generic          Try this one if your system isn't listed
>above;"
>#	@echo "                      it assumes you have installed GNU cc"
>#	@echo ""
>
>I am assuming these are the same as REM files were to basic? If not, please let
>me know. Here is another piece
>


@ means "execute silently" without echoing the actual command being
executed.  "echo" simply displays text.  The above simply enumerates all the
possible makefile 'targets' so that you can choose the best one.


>#dos:
>	$(MAKE) target=DOS \
>		CC=gcc CXX='$$(CC)' \
>#		CFLAGS='$(CFLAGS) -fomit-frame-pointer -m486 -O3' \
>#		CXFLAGS='$(CFLAGS)' \
>#		LDFLAGS='$(LDFLAGS)' \
>#		opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \
>#		     -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B' \
>#		asm='X86.o' \
>#		crafty-make
>



any line with a # on the front is a comment.  I don't know why those are
commented
out but with them "out" it clearly isn't going to "make" anything.

CC identifies the name of the C compiler, normally "gcc".  cxx is the name of
the
C++ compiler, normally g++ but for djgpp I am not sure.

CFLAGS are options to pass to the compiler.  IE -O3 says do "full optimization".
CXFLAGS are passed to the C++ compiler.
LDFLAGS are passed to the loader
opt is used to define the crafty options you want.  The above says use the
"compact
attacks" stuff (which is correct for everyone generally), the other three have
to do
with using the X86.s assembly code.




>Could someone tell me what each line means and does so I can get a better grip
>on all of this? Thanks for any help that is provided. The docs with the program
>are very confusing so ANY help that is provide really is appreciated. Thanks a
>lot.
>
>Regards,
>Jeff



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.