Fixes compilation with gcc/clang, adds proper output directories, enables more warnings.

Signed-off-by: Mathias Garbe <mail@mathias-garbe.de>