erts: Move compiler flags generation

Move the call to utils/make_compiler_flags to after _create_dirs
to make sure that the dirs are created before we try to generate files
in there. This seems to work with parallel make as well, but I cannot
find any documentation that says that it should or should not work.
erts: Fix resolve of generated files for depend