The shared `build-libs` directory needs to be available for modules/packages that depend on the SDK before that package is eventually compiled. This also includes header files such as `esp32_idf_version.h`. Packages are downloaded, patched, prepared before any module is compiled. By adding the directory creation and header as a dependency of `PKG_PREPARE` we make sure the rules are ran before compilation starts.