added -lpthread in compilecommand of Makefile