a bit more fixing of makefiles and added documentation generation.