fixed compile warning in semaphore.cc and fixed makefile to build in linux