Compiling under GNU Linux

Now that we have already got the git repo, now its time to get the other sweeties needed to get it working. First install all the below packages and any added packages that come with it.

#apt-get install build-essential checkinstall libsdl-image1.2-dev libsdl-mixer1.2-dev freeglut3-dev liblua5.1-0-dev libtolua++5.1-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev remake

This would pull in something like 100+ MB of packages, let them install and configure it. Now let's start compiling the game. We need to go inside the dawn-rpg directory to compile :-

~/games/dawn-rpg $ ls

It will show lot of files. What we are looking for here is a file called .configure

~/games/dawn-rpg$ ls configure

Now let's give a whirl to this configure program. The configure program now simply looks if all the dependencies are satisfied to give a makefile.

~/games/dawn-rpg$ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no ........................... ..........................

If all the dependencies are satisfied it will give a statement at the end. Something like this :-

configure: creating ./config.status config.status: creating Makefile config.status: executing depfiles commands

If we get this statement, that means the .configure part was successful and it has created something called a Makefile. So now,we ask 'remake' to do the needful. Remake is better in the sense it is also a improves error reporting and debugging rather than make.

~/games/dawn-rpg$ remake -f Makefile

Depending on your processor's speed and memory, it should spit out a binary called dawn-rpg and a shell-script called dawn-starter.sh at the end if successful. So we simply do :-

~/games/dawn-rpg$ ./dawn-starter.sh

That's it for compiling dawn-rpg