Static build method

I've cleaned up the build a bit and tried to get some kind of best-effort method of producing semi-static builds.