Obtained from: Dave Borman <dab@cray.com>
This needs tidying up and having makefiles sorted out later. Reviewed by: Geoff Rehmet