Fixed the Makefile to include -pthread on the commandline.  It is needed for pthreads apparently.  I also initialized the semaphores.  Not too much done, but a good little amount.