Makefile fixed with regex

Actually I realized there was a much better way to handle my last PR with the Makefile. Sorry for the double PR, this method is definitely better I think =(