More Makefile improvements. Implemented per-unit CXXFLAGS and misc.