fix ccache enabled build, use separate build dir; cleanups