compile to static library