Changed the makefile a little bit. NEXT: handle thread lock