Examples makefiles: harmonization and cleaning.

Remove some unneeded linker flags, add some missing headers dependencies,
same optimization and debug options for all.