fixed documentation build erros and added makefile.