Updated Makefile to use locking system