[draft] autogenerate Makefiles