-
Notifications
You must be signed in to change notification settings - Fork 1
/
building.txt
50 lines (36 loc) · 1.89 KB
/
building.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Building
---------
o Raspberry Pi
If you want to build the code, you'll need to install the Allegro libraries first.
I used version 5.1.8, which I believe is the first version with support for Raspberry Pi.
To install it, I followed this tutorial:
http://joshua14.homelinux.org/blog/?p=1726
There's a pair of #defines at the top of game.h to set the target. Make sure these are:
#define RPI 1
#define WINDOWS 0
Having done this, change to the source directory and run the build script:
cd ~/gravstorm/src
./build.sh
Static vs Shared
The build script will build either an executable which expects shared-object versions of the allegro libraries,
or one which requires, and includes, static versions. The distributed executable (and default config of the
build script) is statically-linked to allegro, in the hope that this means that end-users don't need to
install allegro at all.
If you're building the code, you need to edit the build script to choose static or shared object linking, and
make sure that you built the Allegro5 libraries correspondingly.
The above tutorial produces shared-object libraries. To build static versions, I think I referred to this:
https://ventilatorxor.wordpress.com/2011/08/07/linux-allegro5-static-linking-for-beginners/
o Windows
I use Code:Blocks and MinGW to build under windows. The project file is included (gravstorm.cbp)
There's a tutorial for setting up allegro for codeblocks here:
https://wiki.allegro.cc/index.php?title=Windows,_Code::Blocks_and_Allegro_5
and a forum thread which includes all the things that weren't in the tutorial here :-)
https://www.allegro.cc/forums/thread/616089
I might update the tutorial if I get around to it....
There's a pair of #defines at the top of game.h to set the target. Make sure these are:
#define RPI 0
#define WINDOWS 1
Good Luck!
Ian
IPL 09/03/16