Compile in stages with build.sh