ensuring makefile sets paths correctly and cleanup cruft