Fix auto-generation of Makefiles to have the correct dependencies
Ignore .rej files