Added log to show child termination status and minor cleanups.
Makefiles now query the enviroment variables to choose compiler and
build configuration.