Made makefile smarter