fixed some mistakes in makefiles and updated .gitignore