Add .gitignore
Fix Makefiles for pthreads