Makefile fixes for parallel compilation.

Updated Makefiles to prevent errors when using make -j.
Added missing .gitignore
Minor fix in idManager_server to prevent warning