Tuesday 29 November 2016

Compile Allegro 5.x for Raspberry Pi

I am in the process of porting Mayhem 2 to Allegro 5 (with the help of Jonas Karlsson), and wanted to compile the latest version of Allegro on the Pi, as only an older version is available through apt.

Install the dependencies
sudo apt-get install build-essential git cmake cmake-curses-gui xorg-dev libgl1-mesa-dev libglu-dev libpng-dev libcurl4-nss-dev libfreetype6-dev libjpeg-dev libvorbis-dev libopenal-dev libphysfs-dev libgtk2.0-dev libpulse-dev libflac-dev libdumb1-dev
Get the Code
git clone https://github.com/liballeg/allegro5.git
cd allegro5
Check out the version you want - see here for a list of versions
git checkout 5.2.1
Build it
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-raspberrypi.cmake
Install it
sudo make install
export PKG_CONFIG_PATH=/home/pi/allegro5/build/lib/pkgconfig
sudo ldconfig

No comments:

Post a Comment

Note: only a member of this blog may post a comment.