add multi-threads module and improve the makefile