These instructions cover building 32blit on Linux.
You'll need to install:
For local builds:
For 32Blit device builds:
gcc-arm-none-eabi, versions 7.x-9.x should work)New enough versions of these exist in at least Debian “buster” and Ubuntu 20.04.
Install them with apt like so:
sudo apt install git gcc g++ gcc-arm-none-eabi cmake make \ python3 python3-pip python3-setuptools \ libsdl2-dev libsdl2-image-dev libsdl2-net-dev unzip
And install the 32blit tools with pip3:
pip3 install 32blit
If you want to run code on 32Blit, you should now refer to Building & Running On 32Blit.
Set up the 32Blit Makefile from the root of the repository with the following commands:
mkdir build cd build cmake ..
Now to make any example, type:
make example-name
For example:
make raycaster
This will produce examples/raycaster/raycaster which you should run with:
./examples/raycaster/raycaster
Alternatively you can build everything by just typing:
make
When the build completes you should be able to run any example.
If you're running Ubuntu, Pop!_OS or similar you should be able to fix this for your current session by running:
source ~/.profile
Since $HOME/.local/bin is included in $PATH if it exists.
Otherwise, add something like the following to ~/.profile:
# set PATH so it includes user's private bin if it exists if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi
And make sure to “source” it to update your current session.
Now invoking 32blit should work.