Fixed Makefile bug under linux; platform isolated withenv.py; base template