autogenerate patches, made the whole makefile more genric to be used for other packages as well in the future