Fixed compile flags: -fopenmp now included properly, -D_XOPEN_SOURCE=700 needed by some functions to compile properly, removed repeated flags
Added -D_REENTRANT
more warnings and flags