The recommended way to build gringo is using the build system cmake. There are
also some handwritten Makefiles, but these may be deleted in future releases. 
WARNING: Using these Makefiles will interfere with the cmake builds. If the 
handwritten Makefiles were used, make shure that to type "make clean" before 
using cmake.
To build the lexers used by gringo the lexer-generator re2c is needed.

The usual way to compile and install gringo should be:
./init.sh
cd build/clingof/release/
make
cp bin/clingof <somewhere-in-your-path>

1 Configuration

There is a script called init.sh simplifying the build process. This script is 
capable of initializing out-of-source builds to build different versions of
gringo.

1.1 gringo 
###CURRENTLY NOT SUPPORTED!!!
Calling init.sh without arguments will create the folder build/gringo/release
which contains all files to build a pure grounder. To build the project change 
into the folder.

1.2 clingo

To build clingo call init.sh with the option --clingo. Then change into the
folder build/clingo/release.

1.3 iclingo
###CURRENTLY NOT SUPPORTED!!!
To build iclingo call init.sh with the option --iclingo. Then change into the
folder build/iclingo/release.

1.2 Additional Options

The init.sh script takes some additional options i.e. --debug this will also 
create a debug subfolder which can be used to build the project with debug
information. Call init.sh with --help to get a list of all possible options and 
short descriptions.

2 Compilation

Change into the folder build/{clingof,iclingof}/{release,debug} and type
"make". Alternativly you can call the script build.sh which compiles everything
inside build.

3 Installation

Although make install should work it is sufficient to copy the binary inside
build/{clingof,iclingof}/{release,debug}/bin somewhere in your path or use
the binary directly.
