fix paths and add a kind of make file in R