Fix cross-build bugs

* clean out the build root and copy fresh from result dir if possible

* do not change directories to build, so the log will show which
  project failed

* fix CFLAGS and CXXFLAGS, which are not accepted by drm build.
  Append -m32/-m64 to CC/CXX variables instead.