add switching static or shared by -thin option