This should hopefully fix the Mac OS-X link failures

Also a bit of refactoring (less repetition of same sequences in the various Makefiles), uncomment the which compiler is used output, and misc cleanups.