Modified scripts for compilation. More switches and support for both
old dpi flow and new dpi flow.