changes and fixes to makefile