makefiles: Generate the top-level .gitignore and the distclean rules.