Made Makefile more smart.

And it works properly!