compiles to static library