Added automatic dependencies to makefile and fixed bug that'd would make think that the build was up-to-date.