Multi-threads support and Makefile change

1. multi-threads support.
2. fixed a bug in makefile.
3. Changed script to show build analysis.