Removing the linking of semaphores blocked by a thread and adding a Makefile