Makefile improvements and warning fix

I'd like to propose the following Makefile hostname validation improvements. :)