Add a building script and Makefile for building stand-alone version

@markwu This work needs more discussion and refactor.

Related: #10 and #11