update flattening makefile