Generate intermediate object files for unstd library.

This avoids problems with -unittest later.
Fix two warnings.
Fix Makefile dependencies. Always compile with -w.
Add changes to unstd as a patch.