Revert "Revert "makefile: Optimizations""

This reverts commit bd36730e03fc229cae96b32454d02ce2be0a1c6c.