Overhaul of the build system to work with rake-compile