Fixes to to makefile, dependencies