How to compile GRFCodec
-----------------------

Compiling GRFCodec is pretty straightforward. It can be done, with varying
quantities of automation, with MSVC (sort of -- see notes below), Cygwin's
gcc (using Makefile for a cygwin-dependant binary, and Makefile.win for a
cygwin-independent binary), any Linux gcc (using Makefile, for a Linux
binary), or any Linux gcc cross compiler (using Makefile.win, for a Win32
binary).

It may also be possible to build with Makefile using the Borland C Compiler,
but I am unable to test this.

Compiling with make
===================

The Makefiles will attempt to auto-detect:
- Whether you are building on Cygwin or Linux (ISCYGWIN)
- The name of your mingw cross compiler (PREFIX)
- The location of your boost includes (BOOST_VERSION and/or BOOST_INCLUDE)

If it gets these wrong, modify Makefile.setup appropriately, or set the
above mentioned controlling variables.
ISCYGWIN: 1 on cygwin and 0 on Linux.
PREFIX: the name of your g++ cross compiler, minus the "g++". (If your
    compiler is i586-ming32msvc-g++, PREFIX should be i586-ming32msvc-)
BOOST_VERSION is the version number of your boost install, in the same format
    that boost uses: x_yy for x.yy.0 versions and x_yy_z for x.yy.z versions.
BOOST_INCLUDE is the directory where your boost headers can be found. If you
    set BOOST_INCLUDE, is is not useful to also set BOOST_VERSION.

You may also set the following varibles:
NOREV: Set to 0 by default, set to 1 to remove the "rXXX" from the version
    number.
NO_BOOST: Set to 0 by default; set to 1 if make erroneously finds a boost
    install.
SVNVERSION: Set to svnversion . by default. If you're using TortoiseSVN,
    change Makefile.setup to set it to SubWCRev.exe . instead.


Targets
-------

The following are the most intersting targets. Other targets exist, but are
less useful.

all		Compile grfcodec, grfdiff, and grfmerge, using gcc
allb		Compile grfcodec, grfdiff, and grfmerge, using BCC

grfcodec
grfdiff
grfmerge	Compile the program in question, using gcc.
		Append _r to any of these to also strip/upx the resultant
		binary.

grfcodec.exe
grfdiff.exe
grfmerge.exe	Compile the program in question, using BCC.

release		Compile all three programs using gcc, then strip and upx
		them.

clean		Delete all compiled files
remake		Equivalent of "make clean all"



Compiling with Visual Studio 2003
=================================

Visual Studio can build grfcodec, but not grfdiff or grfmerge, in any of 5
different configurations:
Debug
Debug-NoVer
Release
Release-NoRev
Release-NoVer

Debug, Release, and Release-NoRev configurations use cygwin's make (which
they expect to find in C:\cygwin\bin) to make version.h and ttdpal.h, prior
to building grfcodec with Visual Studio's build engine. NoRev builds without
a revision number in the version string.
In the NoVer configurations, you are responsible for creating and updating
version.h. Instructions on how to do this live right next to the
#include "version.h" directive.

If you do not have boost, #define NO_BOOST near the beginning of readinfo.cc,
or add NO_BOOST to the preprocessor defines in the project settings.

All Release* targets expect to find upx in your PATH.

