Update Makefile with using thread