added some directives to the makefile to ensure environment is ready