Developing BabyChess
====================

The `etc' directory contains information about configuring, compiling, and
debugging. 

You need the Cook program to develop BabyChess.  Read the file
`etc/COOK'.  


Build Debugging Versions
------------------------

All non-source files are in the `bin' directory.  

Sample commands using the `chess_evaluator' program: 

$ sh/build chess_evaluator

	Compile the `chess_evaluator' program.  All modules that don't
	have a .hh file can be compiled into programs. 

$ sh/build bin/baby_chess_evaluator

	This command is equivalent to the one above.  Both commands create the
        file `bin/baby_chess_evaluator'.   


$ sh/build bin/gui_game.program-all

	Build all files that are needed to run the `gui_game'
        program.  This includes `bin/baby_gui_game' and other programs that are
        invoked by `baby_gui_game', such as `bin/baby_chess_evaluator'. 

Targets are documented in `Howto.cook'. 


Environment Variables That Affect Building
------------------------------------------

$build_type

	Determines the build type, possible values are:

	- "":  When $build_type is empty, a release version is
          built.  Each program is compiled in one single step, the macro
          `NDEBUG' is defined, and optimization flags are passed to the
          compiler.  
    	- "debug":  Build a debug version.  Modules are compiled
          separately, debugging flags are set for GCC. 
	- "none":  Don't define any special macros or flags for
          compilation.   

$CXXFLAGS

	Additional compilation flags for GCC.  Macros that should be
        defined for compilation can be added here using the `-D'
        option to GCC.  Read the GCC manual for compiler flags that
        will optimize the executable for your processor  (eg
        -march=athlon-xp) 

$verbose

	If non-empty, infos are printed during the build. 

$gcc

	The compiler.  Defaults to `g++'. 	

