Fixed doubles promotion.
Added support code refactor to all Makefiles.