add lpthread flag
improved makefile
added gitignore