Porting library to static library