makefiles: Generate all the program rules inside the corresponding shell function.