Modified Makefile and BuildEnv.mk for semi-generic enviro