Rework makefiles
Update gitignore
Fix build