tidy up build system a bit and add a static target for android