Fixed compile flags: -fopenmp now included properly, -g only included if debug=1 and propagated through all files, -D_XOPEN_SOURCE=700 needed by some functions to compile properly, removed repeated flags