build a static lib