gcc example.cpp -lsomelibrarywmii build files have the shared libraries located before the source files, and thus can not be easily built with the default configuration.
To build wmii I updated the config.mk to use gcc-4.4 for the compiler
CC = gcc-4.4 -c LD = gcc-4.4This allowed the project to compiled with the following command:
dpkg-buildpackage -rfakeroot -us -uc -b