After much messing around, I was able to create a surprisingly compact bitbake recipe for compiling ARToolkit Plus in OpenEmbedded. Since qmake and qt3-embedded are already well-supported packages, it was just a matter of creating the right patch to the bizarrely placed “build/linux/options.pro” file. This turned out to be quite easy.
The two key things to know are that qmake really wants to use gcc for linking, and that hidden in the options.pro file are the cpu architecture flags. That just means the following options are needed:
QMAKE_CXXFLAGS = -march=armv5te -mtune=xscale
LIBS += -lstdc++ -lm
Then, it’s a matter of convincing qmake to use the existing qt3-embedded mkspec file. This was a bit tricky, and I’m still not sure I did it right. My solution was to throw a couple of exports into the recipe:
export ARTKP=${S}
export QMAKE="${STAGING_BINDIR_NATIVE}/qmake"
Then, voila, we have a recipe that yields an ipk that installs ARToolkit Plus into /usr/lib on our gumstix! If anyone wants it, feel free to grab the tarball and stick it in user.collections/packages.
Tarball of recipe: artkplus.tar.gz
IPK binary package: libartoolkitplus2_2.1.1-r0_armv5te.ipk