makefiles: Generate dependencies for symlinks that are needed at build time.