Refine the build system

Using a single bash script(android style) to do all the building stuff