Reorganize lib as a static library.