Fix makefile generation