Add support for legacy build conventions
Improve exporter test
Build the hal implementation and common sources separately to have proper
temporary relative paths