working on the Makefile a bit, added var.h trying to fix undefined references (externs from sim/extern.h declared in var.h)