Added Doxyfile as a basic configuration to create doxygen documentation from C++ code in src/ . Currently it is advisable to use 'make clean' before using doxygen to create documentation due to compilation pulling in extra C files into the source tree that can muddy the documentation.
Added .gitignore to ignore massive folders generated by Doxygen.
Fixed a problem with linking Jim found (replaced LDFLAGS from -lpthread to -pthread).
Small documentation and source formatting fixes.