Fix build error for linux.
Modify config file to make makefiles.
Update makefiles.
Fix warmings for linux.