Added label in generated makefiles

If the $R label, corresponding to the current working directory, has not
been defined when executing the automatically generated makefile, it is
set to the directory returned by pwd.