added build script for distribution, only tested on Linux.