changed main.c to semaphore.c and added a Makefile to compile code under linux