Fix Makefile generation for simulation of functions.