build: Further build system improvements

 * more strict control over the order of object files passed to the linker
 * conditional inclusion of source files depending on the target arch
   (or any other variable)

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>