Fixed Makefile.common for FC=f77 problem and fixed some environment variables.