Added support for building with "static" Qt libraries.
Some code refactoring: Now using an enum to set the output format instead of separate flags.
Some fixes.
Added build script.