fix/update buildsystem
added flag for static build