The following guide will help you to compile Boost for the Nintendo DS using
devkitARM on Linux or Mac OS X (using the bash shell). Many Boost libraries
are header only and don't require linking with a built Boost component. That
said, if the library you want to use isn't header only, this guide will be your
guide. It assumes you have
environment variables already set-up properly. Thanks to davr for working with me to get boost
Some Environment Variables
First, you must set up some environment variables.
The boost source code comes with some bjam source code, too. We build it for our host platform (your PC) using the included bootstrap.sh script. In the root of the boost directory, do the following.
Configuring and Building Boost
Edit the generated project-config.jam file. We are telling jam to build boost with gcc 4.5.1 arm-eabi-g++. This is the version that devkitARM r32 provides. As devkitARM is changed, this too will need to change.
using gcc : 4.5.1 : arm-eabi-g++ ;
Next, we have to make sure that $OUTDIR exists and is writable. We can do that by creating one. Finally, we use the freshly built bjam binary to build for our target platform, the Nintendo DS, a non-thread-safe statically linkable boost library.
./bjam --toolset=gcc --prefix=$OUTDIR threading=single link=static install
In the End
Your compile should take a little while. Boost is quite big. Note that as the DS doesn't have an operating system to provide threads, anything that depends on threading will fail. In the end, you should get a message that looks similar to the following. Let me know if it turns out different for you.
...failed updating 40 targets...
...skipped 165 targets...
...updated 8369 targets...