add makefile; update R file