Improve makefiles general structure